From a4587deac5ab0eb0d3bbdfc8aeb3a9cf90c3b4a4 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Mon, 1 Feb 2021 09:12:51 -0800 Subject: [PATCH] adding cic-eth as sub dir --- apps/cic-eth/.coveragerc | 7 + apps/cic-eth/.envrc_dev_example | 12 + apps/cic-eth/.envrc_example | 21 + apps/cic-eth/.gitignore | 8 + apps/cic-eth/.gitlab-ci.yml | 11 + apps/cic-eth/CHANGELOG | 114 + apps/cic-eth/LICENSE.txt | 674 + apps/cic-eth/cic_eth/__init__.py | 10 + apps/cic-eth/cic_eth/admin/ctrl.py | 125 + apps/cic-eth/cic_eth/admin/debug.py | 12 + apps/cic-eth/cic_eth/admin/nonce.py | 128 + apps/cic-eth/cic_eth/api/__init__.py | 8 + apps/cic-eth/cic_eth/api/api_admin.py | 445 + apps/cic-eth/cic_eth/api/api_task.py | 431 + apps/cic-eth/cic_eth/callbacks/__init__.py | 1 + apps/cic-eth/cic_eth/callbacks/callback.py | 16 + apps/cic-eth/cic_eth/callbacks/http.py | 64 + apps/cic-eth/cic_eth/callbacks/noop.py | 21 + apps/cic-eth/cic_eth/callbacks/redis.py | 24 + apps/cic-eth/cic_eth/callbacks/tcp.py | 24 + apps/cic-eth/cic_eth/db/__init__.py | 61 + apps/cic-eth/cic_eth/db/enum.py | 51 + apps/cic-eth/cic_eth/db/error.py | 9 + .../cic_eth/db/migrations/default/README | 1 + .../cic_eth/db/migrations/default/alembic.ini | 85 + .../cic_eth/db/migrations/default/env.py | 77 + .../db/migrations/default/script.py.mako | 24 + .../2a07b543335e_add_new_syncer_table.py | 35 + .../versions/49b348246d70_add_nonce_index.py | 29 + .../52c7c59cd0b1_add_account_roles.py | 31 + .../6ac7a1dadc46_add_otx_state_log.py | 30 + ...bd_add_attempts_and_version_log_for_otx.py | 31 + .../7cb65b893934_add_blocknumber_pointer.py | 31 + .../versions/7e8d7626e38f_add_block_sync.py | 45 + .../8593fa1ca0f4_add_transaction_queue.py | 35 + .../versions/89e1e9baa53c_add_account_lock.py | 33 + .../9c4bd7491015_rename_block_sync_table.py | 26 + .../9daa16518a91_add_tx_sync_state.py | 30 + ...e2aab8f331_add_date_accessed_to_txcache.py | 34 + .../versions/cd2052be6db2_convert_tx_index.py | 34 + .../versions/df19f4e69676_add_tx_track.py | 31 + .../default/versions/e3b5330ee71c_.py | 38 + .../db/migrations/postgresql/alembic.ini | 85 + .../cic_eth/db/migrations/postgresql/env.py | 77 + .../db/migrations/postgresql/script.py.mako | 24 + .../2a07b543335e_add_new_syncer_table.py | 35 + .../versions/49b348246d70_add_nonce_index.py | 29 + .../52c7c59cd0b1_add_account_roles.py | 31 + .../6ac7a1dadc46_add_otx_state_log.py | 30 + ...bd_add_attempts_and_version_log_for_otx.py | 31 + .../7cb65b893934_add_blocknumber_pointer.py | 31 + .../versions/7e8d7626e38f_add_block_sync.py | 42 + .../8593fa1ca0f4_add_transaction_queue.py | 35 + .../versions/89e1e9baa53c_add_account_lock.py | 32 + .../9c4bd7491015_rename_block_sync_table.py | 26 + .../9daa16518a91_add_tx_sync_state.py | 30 + ...e2aab8f331_add_date_accessed_to_txcache.py | 33 + .../versions/cd2052be6db2_convert_tx_index.py | 34 + .../versions/df19f4e69676_add_tx_track.py | 31 + .../postgresql/versions/e3b5330ee71c_.py | 38 + apps/cic-eth/cic_eth/db/models/base.py | 73 + apps/cic-eth/cic_eth/db/models/convert.py | 55 + apps/cic-eth/cic_eth/db/models/lock.py | 190 + apps/cic-eth/cic_eth/db/models/nonce.py | 86 + apps/cic-eth/cic_eth/db/models/otx.py | 455 + apps/cic-eth/cic_eth/db/models/role.py | 117 + apps/cic-eth/cic_eth/db/models/sync.py | 168 + apps/cic-eth/cic_eth/db/models/tx.py | 162 + apps/cic-eth/cic_eth/db/util.py | 8 + apps/cic-eth/cic_eth/error.py | 61 + apps/cic-eth/cic_eth/eth/__init__.py | 16 + apps/cic-eth/cic_eth/eth/account.py | 365 + apps/cic-eth/cic_eth/eth/bancor.py | 385 + apps/cic-eth/cic_eth/eth/factory.py | 41 + apps/cic-eth/cic_eth/eth/gas.py | 71 + apps/cic-eth/cic_eth/eth/nonce.py | 23 + apps/cic-eth/cic_eth/eth/request.py | 194 + apps/cic-eth/cic_eth/eth/rpc.py | 39 + apps/cic-eth/cic_eth/eth/task.py | 136 + apps/cic-eth/cic_eth/eth/token.py | 447 + apps/cic-eth/cic_eth/eth/tx.py | 681 + apps/cic-eth/cic_eth/eth/util.py | 102 + apps/cic-eth/cic_eth/queue/__init__.py | 4 + apps/cic-eth/cic_eth/queue/tx.py | 654 + apps/cic-eth/cic_eth/runnable/ctrl.py | 148 + apps/cic-eth/cic_eth/runnable/dispatcher.py | 162 + apps/cic-eth/cic_eth/runnable/manager.py | 410 + apps/cic-eth/cic_eth/runnable/retry.py | 214 + apps/cic-eth/cic_eth/runnable/server_agent.py | 173 + apps/cic-eth/cic_eth/runnable/tag.py | 77 + apps/cic-eth/cic_eth/runnable/tasker.py | 238 + apps/cic-eth/cic_eth/runnable/view.py | 177 + apps/cic-eth/cic_eth/sync/__init__.py | 1 + apps/cic-eth/cic_eth/sync/backend.py | 196 + apps/cic-eth/cic_eth/sync/base.py | 51 + apps/cic-eth/cic_eth/sync/error.py | 4 + apps/cic-eth/cic_eth/sync/head.py | 51 + apps/cic-eth/cic_eth/sync/history.py | 74 + apps/cic-eth/cic_eth/sync/mempool.py | 50 + apps/cic-eth/cic_eth/sync/mined.py | 103 + apps/cic-eth/cic_eth/sync/retry.py | 71 + apps/cic-eth/cic_eth/version.py | 43 + apps/cic-eth/config/bancor.ini | 2 + apps/cic-eth/config/celery.ini | 3 + apps/cic-eth/config/cic.ini | 8 + apps/cic-eth/config/custody.ini | 2 + apps/cic-eth/config/database.ini | 9 + apps/cic-eth/config/dispatcer.ini | 2 + apps/cic-eth/config/eth.ini | 8 + apps/cic-eth/config/lash/bancor.ini | 3 + apps/cic-eth/config/lash/database.ini | 8 + apps/cic-eth/config/lash/eth.ini | 3 + apps/cic-eth/config/lash/redis.ini | 3 + apps/cic-eth/config/lash/signer.ini | 2 + apps/cic-eth/config/lash/ssl.ini | 6 + apps/cic-eth/config/lash/syncer.ini | 2 + apps/cic-eth/config/redis.ini | 4 + apps/cic-eth/config/signer.ini | 5 + apps/cic-eth/config/ssl.ini | 6 + apps/cic-eth/config/syncer.ini | 2 + apps/cic-eth/config/tasks.ini | 3 + apps/cic-eth/config/test/accounts.ini | 2 + apps/cic-eth/config/test/bancor.ini | 2 + apps/cic-eth/config/test/celery.ini | 5 + apps/cic-eth/config/test/cic.ini | 8 + apps/cic-eth/config/test/database.ini | 9 + apps/cic-eth/config/test/dispatcher.ini | 2 + apps/cic-eth/config/test/eth.ini | 8 + apps/cic-eth/config/test/redis.ini | 4 + apps/cic-eth/config/test/signer.ini | 5 + apps/cic-eth/config/test/ssl.ini | 6 + apps/cic-eth/config/test/syncer.ini | 2 + .../crypto_dev_signer_config/config.ini | 4 + .../crypto_dev_signer_config/database.ini | 8 + apps/cic-eth/doc/flowcharts/Makefile | 15 + apps/cic-eth/doc/flowcharts/account_tasks.dot | 21 + apps/cic-eth/doc/flowcharts/balance_tasks.dot | 16 + apps/cic-eth/doc/flowcharts/callback_gift.dot | 10 + apps/cic-eth/doc/flowcharts/convert_tasks.dot | 57 + .../doc/flowcharts/converttransfer_tasks.dot | 15 + apps/cic-eth/doc/flowcharts/dispatch.dot | 159 + apps/cic-eth/doc/flowcharts/readme | 3 + .../cic-eth/doc/flowcharts/register_tasks.dot | 12 + apps/cic-eth/doc/flowcharts/send_tasks.dot | 17 + .../doc/flowcharts/transaction_semantic.dot | 104 + .../doc/flowcharts/transaction_tasks.dot | 22 + .../transferauthorization_tasks.dot | 65 + apps/cic-eth/doc/flowcharts/tx_tasks.dot | 9 + apps/cic-eth/doc/sphinx/Makefile | 20 + apps/cic-eth/doc/sphinx/code.rst | 56 + apps/cic-eth/doc/sphinx/conf.py | 57 + apps/cic-eth/doc/sphinx/index.rst | 19 + .../cic-eth/doc/texinfo/old.20210107/Makefile | 5 + .../cic-eth/doc/texinfo/old.20210107/api.texi | 34 + .../doc/texinfo/old.20210107/index.texi | 28 + .../doc/texinfo/old.20210107/overview.texi | 42 + .../doc/texinfo/old.20210107/queue.texi | 0 .../cic-eth/doc/texinfo/old.20210107/run.texi | 34 + .../doc/texinfo/old.20210107/setup.texi | 98 + .../texinfo/old.20210107/transactions.texi | 26 + apps/cic-eth/doc/texinfo/overview.texi | 24 + apps/cic-eth/docker/Dockerfile | 43 + apps/cic-eth/docker/db.sh | 4 + apps/cic-eth/docker/start_dispatcher.sh | 5 + apps/cic-eth/docker/start_manager.sh | 5 + apps/cic-eth/docker/start_retry.sh | 5 + apps/cic-eth/docker/start_tasker.sh | 29 + apps/cic-eth/examples/api_callback.py | 76 + apps/cic-eth/requirements.txt | 18 + apps/cic-eth/scripts/generator.py | 181 + apps/cic-eth/scripts/insert_tx.py | 57 + apps/cic-eth/scripts/migrate.py | 56 + apps/cic-eth/setup.cfg | 49 + apps/cic-eth/setup.py | 27 + apps/cic-eth/test_requirements.txt | 7 + apps/cic-eth/tests/conftest.py | 47 + apps/cic-eth/tests/fixtures_account.py | 30 + apps/cic-eth/tests/fixtures_bancor.py | 234 + apps/cic-eth/tests/fixtures_celery.py | 57 + apps/cic-eth/tests/fixtures_config.py | 27 + apps/cic-eth/tests/fixtures_database.py | 58 + apps/cic-eth/tests/fixtures_faucet.py | 74 + apps/cic-eth/tests/fixtures_keystore.py | 52 + apps/cic-eth/tests/fixtures_registry.py | 10 + apps/cic-eth/tests/fixtures_token.py | 27 + .../tests/fixtures_transferapproval.py | 30 + apps/cic-eth/tests/fixtures_web3.py | 203 + apps/cic-eth/tests/functional/test_admin.py | 215 + apps/cic-eth/tests/functional/test_app.py | 162 + apps/cic-eth/tests/tasks/test_account.py | 128 + apps/cic-eth/tests/tasks/test_convert.py | 45 + apps/cic-eth/tests/tasks/test_faucet.py | 66 + apps/cic-eth/tests/tasks/test_gas_tasks.py | 246 + apps/cic-eth/tests/tasks/test_lock_tasks.py | 355 + apps/cic-eth/tests/tasks/test_nonce_tasks.py | 49 + apps/cic-eth/tests/tasks/test_otx_tasks.py | 174 + apps/cic-eth/tests/tasks/test_states.py | 125 + apps/cic-eth/tests/tasks/test_token_tasks.py | 42 + .../tests/tasks/test_transfer_approval.py | 76 + apps/cic-eth/tests/tasks/test_tx_tasks.py | 168 + apps/cic-eth/tests/test_basic.py | 10 + apps/cic-eth/tests/test_sign.py | 27 + .../tests/testdata/abi/AccountRegistry.json | 1 + .../cic-eth/tests/testdata/abi/Converter.json | 1 + .../tests/testdata/abi/ConverterRegistry.json | 1 + apps/cic-eth/tests/testdata/abi/ERC20.json | 1 + apps/cic-eth/tests/testdata/abi/Faucet.json | 1 + apps/cic-eth/tests/testdata/abi/Network.json | 1 + apps/cic-eth/tests/testdata/abi/Registry.json | 1 + .../tests/testdata/abi/RegistryClient.json | 1 + .../tests/testdata/abi/TransferApproval.json | 1 + .../tests/testdata/bancor/BancorFormula.json | 151530 +++++++++++++++ .../tests/testdata/bancor/BancorNetwork.json | 56968 ++++++ .../tests/testdata/bancor/BancorX.json | 24111 +++ .../bancor/ChainlinkETHToETHOracle.json | 704 + .../testdata/bancor/ContractRegistry.json | 8533 + .../bancor/ContractRegistryClient.json | 5708 + .../testdata/bancor/ConversionPathFinder.json | 14790 ++ .../tests/testdata/bancor/ConverterBase.json | 28012 +++ .../testdata/bancor/ConverterFactory.json | 5936 + .../testdata/bancor/ConverterRegistry.json | 40060 ++++ .../bancor/ConverterRegistryData.json | 17181 ++ .../testdata/bancor/ConverterUpgrader.json | 18634 ++ .../ConverterV27OrLowerWithFallback.json | 6022 + .../ConverterV27OrLowerWithoutFallback.json | 6017 + .../ConverterV28OrHigherWithFallback.json | 6035 + .../ConverterV28OrHigherWithoutFallback.json | 6031 + .../tests/testdata/bancor/ERC20Token.json | 7601 + .../tests/testdata/bancor/EtherToken.json | 6043 + .../tests/testdata/bancor/GiftableToken.json | 9682 + .../tests/testdata/bancor/IBancorFormula.json | 2929 + .../tests/testdata/bancor/IBancorX.json | 837 + .../testdata/bancor/IBancorXUpgrader.json | 326 + .../bancor/IChainlinkPriceOracle.json | 372 + .../testdata/bancor/IContractRegistry.json | 309 + .../bancor/IConversionPathFinder.json | 420 + .../tests/testdata/bancor/IConverter.json | 4484 + .../testdata/bancor/IConverterAnchor.json | 296 + .../testdata/bancor/IConverterFactory.json | 1167 + .../testdata/bancor/IConverterRegistry.json | 3090 + .../bancor/IConverterRegistryData.json | 4018 + .../testdata/bancor/IConverterUpgrader.json | 372 + .../tests/testdata/bancor/IERC20Token.json | 1914 + .../tests/testdata/bancor/IEtherToken.json | 869 + .../testdata/bancor/ILegacyConverter.json | 55374 ++++++ .../bancor/ILiquidityPoolV2Converter.json | 1578 + .../cic-eth/tests/testdata/bancor/IOwned.json | 441 + .../testdata/bancor/IPoolTokensContainer.json | 1066 + .../tests/testdata/bancor/IPriceOracle.json | 1260 + .../tests/testdata/bancor/ISmartToken.json | 1013 + .../tests/testdata/bancor/ITokenHolder.json | 492 + .../bancor/ITypedConverterAnchorFactory.json | 584 + .../bancor/ITypedConverterCustomFactory.json | 243 + .../bancor/ITypedConverterFactory.json | 636 + .../tests/testdata/bancor/IWhitelist.json | 309 + .../testdata/bancor/LiquidTokenConverter.json | 19724 ++ .../bancor/LiquidTokenConverterFactory.json | 1529 + .../bancor/LiquidityPoolConverter.json | 2866 + .../bancor/LiquidityPoolV1Converter.json | 61559 ++++++ .../LiquidityPoolV1ConverterFactory.json | 1502 + .../bancor/LiquidityPoolV2Converter.json | 48459 +++++ ...LiquidityPoolV2ConverterAnchorFactory.json | 1280 + ...LiquidityPoolV2ConverterCustomFactory.json | 1093 + .../LiquidityPoolV2ConverterFactory.json | 1480 + .../tests/testdata/bancor/NewConverter.json | 6068 + .../testdata/bancor/NonStandardToken.json | 13416 ++ .../bancor/NonStandardTokenDetailed.json | 13457 ++ .../tests/testdata/bancor/OldConverter.json | 6058 + apps/cic-eth/tests/testdata/bancor/Owned.json | 2531 + .../testdata/bancor/PoolTokensContainer.json | 5939 + .../tests/testdata/bancor/PriceOracle.json | 10562 + .../testdata/bancor/ReentrancyGuard.json | 886 + .../tests/testdata/bancor/SafeMath.json | 2968 + .../tests/testdata/bancor/SmartToken.json | 6049 + .../testdata/bancor/TestBancorFormula.json | 5257 + .../testdata/bancor/TestBancorNetwork.json | 7046 + .../bancor/TestChainlinkPriceOracle.json | 1148 + .../bancor/TestContractRegistryClient.json | 552 + .../testdata/bancor/TestConverterFactory.json | 2080 + .../bancor/TestConverterRegistry.json | 2635 + .../bancor/TestLiquidityPoolV1Converter.json | 3038 + .../bancor/TestLiquidityPoolV2Converter.json | 4180 + .../testdata/bancor/TestNonStandardToken.json | 13558 ++ .../TestNonStandardTokenWithoutDecimals.json | 13514 ++ .../testdata/bancor/TestReentrancyGuard.json | 2725 + .../bancor/TestReentrancyGuardAttacker.json | 2801 + .../tests/testdata/bancor/TestSafeMath.json | 1830 + .../testdata/bancor/TestStandardToken.json | 13594 ++ .../testdata/bancor/TestTokenHandler.json | 1618 + .../TestTypedConverterAnchorFactory.json | 1564 + .../tests/testdata/bancor/TokenHandler.json | 5249 + .../tests/testdata/bancor/TokenHolder.json | 1293 + apps/cic-eth/tests/testdata/bancor/Utils.json | 2066 + .../tests/testdata/bancor/Whitelist.json | 3640 + .../testdata/bancor/XTransferRerouter.json | 1948 + apps/cic-eth/tests/unit/api/test_callback.py | 167 + apps/cic-eth/tests/unit/db/test_block_sync.py | 29 + .../tests/unit/db/test_db_convert_transfer.py | 29 + apps/cic-eth/tests/unit/db/test_default.py | 5 + apps/cic-eth/tests/unit/db/test_lock.py | 67 + apps/cic-eth/tests/unit/db/test_nonce_db.py | 20 + apps/cic-eth/tests/unit/db/test_otx.py | 84 + apps/cic-eth/tests/unit/db/test_queue.py | 55 + apps/cic-eth/tests/unit/db/test_role.py | 29 + apps/cic-eth/tests/unit/db/test_tx.py | 124 + apps/cic-eth/tests/unit/eth/test_bancor.py | 129 + apps/cic-eth/tests/unit/eth/test_nonce.py | 51 + apps/cic-eth/tests/unit/eth/test_raw.py | 24 + apps/cic-eth/tests/unit/eth/test_token.py | 88 + .../tests/unit/queue/test_otx_state_log.py | 22 + .../tests/unit/queue/test_queue_lock.py | 65 + .../cic-eth/tests/unit/queue/test_tx_queue.py | 500 + apps/cic-eth/tests/unit/sync/test_head.py | 43 + apps/cic-eth/tests/unit/sync/test_history.py | 194 + .../tests/unit/sync/test_syncer_scratch.py | 79 + apps/cic-eth/tests/unit/util/test_num.py | 19 + apps/cic-eth/tests/unit/util/test_unpack.py | 30 + 317 files changed, 819441 insertions(+) create mode 100644 apps/cic-eth/.coveragerc create mode 100644 apps/cic-eth/.envrc_dev_example create mode 100644 apps/cic-eth/.envrc_example create mode 100644 apps/cic-eth/.gitignore create mode 100644 apps/cic-eth/.gitlab-ci.yml create mode 100644 apps/cic-eth/CHANGELOG create mode 100644 apps/cic-eth/LICENSE.txt create mode 100644 apps/cic-eth/cic_eth/__init__.py create mode 100644 apps/cic-eth/cic_eth/admin/ctrl.py create mode 100644 apps/cic-eth/cic_eth/admin/debug.py create mode 100644 apps/cic-eth/cic_eth/admin/nonce.py create mode 100644 apps/cic-eth/cic_eth/api/__init__.py create mode 100644 apps/cic-eth/cic_eth/api/api_admin.py create mode 100644 apps/cic-eth/cic_eth/api/api_task.py create mode 100644 apps/cic-eth/cic_eth/callbacks/__init__.py create mode 100644 apps/cic-eth/cic_eth/callbacks/callback.py create mode 100644 apps/cic-eth/cic_eth/callbacks/http.py create mode 100644 apps/cic-eth/cic_eth/callbacks/noop.py create mode 100644 apps/cic-eth/cic_eth/callbacks/redis.py create mode 100644 apps/cic-eth/cic_eth/callbacks/tcp.py create mode 100644 apps/cic-eth/cic_eth/db/__init__.py create mode 100644 apps/cic-eth/cic_eth/db/enum.py create mode 100644 apps/cic-eth/cic_eth/db/error.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/README create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/alembic.ini create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/env.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/script.py.mako create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/2a07b543335e_add_new_syncer_table.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/49b348246d70_add_nonce_index.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/52c7c59cd0b1_add_account_roles.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/6ac7a1dadc46_add_otx_state_log.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/7cb65b893934_add_blocknumber_pointer.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/7e8d7626e38f_add_block_sync.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/8593fa1ca0f4_add_transaction_queue.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/89e1e9baa53c_add_account_lock.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/9c4bd7491015_rename_block_sync_table.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/9daa16518a91_add_tx_sync_state.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/a2e2aab8f331_add_date_accessed_to_txcache.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/cd2052be6db2_convert_tx_index.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/df19f4e69676_add_tx_track.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/default/versions/e3b5330ee71c_.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/alembic.ini create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/env.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/script.py.mako create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/2a07b543335e_add_new_syncer_table.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/49b348246d70_add_nonce_index.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/52c7c59cd0b1_add_account_roles.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/6ac7a1dadc46_add_otx_state_log.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7cb65b893934_add_blocknumber_pointer.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7e8d7626e38f_add_block_sync.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/8593fa1ca0f4_add_transaction_queue.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/89e1e9baa53c_add_account_lock.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9c4bd7491015_rename_block_sync_table.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9daa16518a91_add_tx_sync_state.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/a2e2aab8f331_add_date_accessed_to_txcache.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/cd2052be6db2_convert_tx_index.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/df19f4e69676_add_tx_track.py create mode 100644 apps/cic-eth/cic_eth/db/migrations/postgresql/versions/e3b5330ee71c_.py create mode 100644 apps/cic-eth/cic_eth/db/models/base.py create mode 100644 apps/cic-eth/cic_eth/db/models/convert.py create mode 100644 apps/cic-eth/cic_eth/db/models/lock.py create mode 100644 apps/cic-eth/cic_eth/db/models/nonce.py create mode 100644 apps/cic-eth/cic_eth/db/models/otx.py create mode 100644 apps/cic-eth/cic_eth/db/models/role.py create mode 100644 apps/cic-eth/cic_eth/db/models/sync.py create mode 100644 apps/cic-eth/cic_eth/db/models/tx.py create mode 100644 apps/cic-eth/cic_eth/db/util.py create mode 100644 apps/cic-eth/cic_eth/error.py create mode 100644 apps/cic-eth/cic_eth/eth/__init__.py create mode 100644 apps/cic-eth/cic_eth/eth/account.py create mode 100644 apps/cic-eth/cic_eth/eth/bancor.py create mode 100644 apps/cic-eth/cic_eth/eth/factory.py create mode 100644 apps/cic-eth/cic_eth/eth/gas.py create mode 100644 apps/cic-eth/cic_eth/eth/nonce.py create mode 100644 apps/cic-eth/cic_eth/eth/request.py create mode 100644 apps/cic-eth/cic_eth/eth/rpc.py create mode 100644 apps/cic-eth/cic_eth/eth/task.py create mode 100644 apps/cic-eth/cic_eth/eth/token.py create mode 100644 apps/cic-eth/cic_eth/eth/tx.py create mode 100644 apps/cic-eth/cic_eth/eth/util.py create mode 100644 apps/cic-eth/cic_eth/queue/__init__.py create mode 100644 apps/cic-eth/cic_eth/queue/tx.py create mode 100644 apps/cic-eth/cic_eth/runnable/ctrl.py create mode 100644 apps/cic-eth/cic_eth/runnable/dispatcher.py create mode 100644 apps/cic-eth/cic_eth/runnable/manager.py create mode 100644 apps/cic-eth/cic_eth/runnable/retry.py create mode 100644 apps/cic-eth/cic_eth/runnable/server_agent.py create mode 100644 apps/cic-eth/cic_eth/runnable/tag.py create mode 100644 apps/cic-eth/cic_eth/runnable/tasker.py create mode 100644 apps/cic-eth/cic_eth/runnable/view.py create mode 100644 apps/cic-eth/cic_eth/sync/__init__.py create mode 100644 apps/cic-eth/cic_eth/sync/backend.py create mode 100644 apps/cic-eth/cic_eth/sync/base.py create mode 100644 apps/cic-eth/cic_eth/sync/error.py create mode 100644 apps/cic-eth/cic_eth/sync/head.py create mode 100644 apps/cic-eth/cic_eth/sync/history.py create mode 100644 apps/cic-eth/cic_eth/sync/mempool.py create mode 100644 apps/cic-eth/cic_eth/sync/mined.py create mode 100644 apps/cic-eth/cic_eth/sync/retry.py create mode 100644 apps/cic-eth/cic_eth/version.py create mode 100644 apps/cic-eth/config/bancor.ini create mode 100644 apps/cic-eth/config/celery.ini create mode 100644 apps/cic-eth/config/cic.ini create mode 100644 apps/cic-eth/config/custody.ini create mode 100644 apps/cic-eth/config/database.ini create mode 100644 apps/cic-eth/config/dispatcer.ini create mode 100644 apps/cic-eth/config/eth.ini create mode 100644 apps/cic-eth/config/lash/bancor.ini create mode 100644 apps/cic-eth/config/lash/database.ini create mode 100644 apps/cic-eth/config/lash/eth.ini create mode 100644 apps/cic-eth/config/lash/redis.ini create mode 100644 apps/cic-eth/config/lash/signer.ini create mode 100644 apps/cic-eth/config/lash/ssl.ini create mode 100644 apps/cic-eth/config/lash/syncer.ini create mode 100644 apps/cic-eth/config/redis.ini create mode 100644 apps/cic-eth/config/signer.ini create mode 100644 apps/cic-eth/config/ssl.ini create mode 100644 apps/cic-eth/config/syncer.ini create mode 100644 apps/cic-eth/config/tasks.ini create mode 100644 apps/cic-eth/config/test/accounts.ini create mode 100644 apps/cic-eth/config/test/bancor.ini create mode 100644 apps/cic-eth/config/test/celery.ini create mode 100644 apps/cic-eth/config/test/cic.ini create mode 100644 apps/cic-eth/config/test/database.ini create mode 100644 apps/cic-eth/config/test/dispatcher.ini create mode 100644 apps/cic-eth/config/test/eth.ini create mode 100644 apps/cic-eth/config/test/redis.ini create mode 100644 apps/cic-eth/config/test/signer.ini create mode 100644 apps/cic-eth/config/test/ssl.ini create mode 100644 apps/cic-eth/config/test/syncer.ini create mode 100644 apps/cic-eth/crypto_dev_signer_config/config.ini create mode 100644 apps/cic-eth/crypto_dev_signer_config/database.ini create mode 100644 apps/cic-eth/doc/flowcharts/Makefile create mode 100644 apps/cic-eth/doc/flowcharts/account_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/balance_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/callback_gift.dot create mode 100644 apps/cic-eth/doc/flowcharts/convert_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/converttransfer_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/dispatch.dot create mode 100644 apps/cic-eth/doc/flowcharts/readme create mode 100644 apps/cic-eth/doc/flowcharts/register_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/send_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/transaction_semantic.dot create mode 100644 apps/cic-eth/doc/flowcharts/transaction_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/transferauthorization_tasks.dot create mode 100644 apps/cic-eth/doc/flowcharts/tx_tasks.dot create mode 100644 apps/cic-eth/doc/sphinx/Makefile create mode 100644 apps/cic-eth/doc/sphinx/code.rst create mode 100644 apps/cic-eth/doc/sphinx/conf.py create mode 100644 apps/cic-eth/doc/sphinx/index.rst create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/Makefile create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/api.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/index.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/overview.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/queue.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/run.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/setup.texi create mode 100644 apps/cic-eth/doc/texinfo/old.20210107/transactions.texi create mode 100644 apps/cic-eth/doc/texinfo/overview.texi create mode 100644 apps/cic-eth/docker/Dockerfile create mode 100644 apps/cic-eth/docker/db.sh create mode 100644 apps/cic-eth/docker/start_dispatcher.sh create mode 100644 apps/cic-eth/docker/start_manager.sh create mode 100644 apps/cic-eth/docker/start_retry.sh create mode 100644 apps/cic-eth/docker/start_tasker.sh create mode 100644 apps/cic-eth/examples/api_callback.py create mode 100644 apps/cic-eth/requirements.txt create mode 100644 apps/cic-eth/scripts/generator.py create mode 100644 apps/cic-eth/scripts/insert_tx.py create mode 100644 apps/cic-eth/scripts/migrate.py create mode 100644 apps/cic-eth/setup.cfg create mode 100644 apps/cic-eth/setup.py create mode 100644 apps/cic-eth/test_requirements.txt create mode 100644 apps/cic-eth/tests/conftest.py create mode 100644 apps/cic-eth/tests/fixtures_account.py create mode 100644 apps/cic-eth/tests/fixtures_bancor.py create mode 100644 apps/cic-eth/tests/fixtures_celery.py create mode 100644 apps/cic-eth/tests/fixtures_config.py create mode 100644 apps/cic-eth/tests/fixtures_database.py create mode 100644 apps/cic-eth/tests/fixtures_faucet.py create mode 100644 apps/cic-eth/tests/fixtures_keystore.py create mode 100644 apps/cic-eth/tests/fixtures_registry.py create mode 100644 apps/cic-eth/tests/fixtures_token.py create mode 100644 apps/cic-eth/tests/fixtures_transferapproval.py create mode 100644 apps/cic-eth/tests/fixtures_web3.py create mode 100644 apps/cic-eth/tests/functional/test_admin.py create mode 100644 apps/cic-eth/tests/functional/test_app.py create mode 100644 apps/cic-eth/tests/tasks/test_account.py create mode 100644 apps/cic-eth/tests/tasks/test_convert.py create mode 100644 apps/cic-eth/tests/tasks/test_faucet.py create mode 100644 apps/cic-eth/tests/tasks/test_gas_tasks.py create mode 100644 apps/cic-eth/tests/tasks/test_lock_tasks.py create mode 100644 apps/cic-eth/tests/tasks/test_nonce_tasks.py create mode 100644 apps/cic-eth/tests/tasks/test_otx_tasks.py create mode 100644 apps/cic-eth/tests/tasks/test_states.py create mode 100644 apps/cic-eth/tests/tasks/test_token_tasks.py create mode 100644 apps/cic-eth/tests/tasks/test_transfer_approval.py create mode 100644 apps/cic-eth/tests/tasks/test_tx_tasks.py create mode 100644 apps/cic-eth/tests/test_basic.py create mode 100644 apps/cic-eth/tests/test_sign.py create mode 100644 apps/cic-eth/tests/testdata/abi/AccountRegistry.json create mode 100644 apps/cic-eth/tests/testdata/abi/Converter.json create mode 100644 apps/cic-eth/tests/testdata/abi/ConverterRegistry.json create mode 100644 apps/cic-eth/tests/testdata/abi/ERC20.json create mode 100644 apps/cic-eth/tests/testdata/abi/Faucet.json create mode 100644 apps/cic-eth/tests/testdata/abi/Network.json create mode 100644 apps/cic-eth/tests/testdata/abi/Registry.json create mode 100644 apps/cic-eth/tests/testdata/abi/RegistryClient.json create mode 100644 apps/cic-eth/tests/testdata/abi/TransferApproval.json create mode 100644 apps/cic-eth/tests/testdata/bancor/BancorFormula.json create mode 100644 apps/cic-eth/tests/testdata/bancor/BancorNetwork.json create mode 100644 apps/cic-eth/tests/testdata/bancor/BancorX.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ChainlinkETHToETHOracle.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ContractRegistry.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ContractRegistryClient.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterBase.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterRegistryData.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithFallback.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithoutFallback.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithFallback.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithoutFallback.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ERC20Token.json create mode 100644 apps/cic-eth/tests/testdata/bancor/EtherToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/GiftableToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IBancorFormula.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IBancorX.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IBancorXUpgrader.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IChainlinkPriceOracle.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IContractRegistry.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConversionPathFinder.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverterAnchor.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverterRegistry.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverterRegistryData.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IConverterUpgrader.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IERC20Token.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IEtherToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ILiquidityPoolV2Converter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IOwned.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IPoolTokensContainer.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IPriceOracle.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ISmartToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ITokenHolder.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ITypedConverterAnchorFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ITypedConverterCustomFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ITypedConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/IWhitelist.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidTokenConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1Converter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1ConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2Converter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterAnchorFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterCustomFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/NewConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/NonStandardToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/NonStandardTokenDetailed.json create mode 100644 apps/cic-eth/tests/testdata/bancor/OldConverter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/Owned.json create mode 100644 apps/cic-eth/tests/testdata/bancor/PoolTokensContainer.json create mode 100644 apps/cic-eth/tests/testdata/bancor/PriceOracle.json create mode 100644 apps/cic-eth/tests/testdata/bancor/ReentrancyGuard.json create mode 100644 apps/cic-eth/tests/testdata/bancor/SafeMath.json create mode 100644 apps/cic-eth/tests/testdata/bancor/SmartToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestBancorFormula.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestBancorNetwork.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestChainlinkPriceOracle.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestContractRegistryClient.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestConverterFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestConverterRegistry.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV1Converter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV2Converter.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestNonStandardToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestNonStandardTokenWithoutDecimals.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestReentrancyGuard.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestReentrancyGuardAttacker.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestSafeMath.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestStandardToken.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestTokenHandler.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TestTypedConverterAnchorFactory.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TokenHandler.json create mode 100644 apps/cic-eth/tests/testdata/bancor/TokenHolder.json create mode 100644 apps/cic-eth/tests/testdata/bancor/Utils.json create mode 100644 apps/cic-eth/tests/testdata/bancor/Whitelist.json create mode 100644 apps/cic-eth/tests/testdata/bancor/XTransferRerouter.json create mode 100644 apps/cic-eth/tests/unit/api/test_callback.py create mode 100644 apps/cic-eth/tests/unit/db/test_block_sync.py create mode 100644 apps/cic-eth/tests/unit/db/test_db_convert_transfer.py create mode 100644 apps/cic-eth/tests/unit/db/test_default.py create mode 100644 apps/cic-eth/tests/unit/db/test_lock.py create mode 100644 apps/cic-eth/tests/unit/db/test_nonce_db.py create mode 100644 apps/cic-eth/tests/unit/db/test_otx.py create mode 100644 apps/cic-eth/tests/unit/db/test_queue.py create mode 100644 apps/cic-eth/tests/unit/db/test_role.py create mode 100644 apps/cic-eth/tests/unit/db/test_tx.py create mode 100644 apps/cic-eth/tests/unit/eth/test_bancor.py create mode 100644 apps/cic-eth/tests/unit/eth/test_nonce.py create mode 100644 apps/cic-eth/tests/unit/eth/test_raw.py create mode 100644 apps/cic-eth/tests/unit/eth/test_token.py create mode 100644 apps/cic-eth/tests/unit/queue/test_otx_state_log.py create mode 100644 apps/cic-eth/tests/unit/queue/test_queue_lock.py create mode 100644 apps/cic-eth/tests/unit/queue/test_tx_queue.py create mode 100644 apps/cic-eth/tests/unit/sync/test_head.py create mode 100644 apps/cic-eth/tests/unit/sync/test_history.py create mode 100644 apps/cic-eth/tests/unit/sync/test_syncer_scratch.py create mode 100644 apps/cic-eth/tests/unit/util/test_num.py create mode 100644 apps/cic-eth/tests/unit/util/test_unpack.py diff --git a/apps/cic-eth/.coveragerc b/apps/cic-eth/.coveragerc new file mode 100644 index 00000000..63f983d6 --- /dev/null +++ b/apps/cic-eth/.coveragerc @@ -0,0 +1,7 @@ +[report] +omit = + .venv/* + scripts/* + cic_eth/db/migrations/* + cic_eth/sync/head.py + cic_eth/sync/mempool.py diff --git a/apps/cic-eth/.envrc_dev_example b/apps/cic-eth/.envrc_dev_example new file mode 100644 index 00000000..52999ec5 --- /dev/null +++ b/apps/cic-eth/.envrc_dev_example @@ -0,0 +1,12 @@ +set -a +CICTEST_DEV_KEYS_PATH= +CICTEST_DEV_SIGNER_PASSWORD= + +CICTEST_SIGNER_SECRET=deadbeef +CICTEST_SIGNER_DATABASE=signer_test + +CICTEST_PIP_EXTRA_INDEX_HOST= +CICTEST_PIP_EXTRA_INDEX_PORT= +CICTEST_PIP_EXTRA_INDEX_PATH= +CICTEST_PIP_EXTRA_INDEX_PROTO= +set +a diff --git a/apps/cic-eth/.envrc_example b/apps/cic-eth/.envrc_example new file mode 100644 index 00000000..d803e0cc --- /dev/null +++ b/apps/cic-eth/.envrc_example @@ -0,0 +1,21 @@ +set -a +CICTEST_BANCOR_DIR= +CICTEST_BANCOR_REGISTRY_ADDRESS= + +CICTEST_ETH_WS_PROVIDER='ws://localhost:8546' +CICTEST_ETH_HTTP_PROVIDER='http://localhost:8545' +CICTEST_ETH_PROVIDER=$CIC_ETH_HTTP_PROVIDER +CICTEST_ETH_CHAIN_ID=8995 +CICTEST_ETH_GAS_PROVIDER_ADDRESS= + +CICTEST_DATABASE_ENGINE=postgresql +CICTEST_DATABASE_DRIVER=psycopg2 +CICTEST_DATABASE_NAME=cic-eth-test +CICTEST_DATABASE_USER=postgres +CICTEST_DATABASE_PASSWORD= +CICTEST_DATABASE_HOST=localhost +CICTEST_DATABASE_PORT=5432 + +CICTEST_CELERY_BROKER_URL= +set +a +. .envrc_dev_example diff --git a/apps/cic-eth/.gitignore b/apps/cic-eth/.gitignore new file mode 100644 index 00000000..dab8b439 --- /dev/null +++ b/apps/cic-eth/.gitignore @@ -0,0 +1,8 @@ +.envrc +.envrc_dev +.venv +__pycache__ +*.pyc +_build +doc/**/*.png +doc/**/html diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml new file mode 100644 index 00000000..428002b8 --- /dev/null +++ b/apps/cic-eth/.gitlab-ci.yml @@ -0,0 +1,11 @@ +.contract-migration-changes-target: + rules: + - changes: + - $CONTEXT/* + +build-cic-eth: + extends: + - .contract-migration-changes-target + - .py-build + variables: + CONTEXT: apps/cic-eth \ No newline at end of file diff --git a/apps/cic-eth/CHANGELOG b/apps/cic-eth/CHANGELOG new file mode 100644 index 00000000..266e4814 --- /dev/null +++ b/apps/cic-eth/CHANGELOG @@ -0,0 +1,114 @@ +- 0.10.0 + * Move api to subpackage + * Add version identifier to package top level + * Add gas price proxy middleware + * Make initial queue send status inactive, introduce new status READYSEND for initial send attempt + * Add maintenance mode locks, and automatic account lock when node rejects to send a tx to network + * Add nonce repair tool + * Add tx resend admin api + * Add pure tcp and redis task api callbacks + * Add optional outgoing log status tracing + * Add lock lister and lock/unlock cli tool +- 0.9.0 + * Require chain spec parameter in api + * Pass chain spec between tasks +- 0.8.9 + * Change executable argument flag names for contract keys and chain spec + * Take over auxiliary code from cic-registry + * Use cic-bancor package for bancor related code +- 0.8.8 + * Implement transaction granularity for syncers +- 0.8.7 + * Add registration option on api account creation +- 0.8.6 + * Add persistent account role index +- 0.8.5 + * Add refill gas api call +- 0.8.4 + * Add settable abi dir to executables +- 0.8.3 + * Add faucet task, tests + * Add retry tx on incoming gas refill trigger + * Add transfer approval task, tests +- 0.8.2 + * Upgrade cic-registry + * Fix broken history syncer test +- 0.8.1 + * Upgrade dependencies +- 0.8.0 + * Rehabilitate tasker script + * Move tasker and manager scripts to console scripts setup entrypoints +- 0.7.1 + * Make tx hash optional in check-gas-and-send signature builder +- 0.7.0 + * Define callback tasks in API with qualified celery task strings +- 0.6.4 + * Add mock tx cache data generator + * Change sql tx cache value fields to bigint +- 0.6.3 + * Remove CIC-cache related code +- 0.6.2 + * Rename tx_number member of TxCache object to tx_index +- 0.6.1 + * Add postgres-only stored procedures for per-address balances and transactions queries +- 0.6.0 + * Configurable celery in worker script +- 0.5.8 + * Upgrade crypto-dev-signer (now uses SQLAlchemy) + * Use sql backend db for tests + * Use filesystem backend for celery tests +- 0.5.7 + * Remove environment variable dependencies in tests + * Update dependencies +- 0.5.6 + * Upgrade signer +- 0.5.5 + * Implement env-prefix switch in scripts +- 0.5.4 + * Add ipc path parameter to web3ext instantiation +- 0.5.3 + * Add alembic migration script customizable with confini +- 0.5.2 + * Upgrade crypto-dev-signer +- 0.5.1 + * Move tasker back to scripts +- 0.5.0 + * Create Api object, persists callback and queue across methods +- 0.4.1 + * Add docstrings + * Rehabilitate tests + * Correctly scope db sessions in tasks + * Add API for create account +- 0.4.0 + * Use config files instead of environment for cic-dev-tasker +- 0.3.0 + * Add queues +- 0.2.0 + * Add documentation + * Rename cic-dev-syncer to cic-dev-manager + * Rename cic-dev-track to cic-dev-tracker +- 0.1.1 + * Remove cic_eth.eth from packaging +- 0.1.0 + * Extract tx factory object controlling nonce and gasprice + * Fix bug from adapting method call to EthereumTester + * Package api for external use + * Add missing otx saves for transactions +- 0.0.6 + * Add missing "approve zero" for convert in monitor queue +- 0.0.5 + * Add customized eth_tester replacement for active web3 backend +- 0.0.4 + * Add api caller callback for completed tasks + * Add semaphore for web3 calls + * Add missing subtasks in bancor convert chain +- 0.0.3 + * Separate out registry and sempo to external packages +- 0.0.2 + * Add erc20 transfer task + * Add transaction queue tasker and database +- 0.0.1 + * Add registry + * Add bancor token lookup and convert tasks + * Add sempo token register tasks + * Add environment variable docs diff --git a/apps/cic-eth/LICENSE.txt b/apps/cic-eth/LICENSE.txt new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/apps/cic-eth/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/apps/cic-eth/cic_eth/__init__.py b/apps/cic-eth/cic_eth/__init__.py new file mode 100644 index 00000000..adc978e9 --- /dev/null +++ b/apps/cic-eth/cic_eth/__init__.py @@ -0,0 +1,10 @@ +"""Celery tasks API for CIC EVM and web3 JSON-RPC interactions + +.. moduleauthor: Louis Holbrook + +""" + +from .version import ( + version, + version_string, + ) diff --git a/apps/cic-eth/cic_eth/admin/ctrl.py b/apps/cic-eth/cic_eth/admin/ctrl.py new file mode 100644 index 00000000..6b28d86d --- /dev/null +++ b/apps/cic-eth/cic_eth/admin/ctrl.py @@ -0,0 +1,125 @@ +# standard imports +import datetime +import logging + +# third-party imports +import celery +from cic_registry import zero_address + +# local imports +from cic_eth.db.enum import LockEnum +from cic_eth.db.models.lock import Lock +from cic_eth.error import LockedError + +celery_app = celery.current_app +logg = logging.getLogger() + +@celery_app.task() +def lock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL, tx_hash=None): + """Task wrapper to set arbitrary locks + + :param chain_str: Chain spec string representation + :type chain_str: str + :param flags: Flags to set + :type flags: number + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.set(chain_str, flags, address=address, tx_hash=tx_hash) + logg.debug('Locked {} for {}, flag now {}'.format(flags, address, r)) + return chained_input + + +@celery_app.task() +def unlock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL): + """Task wrapper to reset arbitrary locks + + :param chain_str: Chain spec string representation + :type chain_str: str + :param flags: Flags to set + :type flags: number + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.reset(chain_str, flags, address=address) + logg.debug('Unlocked {} for {}, flag now {}'.format(flags, address, r)) + return chained_input + + +@celery_app.task() +def lock_send(chained_input, chain_str, address=zero_address, tx_hash=None): + """Task wrapper to set send lock + + :param chain_str: Chain spec string representation + :type chain_str: str + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.set(chain_str, LockEnum.SEND, address=address, tx_hash=tx_hash) + logg.debug('Send locked for {}, flag now {}'.format(address, r)) + return chained_input + + +@celery_app.task() +def unlock_send(chained_input, chain_str, address=zero_address): + """Task wrapper to reset send lock + + :param chain_str: Chain spec string representation + :type chain_str: str + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.reset(chain_str, LockEnum.SEND, address=address) + logg.debug('Send unlocked for {}, flag now {}'.format(address, r)) + return chained_input + + +@celery_app.task() +def lock_queue(chained_input, chain_str, address=zero_address, tx_hash=None): + """Task wrapper to set queue direct lock + + :param chain_str: Chain spec string representation + :type chain_str: str + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.set(chain_str, LockEnum.QUEUE, address=address, tx_hash=tx_hash) + logg.debug('Queue direct locked for {}, flag now {}'.format(address, r)) + return chained_input + + +@celery_app.task() +def unlock_queue(chained_input, chain_str, address=zero_address): + """Task wrapper to reset queue direct lock + + :param chain_str: Chain spec string representation + :type chain_str: str + :param address: Ethereum address + :type address: str, 0x-hex + :returns: New lock state for address + :rtype: number + """ + r = Lock.reset(chain_str, LockEnum.QUEUE, address=address) + logg.debug('Queue direct unlocked for {}, flag now {}'.format(address, r)) + return chained_input + + +@celery_app.task() +def check_lock(chained_input, chain_str, lock_flags, address=None): + r = Lock.check(chain_str, lock_flags, address=zero_address) + if address != None: + r |= Lock.check(chain_str, lock_flags, address=address) + if r > 0: + logg.debug('lock check {} has match {} for {}'.format(lock_flags, r, address)) + raise LockedError(r) + return chained_input diff --git a/apps/cic-eth/cic_eth/admin/debug.py b/apps/cic-eth/cic_eth/admin/debug.py new file mode 100644 index 00000000..575be543 --- /dev/null +++ b/apps/cic-eth/cic_eth/admin/debug.py @@ -0,0 +1,12 @@ +import datetime + +import celery + +celery_app = celery.current_app + + +@celery_app.task() +def out_tmp(tag, txt): + f = open('/tmp/err.{}.txt'.format(tag), "w") + f.write(txt) + f.close() diff --git a/apps/cic-eth/cic_eth/admin/nonce.py b/apps/cic-eth/cic_eth/admin/nonce.py new file mode 100644 index 00000000..c475f7b3 --- /dev/null +++ b/apps/cic-eth/cic_eth/admin/nonce.py @@ -0,0 +1,128 @@ +# standard imports +import logging + +# third-party imports +import celery +from cic_registry.chain import ChainSpec + +# local imports +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.nonce import Nonce +from cic_eth.admin.ctrl import lock_send +from cic_eth.admin.ctrl import unlock_send +from cic_eth.admin.ctrl import lock_queue +from cic_eth.admin.ctrl import unlock_queue +from cic_eth.queue.tx import get_tx +from cic_eth.queue.tx import set_cancel +from cic_eth.queue.tx import create as queue_create +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.task import sign_tx +from cic_eth.eth.task import create_check_gas_and_send_task + +celery_app = celery.current_app +logg = logging.getLogger() + + +@celery_app.task(bind=True) +def shift_nonce(self, chain_str, tx_hash_orig_hex, delta=1): + """Shift all transactions with nonces higher than the offset by the provided position delta. + + Transactions who are replaced by transactions that move nonces will be marked as OVERRIDDEN. + + :param chainstr: Chain specification string representation + :type chainstr: str + :param tx_hash_orig_hex: Transaction hash to resolve to sender and nonce to use as shift offset + :type tx_hash_orig_hex: str, 0x-hex + :param delta: Amount + """ + queue = None + try: + queue = self.request.delivery_info.get('routing_key') + except AttributeError: + pass + + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_brief = get_tx(tx_hash_orig_hex) + tx_raw = bytes.fromhex(tx_brief['signed_tx'][2:]) + tx = unpack_signed_raw_tx(tx_raw, chain_spec.chain_id()) + nonce = tx_brief['nonce'] + address = tx['from'] + + logg.debug('shifting nonce {} position(s) for address {}, offset {}'.format(delta, address, nonce)) + + lock_queue(None, chain_str, address) + lock_send(None, chain_str, address) + + session = SessionBase.create_session() + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(TxCache.sender==address) + q = q.filter(Otx.nonce>=nonce+delta) + q = q.order_by(Otx.nonce.asc()) + otxs = q.all() + + tx_hashes = [] + txs = [] + for otx in otxs: + tx_raw = bytes.fromhex(otx.signed_tx[2:]) + tx_new = unpack_signed_raw_tx(tx_raw, chain_spec.chain_id()) + + tx_previous_hash_hex = tx_new['hash'] + tx_previous_nonce = tx_new['nonce'] + + del(tx_new['hash']) + del(tx_new['hash_unsigned']) + tx_new['nonce'] -= delta + + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx_new, chain_str) + logg.debug('tx {} -> {} nonce {} -> {}'.format(tx_previous_hash_hex, tx_hash_hex, tx_previous_nonce, tx_new['nonce'])) + + otx = Otx( + nonce=tx_new['nonce'], + address=tx_new['from'], + tx_hash=tx_hash_hex, + signed_tx=tx_signed_raw_hex, + ) + session.add(otx) + session.commit() + + # TODO: cancel all first, then replace. Otherwise we risk two non-locked states for two different nonces. + set_cancel(tx_previous_hash_hex, True) + + TxCache.clone(tx_previous_hash_hex, tx_hash_hex) + + tx_hashes.append(tx_hash_hex) + txs.append(tx_signed_raw_hex) + + session.close() + + s = create_check_gas_and_send_task( + txs, + chain_str, + tx_new['from'], + tx_new['gas'], + tx_hashes, + queue, + ) + + s_unlock_send = celery.signature( + 'cic_eth.admin.ctrl.unlock_send', + [ + chain_str, + tx_new['from'], + ], + queue=queue, + ) + s_unlock_direct = celery.signature( + 'cic_eth.admin.ctrl.unlock_queue', + [ + chain_str, + tx_new['from'], + ], + queue=queue, + ) + s_unlocks = celery.group(s_unlock_send, s_unlock_direct) + s.link(s_unlocks) + s.apply_async() diff --git a/apps/cic-eth/cic_eth/api/__init__.py b/apps/cic-eth/cic_eth/api/__init__.py new file mode 100644 index 00000000..ce747f4f --- /dev/null +++ b/apps/cic-eth/cic_eth/api/__init__.py @@ -0,0 +1,8 @@ +"""Celery tasks API for CIC EVM and web3 JSON-RPC interactions + +.. moduleauthor: Louis Holbrook + +""" + +from .api_task import Api +from .api_admin import AdminApi diff --git a/apps/cic-eth/cic_eth/api/api_admin.py b/apps/cic-eth/cic_eth/api/api_admin.py new file mode 100644 index 00000000..aec9cd47 --- /dev/null +++ b/apps/cic-eth/cic_eth/api/api_admin.py @@ -0,0 +1,445 @@ +# standard imports +import logging + +# third-party imports +import celery +import web3 +from cic_registry import zero_address +from cic_registry import zero_content +from cic_registry import CICRegistry +from crypto_dev_signer.eth.web3ext import Web3 as Web3Ext +from cic_registry.error import UnknownContractError + +# local imports +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.role import AccountRole +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.nonce import Nonce +from cic_eth.db.enum import StatusEnum +from cic_eth.error import InitializationError +from cic_eth.db.error import TxStateChangeError +from cic_eth.eth.rpc import RpcClient +from cic_eth.queue.tx import get_tx +from cic_eth.eth.util import unpack_signed_raw_tx + +app = celery.current_app + +#logg = logging.getLogger(__file__) +logg = logging.getLogger() + + +class AdminApi: + """Provides an interface to view and manipulate existing transaction tasks and system runtime settings. + + :param rpc_client: Rpc client to use for blockchain connections. + :type rpc_client: cic_eth.eth.rpc.RpcClient + :param queue: Name of worker queue to submit tasks to + :type queue: str + """ + def __init__(self, rpc_client, queue='cic-eth'): + self.rpc_client = rpc_client + self.w3 = rpc_client.w3 + self.queue = queue + + + def unlock(self, chain_spec, address, flags=None): + s_unlock = celery.signature( + 'cic_eth.admin.ctrl.unlock', + [ + str(chain_spec), + flags, + address, + ], + queue=self.queue, + ) + return s_unlock.apply_async() + + + def lock(self, chain_spec, address, flags=None): + s_lock = celery.signature( + 'cic_eth.admin.ctrl.lock', + [ + str(chain_spec), + flags, + address, + ], + queue=self.queue, + ) + return s_lock.apply_async() + + + def get_lock(self): + s_lock = celery.signature( + 'cic_eth.queue.tx.get_lock', + [], + queue=self.queue, + ) + return s_lock.apply_async().get() + + + def tag_account(self, tag, address_hex): + """Persistently associate an address with a plaintext tag. + + Some tags are known by the system and is used to resolve addresses to use for certain transactions. + + :param tag: Address tag + :type tag: str + :param address_hex: Ethereum address to tag + :type address_hex: str, 0x-hex + :raises ValueError: Invalid checksum address + """ + if not web3.Web3.isChecksumAddress(address_hex): + raise ValueError('invalid address') + session = SessionBase.create_session() + role = AccountRole.set(tag, address_hex) + session.add(role) + session.commit() + session.close() + + + def resend(self, tx_hash_hex, chain_str, in_place=True, unlock=False): + logg.debug('resend {}'.format(tx_hash_hex)) + s_get_tx_cache = celery.signature( + 'cic_eth.queue.tx.get_tx_cache', + [ + tx_hash_hex, + ], + queue=self.queue, + ) + + # TODO: This check should most likely be in resend task itself + tx_dict = s_get_tx_cache.apply_async().get() + if tx_dict['status'] in [StatusEnum.REVERTED, StatusEnum.SUCCESS, StatusEnum.CANCELLED, StatusEnum.OBSOLETED]: + raise TxStateChangeError('Cannot resend mined or obsoleted transaction'.format(txold_hash_hex)) + + s = None + if in_place: + s = celery.signature( + 'cic_eth.eth.tx.resend_with_higher_gas', + [ + tx_hash_hex, + chain_str, + None, + 1.01, + ], + queue=self.queue, + ) + else: + raise NotImplementedError('resend as new not yet implemented') + + if unlock: + s_gas = celery.signature( + 'cic_eth.admin.ctrl.unlock_send', + [ + chain_str, + tx_dict['sender'], + ], + queue=self.queue, + ) + s.link(s_gas) + + return s.apply_async() + + def check_nonce(self, address): + s = celery.signature( + 'cic_eth.queue.tx.get_account_tx', + [ + address, + True, + False, + ], + queue=self.queue, + ) + txs = s.apply_async().get() + + blocking_tx = None + blocking_nonce = None + nonce_otx = 0 + for k in txs.keys(): + s_get_tx = celery.signature( + 'cic_eth.queue.tx.get_tx', + [ + k, + ], + queue=self.queue, + ) + tx = s_get_tx.apply_async().get() + #tx = get_tx(k) + logg.debug('checking nonce {}'.format(tx['nonce'])) + if tx['status'] in [StatusEnum.REJECTED, StatusEnum.FUBAR]: + blocking_tx = k + blocking_nonce = tx['nonce'] + nonce_otx = tx['nonce'] + + #nonce_cache = Nonce.get(address) + nonce_w3 = self.w3.eth.getTransactionCount(address, 'pending') + + return { + 'nonce': { + 'network': nonce_w3, + 'queue': nonce_otx, + #'cache': nonce_cache, + 'blocking': blocking_nonce, + }, + 'tx': { + 'blocking': blocking_tx, + } + } + + + def fix_nonce(self, address, nonce): + s = celery.signature( + 'cic_eth.queue.tx.get_account_tx', + [ + address, + True, + False, + ], + queue=self.queue, + ) + txs = s.apply_async().get() + + tx_hash_hex = None + for k in txs.keys(): + tx_dict = get_tx(k) + if tx_dict['nonce'] == nonce: + tx_hash_hex = k + + s_nonce = celery.signature( + 'cic_eth.admin.nonce.shift_nonce', + [ + str(self.rpc_client.chain_spec), + tx_hash_hex, + ], + queue=self.queue + ) + return s_nonce.apply_async() + + + # TODO: this is a stub, complete all checks + def ready(self): + """Checks whether all required initializations have been performed. + + :raises cic_eth.error.InitializationError: At least one setting pre-requisite has not been met. + :raises KeyError: An address provided for initialization is not known by the keystore. + """ + addr = AccountRole.get_address('ETH_GAS_PROVIDER_ADDRESS') + if addr == zero_address: + raise InitializationError('missing account ETH_GAS_PROVIDER_ADDRESS') + + self.w3.eth.sign(addr, text='666f6f') + + + def account(self, chain_spec, address, cols=['tx_hash', 'sender', 'recipient', 'nonce', 'block', 'tx_index', 'status', 'network_status', 'date_created'], include_sender=True, include_recipient=True): + """Lists locally originated transactions for the given Ethereum address. + + Performs a synchronous call to the Celery task responsible for performing the query. + + :param address: Ethereum address to return transactions for + :type address: str, 0x-hex + :param cols: Data columns to include + :type cols: list of str + """ + s = celery.signature( + 'cic_eth.queue.tx.get_account_tx', + [address], + queue=self.queue, + ) + txs = s.apply_async().get() + + tx_dict_list = [] + for tx_hash in txs.keys(): + s = celery.signature( + 'cic_eth.queue.tx.get_tx_cache', + [tx_hash], + queue=self.queue, + ) + tx_dict = s.apply_async().get() + if tx_dict['sender'] == address and not include_sender: + logg.debug('skipping sender tx {}'.format(tx_dict['tx_hash'])) + continue + elif tx_dict['recipient'] == address and not include_recipient: + logg.debug('skipping recipient tx {}'.format(tx_dict['tx_hash'])) + continue + + logg.debug(tx_dict) + o = { + 'nonce': tx_dict['nonce'], + 'tx_hash': tx_dict['tx_hash'], + 'status': tx_dict['status'], + 'date_updated': tx_dict['date_updated'], + } + tx_dict_list.append(o) + + return tx_dict_list + + + # TODO: Add exception upon non-existent tx aswell as invalid tx data to docstring + def tx(self, chain_spec, tx_hash=None, tx_raw=None): + """Output local and network details about a given transaction with local origin. + + If the transaction hash is given, the raw trasnaction data will be retrieved from the local transaction queue backend. Otherwise the raw transaction data must be provided directly. Only one of transaction hash and transaction data can be passed. + + :param chain_spec: Chain spec of the transaction's chain context + :type chain_spec: cic_registry.chain.ChainSpec + :param tx_hash: Transaction hash of transaction to parse and view + :type tx_hash: str, 0x-hex + :param tx_raw: Signed raw transaction data to parse and view + :type tx_raw: str, 0x-hex + :raises ValueError: Both tx_hash and tx_raw are passed + :return: Transaction details + :rtype: dict + """ + if tx_hash != None and tx_raw != None: + ValueError('Specify only one of hash or raw tx') + + if tx_raw != None: + tx_hash = self.w3.keccak(hexstr=tx_raw).hex() + + s = celery.signature( + 'cic_eth.queue.tx.get_tx_cache', + [tx_hash], + queue=self.queue, + ) + + tx = s.apply_async().get() + + source_token = None + if tx['source_token'] != zero_address: + try: + source_token = CICRegistry.get_address(chain_spec, tx['source_token']).contract + except UnknownContractError: + source_token_contract = self.w3.eth.contract(abi=CICRegistry.abi('ERC20'), address=tx['source_token']) + source_token = CICRegistry.add_token(chain_spec, source_token_contract) + logg.warning('unknown source token contract {}'.format(tx['source_token'])) + + destination_token = None + if tx['source_token'] != zero_address: + try: + destination_token = CICRegistry.get_address(chain_spec, tx['destination_token']) + except UnknownContractError: + destination_token_contract = self.w3.eth.contract(abi=CICRegistry.abi('ERC20'), address=tx['source_token']) + destination_token = CICRegistry.add_token(chain_spec, destination_token_contract) + logg.warning('unknown destination token contract {}'.format(tx['destination_token'])) + + tx['sender_description'] = 'Custodial account' + tx['recipient_description'] = 'Custodial account' + + c = RpcClient(chain_spec) + if len(c.w3.eth.getCode(tx['sender'])) > 0: + try: + sender_contract = CICRegistry.get_address(chain_spec, tx['sender']) + tx['sender_description'] = 'Contract {}'.format(sender_contract.identifier()) + except UnknownContractError: + tx['sender_description'] = 'Unknown contract' + except KeyError as e: + tx['sender_description'] = 'Unknown contract' + else: + s = celery.signature( + 'cic_eth.eth.account.have', + [ + tx['sender'], + str(chain_spec), + ], + queue=self.queue, + ) + t = s.apply_async() + account = t.get() + if account == None: + tx['sender_description'] = 'Unknown account' + else: + s = celery.signature( + 'cic_eth.eth.account.role', + [ + tx['sender'], + str(chain_spec), + ], + queue=self.queue, + ) + t = s.apply_async() + role = t.get() + if role != None: + tx['sender_description'] = role + + + if len(c.w3.eth.getCode(tx['recipient'])) > 0: + try: + recipient_contract = CICRegistry.get_address(chain_spec, tx['recipient']) + tx['recipient_description'] = 'Contract {}'.format(recipient_contract.identifier()) + except UnknownContractError as e: + tx['recipient_description'] = 'Unknown contract' + except KeyError as e: + tx['recipient_description'] = 'Unknown contract' + else: + s = celery.signature( + 'cic_eth.eth.account.have', + [ + tx['recipient'], + str(chain_spec), + ], + queue=self.queue, + ) + t = s.apply_async() + account = t.get() + if account == None: + tx['recipient_description'] = 'Unknown account' + else: + s = celery.signature( + 'cic_eth.eth.account.role', + [ + tx['recipient'], + str(chain_spec), + ], + queue=self.queue, + ) + t = s.apply_async() + role = t.get() + if role != None: + tx['recipient_description'] = role + + if source_token != None: + tx['source_token_symbol'] = source_token.symbol() + tx['sender_token_balance'] = source_token.function('balanceOf')(tx['sender']).call() + + if destination_token != None: + tx['destination_token_symbol'] = destination_token.symbol() + tx['recipient_token_balance'] = source_token.function('balanceOf')(tx['recipient']).call() + + tx['network_status'] = 'Not submitted' + + try: + c.w3.eth.getTransaction(tx_hash) + tx['network_status'] = 'Mempool' + except web3.exceptions.TransactionNotFound: + pass + + try: + r = c.w3.eth.getTransactionReceipt(tx_hash) + if r.status == 1: + tx['network_status'] = 'Confirmed' + tx['block'] = r.blockNumber + tx['tx_index'] = r.transactionIndex + else: + tx['network_status'] = 'Reverted' + except web3.exceptions.TransactionNotFound: + pass + + tx['sender_gas_balance'] = c.w3.eth.getBalance(tx['sender']) + tx['recipient_gas_balance'] = c.w3.eth.getBalance(tx['recipient']) + + tx_unpacked = unpack_signed_raw_tx(bytes.fromhex(tx['signed_tx'][2:]), chain_spec.chain_id()) + tx['gas_price'] = tx_unpacked['gasPrice'] + tx['gas_limit'] = tx_unpacked['gas'] + + s = celery.signature( + 'cic_eth.queue.tx.get_state_log', + [ + tx_hash, + ], + queue=self.queue, + ) + t = s.apply_async() + tx['status_log'] = t.get() + + return tx diff --git a/apps/cic-eth/cic_eth/api/api_task.py b/apps/cic-eth/cic_eth/api/api_task.py new file mode 100644 index 00000000..eca5f915 --- /dev/null +++ b/apps/cic-eth/cic_eth/api/api_task.py @@ -0,0 +1,431 @@ +"""API for cic-eth celery tasks + +.. moduleauthor:: Louis Holbrook + +""" +# standard imports +import logging + +# third-party imports +import celery +from cic_registry.chain import ChainSpec +from cic_registry import CICRegistry +from cic_eth.eth.factory import TxFactory +from cic_eth.db.enum import LockEnum + +app = celery.current_app + +logg = logging.getLogger(__name__) + + +class Api: + """Creates task chains to perform well-known CIC operations. + + Each method that sends tasks returns details about the root task. The root task uuid can be provided in the callback, to enable to caller to correlate the result with individual calls. It can also be used to independently poll the completion of a task chain. + + :param callback_param: Static value to pass to callback + :type callback_param: str + :param callback_task: Callback task that executes callback_param call. (Must be included by the celery worker) + :type callback_task: string + :param queue: Name of worker queue to submit tasks to + :type queue: str + """ + def __init__(self, chain_str, queue='cic-eth', callback_param=None, callback_task='cic_eth.callbacks.noop', callback_queue=None): + self.chain_str = chain_str + self.chain_spec = ChainSpec.from_chain_str(chain_str) + self.callback_param = callback_param + self.callback_task = callback_task + self.queue = queue + logg.info('api using queue {}'.format(self.queue)) + self.callback_success = None + self.callback_error = None + if callback_queue == None: + callback_queue=self.queue + + if callback_param != None: + self.callback_success = celery.signature( + callback_task, + [ + callback_param, + 0, + ], + queue=callback_queue, + ) + self.callback_error = celery.signature( + callback_task, + [ + callback_param, + 1, + ], + queue=callback_queue, + ) + + + def convert_transfer(self, from_address, to_address, target_return, minimum_return, from_token_symbol, to_token_symbol): + """Executes a chain of celery tasks that performs conversion between two ERC20 tokens, and transfers to a specified receipient after convert has completed. + + :param from_address: Ethereum address of sender + :type from_address: str, 0x-hex + :param to_address: Ethereum address of receipient + :type to_address: str, 0x-hex + :param target_return: Estimated return from conversion + :type target_return: int + :param minimum_return: The least value of destination token return to allow + :type minimum_return: int + :param from_token_symbol: ERC20 token symbol of token being converted + :type from_token_symbol: str + :param to_token_symbol: ERC20 token symbol of token to receive + :type to_token_symbol: str + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + [from_token_symbol, to_token_symbol], + self.chain_str, + LockEnum.QUEUE, + from_address, + ], + queue=self.queue, + ) + s_tokens = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_convert = celery.signature( + 'cic_eth.eth.bancor.convert_with_default_reserve', + [ + from_address, + target_return, + minimum_return, + to_address, + self.chain_str, + ], + queue=self.queue, + ) + s_check.link(s_tokens) + if self.callback_param != None: + s_convert.link(self.callback_success) + s_tokens.link(s_convert).on_error(self.callback_error) + else: + s_tokens.link(s_convert) + + t = s_check.apply_async(queue=self.queue) + return t + + + def convert(self, from_address, target_return, minimum_return, from_token_symbol, to_token_symbol): + """Executes a chain of celery tasks that performs conversion between two ERC20 tokens. + + :param from_address: Ethereum address of sender + :type from_address: str, 0x-hex + :param target_return: Estimated return from conversion + :type target_return: int + :param minimum_return: The least value of destination token return to allow + :type minimum_return: int + :param from_token_symbol: ERC20 token symbol of token being converted + :type from_token_symbol: str + :param to_token_symbol: ERC20 token symbol of token to receive + :type to_token_symbol: str + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + [from_token_symbol, to_token_symbol], + self.chain_str, + LockEnum.QUEUE, + from_address, + ], + queue=self.queue, + ) + s_tokens = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_convert = celery.signature( + 'cic_eth.eth.bancor.convert_with_default_reserve', + [ + from_address, + target_return, + minimum_return, + from_address, + self.chain_str, + ], + queue=self.queue, + ) + s_check.link(s_tokens) + if self.callback_param != None: + s_convert.link(self.callback_success) + s_tokens.link(s_convert).on_error(self.callback_error) + else: + s_tokens.link(s_convert) + + t = s_check.apply_async(queue=self.queue) + return t + + + def transfer(self, from_address, to_address, value, token_symbol): + """Executes a chain of celery tasks that performs a transfer of ERC20 tokens from one address to another. + + :param from_address: Ethereum address of sender + :type from_address: str, 0x-hex + :param to_address: Ethereum address of recipient + :type to_address: str, 0x-hex + :param value: Estimated return from conversion + :type value: int + :param token_symbol: ERC20 token symbol of token to send + :type token_symbol: str + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + [token_symbol], + self.chain_str, + LockEnum.QUEUE, + from_address, + ], + queue=self.queue, + ) + s_tokens = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_transfer = celery.signature( + 'cic_eth.eth.token.transfer', + [ + from_address, + to_address, + value, + self.chain_str, + ], + queue=self.queue, + ) + s_check.link(s_tokens) + if self.callback_param != None: + s_transfer.link(self.callback_success) + s_tokens.link(s_transfer).on_error(self.callback_error) + else: + s_tokens.link(s_transfer) + + t = s_check.apply_async(queue=self.queue) + return t + + + def transfer_request(self, from_address, to_address, spender_address, value, token_symbol): + """Executes a chain of celery tasks that issues a transfer request of ERC20 tokens from one address to another. + + :param from_address: Ethereum address of sender + :type from_address: str, 0x-hex + :param to_address: Ethereum address of recipient + :type to_address: str, 0x-hex + :param spender_address: Ethereum address that is executing transfer (typically an escrow contract) + :type spender_address: str, 0x-hex + :param value: Estimated return from conversion + :type value: int + :param token_symbol: ERC20 token symbol of token to send + :type token_symbol: str + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + [token_symbol], + self.chain_str, + LockEnum.QUEUE, + from_address, + ], + queue=self.queue, + ) + s_tokens_transfer_approval = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_tokens_approve = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_approve = celery.signature( + 'cic_eth.eth.token.approve', + [ + from_address, + spender_address, + value, + self.chain_str, + ], + queue=self.queue, + ) + s_transfer_approval = celery.signature( + 'cic_eth.eth.request.transfer_approval_request', + [ + from_address, + to_address, + value, + self.chain_str, + ], + queue=self.queue, + ) + # TODO: make approve and transfer_approval chainable so callback can be part of the full chain + if self.callback_param != None: + s_transfer_approval.link(self.callback_success) + s_tokens_approve.link(s_approve) + s_tokens_transfer_approval.link(s_transfer_approval).on_error(self.callback_error) + else: + s_tokens_approve.link(s_approve) + s_tokens_transfer_approval.link(s_transfer_approval) + + g = celery.group(s_tokens_approve, s_tokens_transfer_approval) #s_tokens.apply_async(queue=self.queue) + s_check.link(g) + t = s_check.apply_async() + #t = s_tokens.apply_async(queue=self.queue) + return t + + + def balance(self, address, token_symbol): + """Calls the provided callback with the current token balance of the given address. + + :param address: Ethereum address of holder + :type address: str, 0x-hex + :param token_symbol: ERC20 token symbol of token to send + :type token_symbol: str + :returns: uuid of root task + :rtype: celery.Task + """ + if self.callback_param == None: + logg.warning('balance pointlessly called with no callback url') + + s_tokens = celery.signature( + 'cic_eth.eth.token.resolve_tokens_by_symbol', + [ + [token_symbol], + self.chain_str, + ], + queue=self.queue, + ) + s_balance = celery.signature( + 'cic_eth.eth.token.balance', + [ + address, + self.chain_str, + ], + queue=self.queue, + ) + + if self.callback_param != None: + s_balance.link(self.callback_success) + s_tokens.link(s_balance).on_error(self.callback_error) + else: + s_tokens.link(s_balance) + + t = s_tokens.apply_async(queue=self.queue) + return t + + + def create_account(self, password='', register=True): + """Creates a new blockchain address encrypted with the given password, and calls the provided callback with the address of the new account. + + :param password: Password to encode the password with in the backend (careful, you will have to remember it) + :type password: str + :param register: Register the new account in accounts index backend + :type password: bool + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + password, + self.chain_str, + LockEnum.CREATE, + ], + queue=self.queue, + ) + s_account = celery.signature( + 'cic_eth.eth.account.create', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_check.link(s_account) + if self.callback_param != None: + s_account.link(self.callback_success) + + if register: + s_register = celery.signature( + 'cic_eth.eth.account.register', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_account.link(s_register) + + t = s_check.apply_async(queue=self.queue) + return t + + + def refill_gas(self, address): + """Creates a new gas refill transaction with the registered gas provider address. + + :param address: Ethereum address to send gas tokens to. + :type address: str + :returns: uuid of root task + :rtype: celery.Task + """ + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + address, + self.chain_str, + LockEnum.QUEUE, + ], + queue=self.queue, + ) + s_refill = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + self.chain_str, + ], + queue=self.queue, + ) + s_check.link(s_refill) + if self.callback_param != None: + s_refill.link(self.callback_success) + + t = s_check.apply_async(queue=self.queue) + return t + + + def ping(self, r): + """A noop callback ping for testing purposes. + + :returns: uuid of callback task + :rtype: celery.Task + """ + if self.callback_param == None: + logg.warning('nothing to do') + return None + + t = self.callback_success.apply_async([r]) + return t diff --git a/apps/cic-eth/cic_eth/callbacks/__init__.py b/apps/cic-eth/cic_eth/callbacks/__init__.py new file mode 100644 index 00000000..45bea60d --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/__init__.py @@ -0,0 +1 @@ +from .callback import Callback diff --git a/apps/cic-eth/cic_eth/callbacks/callback.py b/apps/cic-eth/cic_eth/callbacks/callback.py new file mode 100644 index 00000000..4ca56e3a --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/callback.py @@ -0,0 +1,16 @@ +# third-party imports +import celery + +class Callback(celery.Task): + """Provides static properties for web connection context. The properties should be set directly. + """ + ssl = False + """If true, a SSL client certificate with default protocol for standard library ssl will be used for the HTTP connection.""" + ssl_cert_file = None + """Absolute path to client certificate PEM file""" + ssl_key_file = None + """Absolute path to client key file""" + ssl_password=None + """Password to unlock key file""" + ssl_ca_file = None + """Client certificate CA chain""" diff --git a/apps/cic-eth/cic_eth/callbacks/http.py b/apps/cic-eth/cic_eth/callbacks/http.py new file mode 100644 index 00000000..f06982e5 --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/http.py @@ -0,0 +1,64 @@ +# standard imports +import json +import ssl +import os +import urllib +from urllib import request +from urllib.request import urlopen + +# third-party imports +from . import Callback +import celery + +celery_app = celery.current_app +logg = celery_app.log.get_default_logger() + + +@celery_app.task(base=Callback, bind=True) +def http(self, result, url, status_code): + """A generic web callback implementation for task results. + + Input parameters depend on whether the callback is used as an error callback, or as a part of a celery chain. + + The callback receives: + + { + 'root_id': the uuid of the topmost task in the chain, which is known to the API caller. + 'status': , + 'result': , + } + + :param result: Task context object (on error) or return value of previous task (on success) + :type result: Varies + :param url: Url to HTTP POST results to + :type url: str + :param status_code: 0 on success, any other value is error + :type status_code: int + """ + req = request.Request(url) + data = { + 'root_id': self.request.root_id, + 'status': status_code, + 'result': result, + } + data_str = json.dumps(data) + data_bytes = data_str.encode('utf-8') + req.add_header('Content-Type', 'application/json') + req.data = data_bytes + + ctx = None + if self.ssl: + ctx = ssl.SSLContext() + ctx.load_cert_chain( + self.ssl_cert_file, + self.ssl_key_file, + self.ssl_password, + ) + + response = urlopen( + req, + context=ctx, + ) + + if response.status != 200: + raise RuntimeError('Expected status 200 from remote server, but got {} {}'.format(response.status, response.msg)) diff --git a/apps/cic-eth/cic_eth/callbacks/noop.py b/apps/cic-eth/cic_eth/callbacks/noop.py new file mode 100644 index 00000000..b064e40d --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/noop.py @@ -0,0 +1,21 @@ +import celery + +celery_app = celery.current_app +logg = celery_app.log.get_default_logger() + + +@celery_app.task(bind=True) +def noop(self, result, param, status_code): + """A noop callback for task chains executed by external api methods. Logs the callback arguments. + + :param result: Task context object (on error) or return value of previous task (on success) + :type result: Varies + :param param: Static value passed from api caller + :type param: Varies + :param status_code: 0 on success, any other value is error + :type status_code: int + :returns: True + :rtype: bool + """ + logg.info('noop callback {} {} {}'.format(result, param, status_code)) + return True diff --git a/apps/cic-eth/cic_eth/callbacks/redis.py b/apps/cic-eth/cic_eth/callbacks/redis.py new file mode 100644 index 00000000..648edabb --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/redis.py @@ -0,0 +1,24 @@ +# standard imports +import logging +import json +import redis as redis_interface + +# third-party imports +import celery + +# local imports +from . import Callback + +celery_app = celery.current_app + +logg = celery_app.log.get_default_logger() + + +@celery_app.task(base=Callback, bind=True) +def redis(self, result, destination, status_code): + (host, port, db, channel) = destination.split(':') + r = redis_interface.Redis(host=host, port=port, db=db) + s = json.dumps(result) + logg.debug('redis callback on host {} port {} db {} channel {}'.format(host, port, db, channel)) + r.publish(channel, s) + r.close() diff --git a/apps/cic-eth/cic_eth/callbacks/tcp.py b/apps/cic-eth/cic_eth/callbacks/tcp.py new file mode 100644 index 00000000..9cd79938 --- /dev/null +++ b/apps/cic-eth/cic_eth/callbacks/tcp.py @@ -0,0 +1,24 @@ +# standard imports +import socket +import logging +import json + +# third-party imports +import celery + +# local imports +from . import Callback + +celery_app = celery.current_app + +logg = celery_app.log.get_default_logger() + + +@celery_app.task(base=Callback, bind=True) +def tcp(self, result, destination, status_code): + s = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM) + (host, port) = destination.split(':') + logg.debug('tcp callback to {} {}'.format(host, port)) + s.connect((host, int(port))) + s.send(json.dumps(result).encode('utf-8')) + s.close() diff --git a/apps/cic-eth/cic_eth/db/__init__.py b/apps/cic-eth/cic_eth/db/__init__.py new file mode 100644 index 00000000..1a549508 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/__init__.py @@ -0,0 +1,61 @@ +# standard imports +import os +import logging + +# local imports +from cic_eth.db.models.base import SessionBase + +logg = logging.getLogger() + + +# an Engine, which the Session will use for connection +# resources + +# TODO: Remove the package exports, all models should be imported using full path +from .models.otx import Otx +from .models.convert import TxConvertTransfer + + +def dsn_from_config(config): + """Generate a dsn string from the provided config dict. + + The config dict must include all well-known database connection parameters, and must implement the method "get(key)" to retrieve them. Any missing parameters will be be rendered as the literal string "None" + + :param config: Configuration object + :type config: Varies + :returns: dsn string + :rtype: str + """ + scheme = config.get('DATABASE_ENGINE') + if config.get('DATABASE_DRIVER') != None: + scheme += '+{}'.format(config.get('DATABASE_DRIVER')) + + dsn = '' + dsn_out = '' + if config.get('DATABASE_ENGINE') == 'sqlite': + dsn = '{}:///{}'.format( + scheme, + config.get('DATABASE_NAME'), + ) + dsn_out = dsn + + else: + dsn = '{}://{}:{}@{}:{}/{}'.format( + scheme, + config.get('DATABASE_USER'), + config.get('DATABASE_PASSWORD'), + config.get('DATABASE_HOST'), + config.get('DATABASE_PORT'), + config.get('DATABASE_NAME'), + ) + dsn_out = '{}://{}:{}@{}:{}/{}'.format( + scheme, + config.get('DATABASE_USER'), + '***', + config.get('DATABASE_HOST'), + config.get('DATABASE_PORT'), + config.get('DATABASE_NAME'), + ) + logg.debug('parsed dsn from config: {}'.format(dsn_out)) + return dsn + diff --git a/apps/cic-eth/cic_eth/db/enum.py b/apps/cic-eth/cic_eth/db/enum.py new file mode 100644 index 00000000..c835cac3 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/enum.py @@ -0,0 +1,51 @@ +# standard imports +import enum + +class StatusEnum(enum.IntEnum): + """ + + - Inactive, not finalized. (<0) + * PENDING: The initial state of a newly added transaction record. No action has been performed on this transaction yet. + * SENDFAIL: The transaction was not received by the node. + * RETRY: The transaction is queued for a new send attempt after previously failing. + * READYSEND: The transaction is queued for its first send attempt + * OBSOLETED: A new transaction with the same nonce and higher gas has been sent to network. + * WAITFORGAS: The transaction is on hold pending gas funding. + - Active state: (==0) + * SENT: The transaction has been sent to the mempool. + - Inactive, finalized. (>0) + * FUBAR: Unknown error occurred and transaction is abandoned. Manual intervention needed. + * CANCELLED: The transaction was sent, but was not mined and has disappered from the mempool. This usually follows a transaction being obsoleted. + * OVERRIDDEN: Transaction has been manually overriden. + * REJECTED: The transaction was rejected by the node. + * REVERTED: The transaction was mined, but exception occurred during EVM execution. (Block number will be set) + * SUCCESS: THe transaction was successfully mined. (Block number will be set) + + """ + PENDING=-9 + SENDFAIL=-8 + RETRY=-7 + READYSEND=-6 + OBSOLETED=-2 + WAITFORGAS=-1 + SENT=0 + FUBAR=1 + CANCELLED=2 + OVERRIDDEN=3 + REJECTED=7 + REVERTED=8 + SUCCESS=9 + + +class LockEnum(enum.IntEnum): + """ + STICKY: When set, reset is not possible + CREATE: Disable creation of accounts + SEND: Disable sending to network + QUEUE: Disable queueing new or modified transactions + """ + STICKY=1 + CREATE=2 + SEND=4 + QUEUE=8 + ALL=int(0xfffffffffffffffe) diff --git a/apps/cic-eth/cic_eth/db/error.py b/apps/cic-eth/cic_eth/db/error.py new file mode 100644 index 00000000..29b89f01 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/error.py @@ -0,0 +1,9 @@ +class TxStateChangeError(Exception): + """Raised when an invalid state change of a queued transaction occurs + """ + pass + + +class UnknownConvertError(Exception): + """Raised when a non-existent convert to transaction subtask is requested + """ diff --git a/apps/cic-eth/cic_eth/db/migrations/default/README b/apps/cic-eth/cic_eth/db/migrations/default/README new file mode 100644 index 00000000..98e4f9c4 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/README @@ -0,0 +1 @@ +Generic single-database configuration. \ No newline at end of file diff --git a/apps/cic-eth/cic_eth/db/migrations/default/alembic.ini b/apps/cic-eth/cic_eth/db/migrations/default/alembic.ini new file mode 100644 index 00000000..1555f68c --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/alembic.ini @@ -0,0 +1,85 @@ +# A generic, single database configuration. + +[alembic] +# path to migration scripts +script_location = . + +# template used to generate migration files +# file_template = %%(rev)s_%%(slug)s + +# timezone to use when rendering the date +# within the migration file as well as the filename. +# string value is passed to dateutil.tz.gettz() +# leave blank for localtime +# timezone = + +# max length of characters to apply to the +# "slug" field +# truncate_slug_length = 40 + +# set to 'true' to run the environment during +# the 'revision' command, regardless of autogenerate +# revision_environment = false + +# set to 'true' to allow .pyc and .pyo files without +# a source .py file to be detected as revisions in the +# versions/ directory +# sourceless = false + +# version location specification; this defaults +# to migrations/versions. When using multiple version +# directories, initial revisions must be specified with --version-path +# version_locations = %(here)s/bar %(here)s/bat migrations/versions + +# the output encoding used when revision files +# are written from script.py.mako +# output_encoding = utf-8 + +#sqlalchemy.url = driver://user:pass@localhost/dbname +sqlalchemy.url = postgresql+psycopg2://postgres@localhost:5432/cic-eth + +[post_write_hooks] +# post_write_hooks defines scripts or Python functions that are run +# on newly generated revision scripts. See the documentation for further +# detail and examples + +# format using "black" - use the console_scripts runner, against the "black" entrypoint +# hooks=black +# black.type=console_scripts +# black.entrypoint=black +# black.options=-l 79 + +# Logging configuration +[loggers] +keys = root,sqlalchemy,alembic + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console +qualname = + +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine + +[logger_alembic] +level = INFO +handlers = +qualname = alembic + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/apps/cic-eth/cic_eth/db/migrations/default/env.py b/apps/cic-eth/cic_eth/db/migrations/default/env.py new file mode 100644 index 00000000..70518a2e --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/env.py @@ -0,0 +1,77 @@ +from logging.config import fileConfig + +from sqlalchemy import engine_from_config +from sqlalchemy import pool + +from alembic import context + +# this is the Alembic Config object, which provides +# access to the values within the .ini file in use. +config = context.config + +# Interpret the config file for Python logging. +# This line sets up loggers basically. +fileConfig(config.config_file_name) + +# add your model's MetaData object here +# for 'autogenerate' support +# from myapp import mymodel +# target_metadata = mymodel.Base.metadata +target_metadata = None + +# other values from the config, defined by the needs of env.py, +# can be acquired: +# my_important_option = config.get_main_option("my_important_option") +# ... etc. + + +def run_migrations_offline(): + """Run migrations in 'offline' mode. + + This configures the context with just a URL + and not an Engine, though an Engine is acceptable + here as well. By skipping the Engine creation + we don't even need a DBAPI to be available. + + Calls to context.execute() here emit the given string to the + script output. + + """ + url = config.get_main_option("sqlalchemy.url") + context.configure( + url=url, + target_metadata=target_metadata, + literal_binds=True, + dialect_opts={"paramstyle": "named"}, + ) + + with context.begin_transaction(): + context.run_migrations() + + +def run_migrations_online(): + """Run migrations in 'online' mode. + + In this scenario we need to create an Engine + and associate a connection with the context. + + """ + connectable = engine_from_config( + config.get_section(config.config_ini_section), + prefix="sqlalchemy.", + poolclass=pool.NullPool, + ) + + with connectable.connect() as connection: + context.configure( + connection=connection, target_metadata=target_metadata + ) + + with context.begin_transaction(): + context.run_migrations() + + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() diff --git a/apps/cic-eth/cic_eth/db/migrations/default/script.py.mako b/apps/cic-eth/cic_eth/db/migrations/default/script.py.mako new file mode 100644 index 00000000..2c015630 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/script.py.mako @@ -0,0 +1,24 @@ +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision | comma,n} +Create Date: ${create_date} + +""" +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +# revision identifiers, used by Alembic. +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +branch_labels = ${repr(branch_labels)} +depends_on = ${repr(depends_on)} + + +def upgrade(): + ${upgrades if upgrades else "pass"} + + +def downgrade(): + ${downgrades if downgrades else "pass"} diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/2a07b543335e_add_new_syncer_table.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/2a07b543335e_add_new_syncer_table.py new file mode 100644 index 00000000..30ddb96f --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/2a07b543335e_add_new_syncer_table.py @@ -0,0 +1,35 @@ +"""Add new syncer table + +Revision ID: 2a07b543335e +Revises: a2e2aab8f331 +Create Date: 2020-12-27 09:35:44.017981 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '2a07b543335e' +down_revision = 'a2e2aab8f331' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'blockchain_sync', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('blockchain', sa.String, nullable=False), + sa.Column('block_start', sa.Integer, nullable=False, default=0), + sa.Column('tx_start', sa.Integer, nullable=False, default=0), + sa.Column('block_cursor', sa.Integer, nullable=False, default=0), + sa.Column('tx_cursor', sa.Integer, nullable=False, default=0), + sa.Column('block_target', sa.Integer, nullable=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime), + ) + + +def downgrade(): + op.drop_table('blockchain_sync') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/49b348246d70_add_nonce_index.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/49b348246d70_add_nonce_index.py new file mode 100644 index 00000000..3abee1b6 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/49b348246d70_add_nonce_index.py @@ -0,0 +1,29 @@ +"""Add nonce index + +Revision ID: 49b348246d70 +Revises: 52c7c59cd0b1 +Create Date: 2020-12-19 09:45:36.186446 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '49b348246d70' +down_revision = '52c7c59cd0b1' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'nonce', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('address_hex', sa.String(42), nullable=False, unique=True), + sa.Column('nonce', sa.Integer, nullable=False), + ) + + +def downgrade(): + op.drop_table('nonce') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/52c7c59cd0b1_add_account_roles.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/52c7c59cd0b1_add_account_roles.py new file mode 100644 index 00000000..7aa74059 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/52c7c59cd0b1_add_account_roles.py @@ -0,0 +1,31 @@ +"""Add account roles + +Revision ID: 52c7c59cd0b1 +Revises: 9c4bd7491015 +Create Date: 2020-12-19 07:21:38.249237 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '52c7c59cd0b1' +down_revision = '9c4bd7491015' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'account_role', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('tag', sa.Text, nullable=False, unique=True), + sa.Column('address_hex', sa.String(42), nullable=False), + ) + pass + + +def downgrade(): + op.drop_table('account_role') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/6ac7a1dadc46_add_otx_state_log.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/6ac7a1dadc46_add_otx_state_log.py new file mode 100644 index 00000000..f15834d9 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/6ac7a1dadc46_add_otx_state_log.py @@ -0,0 +1,30 @@ +"""Add otx state log + +Revision ID: 6ac7a1dadc46 +Revises: 89e1e9baa53c +Create Date: 2021-01-30 13:59:49.022373 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '6ac7a1dadc46' +down_revision = '89e1e9baa53c' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx_state_log', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=False), + sa.Column('date', sa.DateTime, nullable=False), + sa.Column('status', sa.Integer, nullable=False), + ) + + +def downgrade(): + op.drop_table('otx_state_log') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py new file mode 100644 index 00000000..3be687eb --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py @@ -0,0 +1,31 @@ +"""Add attempts and version log for otx + +Revision ID: 71708e943dbd +Revises: 7e8d7626e38f +Create Date: 2020-09-26 14:41:19.298651 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '71708e943dbd' +down_revision = '7e8d7626e38f' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx_attempts', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=False), + sa.Column('date', sa.DateTime, nullable=False), + ) + pass + + +def downgrade(): + op.drop_table('otx_attempts') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/7cb65b893934_add_blocknumber_pointer.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/7cb65b893934_add_blocknumber_pointer.py new file mode 100644 index 00000000..74a97f83 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/7cb65b893934_add_blocknumber_pointer.py @@ -0,0 +1,31 @@ +"""add blocknumber pointer + +Revision ID: 7cb65b893934 +Revises: 8593fa1ca0f4 +Create Date: 2020-09-24 19:29:13.543648 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '7cb65b893934' +down_revision = '8593fa1ca0f4' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'watcher_state', + sa.Column('block_number', sa.Integer) + ) + conn = op.get_bind() + conn.execute('INSERT INTO watcher_state (block_number) VALUES (0);') + pass + + +def downgrade(): + op.drop_table('watcher_state') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/7e8d7626e38f_add_block_sync.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/7e8d7626e38f_add_block_sync.py new file mode 100644 index 00000000..52f29a7b --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/7e8d7626e38f_add_block_sync.py @@ -0,0 +1,45 @@ +"""Add block sync + +Revision ID: 7e8d7626e38f +Revises: cd2052be6db2 +Create Date: 2020-09-26 11:12:27.818524 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '7e8d7626e38f' +down_revision = 'cd2052be6db2' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'block_sync', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('blockchain', sa.String, nullable=False, unique=True), + sa.Column('block_height_backlog', sa.Integer, nullable=False, default=0), + sa.Column('tx_height_backlog', sa.Integer, nullable=False, default=0), + sa.Column('block_height_session', sa.Integer, nullable=False, default=0), + sa.Column('tx_height_session', sa.Integer, nullable=False, default=0), + sa.Column('block_height_head', sa.Integer, nullable=False, default=0), + sa.Column('tx_height_head', sa.Integer, nullable=False, default=0), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime), + ) + op.drop_table('watcher_state') + pass + + +def downgrade(): + op.drop_table('block_sync') + op.create_table( + 'watcher_state', + sa.Column('block_number', sa.Integer) + ) + conn = op.get_bind() + conn.execute('INSERT INTO watcher_state (block_number) VALUES (0);') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/8593fa1ca0f4_add_transaction_queue.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/8593fa1ca0f4_add_transaction_queue.py new file mode 100644 index 00000000..e9f9cf6a --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/8593fa1ca0f4_add_transaction_queue.py @@ -0,0 +1,35 @@ +"""Add transaction queue + +Revision ID: 8593fa1ca0f4 +Revises: +Create Date: 2020-09-22 21:56:42.117047 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '8593fa1ca0f4' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('nonce', sa.Integer, nullable=False), + sa.Column('tx_hash', sa.String(66), nullable=False), + sa.Column('signed_tx', sa.Text, nullable=False), + sa.Column('status', sa.Integer, nullable=False, default=-9), + sa.Column('block', sa.Integer), + ) + op.create_index('idx_otx_tx', 'otx', ['tx_hash'], unique=True) + + +def downgrade(): + op.drop_index('idx_otx_tx') + op.drop_table('otx') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/89e1e9baa53c_add_account_lock.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/89e1e9baa53c_add_account_lock.py new file mode 100644 index 00000000..4b1c4401 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/89e1e9baa53c_add_account_lock.py @@ -0,0 +1,33 @@ +"""Add account lock + +Revision ID: 89e1e9baa53c +Revises: 2a07b543335e +Create Date: 2021-01-27 19:57:36.793882 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '89e1e9baa53c' +down_revision = '2a07b543335e' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'lock', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column("address", sa.String(42), nullable=True), + sa.Column('blockchain', sa.String), + sa.Column("flags", sa.BIGINT(), nullable=False, default=0), + sa.Column("date_created", sa.DateTime, nullable=False), + sa.Column("otx_id", sa.Integer, nullable=True), + ) + op.create_index('idx_chain_address', 'lock', ['blockchain', 'address'], unique=True) + +def downgrade(): + op.drop_index('idx_chain_address') + op.drop_table('lock') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/9c4bd7491015_rename_block_sync_table.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/9c4bd7491015_rename_block_sync_table.py new file mode 100644 index 00000000..f58721b2 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/9c4bd7491015_rename_block_sync_table.py @@ -0,0 +1,26 @@ +"""Rename block sync table + +Revision ID: 9c4bd7491015 +Revises: 9daa16518a91 +Create Date: 2020-10-15 23:45:56.306898 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9c4bd7491015' +down_revision = '9daa16518a91' +branch_labels = None +depends_on = None + + +def upgrade(): + op.rename_table('block_sync', 'otx_sync') + pass + + +def downgrade(): + op.rename_table('otx_sync', 'block_sync') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/9daa16518a91_add_tx_sync_state.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/9daa16518a91_add_tx_sync_state.py new file mode 100644 index 00000000..2c6cc0fe --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/9daa16518a91_add_tx_sync_state.py @@ -0,0 +1,30 @@ +"""add tx sync state + +Revision ID: 9daa16518a91 +Revises: e3b5330ee71c +Create Date: 2020-10-10 14:43:18.699276 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9daa16518a91' +down_revision = 'e3b5330ee71c' +branch_labels = None +depends_on = None + + +def upgrade(): +# op.create_table( +# 'tx_sync', +# sa.Column('tx', sa.String(66), nullable=False), +# ) +# op.execute("INSERT INTO tx_sync VALUES('0x0000000000000000000000000000000000000000000000000000000000000000')") + pass + + +def downgrade(): +# op.drop_table('tx_sync') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/a2e2aab8f331_add_date_accessed_to_txcache.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/a2e2aab8f331_add_date_accessed_to_txcache.py new file mode 100644 index 00000000..f82f2615 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/a2e2aab8f331_add_date_accessed_to_txcache.py @@ -0,0 +1,34 @@ +"""Add date accessed to txcache + +Revision ID: a2e2aab8f331 +Revises: 49b348246d70 +Create Date: 2020-12-24 18:58:06.137812 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'a2e2aab8f331' +down_revision = '49b348246d70' +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column( + 'tx_cache', + sa.Column( + 'date_checked', + sa.DateTime, + nullable=False + ) + ) + pass + + +def downgrade(): + # drop does not work withs qlite + #op.drop_column('tx_cache', 'date_checked') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/cd2052be6db2_convert_tx_index.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/cd2052be6db2_convert_tx_index.py new file mode 100644 index 00000000..5b59d734 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/cd2052be6db2_convert_tx_index.py @@ -0,0 +1,34 @@ +"""convert tx index + +Revision ID: cd2052be6db2 +Revises: 7cb65b893934 +Create Date: 2020-09-24 21:20:51.580500 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'cd2052be6db2' +down_revision = '7cb65b893934' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'tx_convert_transfer', + sa.Column('id', sa.Integer, primary_key=True), + #sa.Column('approve_tx_hash', sa.String(66), nullable=False, unique=True), + sa.Column('convert_tx_hash', sa.String(66), nullable=False, unique=True), + sa.Column('transfer_tx_hash', sa.String(66), unique=True), +# sa.Column('holder_address', sa.String(42), nullable=False), + sa.Column('recipient_address', sa.String(42), nullable=False), + ) + op.create_index('idx_tx_convert_address', 'tx_convert_transfer', ['recipient_address']) + + +def downgrade(): + op.drop_index('idx_tx_convert_address') + op.drop_table('tx_convert_transfer') diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/df19f4e69676_add_tx_track.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/df19f4e69676_add_tx_track.py new file mode 100644 index 00000000..2c1ea138 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/df19f4e69676_add_tx_track.py @@ -0,0 +1,31 @@ +"""Add tx tracker record + +Revision ID: df19f4e69676 +Revises: 71708e943dbd +Create Date: 2020-10-09 23:31:44.563498 + +""" +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = 'df19f4e69676' +down_revision = '71708e943dbd' +branch_labels = None +depends_on = None + + +def upgrade(): +# op.create_table( +# 'tx', +# sa.Column('id', sa.Integer, primary_key=True), +# sa.Column('date_added', sa.DateTime, nullable=False), +# sa.Column('tx_hash', sa.String(66), nullable=False, unique=True), +# sa.Column('success', sa.Boolean(), nullable=False), +# ) + pass + + +def downgrade(): +# op.drop_table('tx') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/default/versions/e3b5330ee71c_.py b/apps/cic-eth/cic_eth/db/migrations/default/versions/e3b5330ee71c_.py new file mode 100644 index 00000000..37cb3b81 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/default/versions/e3b5330ee71c_.py @@ -0,0 +1,38 @@ +"""Add cached values for tx + +Revision ID: e3b5330ee71c +Revises: df19f4e69676 +Create Date: 2020-10-10 00:17:07.094893 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'e3b5330ee71c' +down_revision = 'df19f4e69676' +branch_labels = None +depends_on = None + +def upgrade(): + op.create_table( + 'tx_cache', + sa.Column('id', sa.Integer, primary_key=True), +# sa.Column('tx_id', sa.Integer, sa.ForeignKey('tx.id'), nullable=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime, nullable=False), + sa.Column('source_token_address', sa.String(42), nullable=False), + sa.Column('destination_token_address', sa.String(42), nullable=False), + sa.Column('sender', sa.String(42), nullable=False), + sa.Column('recipient', sa.String(42), nullable=False), + sa.Column('from_value', sa.String(), nullable=False), + sa.Column('to_value', sa.String(), nullable=True), + sa.Column('block_number', sa.BIGINT(), nullable=True), + sa.Column('tx_index', sa.Integer, nullable=True), + ) + +def downgrade(): + op.drop_table('tx_cache') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/alembic.ini b/apps/cic-eth/cic_eth/db/migrations/postgresql/alembic.ini new file mode 100644 index 00000000..1555f68c --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/alembic.ini @@ -0,0 +1,85 @@ +# A generic, single database configuration. + +[alembic] +# path to migration scripts +script_location = . + +# template used to generate migration files +# file_template = %%(rev)s_%%(slug)s + +# timezone to use when rendering the date +# within the migration file as well as the filename. +# string value is passed to dateutil.tz.gettz() +# leave blank for localtime +# timezone = + +# max length of characters to apply to the +# "slug" field +# truncate_slug_length = 40 + +# set to 'true' to run the environment during +# the 'revision' command, regardless of autogenerate +# revision_environment = false + +# set to 'true' to allow .pyc and .pyo files without +# a source .py file to be detected as revisions in the +# versions/ directory +# sourceless = false + +# version location specification; this defaults +# to migrations/versions. When using multiple version +# directories, initial revisions must be specified with --version-path +# version_locations = %(here)s/bar %(here)s/bat migrations/versions + +# the output encoding used when revision files +# are written from script.py.mako +# output_encoding = utf-8 + +#sqlalchemy.url = driver://user:pass@localhost/dbname +sqlalchemy.url = postgresql+psycopg2://postgres@localhost:5432/cic-eth + +[post_write_hooks] +# post_write_hooks defines scripts or Python functions that are run +# on newly generated revision scripts. See the documentation for further +# detail and examples + +# format using "black" - use the console_scripts runner, against the "black" entrypoint +# hooks=black +# black.type=console_scripts +# black.entrypoint=black +# black.options=-l 79 + +# Logging configuration +[loggers] +keys = root,sqlalchemy,alembic + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console +qualname = + +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine + +[logger_alembic] +level = INFO +handlers = +qualname = alembic + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/env.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/env.py new file mode 100644 index 00000000..70518a2e --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/env.py @@ -0,0 +1,77 @@ +from logging.config import fileConfig + +from sqlalchemy import engine_from_config +from sqlalchemy import pool + +from alembic import context + +# this is the Alembic Config object, which provides +# access to the values within the .ini file in use. +config = context.config + +# Interpret the config file for Python logging. +# This line sets up loggers basically. +fileConfig(config.config_file_name) + +# add your model's MetaData object here +# for 'autogenerate' support +# from myapp import mymodel +# target_metadata = mymodel.Base.metadata +target_metadata = None + +# other values from the config, defined by the needs of env.py, +# can be acquired: +# my_important_option = config.get_main_option("my_important_option") +# ... etc. + + +def run_migrations_offline(): + """Run migrations in 'offline' mode. + + This configures the context with just a URL + and not an Engine, though an Engine is acceptable + here as well. By skipping the Engine creation + we don't even need a DBAPI to be available. + + Calls to context.execute() here emit the given string to the + script output. + + """ + url = config.get_main_option("sqlalchemy.url") + context.configure( + url=url, + target_metadata=target_metadata, + literal_binds=True, + dialect_opts={"paramstyle": "named"}, + ) + + with context.begin_transaction(): + context.run_migrations() + + +def run_migrations_online(): + """Run migrations in 'online' mode. + + In this scenario we need to create an Engine + and associate a connection with the context. + + """ + connectable = engine_from_config( + config.get_section(config.config_ini_section), + prefix="sqlalchemy.", + poolclass=pool.NullPool, + ) + + with connectable.connect() as connection: + context.configure( + connection=connection, target_metadata=target_metadata + ) + + with context.begin_transaction(): + context.run_migrations() + + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/script.py.mako b/apps/cic-eth/cic_eth/db/migrations/postgresql/script.py.mako new file mode 100644 index 00000000..2c015630 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/script.py.mako @@ -0,0 +1,24 @@ +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision | comma,n} +Create Date: ${create_date} + +""" +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +# revision identifiers, used by Alembic. +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +branch_labels = ${repr(branch_labels)} +depends_on = ${repr(depends_on)} + + +def upgrade(): + ${upgrades if upgrades else "pass"} + + +def downgrade(): + ${downgrades if downgrades else "pass"} diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/2a07b543335e_add_new_syncer_table.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/2a07b543335e_add_new_syncer_table.py new file mode 100644 index 00000000..30ddb96f --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/2a07b543335e_add_new_syncer_table.py @@ -0,0 +1,35 @@ +"""Add new syncer table + +Revision ID: 2a07b543335e +Revises: a2e2aab8f331 +Create Date: 2020-12-27 09:35:44.017981 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '2a07b543335e' +down_revision = 'a2e2aab8f331' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'blockchain_sync', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('blockchain', sa.String, nullable=False), + sa.Column('block_start', sa.Integer, nullable=False, default=0), + sa.Column('tx_start', sa.Integer, nullable=False, default=0), + sa.Column('block_cursor', sa.Integer, nullable=False, default=0), + sa.Column('tx_cursor', sa.Integer, nullable=False, default=0), + sa.Column('block_target', sa.Integer, nullable=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime), + ) + + +def downgrade(): + op.drop_table('blockchain_sync') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/49b348246d70_add_nonce_index.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/49b348246d70_add_nonce_index.py new file mode 100644 index 00000000..3abee1b6 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/49b348246d70_add_nonce_index.py @@ -0,0 +1,29 @@ +"""Add nonce index + +Revision ID: 49b348246d70 +Revises: 52c7c59cd0b1 +Create Date: 2020-12-19 09:45:36.186446 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '49b348246d70' +down_revision = '52c7c59cd0b1' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'nonce', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('address_hex', sa.String(42), nullable=False, unique=True), + sa.Column('nonce', sa.Integer, nullable=False), + ) + + +def downgrade(): + op.drop_table('nonce') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/52c7c59cd0b1_add_account_roles.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/52c7c59cd0b1_add_account_roles.py new file mode 100644 index 00000000..7aa74059 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/52c7c59cd0b1_add_account_roles.py @@ -0,0 +1,31 @@ +"""Add account roles + +Revision ID: 52c7c59cd0b1 +Revises: 9c4bd7491015 +Create Date: 2020-12-19 07:21:38.249237 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '52c7c59cd0b1' +down_revision = '9c4bd7491015' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'account_role', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('tag', sa.Text, nullable=False, unique=True), + sa.Column('address_hex', sa.String(42), nullable=False), + ) + pass + + +def downgrade(): + op.drop_table('account_role') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/6ac7a1dadc46_add_otx_state_log.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/6ac7a1dadc46_add_otx_state_log.py new file mode 100644 index 00000000..f15834d9 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/6ac7a1dadc46_add_otx_state_log.py @@ -0,0 +1,30 @@ +"""Add otx state log + +Revision ID: 6ac7a1dadc46 +Revises: 89e1e9baa53c +Create Date: 2021-01-30 13:59:49.022373 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '6ac7a1dadc46' +down_revision = '89e1e9baa53c' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx_state_log', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=False), + sa.Column('date', sa.DateTime, nullable=False), + sa.Column('status', sa.Integer, nullable=False), + ) + + +def downgrade(): + op.drop_table('otx_state_log') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py new file mode 100644 index 00000000..3be687eb --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/71708e943dbd_add_attempts_and_version_log_for_otx.py @@ -0,0 +1,31 @@ +"""Add attempts and version log for otx + +Revision ID: 71708e943dbd +Revises: 7e8d7626e38f +Create Date: 2020-09-26 14:41:19.298651 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '71708e943dbd' +down_revision = '7e8d7626e38f' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx_attempts', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=False), + sa.Column('date', sa.DateTime, nullable=False), + ) + pass + + +def downgrade(): + op.drop_table('otx_attempts') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7cb65b893934_add_blocknumber_pointer.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7cb65b893934_add_blocknumber_pointer.py new file mode 100644 index 00000000..74a97f83 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7cb65b893934_add_blocknumber_pointer.py @@ -0,0 +1,31 @@ +"""add blocknumber pointer + +Revision ID: 7cb65b893934 +Revises: 8593fa1ca0f4 +Create Date: 2020-09-24 19:29:13.543648 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '7cb65b893934' +down_revision = '8593fa1ca0f4' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'watcher_state', + sa.Column('block_number', sa.Integer) + ) + conn = op.get_bind() + conn.execute('INSERT INTO watcher_state (block_number) VALUES (0);') + pass + + +def downgrade(): + op.drop_table('watcher_state') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7e8d7626e38f_add_block_sync.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7e8d7626e38f_add_block_sync.py new file mode 100644 index 00000000..6924fa26 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/7e8d7626e38f_add_block_sync.py @@ -0,0 +1,42 @@ +"""Add block sync + +Revision ID: 7e8d7626e38f +Revises: cd2052be6db2 +Create Date: 2020-09-26 11:12:27.818524 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '7e8d7626e38f' +down_revision = 'cd2052be6db2' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'block_sync', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('blockchain', sa.String, nullable=False, unique=True), + sa.Column('height_backlog', sa.Integer, nullable=False, default=0), + sa.Column('height_session', sa.Integer, nullable=False, default=0), + sa.Column('height_head', sa.Integer, nullable=False, default=0), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime), + ) + op.drop_table('watcher_state') + pass + + +def downgrade(): + op.drop_table('block_sync') + op.create_table( + 'watcher_state', + sa.Column('block_number', sa.Integer) + ) + conn = op.get_bind() + conn.execute('INSERT INTO watcher_state (block_number) VALUES (0);') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/8593fa1ca0f4_add_transaction_queue.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/8593fa1ca0f4_add_transaction_queue.py new file mode 100644 index 00000000..e9f9cf6a --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/8593fa1ca0f4_add_transaction_queue.py @@ -0,0 +1,35 @@ +"""Add transaction queue + +Revision ID: 8593fa1ca0f4 +Revises: +Create Date: 2020-09-22 21:56:42.117047 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '8593fa1ca0f4' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'otx', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('nonce', sa.Integer, nullable=False), + sa.Column('tx_hash', sa.String(66), nullable=False), + sa.Column('signed_tx', sa.Text, nullable=False), + sa.Column('status', sa.Integer, nullable=False, default=-9), + sa.Column('block', sa.Integer), + ) + op.create_index('idx_otx_tx', 'otx', ['tx_hash'], unique=True) + + +def downgrade(): + op.drop_index('idx_otx_tx') + op.drop_table('otx') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/89e1e9baa53c_add_account_lock.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/89e1e9baa53c_add_account_lock.py new file mode 100644 index 00000000..05517fd2 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/89e1e9baa53c_add_account_lock.py @@ -0,0 +1,32 @@ +"""Add account lock + +Revision ID: 89e1e9baa53c +Revises: 2a07b543335e +Create Date: 2021-01-27 19:57:36.793882 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '89e1e9baa53c' +down_revision = '2a07b543335e' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'lock', + sa.Column('id', sa.Integer, primary_key=True), + sa.Column("address", sa.String(42), nullable=True), + sa.Column('blockchain', sa.String), + sa.Column("flags", sa.BIGINT(), nullable=False, default=0), + sa.Column("date_created", sa.DateTime, nullable=False), + ) + op.create_index('idx_chain_address', 'lock', ['blockchain', 'address'], unique=True) + +def downgrade(): + op.drop_index('idx_chain_address') + op.drop_table('lock') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9c4bd7491015_rename_block_sync_table.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9c4bd7491015_rename_block_sync_table.py new file mode 100644 index 00000000..f58721b2 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9c4bd7491015_rename_block_sync_table.py @@ -0,0 +1,26 @@ +"""Rename block sync table + +Revision ID: 9c4bd7491015 +Revises: 9daa16518a91 +Create Date: 2020-10-15 23:45:56.306898 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9c4bd7491015' +down_revision = '9daa16518a91' +branch_labels = None +depends_on = None + + +def upgrade(): + op.rename_table('block_sync', 'otx_sync') + pass + + +def downgrade(): + op.rename_table('otx_sync', 'block_sync') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9daa16518a91_add_tx_sync_state.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9daa16518a91_add_tx_sync_state.py new file mode 100644 index 00000000..2c6cc0fe --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/9daa16518a91_add_tx_sync_state.py @@ -0,0 +1,30 @@ +"""add tx sync state + +Revision ID: 9daa16518a91 +Revises: e3b5330ee71c +Create Date: 2020-10-10 14:43:18.699276 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9daa16518a91' +down_revision = 'e3b5330ee71c' +branch_labels = None +depends_on = None + + +def upgrade(): +# op.create_table( +# 'tx_sync', +# sa.Column('tx', sa.String(66), nullable=False), +# ) +# op.execute("INSERT INTO tx_sync VALUES('0x0000000000000000000000000000000000000000000000000000000000000000')") + pass + + +def downgrade(): +# op.drop_table('tx_sync') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/a2e2aab8f331_add_date_accessed_to_txcache.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/a2e2aab8f331_add_date_accessed_to_txcache.py new file mode 100644 index 00000000..808a503c --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/a2e2aab8f331_add_date_accessed_to_txcache.py @@ -0,0 +1,33 @@ +"""Add date accessed to txcache + +Revision ID: a2e2aab8f331 +Revises: 49b348246d70 +Create Date: 2020-12-24 18:58:06.137812 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'a2e2aab8f331' +down_revision = '49b348246d70' +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column( + 'tx_cache', + sa.Column( + 'date_checked', + sa.DateTime, + nullable=False + ) + ) + pass + + +def downgrade(): + op.drop_column('tx_cache', 'date_checked') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/cd2052be6db2_convert_tx_index.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/cd2052be6db2_convert_tx_index.py new file mode 100644 index 00000000..5b59d734 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/cd2052be6db2_convert_tx_index.py @@ -0,0 +1,34 @@ +"""convert tx index + +Revision ID: cd2052be6db2 +Revises: 7cb65b893934 +Create Date: 2020-09-24 21:20:51.580500 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'cd2052be6db2' +down_revision = '7cb65b893934' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'tx_convert_transfer', + sa.Column('id', sa.Integer, primary_key=True), + #sa.Column('approve_tx_hash', sa.String(66), nullable=False, unique=True), + sa.Column('convert_tx_hash', sa.String(66), nullable=False, unique=True), + sa.Column('transfer_tx_hash', sa.String(66), unique=True), +# sa.Column('holder_address', sa.String(42), nullable=False), + sa.Column('recipient_address', sa.String(42), nullable=False), + ) + op.create_index('idx_tx_convert_address', 'tx_convert_transfer', ['recipient_address']) + + +def downgrade(): + op.drop_index('idx_tx_convert_address') + op.drop_table('tx_convert_transfer') diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/df19f4e69676_add_tx_track.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/df19f4e69676_add_tx_track.py new file mode 100644 index 00000000..2c1ea138 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/df19f4e69676_add_tx_track.py @@ -0,0 +1,31 @@ +"""Add tx tracker record + +Revision ID: df19f4e69676 +Revises: 71708e943dbd +Create Date: 2020-10-09 23:31:44.563498 + +""" +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = 'df19f4e69676' +down_revision = '71708e943dbd' +branch_labels = None +depends_on = None + + +def upgrade(): +# op.create_table( +# 'tx', +# sa.Column('id', sa.Integer, primary_key=True), +# sa.Column('date_added', sa.DateTime, nullable=False), +# sa.Column('tx_hash', sa.String(66), nullable=False, unique=True), +# sa.Column('success', sa.Boolean(), nullable=False), +# ) + pass + + +def downgrade(): +# op.drop_table('tx') + pass diff --git a/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/e3b5330ee71c_.py b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/e3b5330ee71c_.py new file mode 100644 index 00000000..ae53cf46 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/migrations/postgresql/versions/e3b5330ee71c_.py @@ -0,0 +1,38 @@ +"""Add cached values for tx + +Revision ID: e3b5330ee71c +Revises: df19f4e69676 +Create Date: 2020-10-10 00:17:07.094893 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'e3b5330ee71c' +down_revision = 'df19f4e69676' +branch_labels = None +depends_on = None + +def upgrade(): + op.create_table( + 'tx_cache', + sa.Column('id', sa.Integer, primary_key=True), +# sa.Column('tx_id', sa.Integer, sa.ForeignKey('tx.id'), nullable=True), + sa.Column('otx_id', sa.Integer, sa.ForeignKey('otx.id'), nullable=True), + sa.Column('date_created', sa.DateTime, nullable=False), + sa.Column('date_updated', sa.DateTime, nullable=False), + sa.Column('source_token_address', sa.String(42), nullable=False), + sa.Column('destination_token_address', sa.String(42), nullable=False), + sa.Column('sender', sa.String(42), nullable=False), + sa.Column('recipient', sa.String(42), nullable=False), + sa.Column('from_value', sa.BIGINT(), nullable=False), + sa.Column('to_value', sa.BIGINT(), nullable=True), + sa.Column('block_number', sa.BIGINT(), nullable=True), + sa.Column('tx_index', sa.Integer, nullable=True), + ) + +def downgrade(): + op.drop_table('tx_cache') + pass diff --git a/apps/cic-eth/cic_eth/db/models/base.py b/apps/cic-eth/cic_eth/db/models/base.py new file mode 100644 index 00000000..153906af --- /dev/null +++ b/apps/cic-eth/cic_eth/db/models/base.py @@ -0,0 +1,73 @@ +# third-party imports +from sqlalchemy import Column, Integer +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy import create_engine +from sqlalchemy.orm import sessionmaker + +Model = declarative_base(name='Model') + + +class SessionBase(Model): + """The base object for all SQLAlchemy enabled models. All other models must extend this. + """ + __abstract__ = True + + id = Column(Integer, primary_key=True) + + engine = None + """Database connection engine of the running aplication""" + sessionmaker = None + """Factory object responsible for creating sessions from the connection pool""" + transactional = True + """Whether the database backend supports query transactions. Should be explicitly set by initialization code""" + poolable = True + """Whether the database backend supports query transactions. Should be explicitly set by initialization code""" + + + @staticmethod + def create_session(): + """Creates a new database session. + """ + return SessionBase.sessionmaker() + + + @staticmethod + def _set_engine(engine): + """Sets the database engine static property + """ + SessionBase.engine = engine + SessionBase.sessionmaker = sessionmaker(bind=SessionBase.engine) + + + @staticmethod + def connect(dsn, debug=False): + """Create new database connection engine and connect to database backend. + + :param dsn: DSN string defining connection. + :type dsn: str + """ + e = None + if SessionBase.poolable: + e = create_engine( + dsn, + max_overflow=50, + pool_pre_ping=True, + pool_size=20, + pool_recycle=10, + echo=debug, + ) + else: + e = create_engine( + dsn, + echo=debug, + ) + + SessionBase._set_engine(e) + + + @staticmethod + def disconnect(): + """Disconnect from database and free resources. + """ + SessionBase.engine.dispose() + SessionBase.engine = None diff --git a/apps/cic-eth/cic_eth/db/models/convert.py b/apps/cic-eth/cic_eth/db/models/convert.py new file mode 100644 index 00000000..00956996 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/models/convert.py @@ -0,0 +1,55 @@ +# third-party imports +from sqlalchemy import Column, Enum, String, Integer +from sqlalchemy.ext.hybrid import hybrid_method + +# local imports +from .base import SessionBase +from ..error import UnknownConvertError + + +class TxConvertTransfer(SessionBase): + """Table describing a transfer of funds after conversion has been successfully performed. + + :param convert_tx_hash: Transaction hash of convert transaction + :type convert_tx_hash: str, 0x-hex + :param recipient_address: Ethereum address of recipient of resulting token balance of conversion + :type recipient_address: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + """ + __tablename__ = 'tx_convert_transfer' + + #approve_tx_hash = Column(String(66)) + convert_tx_hash = Column(String(66)) + transfer_tx_hash = Column(String(66)) + recipient_address = Column(String(42)) + + + @hybrid_method + def transfer(self, transfer_tx_hash): + """Persists transaction hash of performed transfer. Setting this ends the lifetime of this record. + """ + self.transfer_tx_hash = transfer_tx_hash + + + @staticmethod + def get(convert_tx_hash): + """Retrieves a convert transfer record by conversion transaction hash in a separate session. + + :param convert_tx_hash: Transaction hash of convert transaction + :type convert_tx_hash: str, 0x-hex + """ + session = SessionBase.create_session() + q = session.query(TxConvertTransfer) + q = q.filter(TxConvertTransfer.convert_tx_hash==convert_tx_hash) + r = q.first() + session.close() + if r == None: + raise UnknownConvertError(convert_tx_hash) + return r + + + def __init__(self, convert_tx_hash, recipient_address, chain_str): + self.convert_tx_hash = convert_tx_hash + self.recipient_address = recipient_address + self.chain_str = chain_str diff --git a/apps/cic-eth/cic_eth/db/models/lock.py b/apps/cic-eth/cic_eth/db/models/lock.py new file mode 100644 index 00000000..dbd0fd64 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/models/lock.py @@ -0,0 +1,190 @@ +# standard imports +import datetime +import logging + +# third-party imports +from sqlalchemy import Column, String, Integer, DateTime, ForeignKey +from cic_registry import zero_address + +# local imports +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.otx import Otx + +logg = logging.getLogger() + + +class Lock(SessionBase): + """Deactivate functionality on a global or per-account basis + + """ + + __tablename__ = "lock" + + blockchain = Column(String) + address = Column(String, ForeignKey('tx_cache.sender')) + flags = Column(Integer) + date_created = Column(DateTime, default=datetime.datetime.utcnow) + otx_id = Column(Integer, ForeignKey('otx.id')) + + + def chain(self): + """Get chain the cached instance represents. + """ + return self.blockchain + + + @staticmethod + def set(chain_str, flags, address=zero_address, session=None, tx_hash=None): + """Sets flags associated with the given address and chain. + + If a flags entry does not exist it is created. + + Does not validate the address against any other tables or components. + + Valid flags can be found in cic_eth.db.enum.LockEnum. + + :param chain_str: Chain spec string representation + :type str: str + :param flags: Flags to set + :type flags: number + :param address: Ethereum address + :type address: str, 0x-hex + :param session: Database session, if None a separate session will be used. + :type session: SQLAlchemy session + :returns: New flag state of entry + :rtype: number + """ + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + q = localsession.query(Lock) + #q = q.join(TxCache, isouter=True) + q = q.filter(Lock.address==address) + q = q.filter(Lock.blockchain==chain_str) + lock = q.first() + + if lock == None: + lock = Lock() + lock.flags = 0 + lock.address = address + lock.blockchain = chain_str + if tx_hash != None: + q = localsession.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + otx = q.first() + if otx != None: + lock.otx_id = otx.id + + lock.flags |= flags + r = lock.flags + + localsession.add(lock) + localsession.commit() + + if session == None: + localsession.close() + + return r + + + @staticmethod + def reset(chain_str, flags, address=zero_address, session=None): + """Resets flags associated with the given address and chain. + + If the resulting flags entry value is 0, the entry will be deleted. + + Does not validate the address against any other tables or components. + + Valid flags can be found in cic_eth.db.enum.LockEnum. + + :param chain_str: Chain spec string representation + :type str: str + :param flags: Flags to set + :type flags: number + :param address: Ethereum address + :type address: str, 0x-hex + :param session: Database session, if None a separate session will be used. + :type session: SQLAlchemy session + :returns: New flag state of entry + :rtype: number + """ + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + q = localsession.query(Lock) + #q = q.join(TxCache, isouter=True) + q = q.filter(Lock.address==address) + q = q.filter(Lock.blockchain==chain_str) + lock = q.first() + + r = 0 + if lock != None: + lock.flags &= ~flags + if lock.flags == 0: + localsession.delete(lock) + else: + localsession.add(lock) + r = lock.flags + localsession.commit() + + if session == None: + localsession.close() + + return r + + + @staticmethod + def check(chain_str, flags, address=zero_address, session=None): + """Checks whether all given flags are set for given address and chain. + + Does not validate the address against any other tables or components. + + Valid flags can be found in cic_eth.db.enum.LockEnum. + + :param chain_str: Chain spec string representation + :type str: str + :param flags: Flags to set + :type flags: number + :param address: Ethereum address + :type address: str, 0x-hex + :param session: Database session, if None a separate session will be used. + :type session: SQLAlchemy session + :returns: Returns the value of all flags matched + :rtype: number + """ + + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + q = localsession.query(Lock) + #q = q.join(TxCache, isouter=True) + q = q.filter(Lock.address==address) + q = q.filter(Lock.blockchain==chain_str) + q = q.filter(Lock.flags.op('&')(flags)==flags) + lock = q.first() + if session == None: + localsession.close() + + r = 0 + if lock != None: + r = lock.flags & flags + return r + + + @staticmethod + def check_aggregate(chain_str, flags, address, session=None): + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + r = Lock.check(chain_str, flags, session=localsession) + r |= Lock.check(chain_str, flags, address=address, session=localsession) + + if session == None: + localsession.close() + + return r diff --git a/apps/cic-eth/cic_eth/db/models/nonce.py b/apps/cic-eth/cic_eth/db/models/nonce.py new file mode 100644 index 00000000..2a7ad004 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/models/nonce.py @@ -0,0 +1,86 @@ +# standard imports +import logging + +# third-party imports +from sqlalchemy import Column, String, Integer + +# local imports +from .base import SessionBase + +logg = logging.getLogger() + + +class Nonce(SessionBase): + """Provides thread-safe nonce increments. + """ + __tablename__ = 'nonce' + + nonce = Column(Integer) + address_hex = Column(String(42)) + + + @staticmethod + def get(address, session=None): + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + + q = localsession.query(Nonce) + q = q.filter(Nonce.address_hex==address) + nonce = q.first() + + nonce_value = None + if nonce != None: + nonce_value = nonce.nonce; + + if session == None: + localsession.close() + + return nonce_value + + + @staticmethod + def __get(conn, address): + r = conn.execute("SELECT nonce FROM nonce WHERE address_hex = '{}'".format(address)) + nonce = r.fetchone() + if nonce == None: + return None + return nonce[0] + + + @staticmethod + def __set(conn, address, nonce): + conn.execute("UPDATE nonce set nonce = {} WHERE address_hex = '{}'".format(nonce, address)) + + + @staticmethod + def next(address, initial_if_not_exists=0): + """Generate next nonce for the given address. + + If there is no previous nonce record for the address, the nonce may be initialized to a specified value, or 0 if no value has been given. + + :param address: Associate Ethereum address + :type address: str, 0x-hex + :param initial_if_not_exists: Initial nonce value to set if no record exists + :type initial_if_not_exists: number + :returns: Nonce + :rtype: number + """ + conn = Nonce.engine.connect() + if Nonce.transactional: + conn.execute('BEGIN') + conn.execute('LOCK TABLE nonce IN SHARE ROW EXCLUSIVE MODE') + nonce = Nonce.__get(conn, address) + logg.debug('get nonce {} for address {}'.format(nonce, address)) + if nonce == None: + nonce = initial_if_not_exists + conn.execute("INSERT INTO nonce (nonce, address_hex) VALUES ({}, '{}')".format(nonce, address)) + logg.debug('setting default nonce to {} for address {}'.format(nonce, address)) + Nonce.__set(conn, address, nonce+1) + if Nonce.transactional: + conn.execute('COMMIT') + conn.close() + return nonce + + diff --git a/apps/cic-eth/cic_eth/db/models/otx.py b/apps/cic-eth/cic_eth/db/models/otx.py new file mode 100644 index 00000000..43b938b6 --- /dev/null +++ b/apps/cic-eth/cic_eth/db/models/otx.py @@ -0,0 +1,455 @@ +# standard imports +import datetime +import logging + +# third-party imports +from sqlalchemy import Column, Enum, String, Integer, DateTime, Text, or_, ForeignKey +from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method + +# local imports +from .base import SessionBase +from cic_eth.db.enum import StatusEnum +from cic_eth.db.error import TxStateChangeError +#from cic_eth.eth.util import address_hex_from_signed_tx + +logg = logging.getLogger() + + +class OtxStateLog(SessionBase): + + __tablename__ = 'otx_state_log' + + date = Column(DateTime, default=datetime.datetime.utcnow) + status = Column(Integer) + otx_id = Column(Integer, ForeignKey('otx.id')) + + + def __init__(self, otx): + self.otx_id = otx.id + self.status = otx.status + + +class Otx(SessionBase): + """Outgoing transactions with local origin. + + :param nonce: Transaction nonce + :type nonce: number + :param address: Ethereum address of recipient - NOT IN USE, REMOVE + :type address: str + :param tx_hash: Tranasction hash + :type tx_hash: str, 0x-hex + :param signed_tx: Signed raw transaction data + :type signed_tx: str, 0x-hex + """ + __tablename__ = 'otx' + + tracing = False + """Whether to enable queue state tracing""" + + nonce = Column(Integer) + date_created = Column(DateTime, default=datetime.datetime.utcnow) + tx_hash = Column(String(66)) + signed_tx = Column(Text) + status = Column(Integer) + block = Column(Integer) + + + def __set_status(self, status, session=None): + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + self.status = status + localsession.add(self) + localsession.flush() + + if self.tracing: + self.__state_log(session=localsession) + + if session==None: + localsession.commit() + localsession.close() + + + def set_block(self, block, session=None): + """Set block number transaction was mined in. + + Only manipulates object, does not transaction or commit to backend. + + :param block: Block number + :type block: number + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + if self.block != None: + raise TxStateChangeError('Attempted set block {} when block was already {}'.format(block, self.block)) + self.block = block + localsession.add(self) + localsession.flush() + + if session==None: + localsession.commit() + localsession.close() + + + def waitforgas(self, session=None): + """Marks transaction as suspended pending gas funding. + + Only manipulates object, does not transaction or commit to backend. + + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if self.status >= StatusEnum.SENT.value: + raise TxStateChangeError('WAITFORGAS cannot succeed final state, had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.WAITFORGAS, session) + + + def fubar(self, session=None): + """Marks transaction as "fubar." Any transaction marked this way is an anomaly and may be a symptom of a serious problem. + + Only manipulates object, does not transaction or commit to backend. + """ + self.__set_status(StatusEnum.FUBAR, session) + + + def reject(self, session=None): + """Marks transaction as "rejected," which means the node rejected sending the transaction to the network. The nonce has not been spent, and the transaction should be replaced. + + Only manipulates object, does not transaction or commit to backend. + """ + if self.status >= StatusEnum.SENT.value: + raise TxStateChangeError('REJECTED cannot succeed SENT or final state, had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.REJECTED, session) + + + def override(self, session=None): + """Marks transaction as manually overridden. + + Only manipulates object, does not transaction or commit to backend. + """ + if self.status >= StatusEnum.SENT.value: + raise TxStateChangeError('OVERRIDDEN cannot succeed SENT or final state, had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.OVERRIDDEN, session) + + + def retry(self, session=None): + """Marks transaction as ready to retry after a timeout following a sendfail or a completed gas funding. + + Only manipulates object, does not transaction or commit to backend. + + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if self.status != StatusEnum.SENT.value and self.status != StatusEnum.SENDFAIL.value: + raise TxStateChangeError('RETRY must follow SENT or SENDFAIL, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.RETRY, session) + + + def readysend(self, session=None): + """Marks transaction as ready for initial send attempt. + + Only manipulates object, does not transaction or commit to backend. + + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if self.status != StatusEnum.PENDING.value and self.status != StatusEnum.WAITFORGAS.value: + raise TxStateChangeError('READYSEND must follow PENDING or WAITFORGAS, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.READYSEND, session) + + + def sent(self, session=None): + """Marks transaction as having been sent to network. + + Only manipulates object, does not transaction or commit to backend. + + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if self.status > StatusEnum.SENT: + raise TxStateChangeError('SENT after {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.SENT, session) + + + def sendfail(self, session=None): + """Marks that an attempt to send the transaction to the network has failed. + + Only manipulates object, does not transaction or commit to backend. + + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if self.status not in [StatusEnum.PENDING, StatusEnum.SENT, StatusEnum.WAITFORGAS]: + raise TxStateChangeError('SENDFAIL must follow SENT or PENDING, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.SENDFAIL, session) + + + def minefail(self, block, session=None): + """Marks that transaction was mined but code execution did not succeed. + + Only manipulates object, does not transaction or commit to backend. + + :param block: Block number transaction was mined in. + :type block: number + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if block != None: + self.block = block + if self.status != StatusEnum.SENT: + logg.warning('REVERTED should follow SENT, but had {}'.format(StatusEnum(self.status).name)) + #if self.status != StatusEnum.PENDING and self.status != StatusEnum.OBSOLETED and self.status != StatusEnum.SENT: + #if self.status > StatusEnum.SENT: + # raise TxStateChangeError('REVERTED must follow OBSOLETED, PENDING or SENT, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.REVERTED, session) + + + def cancel(self, confirmed=False, session=None): + """Marks that the transaction has been succeeded by a new transaction with same nonce. + + If set to confirmed, the previous state must be OBSOLETED, and will transition to CANCELLED - a finalized state. Otherwise, the state must follow a non-finalized state, and will be set to OBSOLETED. + + Only manipulates object, does not transaction or commit to backend. + + :param confirmed: Whether transition is to a final state. + :type confirmed: bool + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + if confirmed: + if self.status != StatusEnum.OBSOLETED: + logg.warning('CANCELLED must follow OBSOLETED, but had {}'.format(StatusEnum(self.status).name)) + #raise TxStateChangeError('CANCELLED must follow OBSOLETED, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.CANCELLED, session) + elif self.status != StatusEnum.OBSOLETED: + if self.status > StatusEnum.SENT: + logg.warning('OBSOLETED must follow PENDING, SENDFAIL or SENT, but had {}'.format(StatusEnum(self.status).name)) + #raise TxStateChangeError('OBSOLETED must follow PENDING, SENDFAIL or SENT, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.OBSOLETED, session) + + + def success(self, block, session=None): + """Marks that transaction was successfully mined. + + Only manipulates object, does not transaction or commit to backend. + + :param block: Block number transaction was mined in. + :type block: number + :raises cic_eth.db.error.TxStateChangeError: State change represents a sequence of events that should not exist. + """ + + if block != None: + self.block = block + if self.status != StatusEnum.SENT: + logg.error('SUCCESS should follow SENT, but had {}'.format(StatusEnum(self.status).name)) + #raise TxStateChangeError('SUCCESS must follow SENT, but had {}'.format(StatusEnum(self.status).name)) + self.__set_status(StatusEnum.SUCCESS, session) + + + @staticmethod + def get(status=0, limit=4096, status_exact=True): + """Returns outgoing transaction lists by status. + + Status may either be matched exactly, or be an upper bound of the integer value of the status enum. + + :param status: Status value to use in query + :type status: cic_eth.db.enum.StatusEnum + :param limit: Max results to return + :type limit: number + :param status_exact: Whether or not to perform exact status match + :type bool: + :returns: List of transaction hashes + :rtype: tuple, where first element is transaction hash + """ + e = None + session = Otx.create_session() + if status_exact: + e = session.query(Otx.tx_hash).filter(Otx.status==status).order_by(Otx.date_created.asc()).limit(limit).all() + else: + e = session.query(Otx.tx_hash).filter(Otx.status<=status).order_by(Otx.date_created.asc()).limit(limit).all() + session.close() + return e + + + @staticmethod + def load(tx_hash): + """Retrieves the outgoing transaction record by transaction hash. + + :param tx_hash: Transaction hash + :type tx_hash: str, 0x-hex + """ + session = Otx.create_session() + q = session.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + session.close() + return q.first() + + + @staticmethod + def account(account_address): + """Retrieves all transaction hashes for which the given Ethereum address is sender or recipient. + + :param account_address: Ethereum address to use in query. + :type account_address: str, 0x-hex + :returns: Outgoing transactions + :rtype: tuple, where first element is transaction hash + """ + session = Otx.create_session() + q = session.query(Otx.tx_hash) + q = q.join(TxCache) + q = q.filter(or_(TxCache.sender==account_address, TxCache.recipient==account_address)) + txs = q.all() + session.close() + return list(txs) + + + def __state_log(self, session): + l = OtxStateLog(self) + session.add(l) + + + @staticmethod + def add(nonce, address, tx_hash, signed_tx, session=None): + localsession = session + if localsession == None: + localsession = SessionBase.create_session() + + otx = Otx(nonce, address, tx_hash, signed_tx) + localsession.add(otx) + localsession.flush() + if otx.tracing: + otx.__state_log(session=localsession) + localsession.flush() + + if session==None: + localsession.commit() + localsession.close() + return None + + return otx + + + def __init__(self, nonce, address, tx_hash, signed_tx): + self.nonce = nonce + self.tx_hash = tx_hash + self.signed_tx = signed_tx + self.status = StatusEnum.PENDING + signed_tx_bytes = bytes.fromhex(signed_tx[2:]) + + # sender_address = address_hex_from_signed_tx(signed_tx_bytes) + # logg.debug('decoded tx {}'.format(sender_address)) + + + +# TODO: Most of the methods on this object are obsolete, but it contains a static function for retrieving "expired" outgoing transactions that should be moved to Otx instead. +class OtxSync(SessionBase): + """Obsolete + """ + __tablename__ = 'otx_sync' + + blockchain = Column(String) + block_height_backlog = Column(Integer) + tx_height_backlog = Column(Integer) + block_height_session = Column(Integer) + tx_height_session = Column(Integer) + block_height_head = Column(Integer) + tx_height_head = Column(Integer) + date_created = Column(DateTime, default=datetime.datetime.utcnow) + date_updated = Column(DateTime) + + + def backlog(self, block_height=None, tx_height=None): + #session = OtxSync.create_session() + if block_height != None: + if tx_height == None: + raise ValueError('tx height missing') + self.block_height_backlog = block_height + self.tx_height_backlog = tx_height + #session.add(self) + self.date_updated = datetime.datetime.utcnow() + #session.commit() + block_height = self.block_height_backlog + tx_height = self.tx_height_backlog + #session.close() + return (block_height, tx_height) + + + def session(self, block_height=None, tx_height=None): + #session = OtxSync.create_session() + if block_height != None: + if tx_height == None: + raise ValueError('tx height missing') + self.block_height_session = block_height + self.tx_height_session = tx_height + #session.add(self) + self.date_updated = datetime.datetime.utcnow() + #session.commit() + block_height = self.block_height_session + tx_height = self.tx_height_session + #session.close() + return (block_height, tx_height) + + + def head(self, block_height=None, tx_height=None): + #session = OtxSync.create_session() + if block_height != None: + if tx_height == None: + raise ValueError('tx height missing') + self.block_height_head = block_height + self.tx_height_head = tx_height + #session.add(self) + self.date_updated = datetime.datetime.utcnow() + #session.commit() + block_height = self.block_height_head + tx_height = self.tx_height_head + #session.close() + return (block_height, tx_height) + + + @hybrid_property + def synced(self): + #return self.block_height_session == self.block_height_backlog and self.tx_height_session == self.block_height_backlog + return self.block_height_session == self.block_height_backlog and self.tx_height_session == self.tx_height_backlog + + + @staticmethod + def load(blockchain_string, session): + q = session.query(OtxSync) + q = q.filter(OtxSync.blockchain==blockchain_string) + return q.first() + + + @staticmethod + def latest(nonce): + session = SessionBase.create_session() + otx = session.query(Otx).filter(Otx.nonce==nonce).order_by(Otx.created.desc()).first() + session.close() + return otx + + + @staticmethod + def get_expired(datetime_threshold): + session = SessionBase.create_session() + q = session.query(Otx) + q = q.filter(Otx.date_created + +""" +# standard imports +import os + +# local imports +from .rpc import RpcClient + +registry_extra_identifiers = { + 'Faucet': '0x{:0<64s}'.format(b'Faucet'.hex()), + 'TransferApproval': '0x{:0<64s}'.format(b'TransferApproval'.hex()), + } + diff --git a/apps/cic-eth/cic_eth/eth/account.py b/apps/cic-eth/cic_eth/eth/account.py new file mode 100644 index 00000000..01a9f6ef --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/account.py @@ -0,0 +1,365 @@ +# standard imports +import logging + +# third-party imports +import web3 +import celery +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec +from erc20_single_shot_faucet import Faucet +from cic_registry import zero_address + +# local import +from cic_eth.eth import RpcClient +from cic_eth.eth import registry_extra_identifiers +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.task import create_check_gas_and_send_task +from cic_eth.eth.factory import TxFactory +from cic_eth.db.models.nonce import Nonce +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.role import AccountRole +from cic_eth.db.models.tx import TxCache +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.error import RoleMissingError + +#logg = logging.getLogger(__name__) +logg = logging.getLogger() +celery_app = celery.current_app + + +class AccountTxFactory(TxFactory): + """Factory for creating account index contract transactions + """ + def add( + self, + address, + chain_spec, + ): + """Register an Ethereum account address with the on-chain account registry + + :param address: Ethereum account address to add + :type address: str, 0x-hex + :param chain_spec: Chain to build transaction for + :type chain_spec: cic_registry.chain.ChainSpec + :returns: Unsigned "AccountRegistry.add" transaction in standard Ethereum format + :rtype: dict + """ + + c = CICRegistry.get_contract(chain_spec, 'AccountRegistry') + f = c.function('add') + tx_add_buildable = f( + address, + ) + gas = c.gas('add') + tx_add = tx_add_buildable.buildTransaction({ + 'from': self.address, + 'gas': gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + 'value': 0, + }) + return tx_add + + + def gift( + self, + address, + chain_spec, + ): + """Trigger the on-chain faucet to disburse tokens to the provided Ethereum account + + :param address: Ethereum account address to gift to + :type address: str, 0x-hex + :param chain_spec: Chain to build transaction for + :type chain_spec: cic_registry.chain.ChainSpec + :returns: Unsigned "Faucet.giveTo" transaction in standard Ethereum format + :rtype: dict + """ + + c = CICRegistry.get_contract(chain_spec, 'Faucet') + f = c.function('giveTo') + tx_add_buildable = f(address) + gas = c.gas('add') + tx_add = tx_add_buildable.buildTransaction({ + 'from': self.address, + 'gas': gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + 'value': 0, + }) + return tx_add + + +def unpack_register(data): + """Verifies that a transaction is an "AccountRegister.add" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != '0a3b0a4f': + raise ValueError('Invalid account index register data ({})'.format(f)) + + d = data[10:] + return { + 'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + } + + +def unpack_gift(data): + """Verifies that a transaction is a "Faucet.giveTo" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != '63e4bff4': + raise ValueError('Invalid account index register data ({})'.format(f)) + + d = data[10:] + return { + 'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + } + + +@celery_app.task() +def create(password, chain_str): + """Creates and stores a new ethereum account in the keystore. + + The password is passed on to the wallet backend, no encryption is performed in the task worker. + + :param password: Password to encrypt private key with + :type password: str + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Ethereum address of newly created account + :rtype: str, 0x-hex + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + a = c.w3.eth.personal.new_account(password) + logg.debug('created account {}'.format(a)) + + # Initialize nonce provider record for account + n = c.w3.eth.getTransactionCount(a, 'pending') + session = SessionBase.create_session() + o = session.query(Nonce).filter(Nonce.address_hex==a).first() + if o == None: + o = Nonce() + o.address_hex = a + o.nonce = n + session.add(o) + session.commit() + session.close() + return a + + +@celery_app.task(bind=True, throws=(RoleMissingError,)) +def register(self, account_address, chain_str, writer_address=None): + """Creates a transaction to add the given address to the accounts index. + + :param account_address: Ethereum address to add + :type account_address: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :param writer_address: Specify address in keystore to sign transaction. Overrides local accounts role setting. + :type writer_address: str, 0x-hex + :raises RoleMissingError: Writer address not set and writer role not found. + :returns: The account_address input param + :rtype: str, 0x-hex + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + + if writer_address == None: + writer_address = AccountRole.get_address('ACCOUNTS_INDEX_WRITER') + + if writer_address == zero_address: + raise RoleMissingError(account_address) + + + logg.debug('adding account address {} to index; writer {}'.format(account_address, writer_address)) + queue = self.request.delivery_info['routing_key'] + + c = RpcClient(chain_spec, holder_address=writer_address) + txf = AccountTxFactory(writer_address, c) + + tx_add = txf.add(account_address, chain_spec) + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_add, chain_str, queue, 'cic_eth.eth.account.cache_account_data') + + gas_budget = tx_add['gas'] * tx_add['gasPrice'] + + logg.debug('register user tx {}'.format(tx_hash_hex)) + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + writer_address, + gas_budget, + tx_hashes_hex=[tx_hash_hex], + queue=queue, + ) + s.apply_async() + return account_address + + +@celery_app.task(bind=True) +def gift(self, account_address, chain_str): + """Creates a transaction to invoke the faucet contract for the given address. + + :param account_address: Ethereum address to give to + :type account_address: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Raw signed transaction + :rtype: list with transaction as only element + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + + logg.debug('gift account address {} to index'.format(account_address)) + queue = self.request.delivery_info['routing_key'] + + c = RpcClient(chain_spec, holder_address=account_address) + txf = AccountTxFactory(account_address, c) + + tx_add = txf.gift(account_address, chain_spec) + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_add, chain_str, queue, 'cic_eth.eth.account.cache_gift_data') + + gas_budget = tx_add['gas'] * tx_add['gasPrice'] + + logg.debug('register user tx {}'.format(tx_hash_hex)) + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + account_address, + gas_budget, + [tx_hash_hex], + queue=queue, + ) + s.apply_async() + return [tx_signed_raw_hex] + + +@celery_app.task(bind=True) +def have(self, account, chain_str): + """Check whether the given account exists in keystore + + :param account: Account to check + :type account: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Account, or None if not exists + :rtype: Varies + """ + c = RpcClient(account) + try: + c.w3.eth.sign(account, text='2a') + return account + except Exception as e: + logg.debug('cannot sign with {}: {}'.format(account, e)) + return None + + +@celery_app.task(bind=True) +def role(self, account, chain_str): + """Return account role for address + + :param account: Account to check + :type account: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Account, or None if not exists + :rtype: Varies + """ + return AccountRole.role_for(account) + + +@celery_app.task() +def cache_gift_data( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for a Faucet.giveTo transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + tx_data = unpack_gift(tx['data']) + + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx['to'], + zero_address, + zero_address, + 0, + 0, + ) + + session = SessionBase.create_session() + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) + + +@celery_app.task() +def cache_account_data( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for an AccountsIndex.add transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + tx_data = unpack_register(tx['data']) + + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx['to'], + zero_address, + zero_address, + 0, + 0, + ) + + session = SessionBase.create_session() + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) diff --git a/apps/cic-eth/cic_eth/eth/bancor.py b/apps/cic-eth/cic_eth/eth/bancor.py new file mode 100644 index 00000000..fdc01144 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/bancor.py @@ -0,0 +1,385 @@ +# standard imports +import os +import logging + +# third-party imports +import celery +import web3 +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec + +# local imports +from cic_eth.db import SessionBase +from cic_eth.db.models.convert import TxConvertTransfer +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.task import create_check_gas_and_send_task +from cic_eth.eth.token import TokenTxFactory +from cic_eth.eth.factory import TxFactory +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.rpc import RpcClient + +celery_app = celery.current_app +#logg = celery_app.log.get_default_logger() +logg = logging.getLogger() + +contract_function_signatures = { + 'convert': 'f3898a97', + 'convert2': '569706eb', + } + + +class BancorTxFactory(TxFactory): + + """Factory for creating Bancor network transactions. + """ + def convert( + self, + source_token_address, + destination_token_address, + reserve_address, + source_amount, + minimum_return, + chain_spec, + fee_beneficiary='0x0000000000000000000000000000000000000000', + fee_ppm=0, + ): + """Create a BancorNetwork "convert" transaction. + + :param source_token_address: ERC20 contract address for token to convert from + :type source_token_address: str, 0x-hex + :param destination_token_address: ERC20 contract address for token to convert to + :type destination_token_address: str, 0x-hex + :param reserve_address: ERC20 contract address of Common reserve token + :type reserve_address: str, 0x-hex + :param source_amount: Amount of source tokens to convert + :type source_amount: int + :param minimum_return: Minimum amount of destination tokens to accept as result for conversion + :type source_amount: int + :return: Unsigned "convert" transaction in standard Ethereum format + :rtype: dict + """ + network_contract = CICRegistry.get_contract(chain_spec, 'BancorNetwork') + network_gas = network_contract.gas('convert') + tx_convert_buildable = network_contract.contract.functions.convert2( + [ + source_token_address, + source_token_address, + reserve_address, + destination_token_address, + destination_token_address, + ], + source_amount, + minimum_return, + fee_beneficiary, + fee_ppm, + ) + tx_convert = tx_convert_buildable.buildTransaction({ + 'from': self.address, + 'gas': network_gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + }) + return tx_convert + + +def unpack_convert(data): + f = data[2:10] + if f != contract_function_signatures['convert2']: + raise ValueError('Invalid convert data ({})'.format(f)) + + d = data[10:] + path = d[384:] + source = path[64-40:64] + destination = path[-40:] + + amount = int(d[64:128], 16) + min_return = int(d[128:192], 16) + fee_recipient = d[192:256] + fee = int(d[256:320], 16) + return { + 'amount': amount, + 'min_return': min_return, + 'source_token': web3.Web3.toChecksumAddress('0x' + source), + 'destination_token': web3.Web3.toChecksumAddress('0x' + destination), + 'fee_recipient': fee_recipient, + 'fee': fee, + } + + + +# Kept for historical reference, it unpacks a convert call without fee parameters +#def _unpack_convert_mint(data): +# f = data[2:10] +# if f != contract_function_signatures['convert2']: +# raise ValueError('Invalid convert data ({})'.format(f)) +# +# d = data[10:] +# path = d[256:] +# source = path[64-40:64] +# destination = path[-40:] +# +# amount = int(d[64:128], 16) +# min_return = int(d[128:192], 16) +# return { +# 'amount': amount, +# 'min_return': min_return, +# 'source_token': web3.Web3.toChecksumAddress('0x' + source), +# 'destination_token': web3.Web3.toChecksumAddress('0x' + destination), +# } + + +@celery_app.task(bind=True) +def convert_with_default_reserve(self, tokens, from_address, source_amount, minimum_return, to_address, chain_str): + """Performs a conversion between two liquid tokens using Bancor network. + + :param tokens: Token pair, source and destination respectively + :type tokens: list of str, 0x-hex + :param from_address: Ethereum address of sender + :type from_address: str, 0x-hex + :param source_amount: Amount of source tokens to convert + :type source_amount: int + :param minimum_return: Minimum about of destination tokens to receive + :type minimum_return: int + """ + + chain_spec = ChainSpec.from_chain_str(chain_str) + queue = self.request.delivery_info['routing_key'] + + c = RpcClient(chain_spec, holder_address=from_address) + + cr = CICRegistry.get_contract(chain_spec, 'BancorNetwork') + source_token = CICRegistry.get_address(chain_spec, tokens[0]['address']) + reserve_address = CICRegistry.get_contract(chain_spec, 'BNTToken', 'ERC20').address() + + tx_factory = TokenTxFactory(from_address, c) + + tx_approve_zero = tx_factory.approve(source_token.address(), cr.address(), 0, chain_spec) + (tx_approve_zero_hash_hex, tx_approve_zero_signed_hex) = sign_and_register_tx(tx_approve_zero, chain_str, queue, 'cic_eth.eth.token.otx_cache_approve') + + tx_approve = tx_factory.approve(source_token.address(), cr.address(), source_amount, chain_spec) + (tx_approve_hash_hex, tx_approve_signed_hex) = sign_and_register_tx(tx_approve, chain_str, queue, 'cic_eth.eth.token.otx_cache_approve') + + tx_factory = BancorTxFactory(from_address, c) + tx_convert = tx_factory.convert( + tokens[0]['address'], + tokens[1]['address'], + reserve_address, + source_amount, + minimum_return, + chain_spec, + ) + (tx_convert_hash_hex, tx_convert_signed_hex) = sign_and_register_tx(tx_convert, chain_str, queue, 'cic_eth.eth.bancor.otx_cache_convert') + + # TODO: consider moving save recipient to async task / chain it before the tx send + if to_address != None: + save_convert_recipient(tx_convert_hash_hex, to_address, chain_str) + + s = create_check_gas_and_send_task( + [tx_approve_zero_signed_hex, tx_approve_signed_hex, tx_convert_signed_hex], + chain_str, + from_address, + tx_approve_zero['gasPrice'] * tx_approve_zero['gas'], + tx_hashes_hex=[tx_approve_hash_hex], + queue=queue, + ) + s.apply_async() + return tx_convert_hash_hex + + +#@celery_app.task() +#def process_approval(tx_hash_hex): +# t = session.query(TxConvertTransfer).query(TxConvertTransfer.approve_tx_hash==tx_hash_hex).first() +# c = session.query(Otx).query(Otx.tx_hash==t.convert_tx_hash) +# gas_limit = 8000000 +# gas_price = GasOracle.gas_price() +# +# # TODO: use celery group instead +# s_queue = celery.signature( +# 'cic_eth.queue.tx.create', +# [ +# nonce, +# c['address'], # TODO: check that this is in fact sender address +# c['tx_hash'], +# c['signed_tx'], +# ] +# ) +# s_queue.apply_async() +# +# s_check_gas = celery.signature( +# 'cic_eth.eth.tx.check_gas', +# [ +# c['address'], +# [c['signed_tx']], +# gas_limit * gas_price, +# ] +# ) +# s_send = celery.signature( +# 'cic_eth.eth.tx.send', +# [], +# ) +# +# s_set_sent = celery.signature( +# 'cic_eth.queue.tx.set_sent_status', +# [False], +# ) +# s_send.link(s_set_sent) +# s_check_gas.link(s_send) +# s_check_gas.apply_async() +# return tx_hash_hex + + + +@celery_app.task() +def save_convert_recipient(convert_hash, recipient_address, chain_str): + """Registers the recipient target for a convert-and-transfer operation. + + :param convert_hash: Transaction hash of convert operation + :type convert_hash: str, 0x-hex + :param recipient_address: Address of consequtive transfer recipient + :type recipient_address: str, 0x-hex + """ + session = SessionBase.create_session() + t = TxConvertTransfer(convert_hash, recipient_address, chain_str) + session.add(t) + session.commit() + session.close() + + +@celery_app.task() +def save_convert_transfer(convert_hash, transfer_hash): + """Registers that the transfer part of a convert-and-transfer operation has been executed. + + :param convert_hash: Transaction hash of convert operation + :type convert_hash: str, 0x-hex + :param convert_hash: Transaction hash of transfer operation + :type convert_hash: str, 0x-hex + :returns: transfer_hash, + :rtype: list, single str, 0x-hex + """ + session = SessionBase.create_session() + t = TxConvertTransfer.get(convert_hash) + t.transfer(transfer_hash) + session.add(t) + session.commit() + session.close() + return [transfer_hash] + + +# TODO: seems unused, consider removing +@celery_app.task() +def resolve_converters_by_tokens(tokens, chain_str): + """Return converters for a list of tokens. + + :param tokens: Token addresses to look up + :type tokens: list of str, 0x-hex + :return: Addresses of matching converters + :rtype: list of str, 0x-hex + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + for t in tokens: + c = CICRegistry.get_contract(chain_spec, 'ConverterRegistry') + fn = c.function('getConvertersByAnchors') + try: + converters = fn([t['address']]).call() + except Exception as e: + raise e + t['converters'] = converters + + return tokens + + +@celery_app.task(bind=True) +def transfer_converted(self, tokens, holder_address, receiver_address, value, tx_convert_hash_hex, chain_str): + """Execute the ERC20 transfer of a convert-and-transfer operation. + + First argument is a list of tokens, to enable the task to be chained to the symbol to token address resolver function. However, it accepts only one token as argument. + + :param tokens: Token addresses + :type tokens: list of str, 0x-hex + :param holder_address: Token holder address + :type holder_address: str, 0x-hex + :param holder_address: Token receiver address + :type holder_address: str, 0x-hex + :param value: Amount of token, in 'wei' + :type value: int + :raises TokenCountError: Either none or more then one tokens have been passed as tokens argument + :return: Transaction hash + :rtype: str, 0x-hex + """ + # we only allow one token, one transfer + if len(tokens) != 1: + raise TokenCountError + + chain_spec = ChainSpec.from_chain_str(chain_str) + + queue = self.request.delivery_info['routing_key'] + + c = RpcClient(chain_spec, holder_address=holder_address) + + # get transaction parameters + gas_price = c.gas_price() + tx_factory = TokenTxFactory(holder_address, c) + + token_address = tokens[0]['address'] + tx_transfer = tx_factory.transfer( + token_address, + receiver_address, + value, + chain_spec, + ) + (tx_transfer_hash_hex, tx_transfer_signed_hex) = sign_and_register_tx(tx_transfer, chain_str, queue, 'cic_eth.eth.token.otx_cache_transfer') + + # send transaction + logg.info('transfer converted token {} from {} to {} value {} {}'.format(token_address, holder_address, receiver_address, value, tx_transfer_signed_hex)) + s = create_check_gas_and_send_task( + [tx_transfer_signed_hex], + chain_str, + holder_address, + tx_transfer['gasPrice'] * tx_transfer['gas'], + None, + queue, + ) + s_save = celery.signature( + 'cic_eth.eth.bancor.save_convert_transfer', + [ + tx_convert_hash_hex, + tx_transfer_hash_hex, + ], + queue=queue, + ) + s_save.link(s) + s_save.apply_async() + return tx_transfer_hash_hex + + +@celery_app.task() +def otx_cache_convert( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + tx_data = unpack_convert(tx['data']) + logg.debug('tx data {}'.format(tx_data)) + + session = TxCache.create_session() + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx['from'], + tx_data['source_token'], + tx_data['destination_token'], + tx_data['amount'], + tx_data['amount'], + ) + session.add(tx_cache) + session.commit() + session.close() + return tx_hash_hex + diff --git a/apps/cic-eth/cic_eth/eth/factory.py b/apps/cic-eth/cic_eth/eth/factory.py new file mode 100644 index 00000000..fef8a025 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/factory.py @@ -0,0 +1,41 @@ +# standard imports +import logging + +# local imports +from cic_registry import CICRegistry +from cic_eth.eth.nonce import NonceOracle +from cic_eth.eth import RpcClient + +logg = logging.getLogger(__name__) + + +class TxFactory: + """Base class for transaction factory classes. + + :param from_address: Signer address to create transaction on behalf of + :type from_address: str, 0x-hex + :param rpc_client: RPC connection object to use to acquire account nonce if no record in nonce cache + :type rpc_client: cic_eth.eth.rpc.RpcClient + """ + + gas_price = 100 + """Gas price, updated between batches""" + + + def __init__(self, from_address, rpc_client): + self.address = from_address + + self.default_nonce = rpc_client.w3.eth.getTransactionCount(from_address, 'pending') + self.nonce_oracle = NonceOracle(from_address, self.default_nonce) + + TxFactory.gas_price = rpc_client.gas_price() + logg.debug('txfactory instance address {} gas price'.format(self.address, self.gas_price)) + + + def next_nonce(self): + """Returns the current cached nonce value, and increments it for next transaction. + + :returns: Nonce + :rtype: number + """ + return self.nonce_oracle.next() diff --git a/apps/cic-eth/cic_eth/eth/gas.py b/apps/cic-eth/cic_eth/eth/gas.py new file mode 100644 index 00000000..5bbd13d3 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/gas.py @@ -0,0 +1,71 @@ +# standard imports +import logging + +# local imports +from cic_eth.db.models.role import AccountRole +from cic_eth.db.models.base import SessionBase + +logg = logging.getLogger() + + +class GasOracle(): + """Provides gas pricing for transactions. + + :param w3: Web3 object + :type w3: web3.Web3 + """ + + __safe_threshold_amount_value = 2000000000 * 60000 * 3 + __refill_amount_value = __safe_threshold_amount_value * 5 + default_gas_limit = 21000 + + def __init__(self, w3): + self.w3 = w3 + self.gas_price_current = w3.eth.gas_price() + + + def safe_threshold_amount(self): + """The gas balance threshold under which a new gas refill transaction should be initiated. + + :returns: Gas token amount + :rtype: number + """ + g = GasOracle.__safe_threshold_amount_value + logg.warning('gas safe threshold is currently hardcoded to {}'.format(g)) + return g + + + def refill_amount(self): + """The amount of gas tokens to send in a gas refill transaction. + + :returns: Gas token amount + :rtype: number + """ + g = GasOracle.__refill_amount_value + logg.warning('gas refill amount is currently hardcoded to {}'.format(g)) + return g + + + def gas_provider(self): + """Gas provider address. + + :returns: Etheerum account address + :rtype: str, 0x-hex + """ + return AccountRole.get_address('GAS_GIFTER') + + + def gas_price(self, category='safe'): + """Get projected gas price to use for a transaction at the current moment. + + When the category parameter is implemented, it can be used to control the priority of a transaction in the network. + + :param category: Bid level category to return price for. Currently has no effect. + :type category: str + :returns: Gas price + :rtype: number + """ + #logg.warning('gas price hardcoded to category "safe"') + #g = 100 + #return g + return self.gas_price_current diff --git a/apps/cic-eth/cic_eth/eth/nonce.py b/apps/cic-eth/cic_eth/eth/nonce.py new file mode 100644 index 00000000..6e8e0a75 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/nonce.py @@ -0,0 +1,23 @@ +# local imports +from cic_eth.db.models.nonce import Nonce + +class NonceOracle(): + """Ensures atomic nonce increments for all transactions across all tasks and threads. + + :param address: Address to generate nonces for + :type address: str, 0x-hex + :param default_nonce: Initial nonce value to use if no nonce cache entry already exists + :type default_nonce: number + """ + def __init__(self, address, default_nonce): + self.address = address + self.default_nonce = default_nonce + + + def next(self): + """Get next unique nonce. + + :returns: Nonce + :rtype: number + """ + return Nonce.next(self.address, self.default_nonce) diff --git a/apps/cic-eth/cic_eth/eth/request.py b/apps/cic-eth/cic_eth/eth/request.py new file mode 100644 index 00000000..8f1c6b96 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/request.py @@ -0,0 +1,194 @@ +# standard imports +import logging + +# third-party imports +import web3 +import celery +from erc20_approval_escrow import TransferApproval +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec + +# local imports +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.base import SessionBase +from cic_eth.eth import RpcClient +from cic_eth.eth.factory import TxFactory +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.task import create_check_gas_and_send_task +from cic_eth.error import TokenCountError + +celery_app = celery.current_app +logg = logging.getLogger() + +contract_function_signatures = { + 'request': 'b0addede', + } + + +class TransferRequestTxFactory(TxFactory): + """Factory for creating Transfer request transactions using the TransferApproval contract backend + """ + def request( + self, + token_address, + beneficiary_address, + amount, + chain_spec, + ): + """Create a new TransferApproval.request transaction + + :param token_address: Token to create transfer request for + :type token_address: str, 0x-hex + :param beneficiary_address: Beneficiary of token transfer + :type beneficiary_address: str, 0x-hex + :param amount: Amount of tokens to transfer + :type amount: number + :param chain_spec: Chain spec + :type chain_spec: cic_registry.chain.ChainSpec + :returns: Transaction in standard Ethereum format + :rtype: dict + """ + transfer_approval = CICRegistry.get_contract(chain_spec, 'TransferApproval', 'TransferAuthorization') + fn = transfer_approval.function('createRequest') + tx_approval_buildable = fn(beneficiary_address, token_address, amount) + transfer_approval_gas = transfer_approval.gas('createRequest') + + tx_approval = tx_approval_buildable.buildTransaction({ + 'from': self.address, + 'gas': transfer_approval_gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + }) + return tx_approval + + +def unpack_transfer_approval_request(data): + """Verifies that a transaction is an "TransferApproval.request" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != contract_function_signatures['request']: + raise ValueError('Invalid transfer request data ({})'.format(f)) + + d = data[10:] + return { + 'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + 'token': web3.Web3.toChecksumAddress('0x' + d[128-40:128]), + 'amount': int(d[128:], 16) + } + + +@celery_app.task(bind=True) +def transfer_approval_request(self, tokens, holder_address, receiver_address, value, chain_str): + """Creates a new transfer approval + + :param tokens: Token to generate transfer request for + :type tokens: list with single token spec as dict + :param holder_address: Address to generate transfer on behalf of + :type holder_address: str, 0x-hex + :param receiver_address: Address to transfser tokens to + :type receiver_address: str, 0x-hex + :param value: Amount of tokens to transfer + :type value: number + :param chain_spec: Chain spec string representation + :type chain_spec: str + :raises cic_eth.error.TokenCountError: More than one token in tokens argument + :returns: Raw signed transaction + :rtype: list with transaction as only element + """ + + if len(tokens) != 1: + raise TokenCountError + + chain_spec = ChainSpec.from_chain_str(chain_str) + + queue = self.request.delivery_info['routing_key'] + + t = tokens[0] + + c = RpcClient(holder_address) + + txf = TransferRequestTxFactory(holder_address, c) + + tx_transfer = txf.request(t['address'], receiver_address, value, chain_spec) + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, chain_str, queue, 'cic_eth.eth.request.otx_cache_transfer_approval_request') + + gas_budget = tx_transfer['gas'] * tx_transfer['gasPrice'] + + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + holder_address, + gas_budget, + [tx_hash_hex], + queue, + ) + s.apply_async() + return [tx_signed_raw_hex] + + +@celery_app.task() +def otx_cache_transfer_approval_request( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for an TransferApproval.request transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + logg.debug('in otx acche transfer approval request') + (txc, cache_id) = cache_transfer_approval_request_data(tx_hash_hex, tx) + return txc + + +@celery_app.task() +def cache_transfer_approval_request_data( + tx_hash_hex, + tx, + ): + """Helper function for otx_cache_transfer_approval_request + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx: Signed raw transaction + :type tx: str, 0x-hex + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + tx_data = unpack_transfer_approval_request(tx['data']) + logg.debug('tx approval request data {}'.format(tx_data)) + logg.debug('tx approval request {}'.format(tx)) + + session = SessionBase.create_session() + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx_data['to'], + tx_data['token'], + tx_data['token'], + tx_data['amount'], + tx_data['amount'], + ) + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) diff --git a/apps/cic-eth/cic_eth/eth/rpc.py b/apps/cic-eth/cic_eth/eth/rpc.py new file mode 100644 index 00000000..0d5486f3 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/rpc.py @@ -0,0 +1,39 @@ +# standard imports +import logging + +# local imports +from cic_eth.eth.gas import GasOracle + +logg = logging.getLogger() + + +class RpcClient(GasOracle): + """RPC wrapper for web3 enabling gas calculation helpers and signer middleware. + + :param chain_spec: Chain spec + :type chain_spec: cic_registry.chain.ChainSpec + :param holder_address: DEPRECATED Address of subject of the session. + :type holder_address: str, 0x-hex + """ + + signer_ipc_path = None + """Unix socket path to JSONRPC signer and keystore""" + + web3_constructor = None + """Custom function to build a web3 object with middleware plugins""" + + + def __init__(self, chain_spec, holder_address=None): + (self.provider, w3) = RpcClient.web3_constructor() + super(RpcClient, self).__init__(w3) + self.chain_spec = chain_spec + if holder_address != None: + self.holder_address = holder_address + logg.info('gasprice {}'.format(self.gas_price())) + + + @staticmethod + def set_constructor(web3_constructor): + """Sets the constructor to use for building the web3 object. + """ + RpcClient.web3_constructor = web3_constructor diff --git a/apps/cic-eth/cic_eth/eth/task.py b/apps/cic-eth/cic_eth/eth/task.py new file mode 100644 index 00000000..0aeb4371 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/task.py @@ -0,0 +1,136 @@ +# standard imports +import logging + +# third-party imports +import celery +from cic_registry.chain import ChainSpec + +# local imports +from cic_eth.eth import RpcClient +from cic_eth.queue.tx import create as queue_create + +celery_app = celery.current_app +logg = celery_app.log.get_default_logger() + + +@celery_app.task() +def sign_tx(tx, chain_str): + """Sign a single transaction against the given chain specification. + + :param tx: Transaction in standard Ethereum format + :type tx: dict + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and raw signed transaction, respectively + :rtype: tuple + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + tx_transfer_signed = c.w3.eth.sign_transaction(tx) + logg.debug('tx_transfer_signed {}'.format(tx_transfer_signed)) + tx_hash = c.w3.keccak(hexstr=tx_transfer_signed['raw']) + tx_hash_hex = tx_hash.hex() + return (tx_hash_hex, tx_transfer_signed['raw'],) + + +def sign_and_register_tx(tx, chain_str, queue, cache_task=None): + """Signs the provided transaction, and adds it to the transaction queue cache (with status PENDING). + + :param tx: Standard ethereum transaction data + :type tx: dict + :param chain_str: Chain spec, string representation + :type chain_str: str + :param queue: Task queue + :type queue: str + :param cache_task: Cache task to call with signed transaction. If None, no task will be called. + :type cache_task: str + :returns: Tuple; Transaction hash, signed raw transaction data + :rtype: tuple + """ + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str) + + logg.debug('adding queue tx {}'.format(tx_hash_hex)) + +# s = celery.signature( +# 'cic_eth.queue.tx.create', +# [ +# tx['nonce'], +# tx['from'], +# tx_hash_hex, +# tx_signed_raw_hex, +# chain_str, +# ], +# queue=queue, +# ) + + # TODO: consider returning this as a signature that consequtive tasks can be linked to + queue_create( + tx['nonce'], + tx['from'], + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ) + + if cache_task != None: + logg.debug('adding cache task {} tx {}'.format(cache_task, tx_hash_hex)) + s_cache = celery.signature( + cache_task, + [ + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ], + queue=queue, + ) + s_cache.apply_async() + + return (tx_hash_hex, tx_signed_raw_hex,) + + +# TODO: rename as we will not be sending task in the chain, this is the responsibility of the dispatcher +def create_check_gas_and_send_task(tx_signed_raws_hex, chain_str, holder_address, gas, tx_hashes_hex=None, queue=None): + """Creates a celery task signature for a check_gas task that adds the task to the outgoing queue to be processed by the dispatcher. + + If tx_hashes_hex is not spefified, a preceding task chained to check_gas must supply the transaction hashes as its return value. + + :param tx_signed_raws_hex: Raw signed transaction data + :type tx_signed_raws_hex: list of str, 0x-hex + :param chain_str: Chain spec, string representation + :type chain_str: str + :param holder_address: Address sending the transactions + :type holder_address: str, 0x-hex + :param gas: Gas budget hint for transactions + :type gas: int + :param tx_hashes_hex: Transaction hashes + :type tx_hashes_hex: list of str, 0x-hex + :param queue: Task queue + :type queue: str + :returns: Signature of task chain + :rtype: celery.Signature + """ + s_check_gas = None + if tx_hashes_hex != None: + s_check_gas = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + tx_hashes_hex, + chain_str, + tx_signed_raws_hex, + holder_address, + gas, + ], + queue=queue, + ) + else: + s_check_gas = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + chain_str, + tx_signed_raws_hex, + holder_address, + gas, + ], + queue=queue, + ) + return s_check_gas diff --git a/apps/cic-eth/cic_eth/eth/token.py b/apps/cic-eth/cic_eth/eth/token.py new file mode 100644 index 00000000..fac767e9 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/token.py @@ -0,0 +1,447 @@ +# standard imports +import logging + +# third-party imports +import celery +import requests +import web3 +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec + +# platform imports +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.base import SessionBase +from cic_eth.eth import RpcClient +from cic_eth.error import TokenCountError, PermanentTxError, OutOfGasError, NotLocalTxError +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.task import create_check_gas_and_send_task +from cic_eth.eth.factory import TxFactory +from cic_eth.eth.util import unpack_signed_raw_tx + +celery_app = celery.current_app +logg = logging.getLogger() + +# TODO: fetch from cic-contracts instead when implemented +contract_function_signatures = { + 'transfer': 'a9059cbb', + 'approve': '095ea7b3', + 'transferfrom': '23b872dd', + } + + +class TokenTxFactory(TxFactory): + """Factory for creating ERC20 token transactions. + """ + def approve( + self, + token_address, + spender_address, + amount, + chain_spec, + ): + """Create an ERC20 "approve" transaction + + :param token_address: ERC20 contract address + :type token_address: str, 0x-hex + :param spender_address: Address to approve spending for + :type spender_address: str, 0x-hex + :param amount: Amount of tokens to approve + :type amount: int + :param chain_spec: Chain spec + :type chain_spec: cic_registry.chain.ChainSpec + :returns: Unsigned "approve" transaction in standard Ethereum format + :rtype: dict + """ + source_token = CICRegistry.get_address(chain_spec, token_address) + source_token_contract = source_token.contract + tx_approve_buildable = source_token_contract.functions.approve( + spender_address, + amount, + ) + source_token_gas = source_token.gas('transfer') + + tx_approve = tx_approve_buildable.buildTransaction({ + 'from': self.address, + 'gas': source_token_gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + }) + return tx_approve + + + def transfer( + self, + token_address, + receiver_address, + value, + chain_spec, + ): + """Create an ERC20 "transfer" transaction + + :param token_address: ERC20 contract address + :type token_address: str, 0x-hex + :param receiver_address: Address to send tokens to + :type receiver_address: str, 0x-hex + :param amount: Amount of tokens to send + :type amount: int + :param chain_spec: Chain spec + :type chain_spec: cic_registry.chain.ChainSpec + :returns: Unsigned "transfer" transaction in standard Ethereum format + :rtype: dict + """ + source_token = CICRegistry.get_address(chain_spec, token_address) + source_token_contract = source_token.contract + transfer_buildable = source_token_contract.functions.transfer( + receiver_address, + value, + ) + source_token_gas = source_token.gas('transfer') + + tx_transfer = transfer_buildable.buildTransaction( + { + 'from': self.address, + 'gas': source_token_gas, + 'gasPrice': self.gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': self.next_nonce(), + }) + return tx_transfer + + +def unpack_transfer(data): + """Verifies that a transaction is an "ERC20.transfer" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != contract_function_signatures['transfer']: + raise ValueError('Invalid transfer data ({})'.format(f)) + + d = data[10:] + return { + 'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + 'amount': int(d[64:], 16) + } + + +def unpack_transferfrom(data): + """Verifies that a transaction is an "ERC20.transferFrom" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != contract_function_signatures['transferfrom']: + raise ValueError('Invalid transferFrom data ({})'.format(f)) + + d = data[10:] + return { + 'from': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + 'to': web3.Web3.toChecksumAddress('0x' + d[128-40:128]), + 'amount': int(d[128:], 16) + } + + +def unpack_approve(data): + """Verifies that a transaction is an "ERC20.approve" transaction, and extracts call parameters from it. + + :param data: Raw input data from Ethereum transaction. + :type data: str, 0x-hex + :raises ValueError: Function signature does not match AccountRegister.add + :returns: Parsed parameters + :rtype: dict + """ + f = data[2:10] + if f != contract_function_signatures['approve']: + raise ValueError('Invalid approval data ({})'.format(f)) + + d = data[10:] + return { + 'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]), + 'amount': int(d[64:], 16) + } + + +@celery_app.task() +def balance(tokens, holder_address, chain_str): + """Return token balances for a list of tokens for given address + + :param tokens: Token addresses + :type tokens: list of str, 0x-hex + :param holder_address: Token holder address + :type holder_address: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :return: List of balances + :rtype: list of int + """ + #abi = ContractRegistry.abi('ERC20Token') + chain_spec = ChainSpec.from_chain_str(chain_str) + balances = [] + c = RpcClient(chain_spec) + for t in tokens: + #token = CICRegistry.get_address(t['address']) + #abi = token.abi() + #o = c.w3.eth.contract(abi=abi, address=t['address']) + o = CICRegistry.get_address(chain_spec, t['address']).contract + b = o.functions.balanceOf(holder_address).call() + logg.debug('balance {} for {}: {}'.format(t['address'], holder_address, b)) + balances.append(b) + return b + + +@celery_app.task(bind=True) +def transfer(self, tokens, holder_address, receiver_address, value, chain_str): + """Transfer ERC20 tokens between addresses + + First argument is a list of tokens, to enable the task to be chained to the symbol to token address resolver function. However, it accepts only one token as argument. + + :raises TokenCountError: Either none or more then one tokens have been passed as tokens argument + + :param tokens: Token addresses + :type tokens: list of str, 0x-hex + :param holder_address: Token holder address + :type holder_address: str, 0x-hex + :param receiver_address: Token receiver address + :type receiver_address: str, 0x-hex + :param value: Amount of token, in 'wei' + :type value: int + :param chain_str: Chain spec string representation + :type chain_str: str + :raises TokenCountError: More than one token is passed in tokens list + :return: Transaction hash for tranfer operation + :rtype: str, 0x-hex + """ + # we only allow one token, one transfer + if len(tokens) != 1: + raise TokenCountError + + chain_spec = ChainSpec.from_chain_str(chain_str) + + queue = self.request.delivery_info['routing_key'] + + # retrieve the token interface + t = tokens[0] + + c = RpcClient(chain_spec, holder_address=holder_address) + + txf = TokenTxFactory(holder_address, c) + + tx_transfer = txf.transfer(t['address'], receiver_address, value, chain_spec) + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, chain_str, queue, cache_task='cic_eth.eth.token.otx_cache_transfer') + + gas_budget = tx_transfer['gas'] * tx_transfer['gasPrice'] + + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + holder_address, + gas_budget, + [tx_hash_hex], + queue, + ) + s.apply_async() + return tx_hash_hex + + +@celery_app.task(bind=True) +def approve(self, tokens, holder_address, spender_address, value, chain_str): + """Approve ERC20 transfer on behalf of holder address + + First argument is a list of tokens, to enable the task to be chained to the symbol to token address resolver function. However, it accepts only one token as argument. + + :raises TokenCountError: Either none or more then one tokens have been passed as tokens argument + + :param tokens: Token addresses + :type tokens: list of str, 0x-hex + :param holder_address: Token holder address + :type holder_address: str, 0x-hex + :param receiver_address: Token receiver address + :type receiver_address: str, 0x-hex + :param value: Amount of token, in 'wei' + :type value: int + :param chain_str: Chain spec string representation + :type chain_str: str + :raises TokenCountError: More than one token is passed in tokens list + :return: Transaction hash for tranfer operation + :rtype: str, 0x-hex + """ + # we only allow one token, one transfer + if len(tokens) != 1: + raise TokenCountError + + chain_spec = ChainSpec.from_chain_str(chain_str) + + queue = self.request.delivery_info['routing_key'] + + # retrieve the token interface + t = tokens[0] + + c = RpcClient(chain_spec, holder_address=holder_address) + + txf = TokenTxFactory(holder_address, c) + + tx_transfer = txf.approve(t['address'], spender_address, value, chain_spec) + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, chain_str, queue, cache_task='cic_eth.eth.token.otx_cache_approve') + + gas_budget = tx_transfer['gas'] * tx_transfer['gasPrice'] + + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + holder_address, + gas_budget, + [tx_hash_hex], + queue, + ) + s.apply_async() + return tx_hash_hex + + +@celery_app.task() +def resolve_tokens_by_symbol(token_symbols, chain_str): + """Returns contract addresses of an array of ERC20 token symbols + + :param token_symbols: Token symbols to resolve + :type token_symbols: list of str + :param chain_str: Chain spec string representation + :type chain_str: str + + :return: Respective token contract addresses + :rtype: list of str, 0x-hex + """ + tokens = [] + chain_spec = ChainSpec.from_chain_str(chain_str) + for token_symbol in token_symbols: + token = CICRegistry.get_token(chain_spec, token_symbol) + tokens.append({ + 'address': token.address(), + #'converters': [], + }) + return tokens + + +@celery_app.task() +def otx_cache_transfer( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for an ERC20.transfer or ERC20.transferFrom transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + (txc, cache_id) = cache_transfer_data(tx_hash_hex, tx) + return txc + + +@celery_app.task() +def cache_transfer_data( + tx_hash_hex, + tx, + ): + """Helper function for otx_cache_transfer + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx: Signed raw transaction + :type tx: str, 0x-hex + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + tx_data = unpack_transfer(tx['data']) + logg.debug('tx data {}'.format(tx_data)) + logg.debug('tx {}'.format(tx)) + + session = SessionBase.create_session() + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx_data['to'], + tx['to'], + tx['to'], + tx_data['amount'], + tx_data['amount'], + ) + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) + + +@celery_app.task() +def otx_cache_approve( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for an ERC20.approve transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + (txc, cache_id) = cache_approve_data(tx_hash_hex, tx) + return txc + + +@celery_app.task() +def cache_approve_data( + tx_hash_hex, + tx, + ): + """Helper function for otx_cache_approve + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx: Signed raw transaction + :type tx: str, 0x-hex + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + tx_data = unpack_approve(tx['data']) + logg.debug('tx data {}'.format(tx_data)) + logg.debug('tx {}'.format(tx)) + + session = SessionBase.create_session() + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx_data['to'], + tx['to'], + tx['to'], + tx_data['amount'], + tx_data['amount'], + ) + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) diff --git a/apps/cic-eth/cic_eth/eth/tx.py b/apps/cic-eth/cic_eth/eth/tx.py new file mode 100644 index 00000000..c6d72c5b --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/tx.py @@ -0,0 +1,681 @@ +# standard imports +import logging + +# third-party imports +import celery +import requests +import web3 +from cic_registry import zero_address +from cic_registry.chain import ChainSpec + +# local imports +from .rpc import RpcClient +from cic_eth.db import Otx, SessionBase +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.lock import Lock +from cic_eth.db.enum import LockEnum +from cic_eth.error import PermanentTxError +from cic_eth.error import TemporaryTxError +from cic_eth.error import NotLocalTxError +from cic_eth.queue.tx import create as queue_create +from cic_eth.queue.tx import get_tx +from cic_eth.queue.tx import get_nonce_tx +from cic_eth.error import OutOfGasError +from cic_eth.error import LockedError +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.task import sign_and_register_tx, create_check_gas_and_send_task +from cic_eth.eth.task import sign_tx +from cic_eth.eth.nonce import NonceOracle +from cic_eth.error import AlreadyFillingGasError +from cic_eth.eth.util import tx_hex_string +from cic_eth.admin.ctrl import lock_send + +celery_app = celery.current_app +logg = logging.getLogger() + +MAX_NONCE_ATTEMPTS = 3 + + +# TODO this function is too long +@celery_app.task(bind=True, throws=(OutOfGasError)) +def check_gas(self, tx_hashes, chain_str, txs=[], address=None, gas_required=None): + """Check the gas level of the sender address of a transaction. + + If the account balance is not sufficient for the required gas, gas refill is requested and OutOfGasError raiser. + + If account balance is sufficient, but level of gas before spend is below "safe" threshold, gas refill is requested, and execution continues normally. + + :param tx_hashes: Transaction hashes due to be submitted + :type tx_hashes: list of str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :param txs: Signed raw transaction data, corresponding to tx_hashes + :type txs: list of str, 0x-hex + :param address: Sender address + :type address: str, 0x-hex + :param gas_required: Gas limit * gas price for transaction, (optional, if not set will be retrived from transaction data) + :type gas_required: int + :return: Signed raw transaction data list + :rtype: param txs, unchanged + """ + if len(txs) == 0: + for i in range(len(tx_hashes)): + o = get_tx(tx_hashes[i]) + txs.append(o['signed_tx']) + logg.debug('ooooo {}'.format(o)) + if address == None: + address = o['address'] + + chain_spec = ChainSpec.from_chain_str(chain_str) + + queue = self.request.delivery_info['routing_key'] + + #c = RpcClient(chain_spec, holder_address=address) + c = RpcClient(chain_spec) + + # TODO: it should not be necessary to pass address explicitly, if not passed should be derived from the tx + balance = c.w3.eth.getBalance(address) + logg.debug('check gas txs {}'.format(tx_hashes)) + logg.debug('address {} has gas {} needs {}'.format(address, balance, gas_required)) + + if gas_required > balance: + s_refill_gas = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + address, + chain_str, + ], + queue=queue, + ) + s_refill_gas.apply_async() + wait_tasks = [] + for tx_hash in tx_hashes: + s = celery.signature( + 'cic_eth.queue.tx.set_waitforgas', + [ + tx_hash, + ], + queue=queue, + ) + wait_tasks.append(s) + celery.group(wait_tasks)() + raise OutOfGasError('need to fill gas, required {}, had {}'.format(gas_required, balance)) + + safe_gas = c.safe_threshold_amount() + if balance < safe_gas: + s_refill_gas = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + address, + chain_str, + ], + queue=queue, + ) + s_refill_gas.apply_async() + logg.debug('requested refill from {} to {}'.format(c.gas_provider(), address)) + ready_tasks = [] + for tx_hash in tx_hashes: + s = celery.signature( + 'cic_eth.queue.tx.set_ready', + [ + tx_hash, + ], + queue=queue, + ) + ready_tasks.append(s) + logg.debug('tasks {}'.format(ready_tasks)) + celery.group(ready_tasks)() + + return txs + + +# TODO: chain chainable transactions that use hashes as inputs may be chained to this function to output signed txs instead. +@celery_app.task(bind=True) +def hashes_to_txs(self, tx_hashes): + """Return a list of raw signed transactions from the local transaction queue corresponding to a list of transaction hashes. + + :param tx_hashes: Transaction hashes + :type tx_hashes: list of str, 0x-hex + :raises ValueError: Empty input list + :returns: Signed raw transactions + :rtype: list of str, 0x-hex + """ + #logg = celery_app.log.get_default_logger() + if len(tx_hashes) == 0: + raise ValueError('no transaction to send') + + queue = self.request.delivery_info['routing_key'] + + #otxs = ','.format("'{}'".format(tx_hash) for tx_hash in tx_hashes) + + session = SessionBase.create_session() + q = session.query(Otx.signed_tx) + q = q.filter(Otx.tx_hash.in_(tx_hashes)) + tx_tuples = q.all() + session.close() + + def __head(x): + return x[0] + + txs = [] + for f in map(__head, tx_tuples): + txs.append(f) + + return txs + + +# TODO: Move this and send to subfolder submodule +class ParityNodeHandler: + def __init__(self, chain_spec, queue): + self.chain_spec = chain_spec + self.chain_str = str(chain_spec) + self.queue = queue + + def handle(self, exception, tx_hash_hex, tx_hex): + meth = self.handle_default + if isinstance(exception, (ValueError)): +# s_debug = celery.signature( +# 'cic_eth.admin.debug.out_tmp', +# [tx_hash_hex, '{}: {}'.format(tx_hash_hex, exception)], +# queue=queue, +# ) +# s_debug.apply_async() + earg = exception.args[0] + if earg['code'] == -32010: + logg.debug('skipping lock for code {}'.format(earg['code'])) + meth = self.handle_invalid_parameters + elif earg['code'] == -32602: + meth = self.handle_invalid_encoding + else: + meth = self.handle_invalid + elif isinstance(exception, (requests.exceptions.ConnectionError)): + meth = self.handle_connection + (t, e_fn, message) = meth(tx_hash_hex, tx_hex) + return (t, e_fn, '{} {}'.format(message, exception)) + + + def handle_connection(self, tx_hash_hex, tx_hex): + s_set_sent = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [ + tx_hash_hex, + True, + ], + queue=self.queue, + ) + t = s_set_sent.apply_async() + return (t, TemporaryTxError, 'Sendfail {}'.format(tx_hex_string(tx_hex, self.chain_spec.chain_id()))) + + + def handle_invalid_encoding(self, tx_hash_hex, tx_hex): + tx_bytes = bytes.fromhex(tx_hex[2:]) + tx = unpack_signed_raw_tx(tx_bytes, self.chain_spec.chain_id()) + s_lock = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + tx_hash_hex, + self.chain_str, + tx['from'], + tx_hash_hex, + ], + queue=self.queue, + ) + s_set_reject = celery.signature( + 'cic_eth.queue.tx.set_rejected', + [], + queue=self.queue, + ) + nonce_txs = get_nonce_tx(tx['nonce'], tx['from'], self.chain_spec.chain_id()) + attempts = len(nonce_txs) + if attempts < MAX_NONCE_ATTEMPTS: + logg.debug('nonce {} address {} retries {} < {}'.format(tx['nonce'], tx['from'], attempts, MAX_NONCE_ATTEMPTS)) + s_resend = celery.signature( + 'cic_eth.eth.tx.resend_with_higher_gas', + [ + self.chain_str, + None, + 1.01, + ], + queue=self.queue, + ) + s_unlock = celery.signature( + 'cic_eth.admin.ctrl.unlock_send', + [ + self.chain_str, + tx['from'], + ], + queue=self.queue, + ) + s_resend.link(s_unlock) + s_set_reject.link(s_resend) + + s_lock.link(s_set_reject) + t = s_lock.apply_async() + return (t, PermanentTxError, 'Reject invalid encoding {}'.format(tx_hex_string(tx_hex, self.chain_spec.chain_id()))) + + + def handle_invalid_parameters(self, tx_hash_hex, tx_hex): + s_sync = celery.signature( + 'cic_eth.eth.tx.sync_tx', + [ + tx_hash_hex, + self.chain_str, + ], + queue=self.queue, + ) + t = s_sync.apply_async() + return (t, PermanentTxError, 'Reject invalid parameters {}'.format(tx_hex_string(tx_hex, self.chain_spec.chain_id()))) + + + def handle_invalid(self, tx_hash_hex, tx_hex): + tx_bytes = bytes.fromhex(tx_hex[2:]) + tx = unpack_signed_raw_tx(tx_bytes, self.chain_spec.chain_id()) + s_lock = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + tx_hash_hex, + self.chain_str, + tx['from'], + tx_hash_hex, + ], + queue=self.queue, + ) + s_set_reject = celery.signature( + 'cic_eth.queue.tx.set_rejected', + [], + queue=self.queue, + ) + s_lock.link(s_set_reject) + t = s_lock.apply_async() + return (t, PermanentTxError, 'Reject invalid {}'.format(tx_hex_string(tx_hex, self.chain_spec.chain_id()))) + + + def handle_default(self, tx_hash_hex, tx_hex): + tx_bytes = bytes.fromhex(tx_hex[2:]) + tx = unpack_signed_raw_tx(tx_bytes, self.chain_spec.chain_id()) + s_lock = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + tx_hash_hex, + self.chain_str, + tx['from'], + tx_hash_hex, + ], + queue=self.queue, + ) + s_set_fubar = celery.signature( + 'cic_eth.queue.tx.set_fubar', + [], + queue=self.queue, + ) + s_lock.link(s_set_fubar) + t = s_lock.apply_async() + return (t, PermanentTxError, 'Fubar {}'.format(tx_hex_string(tx_hex, self.chain_spec.chain_id()))) + + +@celery_app.task(bind=True) +def send(self, txs, chain_str): + """Send transactions to the network. + + If more than one transaction is passed to the task, it will spawn a new send task with the remaining transaction(s) after the first in the list has been processed. + + Updates the outgoing transaction queue entry to SENT on successful send. + + If a temporary error occurs, the queue entry is set to SENDFAIL. + + If a permanent error occurs due to invalid transaction data, queue entry value is set to REJECTED. + + Any other permanent error that isn't explicitly handled will get value FUBAR. + + :param txs: Signed raw transaction data + :type txs: list of str, 0x-hex + :param chain_str: Chain spec, string representation + :type chain_str: str + :raises TemporaryTxError: If unable to connect to node + :raises PermanentTxError: If EVM execution fails immediately due to tx input, or if tx contents are invalid. + :return: transaction hash of sent transaction + :rtype: str, 0x-hex + """ + if len(txs) == 0: + raise ValueError('no transaction to send') + + chain_spec = ChainSpec.from_chain_str(chain_str) + + + tx_hex = txs[0] + logg.debug('send transaction {}'.format(tx_hex)) + + tx_hash = web3.Web3.keccak(hexstr=tx_hex) + tx_hash_hex = tx_hash.hex() + + queue = self.request.delivery_info.get('routing_key', None) + if queue == None: + logg.debug('send tx {} has no queue', tx_hash) + + c = RpcClient(chain_spec) + r = None + try: + r = c.w3.eth.send_raw_transaction(tx_hex) + except Exception as e: + logg.debug('e {}'.format(e)) + raiser = ParityNodeHandler(chain_spec, queue) + (t, e, m) = raiser.handle(e, tx_hash_hex, tx_hex) + raise e(m) + + s_set_sent = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [ + tx_hash_hex, + False + ], + queue=queue, + ) + s_set_sent.apply_async() + + tx_tail = txs[1:] + if len(tx_tail) > 0: + s = celery.signature( + 'cic_eth.eth.tx.send', + [tx_tail], + queue=queue, + ) + s.apply_async() + + return r.hex() + + +@celery_app.task(bind=True, throws=(AlreadyFillingGasError)) +def refill_gas(self, recipient_address, chain_str): + """Executes a native token transaction to fund the recipient's gas expenditures. + + :param recipient_address: Recipient in need of gas + :type recipient_address: str, 0x-hex + :param chain_str: Chain spec, string representation + :type chain_str: str + :raises AlreadyFillingGasError: A gas refill transaction for this address is already executing + :returns: Transaction hash. + :rtype: str, 0x-hex + """ + chain_spec = ChainSpec.from_chain_str(chain_str) + + session = SessionBase.create_session() + q = session.query(Otx.tx_hash) + q = q.join(TxCache) + q = q.filter(Otx.status<=0) + q = q.filter(TxCache.from_value!='0x00') + q = q.filter(TxCache.recipient==recipient_address) + c = q.count() + session.close() + if c > 0: + raise AlreadyFillingGasError(recipient_address) + + queue = self.request.delivery_info['routing_key'] + + c = RpcClient(chain_spec) + clogg = celery_app.log.get_default_logger() + logg.debug('refill gas from provider address {}'.format(c.gas_provider())) + default_nonce = c.w3.eth.getTransactionCount(c.gas_provider(), 'pending') + nonce_generator = NonceOracle(c.gas_provider(), default_nonce) + nonce = nonce_generator.next() + gas_price = c.gas_price() + gas_limit = c.default_gas_limit + refill_amount = c.refill_amount() + logg.debug('gas price {} nonce {}'.format(gas_price, nonce)) + + # create and sign transaction + tx_send_gas = { + 'from': c.gas_provider(), + 'to': recipient_address, + 'gas': gas_limit, + 'gasPrice': gas_price, + 'chainId': chain_spec.chain_id(), + 'nonce': nonce, + 'value': refill_amount, + 'data': '', + } + logg.debug('txsend_gas {}'.format(tx_send_gas)) + tx_send_gas_signed = c.w3.eth.sign_transaction(tx_send_gas) + tx_hash = web3.Web3.keccak(hexstr=tx_send_gas_signed['raw']) + tx_hash_hex = tx_hash.hex() + + # TODO: route this through sign_and_register_tx instead + logg.debug('adding queue refill gas tx {}'.format(tx_hash_hex)) + queue_create( + nonce, + c.gas_provider(), + tx_hash_hex, + tx_send_gas_signed['raw'], + chain_str, + ) + + s_tx_cache = celery.signature( + 'cic_eth.eth.tx.cache_gas_refill_data', + [ + tx_hash_hex, + tx_send_gas, + ], + queue=queue, + ) + s_status = celery.signature( + 'cic_eth.queue.tx.set_ready', + [ + tx_hash_hex, + ], + queue=queue, + ) + celery.group(s_tx_cache, s_status)() + return tx_send_gas_signed['raw'] + + +@celery_app.task(bind=True) +def resend_with_higher_gas(self, txold_hash_hex, chain_str, gas=None, default_factor=1.1): + """Create a new transaction from an existing one with same nonce and higher gas price. + + :param txold_hash_hex: Transaction to re-create + :type txold_hash_hex: str, 0x-hex + :param chain_str: Chain spec, string representation + :type chain_str: str + :param gas: Explicitly use the specified gas amount + :type gas: number + :param default_factor: Default factor by which to increment the gas price by + :type default_factor: float + :raises NotLocalTxError: Transaction does not exist in the local queue + :returns: Transaction hash + :rtype: str, 0x-hex + """ + session = SessionBase.create_session() + otx = session.query(Otx).filter(Otx.tx_hash==txold_hash_hex).first() + if otx == None: + session.close() + raise NotLocalTxError(txold_hash_hex) + session.close() + + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + + tx_signed_raw_bytes = bytes.fromhex(otx.signed_tx[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + logg.debug('otx {} {}'.format(tx, otx.signed_tx)) + + queue = self.request.delivery_info['routing_key'] + + logg.debug('before {}'.format(tx)) + if gas != None: + tx['gasPrice'] = gas + else: + gas_price = c.gas_price() + if tx['gasPrice'] > gas_price: + logg.warning('Network gas price {} is lower than overdue tx gas price {}'.format(gas_price, tx['gasPrice'])) + #tx['gasPrice'] = int(tx['gasPrice'] * default_factor) + tx['gasPrice'] += 1 + else: + new_gas_price = int(tx['gasPrice'] * default_factor) + if gas_price > new_gas_price: + tx['gasPrice'] = gas_price + else: + tx['gasPrice'] = new_gas_price + + logg.debug('after {}'.format(tx)) + + #(tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx, chain_str, queue) + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str) + queue_create( + tx['nonce'], + tx['from'], + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ) + TxCache.clone(txold_hash_hex, tx_hash_hex) + + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + tx['from'], + tx['gasPrice'] * tx['gas'], + [tx_hash_hex], + queue=queue, + ) + s.apply_async() + return tx_hash_hex + + +@celery_app.task(bind=True, throws=(web3.exceptions.TransactionNotFound,)) +def sync_tx(self, tx_hash_hex, chain_str): + + queue = self.request.delivery_info['routing_key'] + + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + + tx = c.w3.eth.getTransaction(tx_hash_hex) + rcpt = None + try: + rcpt = c.w3.eth.getTransactionReceipt(tx_hash_hex) + except web3.exceptions.TransactionNotFound as e: + pass + + if rcpt != None: + success = rcpt['status'] == 1 + logg.debug('sync tx {} mined block {} success {}'.format(tx_hash_hex, rcpt['blockNumber'], success)) + + s = celery.signature( + 'cic_eth.queue.tx.set_final_status', + [ + tx_hash_hex, + rcpt['blockNumber'], + not success, + ], + queue=queue, + ) + else: + logg.debug('sync tx {} mempool'.format(tx_hash_hex)) + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [ + tx_hash_hex, + ], + queue=queue, + ) + + s.apply_async() + + + +@celery_app.task(bind=True) +def resume_tx(self, txpending_hash_hex, chain_str): + """Queue a suspended tranaction for (re)sending + + :param txpending_hash_hex: Transaction hash + :type txpending_hash_hex: str, 0x-hex + :param chain_str: Chain spec, string representation + :type chain_str: str + :raises NotLocalTxError: Transaction does not exist in the local queue + :returns: Transaction hash + :rtype: str, 0x-hex + """ + + chain_spec = ChainSpec.from_chain_str(chain_str) + + session = SessionBase.create_session() + r = session.query(Otx.signed_tx).filter(Otx.tx_hash==txpending_hash_hex).first() + session.close() + if r == None: + raise NotLocalTxError(txpending_hash_hex) + + tx_signed_raw_hex = r[0] + tx_signed_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_bytes, chain_spec.chain_id()) + + queue = self.request.delivery_info['routing_key'] + + s = create_check_gas_and_send_task( + [tx_signed_raw_hex], + chain_str, + tx['from'], + tx['gasPrice'] * tx['gas'], + [txpending_hash_hex], + queue=queue, + ) + s.apply_async() + return txpending_hash_hex + + +@celery_app.task() +def otx_cache_parse_tx( + tx_hash_hex, + tx_signed_raw_hex, + chain_str, + ): + """Generates and commits transaction cache metadata for a gas refill transaction + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx_signed_raw_hex: Raw signed transaction + :type tx_signed_raw_hex: str, 0x-hex + :param chain_str: Chain spec string representation + :type chain_str: str + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + + + chain_spec = ChainSpec.from_chain_str(chain_str) + c = RpcClient(chain_spec) + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw_hex[2:]) + tx = unpack_signed_raw_tx(tx_signed_raw_bytes, chain_spec.chain_id()) + (txc, cache_id) = cache_gas_refill_data(tx_hash_hex, tx) + return txc + + +@celery_app.task() +def cache_gas_refill_data( + tx_hash_hex, + tx, + ): + """Helper function for otx_cache_parse_tx + + :param tx_hash_hex: Transaction hash + :type tx_hash_hex: str, 0x-hex + :param tx: Signed raw transaction + :type tx: str, 0x-hex + :returns: Transaction hash and id of cache element in storage backend, respectively + :rtype: tuple + """ + tx_cache = TxCache( + tx_hash_hex, + tx['from'], + tx['to'], + zero_address, + zero_address, + tx['value'], + tx['value'], + ) + + session = SessionBase.create_session() + session.add(tx_cache) + session.commit() + cache_id = tx_cache.id + session.close() + return (tx_hash_hex, cache_id) diff --git a/apps/cic-eth/cic_eth/eth/util.py b/apps/cic-eth/cic_eth/eth/util.py new file mode 100644 index 00000000..4bd2dea6 --- /dev/null +++ b/apps/cic-eth/cic_eth/eth/util.py @@ -0,0 +1,102 @@ +# standard imports +import logging +import sha3 +import web3 + +# third-party imports +from rlp import decode as rlp_decode +from rlp import encode as rlp_encode +from eth_keys import KeyAPI + +logg = logging.getLogger() + +field_debugs = [ + 'nonce', + 'gasPrice', + 'gas', + 'to', + 'value', + 'data', + 'v', + 'r', + 's', + ] + + +def unpack_signed_raw_tx(tx_raw_bytes, chain_id): + d = rlp_decode(tx_raw_bytes) + + logg.debug('decoding using chain id {}'.format(chain_id)) + j = 0 + for i in d: + logg.debug('decoded {}: {}'.format(field_debugs[j], i.hex())) + j += 1 + vb = chain_id + if chain_id != 0: + v = int.from_bytes(d[6], 'big') + vb = v - (chain_id * 2) - 35 + s = b''.join([d[7], d[8], bytes([vb])]) + so = KeyAPI.Signature(signature_bytes=s) + + h = sha3.keccak_256() + h.update(rlp_encode(d)) + signed_hash = h.digest() + + d[6] = chain_id + d[7] = b'' + d[8] = b'' + + h = sha3.keccak_256() + h.update(rlp_encode(d)) + unsigned_hash = h.digest() + + p = so.recover_public_key_from_msg_hash(unsigned_hash) + a = p.to_checksum_address() + logg.debug('decoded recovery byte {}'.format(vb)) + logg.debug('decoded address {}'.format(a)) + logg.debug('decoded signed hash {}'.format(signed_hash.hex())) + logg.debug('decoded unsigned hash {}'.format(unsigned_hash.hex())) + + to = d[3].hex() or None + if to != None: + to = web3.Web3.toChecksumAddress('0x' + to) + + return { + 'from': a, + 'nonce': int.from_bytes(d[0], 'big'), + 'gasPrice': int.from_bytes(d[1], 'big'), + 'gas': int.from_bytes(d[2], 'big'), + 'to': to, + 'value': int.from_bytes(d[4], 'big'), + 'data': '0x' + d[5].hex(), + 'v': chain_id, + 'r': '0x' + s[:32].hex(), + 's': '0x' + s[32:64].hex(), + 'chainId': chain_id, + 'hash': '0x' + signed_hash.hex(), + 'hash_unsigned': '0x' + unsigned_hash.hex(), + } + + +def unpack_signed_raw_tx_hex(tx_raw_hex, chain_id): + return unpack_signed_raw_tx(bytes.fromhex(tx_raw_hex[2:]), chain_id) + + +# TODO: consider moving tx string representation generation from api_admin to here +def tx_string(tx_raw_bytes, chain_id): + tx_unpacked = unpack_signed_raw_tx(tx_raw_bytes, chain_id) + return 'tx nonce {} from {} to {} hash {}'.format( + tx_unpacked['nonce'], + tx_unpacked['from'], + tx_unpacked['to'], + tx_unpacked['hash'], + ) + +def tx_hex_string(tx_hex, chain_id): + if len(tx_hex) < 2: + raise ValueError('invalid data length') + elif tx_hex[:2] == '0x': + tx_hex = tx_hex[2:] + + tx_raw_bytes = bytes.fromhex(tx_hex) + return tx_string(tx_raw_bytes, chain_id) diff --git a/apps/cic-eth/cic_eth/queue/__init__.py b/apps/cic-eth/cic_eth/queue/__init__.py new file mode 100644 index 00000000..8acee1b9 --- /dev/null +++ b/apps/cic-eth/cic_eth/queue/__init__.py @@ -0,0 +1,4 @@ +# third-party imports +import celery + +from .tx import get_tx diff --git a/apps/cic-eth/cic_eth/queue/tx.py b/apps/cic-eth/cic_eth/queue/tx.py new file mode 100644 index 00000000..bcc2bed3 --- /dev/null +++ b/apps/cic-eth/cic_eth/queue/tx.py @@ -0,0 +1,654 @@ +# standard imports +import logging +import time +import datetime + +# third-party imports +import celery +from sqlalchemy import or_ +from sqlalchemy import tuple_ +from sqlalchemy import func + +# local imports +from cic_registry import CICRegistry +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.otx import OtxStateLog +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.lock import Lock +from cic_eth.db import SessionBase +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import LockEnum +from cic_eth.eth.util import unpack_signed_raw_tx # TODO: should not be in same sub-path as package that imports queue.tx +from cic_eth.error import NotLocalTxError +from cic_eth.error import LockedError + +celery_app = celery.current_app +#logg = celery_app.log.get_default_logger() +logg = logging.getLogger() + + +@celery_app.task() +def create(nonce, holder_address, tx_hash, signed_tx, chain_str, obsolete_predecessors=True): + """Create a new transaction queue record. + + :param nonce: Transaction nonce + :type nonce: int + :param holder_address: Sender address + :type holder_address: str, 0x-hex + :param tx_hash: Transaction hash + :type tx_hash: str, 0x-hex + :param signed_tx: Signed raw transaction + :type signed_tx: str, 0x-hex + :param chain_str: Chain spec string representation to create transaction for + :type chain_str: str + :returns: transaction hash + :rtype: str, 0x-hash + """ + session = SessionBase.create_session() + lock = Lock.check_aggregate(chain_str, LockEnum.QUEUE, holder_address, session=session) + if lock > 0: + session.close() + raise LockedError(lock) + + o = Otx.add( + nonce=nonce, + address=holder_address, + tx_hash=tx_hash, + signed_tx=signed_tx, + session=session, + ) + session.flush() + + if obsolete_predecessors: + # TODO: obsolete previous txs from same holder with same nonce + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(Otx.nonce==nonce) + q = q.filter(TxCache.sender==holder_address) + q = q.filter(Otx.tx_hash!=tx_hash) + q = q.filter(Otx.status<=StatusEnum.SENT) + + for otx in q.all(): + logg.info('otx {} obsoleted by {}'.format(otx.tx_hash, tx_hash)) + if otx.status == StatusEnum.SENT: + otx.cancel(False, session=session) + elif otx.status != StatusEnum.OBSOLETED: + otx.override(session=session) + + session.commit() + session.close() + logg.debug('queue created nonce {} from {} hash {}'.format(nonce, holder_address, tx_hash)) + return tx_hash + + +# TODO: Replace set_* with single task for set status +@celery_app.task() +def set_sent_status(tx_hash, fail=False): + """Used to set the status after a send attempt + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :param fail: if True, will set a SENDFAIL status, otherwise a SENT status. (Default: False) + :type fail: boolean + :raises NotLocalTxError: If transaction not found in queue. + :returns: True if tx is known, False otherwise + :rtype: boolean + """ + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + logg.warning('not local tx, skipping {}'.format(tx_hash)) + session.close() + return False + + if fail: + o.sendfail(session=session) + else: + o.sent(session=session) + + session.commit() + session.close() + + return tx_hash + + +@celery_app.task() +def set_final_status(tx_hash, block=None, fail=False): + """Used to set the status of an incoming transaction result. + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :param block: Block number if final status represents a confirmation on the network + :type block: number + :param fail: if True, will set a SUCCESS status, otherwise a REVERTED status. (Default: False) + :type fail: boolean + :raises NotLocalTxError: If transaction not found in queue. + """ + session = SessionBase.create_session() + q = session.query( + Otx.nonce.label('nonce'), + TxCache.sender.label('sender'), + Otx.id.label('otxid'), + ) + q = q.join(TxCache) + q = q.filter(Otx.tx_hash==tx_hash) + o = q.first() + + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + session.flush() + + nonce = o.nonce + sender = o.sender + otxid = o.otxid + + q = session.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + o = q.first() + + if fail: + o.minefail(block, session=session) + else: + o.success(block, session=session) + + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(Otx.nonce==nonce) + q = q.filter(TxCache.sender==sender) + q = q.filter(Otx.tx_hash!=tx_hash) + + for otwo in q.all(): + otwo.cancel(True, session=session) + + session.commit() + session.close() + + return tx_hash + +@celery_app.task() +def set_cancel(tx_hash, manual=False): + """Used to set the status when a transaction is cancelled. + + Will set the state to CANCELLED or OVERRIDDEN + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :param manual: If set, status will be OVERRIDDEN. Otherwise CANCELLED. + :type manual: boolean + :raises NotLocalTxError: If transaction not found in queue. + """ + + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + session.flush() + + if manual: + o.override(session=session) + else: + o.cancel(session=session) + + session.commit() + session.close() + + return tx_hash + + +@celery_app.task() +def set_rejected(tx_hash): + """Used to set the status when the node rejects sending a transaction to network + + Will set the state to REJECTED + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + """ + + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + session.flush() + + o.reject(session=session) + session.commit() + session.close() + + return tx_hash + + +@celery_app.task() +def set_fubar(tx_hash): + """Used to set the status when an unexpected error occurs. + + Will set the state to FUBAR + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + """ + + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + session.flush() + + o.fubar(session=session) + session.commit() + session.close() + + return tx_hash + +@celery_app.task() +def set_ready(tx_hash): + """Used to mark a transaction as ready to be sent to network + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + """ + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + session.flush() + + if o.status == StatusEnum.WAITFORGAS or o.status == StatusEnum.PENDING: + o.readysend(session=session) + else: + o.retry(session=session) + + logg.debug('ot otx otx {} {}'.format(tx_hash, o)) + + session.add(o) + session.commit() + session.close() + + return tx_hash + + +@celery_app.task() +def set_waitforgas(tx_hash): + """Used to set the status when a transaction must be deferred due to gas refill + + Will set the state to WAITFORGAS + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + """ + + session = SessionBase.create_session() + o = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if o == None: + session.close() + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + session.flush() + + o.waitforgas(session=session) + session.commit() + session.close() + + return tx_hash + +@celery_app.task() +def get_state_log(tx_hash): + + logs = [] + + session = SessionBase.create_session() + + q = session.query(OtxStateLog) + q = q.join(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + q = q.order_by(OtxStateLog.date.asc()) + for l in q.all(): + logs.append((l.date, l.status,)) + + session.close() + + return logs + + +@celery_app.task() +def get_tx_cache(tx_hash): + """Returns an aggregate dictionary of outgoing transaction data and metadata + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + :returns: Transaction data + :rtype: dict + """ + session = SessionBase.create_session() + q = session.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + otx = q.first() + + if otx == None: + session.close() + raise NotLocalTxError(tx_hash) + + session.flush() + + q = session.query(TxCache) + q = q.filter(TxCache.otx_id==otx.id) + txc = q.first() + + session.close() + + values = txc.values() + tx = { + 'tx_hash': otx.tx_hash, + 'signed_tx': otx.signed_tx, + 'nonce': otx.nonce, + 'status': StatusEnum(otx.status).name, + 'status_code': otx.status, + 'source_token': txc.source_token_address, + 'destination_token': txc.destination_token_address, + 'sender': txc.sender, + 'recipient': txc.recipient, + 'from_value': values[0], + 'to_value': values[1], + 'date_created': txc.date_created, + 'date_updated': txc.date_updated, + 'date_checked': txc.date_checked, + } + + return tx + + +@celery_app.task() +def get_lock(address=None): + """Retrieve all active locks + + If address is set, the query will look up the lock for the specified address only. A list of zero or one elements is returned, depending on whether a lock is set or not. + + :param address: Get lock for only the specified address + :type address: str, 0x-hex + :returns: List of locks + :rtype: list of dicts + """ + session = SessionBase.create_session() + q = session.query( + Lock.date_created, + Lock.address, + Lock.flags, + Otx.tx_hash, + ) + q = q.join(Otx, isouter=True) + if address != None: + q = q.filter(Lock.address==address) + else: + q = q.order_by(Lock.date_created.asc()) + + locks = [] + for lock in q.all(): + o = { + 'date': lock[0], + 'address': lock[1], + 'tx_hash': lock[3], + 'flags': lock[2], + } + locks.append(o) + session.close() + + return locks + + +@celery_app.task() +def get_tx(tx_hash): + """Retrieve a transaction queue record by transaction hash + + :param tx_hash: Transaction hash of record to modify + :type tx_hash: str, 0x-hex + :raises NotLocalTxError: If transaction not found in queue. + :returns: nonce, address and signed_tx (raw signed transaction) + :rtype: dict + """ + session = SessionBase.create_session() + tx = session.query(Otx).filter(Otx.tx_hash==tx_hash).first() + if tx == None: + raise NotLocalTxError('queue does not contain tx hash {}'.format(tx_hash)) + + o = { + 'otx_id': tx.id, + 'nonce': tx.nonce, + 'signed_tx': tx.signed_tx, + 'status': tx.status, + } + logg.debug('get tx {}'.format(o)) + session.close() + return o + + +@celery_app.task() +def get_nonce_tx(nonce, sender, chain_id): + """Retrieve all transactions for address with specified nonce + + :param nonce: Nonce + :type nonce: number + :param address: Ethereum address + :type address: str, 0x-hex + :returns: Transactions + :rtype: dict, with transaction hash as key, signed raw transaction as value + """ + session = SessionBase.create_session() + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(TxCache.sender==sender) + q = q.filter(Otx.nonce==nonce) + + txs = {} + for r in q.all(): + tx_signed_bytes = bytes.fromhex(r.signed_tx[2:]) + tx = unpack_signed_raw_tx(tx_signed_bytes, chain_id) + if sender == None or tx['from'] == sender: + txs[r.tx_hash] = r.signed_tx + + session.close() + + return txs + + + +# TODO: pass chain spec instead of chain id +def get_paused_txs(status=None, sender=None, chain_id=0): + """Returns not finalized transactions that have been attempted sent without success. + + :param status: If set, will return transactions with this local queue status only + :type status: cic_eth.db.enum.StatusEnum + :param recipient: Recipient address to return transactions for + :type recipient: str, 0x-hex + :param chain_id: Numeric chain id to use to parse signed transaction data + :type chain_id: number + :raises ValueError: Status is finalized, sent or never attempted sent + :returns: Transactions + :rtype: dict, with transaction hash as key, signed raw transaction as value + """ + session = SessionBase.create_session() + q = session.query(Otx) + + if status != None: + if status == StatusEnum.PENDING or status >= StatusEnum.SENT: + raise ValueError('not a valid paused tx value: {}'.format(status)) + q = q.filter(Otx.status==status) + q = q.join(TxCache) + else: + q = q.filter(Otx.status>StatusEnum.PENDING) + q = q.filter(Otx.status 0 and i == limit: + break + txs[o.tx_hash] = o.signed_tx + i += 1 + session.close() + return txs + + +# TODO: move query to model +def get_upcoming_tx(status=StatusEnum.READYSEND, recipient=None, before=None, chain_id=0): + """Returns the next pending transaction, specifically the transaction with the lowest nonce, for every recipient that has pending transactions. + + Will omit addresses that have the LockEnum.SEND bit in Lock set. + + (TODO) Will not return any rows if LockEnum.SEND bit in Lock is set for zero address. + + :param status: Defines the status used to filter as upcoming. + :type status: cic_eth.db.enum.StatusEnum + :param recipient: Ethereum address of recipient to return transaction for + :type recipient: str, 0x-hex + :param before: Only return transactions if their modification date is older than the given timestamp + :type before: datetime.datetime + :param chain_id: Chain id to use to parse signed transaction data + :type chain_id: number + :raises ValueError: Status is finalized, sent or never attempted sent + :returns: Transactions + :rtype: dict, with transaction hash as key, signed raw transaction as value + """ + session = SessionBase.create_session() + q = session.query( + TxCache.sender, + func.min(Otx.nonce).label('nonce'), + ) + q = q.join(TxCache) + q = q.join(Lock, isouter=True) + q = q.filter(or_(Lock.flags==None, Lock.flags.op('&')(LockEnum.SEND.value)==0)) + + if status >= StatusEnum.SENT: + raise ValueError('not a valid non-final tx value: {}'.format(s)) + q = q.filter(Otx.status==status) + + if recipient != None: + q = q.filter(TxCache.recipient==recipient) + + q = q.group_by(TxCache.sender) + + txs = {} + + results = q.all() + for r in results: + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(TxCache.sender==r.sender) + q = q.filter(Otx.nonce==r.nonce) + + if before != None: + q = q.filter(TxCache.date_checked 1: + task_queue = task_split[0] + task_pair = (task_split[1], task_queue) + transfer_callbacks.append(task_pair) + + +# TODO: move to contract registry +__convert_log_hash = '0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095' # keccak256(Conversion(address,address,address,uint256,uint256,address) +__account_registry_add_log_hash = '0x5ed3bdd47b9af629827a8d129aa39c870b10c03f0153fe9ddb8e84b665061acd' # keccak256(AccountAdded(address,uint256)) + +__transfer_method_signature = '0xa9059cbb' # keccak256(transfer(address,uint256)) +__transferfrom_method_signature = '0x23b872dd' # keccak256(transferFrom(address,address,uint256)) +__giveto_method_signature = '0x63e4bff4' # keccak256(giveTo(address)) + +# TODO: move to bancor package +def parse_convert_log(w3, entry): + data = entry.data[2:] + from_amount = int(data[:64], 16) + to_amount = int(data[64:128], 16) + holder_address_hex_raw = '0x' + data[-40:] + holder_address_hex = w3.toChecksumAddress(holder_address_hex_raw) + o = { + 'from_amount': from_amount, + 'to_amount': to_amount, + 'holder_address': holder_address_hex + } + logg.debug('parsed convert log {}'.format(o)) + return o + + +def registration_filter(w3, tx, rcpt, chain_spec): + registered_address = None + for l in rcpt['logs']: + event_topic_hex = l['topics'][0].hex() + if event_topic_hex == __account_registry_add_log_hash: + address_bytes = l.topics[1][32-20:] + address = web3.Web3.toChecksumAddress(address_bytes.hex()) + logg.debug('request token gift to {}'.format(address)) + s = celery.signature( + 'cic_eth.eth.account.gift', + [ + address, + str(chain_spec), + ], + queue=queue, + ) + s.apply_async() + + +def convert_filter(w3, tx, rcpt, chain_spec): + destination_token_address = None + recipient_address = None + amount = 0 + for l in rcpt['logs']: + event_topic_hex = l['topics'][0].hex() + if event_topic_hex == __convert_log_hash: + tx_hash_hex = tx['hash'].hex() + try: + convert_transfer = TxConvertTransfer.get(tx_hash_hex) + except UnknownConvertError: + logg.warning('skipping unknown convert tx {}'.format(tx_hash_hex)) + continue + if convert_transfer.transfer_tx_hash != None: + logg.warning('convert tx {} cache record already has transfer hash {}, skipping'.format(tx_hash_hex, convert_transfer.transfer_hash)) + continue + recipient_address = convert_transfer.recipient_address + logg.debug('found convert event {} recipient'.format(tx_hash_hex, recipient_address)) + r = parse_convert_log(l) + destination_token_address = l['topics'][3][-20:] + + if destination_token_address == zero_address or destination_token_address == None: + return None + + destination_token_address_hex = destination_token_address.hex() + s = celery.signature( + 'cic_eth.eth.bancor.transfer_converted', + [ + [{ + 'address': w3.toChecksumAddress(destination_token_address_hex), + }], + r['holder_address'], + recipient_address, + r['to_amount'], + tx_hash_hex, + str(chain_spec), + ], + queue=queue, + ) + logg.info('sending tx signature {}'.format(s)) + t = s.apply_async() + logg.debug('submitted transfer after convert task uuid {} {}'.format(t, t.successful())) + return t + + +def tx_filter(w3, tx, rcpt, chain_spec): + tx_hash_hex = tx.hash.hex() + otx = Otx.load(tx_hash_hex) + if otx == None: + logg.debug('tx {} not found locally, skipping'.format(tx_hash_hex)) + return None + logg.info('otx found {}'.format(otx.tx_hash)) + s = celery.signature( + 'cic_eth.queue.tx.set_final_status', + [ + tx_hash_hex, + rcpt.blockNumber, + rcpt.status == 0, + ], + queue=queue, + ) + t = s.apply_async() + return t + + +# TODO: replace with registry call instead +def get_token_symbol(w3, address): + #token = CICRegistry.get_address(CICRegistry.chain_spec, tx['to']) + logg.warning('token verification missing') + c = w3.eth.contract(abi=CICRegistry.abi('ERC20'), address=address) + return c.functions.symbol().call() + + +# TODO: replace with registry call instead +def get_token_decimals(w3, address): + #token = CICRegistry.get_address(CICRegistry.chain_spec, tx['to']) + logg.warning('token verification missing') + c = w3.eth.contract(abi=CICRegistry.abi('ERC20'), address=address) + return c.functions.decimals().call() + + +def callbacks_filter(w3, tx, rcpt, chain_spec): + transfer_data = None + if len(tx.input) < 10: + logg.debug('callbacks filter data length not sufficient for method signature in tx {}, skipping'.format(tx['hash'])) + return + + logg.debug('checking callbacks filter input {}'.format(tx.input[:10])) + + transfer_type = 'transfer' + method_signature = tx.input[:10] + if method_signature == __transfer_method_signature: + transfer_data = unpack_transfer(tx.input) + transfer_data['from'] = tx['from'] + transfer_data['token_address'] = tx['to'] + elif method_signature == __transferfrom_method_signature: + transfer_type = 'transferfrom' + transfer_data = unpack_transferfrom(tx.input) + transfer_data['token_address'] = tx['to'] + elif method_signature == __giveto_method_signature: + transfer_type = 'tokengift' + transfer_data = unpack_gift(tx.input) + for l in rcpt.logs: + if l.topics[0].hex() == '0x45c201a59ac545000ead84f30b2db67da23353aa1d58ac522c48505412143ffa': + transfer_data['amount'] = web3.Web3.toInt(hexstr=l.data) + token_address_bytes = l.topics[2][32-20:] + transfer_data['token_address'] = web3.Web3.toChecksumAddress(token_address_bytes.hex()) + transfer_data['from'] = rcpt.to + + if transfer_data != None: + for tc in transfer_callbacks: + token_symbol = None + try: + logg.debug('checking token {}'.format(transfer_data['token_address'])) + token_symbol = get_token_symbol(w3, transfer_data['token_address']) + token_decimals = get_token_decimals(w3, transfer_data['token_address']) + logg.debug('calling transfer callback {}:{} for tx {}'.format(tc[1], tc[0], tx['hash'])) + except UnknownContractError: + logg.debug('callback filter {}:{} skipping "transfer" method on unknown contract {} tx {}'.format(tc[1], tc[0], transfer_data['to'], tx.hash.hex())) + continue + result = { + 'hash': tx.hash.hex(), + 'sender': transfer_data['from'], + 'recipient': transfer_data['to'], + 'source_value': transfer_data['amount'], + 'destination_value': transfer_data['amount'], + 'source_token': transfer_data['token_address'], + 'destination_token': transfer_data['token_address'], + 'source_token_symbol': token_symbol, + 'destination_token_symbol': token_symbol, + 'source_token_decimals': token_decimals, + 'destination_token_decimals': token_decimals, + 'chain': str(chain_spec), + } + s = celery.signature( + tc[0], + [ + result, + transfer_type, + int(rcpt.status == 0), + ], + queue=tc[1], + ) + s.apply_async() + + +class GasFilter: + + def __init__(self, gas_provider): + self.gas_provider = gas_provider + + def filter(self, w3, tx, rcpt, chain_str): + tx_hash_hex = tx.hash.hex() + if tx['value'] > 0: + logg.debug('gas refill tx {}'.format(tx_hash_hex)) + session = SessionBase.create_session() + q = session.query(TxCache.recipient) + q = q.join(Otx) + q = q.filter(Otx.tx_hash==tx_hash_hex) + r = q.first() + + session.close() + + if r == None: + logg.warning('unsolicited gas refill tx {}'.format(tx_hash_hex)) + return + + chain_spec = ChainSpec.from_chain_str(chain_str) + txs = get_paused_txs(StatusEnum.WAITFORGAS, r[0], chain_spec.chain_id()) + + if len(txs) > 0: + logg.info('resuming gas-in-waiting txs for {}: {}'.format(r[0], txs.keys())) + s = create_check_gas_and_send_task( + list(txs.values()), + str(chain_str), + r[0], + 0, + tx_hashes_hex=list(txs.keys()), + queue=queue, + ) + s.apply_async() + + +re_websocket = re.compile('^wss?://') +re_http = re.compile('^https?://') +blockchain_provider = config.get('ETH_PROVIDER') +if re.match(re_websocket, blockchain_provider) != None: + blockchain_provider = WebsocketProvider(blockchain_provider) +elif re.match(re_http, blockchain_provider) != None: + blockchain_provider = HTTPProvider(blockchain_provider) +else: + raise ValueError('unknown provider url {}'.format(blockchain_provider)) + +def web3_constructor(): + w3 = web3.Web3(blockchain_provider) + return (blockchain_provider, w3) +RpcClient.set_constructor(web3_constructor) + + +def main(): + + chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) + c = RpcClient(chain_spec) + + CICRegistry.init(c.w3, config.get('CIC_REGISTRY_ADDRESS'), chain_spec) + CICRegistry.add_path(config.get('ETH_ABI_DIR')) + chain_registry = ChainRegistry(chain_spec) + CICRegistry.add_chain_registry(chain_registry) + + if config.get('ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER') != None: + CICRegistry.add_role(chain_spec, config.get('ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER'), 'AccountRegistry', True) + + syncers = [] + block_offset = c.w3.eth.blockNumber + chain = str(chain_spec) + + if SyncerBackend.first(chain): + from cic_eth.sync.history import HistorySyncer + backend = SyncerBackend.initial(chain, block_offset) + syncer = HistorySyncer(backend) + syncers.append(syncer) + + if args.mode == 'head': + from cic_eth.sync.head import HeadSyncer + block_sync = SyncerBackend.live(chain, block_offset+1) + syncers.append(HeadSyncer(block_sync)) + elif args.mode == 'history': + from cic_eth.sync.history import HistorySyncer + backends = SyncerBackend.resume(chain, block_offset+1) + for backend in backends: + syncers.append(HistorySyncer(backend)) + if len(syncers) == 0: + logg.info('found no unsynced history. terminating') + sys.exit(0) + else: + sys.stderr.write("unknown mode '{}'\n".format(args.mode)) + sys.exit(1) + +# bancor_registry_contract = CICRegistry.get_contract(chain_spec, 'BancorRegistry', interface='Registry') +# bancor_chain_registry = CICRegistry.get_chain_registry(chain_spec) +# bancor_registry = BancorRegistryClient(c.w3, bancor_chain_registry, config.get('ETH_ABI_DIR')) +# bancor_registry.load() + + i = 0 + for syncer in syncers: + logg.debug('running syncer index {}'.format(i)) + gas_filter = GasFilter(c.gas_provider()).filter + syncer.filter.append(gas_filter) + syncer.filter.append(registration_filter) + syncer.filter.append(callbacks_filter) + # TODO: the two following filter functions break the filter loop if return uuid. Pro: less code executed. Con: Possibly unintuitive flow break + syncer.filter.append(tx_filter) + syncer.filter.append(convert_filter) + + try: + syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL'))) + except LoopDone as e: + sys.stderr.write("sync '{}' done at block {}\n".format(args.mode, e)) + + i += 1 + + sys.exit(0) + + +if __name__ == '__main__': + main() diff --git a/apps/cic-eth/cic_eth/runnable/retry.py b/apps/cic-eth/cic_eth/runnable/retry.py new file mode 100644 index 00000000..b59f6d05 --- /dev/null +++ b/apps/cic-eth/cic_eth/runnable/retry.py @@ -0,0 +1,214 @@ +import os +import sys +import logging +import argparse +import re +import datetime + +import web3 +import confini +import celery +from web3 import HTTPProvider, WebsocketProvider +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec + +from cic_eth.db import dsn_from_config +from cic_eth.db import SessionBase +from cic_eth.eth import RpcClient +from cic_eth.sync.retry import RetrySyncer +from cic_eth.queue.tx import get_status_tx +from cic_eth.queue.tx import get_tx +from cic_eth.admin.ctrl import lock_send +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import LockEnum +from cic_eth.eth.util import unpack_signed_raw_tx_hex + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() +logging.getLogger('websockets.protocol').setLevel(logging.CRITICAL) +logging.getLogger('web3.RequestManager').setLevel(logging.CRITICAL) +logging.getLogger('web3.providers.WebsocketProvider').setLevel(logging.CRITICAL) +logging.getLogger('web3.providers.HTTPProvider').setLevel(logging.CRITICAL) + + +config_dir = os.path.join('/usr/local/etc/cic-eth') + +argparser = argparse.ArgumentParser(description='daemon that monitors transactions in new blocks') +argparser.add_argument('-c', type=str, default=config_dir, help='config root to use') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, help='chain spec') +argparser.add_argument('--retry-delay', dest='retry_delay', type=str, help='seconds to wait for retrying a transaction that is marked as sent') +argparser.add_argument('--abi-dir', dest='abi_dir', type=str, help='Directory containing bytecode and abi') +argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration') +argparser.add_argument('-q', type=str, default='cic-eth', help='celery queue to submit transaction tasks to') +argparser.add_argument('-v', help='be verbose', action='store_true') +argparser.add_argument('-vv', help='be more verbose', action='store_true') +args = argparser.parse_args(sys.argv[1:]) + + +if args.v == True: + logging.getLogger().setLevel(logging.INFO) +elif args.vv == True: + logging.getLogger().setLevel(logging.DEBUG) + +config_dir = os.path.join(args.c) +os.makedirs(config_dir, 0o777, True) +config = confini.Config(config_dir, args.env_prefix) +config.process() +# override args +args_override = { + 'ETH_ABI_DIR': getattr(args, 'abi_dir'), + 'CIC_CHAIN_SPEC': getattr(args, 'i'), + 'CIC_TX_RETRY_DELAY': getattr(args, 'retry_delay'), + } +config.dict_override(args_override, 'cli flag') +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config loaded from {}:\n{}'.format(config_dir, config)) + +app = celery.Celery(backend=config.get('CELERY_RESULT_URL'), broker=config.get('CELERY_BROKER_URL')) + +queue = args.q + +chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) + +dsn = dsn_from_config(config) +SessionBase.connect(dsn) + + +re_websocket = re.compile('^wss?://') +re_http = re.compile('^https?://') +blockchain_provider = config.get('ETH_PROVIDER') +if re.match(re_websocket, blockchain_provider) != None: + blockchain_provider = WebsocketProvider(blockchain_provider) +elif re.match(re_http, blockchain_provider) != None: + blockchain_provider = HTTPProvider(blockchain_provider) +else: + raise ValueError('unknown provider url {}'.format(blockchain_provider)) + +def web3_constructor(): + w3 = web3.Web3(blockchain_provider) + return (blockchain_provider, w3) +RpcClient.set_constructor(web3_constructor) + + +straggler_delay = int(config.get('CIC_TX_RETRY_DELAY')) + +# TODO: we already have the signed raw tx in get, so its a waste of cycles to get_tx here +def sendfail_filter(w3, tx_hash, rcpt, chain_str): + chain_spec = ChainSpec.from_chain_str(chain_str) + tx_dict = get_tx(tx_hash) + tx = unpack_signed_raw_tx_hex(tx_dict['signed_tx'], chain_spec.chain_id()) + logg.debug('submitting tx {} for retry'.format(tx_hash)) + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + tx_hash, + chain_str, + LockEnum.QUEUE, + tx['from'], + ], + queue=queue, + ) +# s_resume = celery.signature( +# 'cic_eth.eth.tx.resume_tx', +# [ +# chain_str, +# ], +# queue=queue, +# ) + +# s_retry_status = celery.signature( +# 'cic_eth.queue.tx.set_ready', +# [], +# queue=queue, +# ) + s_resend = celery.signature( + 'cic_eth.eth.tx.resend_with_higher_gas', + [ + chain_str, + ], + queue=queue, + ) + + #s_resume.link(s_retry_status) + #s_check.link(s_resume) + s_check.link(s_resend) + s_check.apply_async() + + +# TODO: can we merely use the dispatcher instead? +def dispatch(chain_str): + txs = get_status_tx(StatusEnum.RETRY, datetime.datetime.utcnow()) + if len(txs) == 0: + logg.debug('no retry state txs found') + return + #signed_txs = list(txs.values()) + #logg.debug('signed txs {} chain {}'.format(signed_txs, chain_str)) + #for tx in signed_txs: + for k in txs.keys(): + #tx_cache = get_tx_cache(k) + tx_raw = txs[k] + tx = unpack_signed_raw_tx_hex(tx_raw, chain_spec.chain_id()) + + s_check = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + [tx_raw], + chain_str, + LockEnum.QUEUE, + tx['from'], + ], + queue=queue, + ) + s_send = celery.signature( + 'cic_eth.eth.tx.send', + [ + chain_str, + ], + queue=queue, + ) + s_check.link(s_send) + t = s_check.apply_async() + +# try: +# r = t.get() +# logg.debug('submitted as {} result {} with queue task {}'.format(t, r, t.children[0].get())) +# except PermanentTxError as e: +# logg.error('tx {} permanently failed: {}'.format(tx, e)) +# except TemporaryTxError as e: +# logg.error('tx {} temporarily failed: {}'.format(tx, e)) + +# +# +#def straggler_filter(w3, tx, rcpt, chain_str): +# before = datetime.datetime.utcnow() - datetime.timedelta(seconds=straggler_delay) +# txs = get_status_tx(StatusEnum.SENT, before) +# if len(txs) == 0: +# logg.debug('no straggler txs found') +# return +# txs = list(txs.keys()) +# logg.debug('straggler txs {} chain {}'.format(signed_txs, chain_str)) +# s_send = celery.signature( +# 'cic_eth.eth.resend_with_higher_gas', +# [ +# txs, +# chain_str, +# ], +# queue=queue, +# ) +# s_send.apply_async() + + +def main(): + + c = RpcClient(chain_spec) + CICRegistry.init(c.w3, config.get('CIC_REGISTRY_ADDRESS'), chain_spec) + CICRegistry.add_path(config.get('ETH_ABI_DIR')) + + syncer = RetrySyncer(chain_spec, straggler_delay, final_func=dispatch) + syncer.filter.append(sendfail_filter) + syncer.loop(float(straggler_delay)) + + +if __name__ == '__main__': + main() diff --git a/apps/cic-eth/cic_eth/runnable/server_agent.py b/apps/cic-eth/cic_eth/runnable/server_agent.py new file mode 100644 index 00000000..5f89f12d --- /dev/null +++ b/apps/cic-eth/cic_eth/runnable/server_agent.py @@ -0,0 +1,173 @@ +# standard imports +import os +import re +import logging +import argparse +import json + +# third-party imports +import web3 +import confini +import celery +from json.decoder import JSONDecodeError +from cic_registry.chain import ChainSpec + +# local imports +from cic_eth.db import dsn_from_config +from cic_eth.db.models.base import SessionBase +from cic_eth.eth.util import unpack_signed_raw_tx + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +rootdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) +dbdir = os.path.join(rootdir, 'cic_eth', 'db') +migrationsdir = os.path.join(dbdir, 'migrations') + +config_dir = os.path.join('/usr/local/etc/cic-eth') + +argparser = argparse.ArgumentParser() +argparser.add_argument('-c', type=str, default=config_dir, help='config file') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, help='chain spec') +argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration') +argparser.add_argument('-q', type=str, default='cic-eth', help='queue name for worker tasks') +argparser.add_argument('-v', action='store_true', help='be verbose') +argparser.add_argument('-vv', action='store_true', help='be more verbose') +args = argparser.parse_args() + +if args.vv: + logging.getLogger().setLevel(logging.DEBUG) +elif args.v: + logging.getLogger().setLevel(logging.INFO) + +config = confini.Config(args.c, args.env_prefix) +config.process() +args_override = { + 'CIC_CHAIN_SPEC': getattr(args, 'i'), + } +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config:\n{}'.format(config)) + +dsn = dsn_from_config(config) +SessionBase.connect(dsn) + +celery_app = celery.Celery(backend=config.get('CELERY_RESULT_URL'), broker=config.get('CELERY_BROKER_URL')) +queue = args.q + +re_transfer_approval_request = r'^/transferrequest/?' + +chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) + + +def process_transfer_approval_request(session, env): + r = re.match(re_transfer_approval_request, env.get('PATH_INFO')) + if not r: + return None + + if env.get('CONTENT_TYPE') != 'application/json': + raise AttributeError('content type') + + if env.get('REQUEST_METHOD') != 'POST': + raise AttributeError('method') + + post_data = json.load(env.get('wsgi.input')) + token_address = web3.Web3.toChecksumAddress(post_data['token_address']) + holder_address = web3.Web3.toChecksumAddress(post_data['holder_address']) + beneficiary_address = web3.Web3.toChecksumAddress(post_data['beneficiary_address']) + value = int(post_data['value']) + + logg.debug('transfer approval request token {} to {} from {} value {}'.format( + token_address, + beneficiary_address, + holder_address, + value, + ) + ) + + s = celery.signature( + 'cic_eth.eth.request.transfer_approval_request', + [ + [ + { + 'address': token_address, + }, + ], + holder_address, + beneficiary_address, + value, + config.get('CIC_CHAIN_SPEC'), + ], + queue=queue, + ) + t = s.apply_async() + r = t.get() + tx_raw_bytes = bytes.fromhex(r[0][2:]) + tx = unpack_signed_raw_tx(tx_raw_bytes, chain_spec.chain_id()) + for r in t.collect(): + logg.debug('result {}'.format(r)) + + if not t.successful(): + raise RuntimeError(tx['hash']) + + return ('text/plain', tx['hash'].encode('utf-8'),) + + +# uwsgi application +def application(env, start_response): + + for k in env.keys(): + logg.debug('env {} {}'.format(k, env[k])) + + headers = [] + content = b'' + err = None + + session = SessionBase.create_session() + for handler in [ + process_transfer_approval_request, + ]: + try: + r = handler(session, env) + except AttributeError as e: + logg.error('handler fail attribute {}'.format(e)) + err = '400 Impertinent request' + break + except JSONDecodeError as e: + logg.error('handler fail json {}'.format(e)) + err = '400 Invalid data format' + break + except KeyError as e: + logg.error('handler fail key {}'.format(e)) + err = '400 Invalid JSON' + break + except ValueError as e: + logg.error('handler fail value {}'.format(e)) + err = '400 Invalid data' + break + except RuntimeError as e: + logg.error('task fail value {}'.format(e)) + err = '500 Task failed, sorry I cannot tell you more' + break + if r != None: + (mime_type, content) = r + break + session.close() + + if err != None: + headers.append(('Content-Type', 'text/plain, charset=UTF-8',)) + start_response(err, headers) + session.close() + return [content] + + headers.append(('Content-Length', str(len(content))),) + headers.append(('Access-Control-Allow-Origin', '*',)); + + if len(content) == 0: + headers.append(('Content-Type', 'text/plain, charset=UTF-8',)) + start_response('404 Looked everywhere, sorry', headers) + else: + headers.append(('Content-Type', mime_type,)) + start_response('200 OK', headers) + + return [content] diff --git a/apps/cic-eth/cic_eth/runnable/tag.py b/apps/cic-eth/cic_eth/runnable/tag.py new file mode 100644 index 00000000..c1df1e30 --- /dev/null +++ b/apps/cic-eth/cic_eth/runnable/tag.py @@ -0,0 +1,77 @@ +# standard imports +import os +import sys +import logging +import argparse +import re + +# third-party imports +import web3 +from web3 import HTTPProvider, WebsocketProvider +import confini + +# local imports +from cic_eth.api import AdminApi +from cic_eth.eth import RpcClient +from cic_eth.db import dsn_from_config +from cic_eth.db.models.base import SessionBase + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +default_config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic') + + +argparser = argparse.ArgumentParser(description='daemon that monitors transactions in new blocks') +argparser.add_argument('-p', '--provider', dest='p', type=str, help='Web3 provider url (http only)') +argparser.add_argument('-c', type=str, default=default_config_dir, help='config root to use') +argparser.add_argument('-v', help='be verbose', action='store_true') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, help='chain spec') +argparser.add_argument('-vv', help='be more verbose', action='store_true') +argparser.add_argument('tag', type=str, help='address tag') +argparser.add_argument('address', type=str, help='address') +args = argparser.parse_args(sys.argv[1:]) + +if args.v == True: + logging.getLogger().setLevel(logging.INFO) +elif args.vv == True: + logging.getLogger().setLevel(logging.DEBUG) + +config = confini.Config(args.c) +config.process() +args_override = { + 'ETH_PROVIDER': getattr(args, 'p'), + 'CIC_CHAIN_SPEC': getattr(args, 'i'), + } +config.dict_override(args_override, 'cli flag') +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config loaded from {}\n{}'.format(args.c, config)) + + +dsn = dsn_from_config(config) +SessionBase.connect(dsn) + +re_websocket = re.compile('^wss?://') +re_http = re.compile('^https?://') +blockchain_provider = config.get('ETH_PROVIDER') +if re.match(re_websocket, blockchain_provider) != None: + blockchain_provider = WebsocketProvider(blockchain_provider) +elif re.match(re_http, blockchain_provider) != None: + blockchain_provider = HTTPProvider(blockchain_provider) +else: + raise ValueError('unknown provider url {}'.format(blockchain_provider)) + +def web3_constructor(): + w3 = web3.Web3(blockchain_provider) + return (blockchain_provider, w3) +RpcClient.set_constructor(web3_constructor) +c = RpcClient(config.get('CIC_CHAIN_SPEC')) + +def main(): + api = AdminApi(c) + api.tag_account(args.tag, args.address) + + +if __name__ == '__main__': + main() diff --git a/apps/cic-eth/cic_eth/runnable/tasker.py b/apps/cic-eth/cic_eth/runnable/tasker.py new file mode 100644 index 00000000..efbb6e75 --- /dev/null +++ b/apps/cic-eth/cic_eth/runnable/tasker.py @@ -0,0 +1,238 @@ +# standard imports +import sys +import os +import logging +import argparse +import tempfile +import re +import urllib +import websocket + +# third-party imports +import celery +import confini +from crypto_dev_signer.eth.web3ext import Web3 as Web3Ext +from web3 import HTTPProvider, WebsocketProvider +from gas_proxy.web3 import GasMiddleware + +# local imports +from cic_registry.registry import CICRegistry +from cic_registry.registry import ChainRegistry +from cic_registry.registry import ChainSpec +from cic_registry.helper.declarator import DeclaratorOracleAdapter + +from cic_bancor.bancor import BancorRegistryClient +from cic_eth.eth import bancor +from cic_eth.eth import token +from cic_eth.eth import tx +from cic_eth.eth import account +from cic_eth.eth import request +from cic_eth.admin import debug +from cic_eth.admin import ctrl +from cic_eth.eth.rpc import RpcClient +from cic_eth.eth.rpc import GasOracle +from cic_eth.queue import tx +from cic_eth.callbacks import Callback +from cic_eth.callbacks import http +from cic_eth.callbacks import tcp +from cic_eth.callbacks import redis +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.otx import Otx +from cic_eth.db import dsn_from_config + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +config_dir = os.path.join('/usr/local/etc/cic-eth') + +argparser = argparse.ArgumentParser() +argparser.add_argument('-p', '--provider', dest='p', type=str, help='web3 provider') +argparser.add_argument('-c', type=str, default=config_dir, help='config file') +argparser.add_argument('-q', type=str, default='cic-eth', help='queue name for worker tasks') +argparser.add_argument('--abi-dir', dest='abi_dir', type=str, help='Directory containing bytecode and abi') +argparser.add_argument('--trace-queue-status', default=None, dest='trace_queue_status', action='store_true', help='set to perist all queue entry status changes to storage') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, help='chain spec') +argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration') +argparser.add_argument('-v', action='store_true', help='be verbose') +argparser.add_argument('-vv', action='store_true', help='be more verbose') +args = argparser.parse_args() + +if args.vv: + logging.getLogger().setLevel(logging.DEBUG) +elif args.v: + logging.getLogger().setLevel(logging.INFO) + +config = confini.Config(args.c, args.env_prefix) +config.process() +# override args +args_override = { + 'ETH_ABI_DIR': getattr(args, 'abi_dir'), + 'CIC_CHAIN_SPEC': getattr(args, 'i'), + 'ETH_PROVIDER': getattr(args, 'p'), + 'TASKS_TRACE_QUEUE_STATUS': getattr(args, 'trace_queue_status'), + } +config.dict_override(args_override, 'cli flag') +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config loaded from {}:\n{}'.format(args.c, config)) + +# connect to database +dsn = dsn_from_config(config) +SessionBase.connect(dsn) + +# verify database connection with minimal sanity query +session = SessionBase.create_session() +session.execute('select version_num from alembic_version') +session.close() + +# set up celery +current_app = celery.Celery(__name__) + +broker = config.get('CELERY_BROKER_URL') +if broker[:4] == 'file': + bq = tempfile.mkdtemp() + bp = tempfile.mkdtemp() + current_app.conf.update({ + 'broker_url': broker, + 'broker_transport_options': { + 'data_folder_in': bq, + 'data_folder_out': bq, + 'data_folder_processed': bp, + }, + }, + ) + logg.warning('celery broker dirs queue i/o {} processed {}, will NOT be deleted on shutdown'.format(bq, bp)) +else: + current_app.conf.update({ + 'broker_url': broker, + }) + +result = config.get('CELERY_RESULT_URL') +if result[:4] == 'file': + rq = tempfile.mkdtemp() + current_app.conf.update({ + 'result_backend': 'file://{}'.format(rq), + }) + logg.warning('celery backend store dir {} created, will NOT be deleted on shutdown'.format(rq)) +else: + current_app.conf.update({ + 'result_backend': result, + }) + + +# set up web3 +# TODO: web3 socket wrapping is now a lot of code. factor out +class JSONRPCHttpSocketAdapter: + + def __init__(self, url): + self.response = None + self.url = url + + def send(self, data): + logg.debug('redirecting socket send to jsonrpc http socket adapter {} {}'.format(self.url, data)) + req = urllib.request.Request(self.url, method='POST') + req.add_header('Content-type', 'application/json') + req.add_header('Connection', 'close') + res = urllib.request.urlopen(req, data=data.encode('utf-8')) + self.response = res.read().decode('utf-8') + logg.debug('setting jsonrpc http socket adapter response to {}'.format(self.response)) + + def recv(self, n=0): + return self.response + + +re_websocket = re.compile('^wss?://') +re_http = re.compile('^https?://') +blockchain_provider = config.get('ETH_PROVIDER') +socket_constructor = None +if re.match(re_websocket, blockchain_provider) != None: + def socket_constructor_ws(): + return websocket.create_connection(config.get('ETH_PROVIDER')) + socket_constructor = socket_constructor_ws + blockchain_provider = WebsocketProvider(blockchain_provider) +elif re.match(re_http, blockchain_provider) != None: + def socket_constructor_http(): + return JSONRPCHttpSocketAdapter(config.get('ETH_PROVIDER')) + socket_constructor = socket_constructor_http + blockchain_provider = HTTPProvider(blockchain_provider) +else: + raise ValueError('unknown provider url {}'.format(blockchain_provider)) + + +def web3ext_constructor(): + w3 = Web3Ext(blockchain_provider, config.get('SIGNER_SOCKET_PATH')) + GasMiddleware.socket_constructor = socket_constructor + w3.middleware_onion.add(GasMiddleware) + + def sign_transaction(tx): + r = w3.eth.signTransaction(tx) + d = r.__dict__ + for k in d.keys(): + if k == 'tx': + d[k] = d[k].__dict__ + else: + d[k] = d[k].hex() + return d + + setattr(w3.eth, 'sign_transaction', sign_transaction) + setattr(w3.eth, 'send_raw_transaction', w3.eth.sendRawTransaction) + return (blockchain_provider, w3) +RpcClient.set_constructor(web3ext_constructor) + +logg.info('ccc {}'.format(config.store['TASKS_TRACE_QUEUE_STATUS'])) +Otx.tracing = config.true('TASKS_TRACE_QUEUE_STATUS') + + +def main(): + argv = ['worker'] + if args.vv: + argv.append('--loglevel=DEBUG') + elif args.v: + argv.append('--loglevel=INFO') + argv.append('-Q') + argv.append(args.q) + argv.append('-n') + argv.append(args.q) + + if config.true('SSL_ENABLE_CLIENT'): + Callback.ssl = True + Callback.ssl_cert_file = config.get('SSL_CERT_FILE') + Callback.ssl_key_file = config.get('SSL_KEY_FILE') + Callback.ssl_password = config.get('SSL_PASSWORD') + + if config.get('SSL_CA_FILE') != '': + Callback.ssl_ca_file = config.get('SSL_CA_FILE') + + chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) + + c = RpcClient(chain_spec) + CICRegistry.init(c.w3, config.get('CIC_REGISTRY_ADDRESS'), chain_spec) + CICRegistry.add_path(config.get('ETH_ABI_DIR')) + + chain_registry = ChainRegistry(chain_spec) + CICRegistry.add_chain_registry(chain_registry, True) + + if config.get('ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER') != None: + CICRegistry.add_role(chain_spec, config.get('ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER'), 'AccountRegistry', True) + + if config.get('CIC_DECLARATOR_ADDRESS') != None: + abi_path = os.path.join(config.get('ETH_ABI_DIR'), '{}.json'.format(interface)) + f = open(abi_path) + abi = json.load(abi_path) + f.close() + c = w3.eth.contract(abi=abi, address=address) + trusted_addresses = config.get('CIC_TRUSTED_ADDRESSES', []).split(',') + oracle = DeclaratorOracleAdapter(contract, trusted_addresses) + chain_registry.add_oracle(oracle) + + + #chain_spec = CICRegistry.default_chain_spec + #bancor_registry_contract = CICRegistry.get_contract(chain_spec, 'BancorRegistry', interface='Registry') + #bancor_chain_registry = CICRegistry.get_chain_registry(chain_spec) + #bancor_registry = BancorRegistryClient(c.w3, bancor_chain_registry, config.get('ETH_ABI_DIR')) + #bancor_registry.load(True) + current_app.worker_main(argv) + + +if __name__ == '__main__': + main() diff --git a/apps/cic-eth/cic_eth/runnable/view.py b/apps/cic-eth/cic_eth/runnable/view.py new file mode 100644 index 00000000..12de34eb --- /dev/null +++ b/apps/cic-eth/cic_eth/runnable/view.py @@ -0,0 +1,177 @@ +#!python3 + +# SPDX-License-Identifier: GPL-3.0-or-later + +# standard imports +import os +import json +import argparse +import logging +import sys +import re +import datetime + +# third-party imports +import confini +import celery +import web3 +from cic_registry import CICRegistry +from cic_registry.chain import ChainSpec +from cic_registry.chain import ChainRegistry + +# local imports +from cic_eth.api import AdminApi +from cic_eth.eth.rpc import RpcClient +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import LockEnum + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +logging.getLogger('web3').setLevel(logging.WARNING) +logging.getLogger('urllib3').setLevel(logging.WARNING) + + +default_abi_dir = '/usr/share/local/cic/solidity/abi' +default_config_dir = os.path.join('/usr/local/etc/cic-eth') + +argparser = argparse.ArgumentParser() +argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)') +argparser.add_argument('-r', '--registry-address', type=str, help='CIC registry address') +argparser.add_argument('-f', '--format', dest='f', default='terminal', type=str, help='Output format') +argparser.add_argument('-c', type=str, default=default_config_dir, help='config root to use') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, help='chain spec') +argparser.add_argument('-q', type=str, default='cic-eth', help='celery queue to submit transaction tasks to') +argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration') +argparser.add_argument('-v', action='store_true', help='Be verbose') +argparser.add_argument('-vv', help='be more verbose', action='store_true') +argparser.add_argument('query', type=str, help='Transaction, transaction hash, account or "lock"') +args = argparser.parse_args() + +if args.v == True: + logging.getLogger().setLevel(logging.INFO) +elif args.vv == True: + logging.getLogger().setLevel(logging.DEBUG) + + +config_dir = os.path.join(args.c) +os.makedirs(config_dir, 0o777, True) +config = confini.Config(config_dir, args.env_prefix) +config.process() +args_override = { + 'ETH_PROVIDER': getattr(args, 'p'), + 'CIC_CHAIN_SPEC': getattr(args, 'i'), + } +# override args +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config loaded from {}:\n{}'.format(config_dir, config)) + +re_websocket = re.compile('^wss?://') +re_http = re.compile('^https?://') +blockchain_provider = config.get('ETH_PROVIDER') +if re.match(re_websocket, blockchain_provider) != None: + blockchain_provider = web3.Web3.WebsocketProvider(blockchain_provider) +elif re.match(re_http, blockchain_provider) != None: + blockchain_provider = web3.Web3.HTTPProvider(blockchain_provider) +else: + raise ValueError('unknown provider url {}'.format(blockchain_provider)) + +def web3_constructor(): + w3 = web3.Web3(blockchain_provider) + return (blockchain_provider, w3) +RpcClient.set_constructor(web3_constructor) + + +celery_app = celery.Celery(broker=config.get('CELERY_BROKER_URL'), backend=config.get('CELERY_RESULT_URL')) + +queue = args.q + +chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) +chain_str = str(chain_spec) +c = RpcClient(chain_spec) +admin_api = AdminApi(c) + +CICRegistry.init(c.w3, config.get('CIC_REGISTRY_ADDRESS'), chain_spec) +chain_registry = ChainRegistry(chain_spec) +CICRegistry.add_chain_registry(chain_registry) +CICRegistry.add_path(config.get('ETH_ABI_DIR')) +CICRegistry.load_for(chain_spec) + +fmt = 'terminal' +if args.f[:1] == 'j': + fmt = 'json' +elif args.f[:1] != 't': + raise ValueError('unknown output format {}'.format(args.f)) + + +def render_tx(o, **kwargs): + content = '' + for k in o.keys(): + if not k in ['status_log']: + content += '{}: {}\n'.format(k, o[k]) + content += 'status log:\n' + + for v in o.get('status_log', []): + d = datetime.datetime.fromisoformat(v[0]) + e = StatusEnum(v[1]).name + content += '{}: {}\n'.format(d, e) + + return content + +def render_account(o, **kwargs): + return '{} {} {} {}'.format( + o['date_updated'], + o['nonce'], + o['tx_hash'], + o['status'], + ) + + +def render_lock(o, **kwargs): + lockstrings = [] + flags = o['flags'] + for i in range(31): + v = 1 << i + if flags & v: + lockstrings.append(LockEnum(v).name) + + s = '{} {} {}'.format( + o['address'], + o['date'], + ",".join(lockstrings), + ) + if o['tx_hash'] != None: + s += ' ' + o['tx_hash'] + + return s + +# TODO: move each command to submodule +def main(): + logg.debug('len {}'.format(len(args.query))) + txs = [] + renderer = render_tx + if len(args.query) > 66: + txs = [admin_api.tx(chain_spec, tx_raw=args.query)] + elif len(args.query) > 42: + txs = [admin_api.tx(chain_spec, tx_hash=args.query)] + elif len(args.query) == 42: + txs = admin_api.account(chain_spec, args.query, include_recipient=False) + renderer = render_account + elif len(args.query) >= 4 and args.query[:4] == 'lock': + txs = admin_api.get_lock() + renderer = render_lock + else: + raise ValueError('cannot parse argument {}'.format(args.query)) + + if len(txs) == 0: + logg.info('no matches found') + else: + if fmt == 'json': + sys.stdout.write(json.dumps(txs)) + else: + m = map(renderer, txs) + print(*m, sep="\n") + +if __name__ == '__main__': + main() diff --git a/apps/cic-eth/cic_eth/sync/__init__.py b/apps/cic-eth/cic_eth/sync/__init__.py new file mode 100644 index 00000000..325f58dc --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/__init__.py @@ -0,0 +1 @@ +from .base import Syncer diff --git a/apps/cic-eth/cic_eth/sync/backend.py b/apps/cic-eth/cic_eth/sync/backend.py new file mode 100644 index 00000000..af58be94 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/backend.py @@ -0,0 +1,196 @@ +# standard imports +import logging + +# local imports +from cic_eth.db.models.sync import BlockchainSync +from cic_eth.db.models.base import SessionBase + +logg = logging.getLogger() + + +class SyncerBackend: + """Interface to block and transaction sync state. + + :param chain_spec: Chain spec for the chain that syncer is running for. + :type chain_spec: cic_registry.chain.ChainSpec + :param object_id: Unique id for the syncer session. + :type object_id: number + """ + def __init__(self, chain_spec, object_id): + self.db_session = None + self.db_object = None + self.chain_spec = chain_spec + self.object_id = object_id + self.connect() + self.disconnect() + + + def connect(self): + """Loads the state of the syncer session with the given id. + """ + self.db_session = SessionBase.create_session() + q = self.db_session.query(BlockchainSync) + q = q.filter(BlockchainSync.id==self.object_id) + self.db_object = q.first() + if self.db_object == None: + raise ValueError('sync entry with id {} not found'.format(self.object_id)) + + + def disconnect(self): + """Commits state of sync to backend. + """ + self.db_session.add(self.db_object) + self.db_session.commit() + self.db_session.close() + + + def chain(self): + """Returns chain spec for syncer + + :returns: Chain spec + :rtype chain_spec: cic_registry.chain.ChainSpec + """ + return self.chain_spec + + + def get(self): + """Get the current state of the syncer cursor. + + :returns: Block and block transaction height, respectively + :rtype: tuple + """ + self.connect() + pair = self.db_object.cursor() + self.disconnect() + return pair + + + def set(self, block_height, tx_height): + """Update the state of the syncer cursor + :param block_height: Block height of cursor + :type block_height: number + :param tx_height: Block transaction height of cursor + :type tx_height: number + :returns: Block and block transaction height, respectively + :rtype: tuple + """ + self.connect() + pair = self.db_object.set(block_height, tx_height) + self.disconnect() + return pair + + + def start(self): + """Get the initial state of the syncer cursor. + + :returns: Initial block and block transaction height, respectively + :rtype: tuple + """ + self.connect() + pair = self.db_object.start() + self.disconnect() + return pair + + + def target(self): + """Get the target state (upper bound of sync) of the syncer cursor. + + :returns: Target block height + :rtype: number + """ + self.connect() + target = self.db_object.target() + self.disconnect() + return target + + + @staticmethod + def first(chain): + """Returns the model object of the most recent syncer in backend. + + :param chain: Chain spec of chain that syncer is running for. + :type chain: cic_registry.chain.ChainSpec + :returns: Last syncer object + :rtype: cic_eth.db.models.BlockchainSync + """ + return BlockchainSync.first(chain) + + + @staticmethod + def initial(chain, block_height): + """Creates a new syncer session and commit its initial state to backend. + + :param chain: Chain spec of chain that syncer is running for. + :type chain: cic_registry.chain.ChainSpec + :param block_height: Target block height + :type block_height: number + :returns: New syncer object + :rtype: cic_eth.db.models.BlockchainSync + """ + object_id = None + session = SessionBase.create_session() + o = BlockchainSync(chain, 0, 0, block_height) + session.add(o) + session.commit() + object_id = o.id + session.close() + + return SyncerBackend(chain, object_id) + + + @staticmethod + def resume(chain, block_height): + """Retrieves and returns all previously unfinished syncer sessions. + + + :param chain: Chain spec of chain that syncer is running for. + :type chain: cic_registry.chain.ChainSpec + :param block_height: Target block height + :type block_height: number + :returns: Syncer objects of unfinished syncs + :rtype: list of cic_eth.db.models.BlockchainSync + """ + syncers = [] + + session = SessionBase.create_session() + + object_id = None + + for object_id in BlockchainSync.get_unsynced(session=session): + logg.debug('block syncer resume added previously unsynced sync entry id {}'.format(object_id)) + syncers.append(SyncerBackend(chain, object_id)) + + (block_resume, tx_resume) = BlockchainSync.get_last_live_height(block_height, session=session) + if block_height != block_resume: + o = BlockchainSync(chain, block_resume, tx_resume, block_height) + session.add(o) + session.commit() + object_id = o.id + syncers.append(SyncerBackend(chain, object_id)) + logg.debug('block syncer resume added new sync entry from previous run id {}, start{}:{} target {}'.format(object_id, block_resume, tx_resume, block_height)) + + session.close() + + return syncers + + + @staticmethod + def live(chain, block_height): + """Creates a new open-ended syncer session starting at the given block height. + + :param chain: Chain spec of chain that syncer is running for. + :type chain: cic_registry.chain.ChainSpec + :param block_height: Target block height + :type block_height: number + :returns: "Live" syncer object + :rtype: cic_eth.db.models.BlockchainSync + """ + object_id = None + session = SessionBase.create_session() + o = BlockchainSync(chain, block_height, 0, None) + session.add(o) + session.commit() + object_id = o.id + session.close() + + return SyncerBackend(chain, object_id) diff --git a/apps/cic-eth/cic_eth/sync/base.py b/apps/cic-eth/cic_eth/sync/base.py new file mode 100644 index 00000000..b678ccb7 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/base.py @@ -0,0 +1,51 @@ +# TODO: extend blocksync model +class Syncer: + """Base class and interface for implementing a block sync poller routine. + + :param bc_cache: Retrieves block cache cursors for chain head and latest processed block. + :type bc_cache: cic_eth.sync.SyncerBackend + """ + w3 = None + running_global = True + + def __init__(self, bc_cache): + self.cursor = None + self.bc_cache = bc_cache + self.filter = [] + self.running = True + + + def chain(self): + """Returns the string representation of the chain spec for the chain the syncer is running on. + + :returns: Chain spec string + :rtype: str + """ + return self.bc_cache.chain() + + + def get(self): + """Get latest unprocessed blocks. + + :returns: list of block hash strings + :rtype: list + """ + raise NotImplementedError() + + + def process(self, w3, ref): + """Process transactions in a single block. + + :param ref: Reference of object to process + :type ref: str, 0x-hex + """ + raise NotImplementedError() + + + def loop(self, interval): + """Entry point for syncer loop + + :param interval: Delay in seconds until next attempt if no new blocks are found. + :type interval: int + """ + raise NotImplementedError() diff --git a/apps/cic-eth/cic_eth/sync/error.py b/apps/cic-eth/cic_eth/sync/error.py new file mode 100644 index 00000000..1d2ff27b --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/error.py @@ -0,0 +1,4 @@ +class LoopDone(Exception): + """Exception raised when a syncing is complete. + """ + pass diff --git a/apps/cic-eth/cic_eth/sync/head.py b/apps/cic-eth/cic_eth/sync/head.py new file mode 100644 index 00000000..f96a75b7 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/head.py @@ -0,0 +1,51 @@ +# standard imports +import logging + +# third-party imports +import web3 + +# local imports +from .mined import MinedSyncer +from .base import Syncer + +logg = logging.getLogger() + + +class HeadSyncer(MinedSyncer): + """Implements the get method in Syncer for retrieving every new mined block. + + :param bc_cache: Retrieves block cache cursors for chain head and latest processed block. + :type bc_cache: Object implementing methods from cic_eth.sync.SyncerBackend + """ + def __init__(self, bc_cache): + super(HeadSyncer, self).__init__(bc_cache) + # TODO: filter not returning all blocks, at least with ganache. kind of defeats the point, then + #self.w3_filter = rpc.w3.eth.filter({ + # 'fromBlock': block_offset, + # }) #'latest') + #self.bc_cache.set(block_offset, 0) + logg.debug('initialized head syncer with offset {}'.format(bc_cache.start())) + + """Implements Syncer.get + + :param w3: Web3 object + :type w3: web3.Web3 + :returns: Block hash of newly mined blocks. if any + :rtype: list of str, 0x-hex + """ + def get(self, w3): + # Of course, the filter doesn't return the same block dict format as getBlock() so we'll just waste some cycles getting the hashes instead. + #hashes = [] + #for block in self.w3_filter.get_new_entries(): + # hashes.append(block['blockHash']) + #logg.debug('blocks {}'.format(hashes)) + #return hashes + (block_number, tx_number) = self.bc_cache.get() + block_hash = [] + try: + block = w3.eth.getBlock(block_number) + block_hash.append(block.hash) + except web3.exceptions.BlockNotFound: + pass + + return block_hash diff --git a/apps/cic-eth/cic_eth/sync/history.py b/apps/cic-eth/cic_eth/sync/history.py new file mode 100644 index 00000000..c75602b5 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/history.py @@ -0,0 +1,74 @@ +# standard imports +import logging + +# third-party imports +from web3.exceptions import BlockNotFound +from .error import LoopDone + +# local imports +from .mined import MinedSyncer +from .base import Syncer +from cic_eth.db.models.base import SessionBase + +logg = logging.getLogger() + + +class HistorySyncer(MinedSyncer): + """Implements the get method in Syncer for retrieving all blocks between last processed block before previous shutdown and block height at time of syncer start. + + :param bc_cache: Retrieves block cache cursors for chain head and latest processed block. + :type bc_cache: Object implementing methods from cic_eth.sync.SyncerBackend + :param mx: Maximum number of blocks to return in one call + :type mx: int + """ + def __init__(self, bc_cache, mx=20): + super(HistorySyncer, self).__init__(bc_cache) + self.max = mx + + self.target = bc_cache.target() + logg.info('History syncer target block number {}'.format(self.target)) + + session_offset = self.bc_cache.get() + + self.block_offset = session_offset[0] + self.tx_offset = session_offset[1] + logg.info('History syncer starting at {}:{}'.format(session_offset[0], session_offset[1])) + + self.filter = [] + + + """Implements Syncer.get + + BUG: Should also raise LoopDone when block array is empty after loop. + + :param w3: Web3 object + :type w3: web3.Web3 + :raises LoopDone: If a block is not found. + :return: Return a batch of blocks to process + :rtype: list of str, 0x-hex + """ + def get(self, w3): + sync_db = self.bc_cache + height = self.bc_cache.get() + logg.debug('height {}'.format(height)) + block_last = height[0] + tx_last = height[1] + if not self.running: + raise LoopDone((block_last, tx_last)) + b = [] + block_target = block_last + self.max + if block_target > self.target: + block_target = self.target + logg.debug('target {} last {} max {}'.format(block_target, block_last, self.max)) + for i in range(block_last, block_target): + if i == self.target: + logg.info('reached target {}, exiting'.format(i)) + self.running = False + break + bhash = w3.eth.getBlock(i).hash + b.append(bhash) + logg.debug('appending block {} {}'.format(i, bhash.hex())) + if block_last == block_target: + logg.info('aleady reached target {}, exiting'.format(self.target)) + self.running = False + return b diff --git a/apps/cic-eth/cic_eth/sync/mempool.py b/apps/cic-eth/cic_eth/sync/mempool.py new file mode 100644 index 00000000..a3a62c6d --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/mempool.py @@ -0,0 +1,50 @@ +class MemPoolSyncer(Syncer): + + + def __init__(self, bc_cache): + raise NotImplementedError('incomplete, needs web3 tx to raw transaction conversion') + super(MemPoolSyncer, self).__init__(bc_cache) +# self.w3_filter = Syncer.w3.eth.filter('pending') +# for tx in tx_cache.txs: +# self.txs.append(tx) +# logg.debug('add tx {} to mempoolsyncer'.format(tx)) +# +# +# def get(self): +# return self.w3_filter.get_new_entries() +# +# +# def process(self, tx_hash): +# tx_hash_hex = tx_hash.hex() +# if tx_hash_hex in self.txs: +# logg.debug('syncer already watching {}, skipping'.format(tx_hash_hex)) +# tx = self.w3.eth.getTransaction(tx_hash_hex) +# serialized_tx = rlp.encode({ +# 'nonce': tx.nonce, +# 'from': getattr(tx, 'from'), +# }) +# logg.info('add {} to syncer: {}'.format(tx, serialized_tx)) +# otx = Otx( +# nonce=tx.nonce, +# address=getattr(tx, 'from'), +# tx_hash=tx_hash_hex, +# signed_tx=serialized_tx, +# ) +# Otx.session.add(otx) +# Otx.session.commit() +# +# +# def loop(self, interval): +# while Syncer.running: +# logg.debug('loop execute') +# txs = self.get() +# logg.debug('got txs {}'.format(txs)) +# for tx in txs: +# #block_number = self.process(block.hex()) +# self.process(tx) +# #if block_number > self.bc_cache.head(): +# # self.bc_cache.head(block_number) +# time.sleep(interval) +# logg.info("Syncer no longer set to run, gracefully exiting") + + diff --git a/apps/cic-eth/cic_eth/sync/mined.py b/apps/cic-eth/cic_eth/sync/mined.py new file mode 100644 index 00000000..616eea54 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/mined.py @@ -0,0 +1,103 @@ +# standard imports +import logging +import time + +# third-party imports +import celery + +# local impotes +from .base import Syncer +from cic_eth.queue.tx import set_final_status +from cic_eth.eth import RpcClient + +app = celery.current_app +logg = logging.getLogger() + + +class MinedSyncer(Syncer): + """Base implementation of block processor for mined blocks. + + Loops through all transactions, + + :param bc_cache: Retrieves block cache cursors for chain head and latest processed block. + :type bc_cache: Object implementing methods from cic_eth.sync.SyncerBackend + """ + + def __init__(self, bc_cache): + super(MinedSyncer, self).__init__(bc_cache) + self.block_offset = 0 + self.tx_offset = 0 + + + def process(self, w3, ref): + """Processes transactions in a single block, advancing transaction (and block) cursor accordingly. + + :param w3: Web3 object + :type w3: web3.Web3 + :param ref: Block reference (hash) to process + :type ref: str, 0x-hex + :returns: Block number of next unprocessed block + :rtype: number + """ + b = w3.eth.getBlock(ref) + c = w3.eth.getBlockTransactionCount(ref) + s = 0 + if self.block_offset == b.number: + s = self.tx_offset + + logg.debug('processing {} (blocknumber {}, count {}, offset {})'.format(ref, b.number, c, s)) + + for i in range(s, c): + tx = w3.eth.getTransactionByBlock(ref, i) + tx_hash_hex = tx['hash'].hex() + rcpt = w3.eth.getTransactionReceipt(tx_hash_hex) + logg.debug('{}/{} processing tx {} from block {} {}'.format(i+1, c, tx_hash_hex, b.number, ref)) + ours = False + # TODO: ensure filter loop can complete on graceful shutdown + for f in self.filter: + #try: + task_uuid = f(w3, tx, rcpt, self.chain()) + #except Exception as e: + # logg.error('error in filter {} tx {}: {}'.format(f, tx_hash_hex, e)) + # continue + if task_uuid != None: + logg.debug('tx {} passed to celery task {}'.format(tx_hash_hex, task_uuid)) + s = celery.signature( + 'set_final_status', + [tx_hash_hex, rcpt['blockNumber'], not rcpt['status']], + ) + s.apply_async() + break + next_tx = i + 1 + if next_tx == c: + self.bc_cache.set(b.number+1, 0) + else: + self.bc_cache.set(b.number, next_tx) + if c == 0: + logg.info('synced block {} has no transactions'.format(b.number)) + #self.bc_cache.session(b.number+1, 0) + self.bc_cache.set(b.number+1, 0) + return b['number'] + + + + def loop(self, interval): + """Loop running until the "running" property of Syncer is set to False. + + Retrieves latest unprocessed blocks and processes them. + + :param interval: Delay in seconds until next attempt if no new blocks are found. + :type interval: int + """ + while self.running and Syncer.running_global: + self.bc_cache.connect() + c = RpcClient(self.chain()) + logg.debug('loop execute') + e = self.get(c.w3) + logg.debug('got blocks {}'.format(e)) + for block in e: + block_number = self.process(c.w3, block.hex()) + logg.info('processed block {} {}'.format(block_number, block.hex())) + self.bc_cache.disconnect() + time.sleep(interval) + logg.info("Syncer no longer set to run, gracefully exiting") diff --git a/apps/cic-eth/cic_eth/sync/retry.py b/apps/cic-eth/cic_eth/sync/retry.py new file mode 100644 index 00000000..302e4c75 --- /dev/null +++ b/apps/cic-eth/cic_eth/sync/retry.py @@ -0,0 +1,71 @@ +# standard imports +import logging +import datetime +import time + +# third-party imports +import celery + +# local imports +from .base import Syncer +from cic_eth.eth.rpc import RpcClient +from cic_eth.db.enum import StatusEnum +from cic_eth.queue.tx import get_status_tx + +logg = logging.getLogger() + +celery_app = celery.current_app + + +class noop_cache: + + def __init__(self, chain_spec): + self.chain_spec = chain_spec + + + def chain(self): + return self.chain_spec + + +class RetrySyncer(Syncer): + + def __init__(self, chain_spec, stalled_grace_seconds, failed_grace_seconds=None, final_func=None): + cache = noop_cache(chain_spec) + super(RetrySyncer, self).__init__(cache) + if failed_grace_seconds == None: + failed_grace_seconds = stalled_grace_seconds + self.stalled_grace_seconds = stalled_grace_seconds + self.failed_grace_seconds = failed_grace_seconds + self.final_func = final_func + + + def get(self, w3): +# before = datetime.datetime.utcnow() - datetime.timedelta(seconds=self.failed_grace_seconds) +# failed_txs = get_status_tx( +# StatusEnum.SENDFAIL.value, +# before=before, +# ) + before = datetime.datetime.utcnow() - datetime.timedelta(seconds=self.stalled_grace_seconds) + stalled_txs = get_status_tx( + StatusEnum.SENT.value, + before=before, + ) + # return list(failed_txs.keys()) + list(stalled_txs.keys()) + return stalled_txs + + + def process(self, w3, ref): + logg.debug('tx {}'.format(ref)) + for f in self.filter: + f(w3, ref, None, str(self.chain())) + + + def loop(self, interval): + chain_str = str(self.chain()) + while self.running and Syncer.running_global: + c = RpcClient(self.chain()) + for tx in self.get(c.w3): + self.process(c.w3, tx) + if self.final_func != None: + self.final_func(chain_str) + time.sleep(interval) diff --git a/apps/cic-eth/cic_eth/version.py b/apps/cic-eth/cic_eth/version.py new file mode 100644 index 00000000..6a95f248 --- /dev/null +++ b/apps/cic-eth/cic_eth/version.py @@ -0,0 +1,43 @@ +# standard imports +import os +import time +import logging + +# third-party imports +import semver + +version = ( + 0, + 10, + 0, + 'alpha.22', + ) + +version_object = semver.VersionInfo( + major=version[0], + minor=version[1], + patch=version[2], + prerelease=version[3], + ) + + +def git_hash(): + import subprocess + git_diff = subprocess.run(['git', 'diff'], capture_output=True) + git_hash = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True) + git_hash_brief = git_hash.stdout.decode('utf-8')[:8] + return git_hash_brief + +version_string = str(version_object) + +try: + version_git = git_hash() + version_string += '+build.{}'.format(version_git) +except FileNotFoundError: + time_string_pair = str(time.time()).split('.') + version_string += '+build.{}{:<09d}'.format( + time_string_pair[0], + int(time_string_pair[1]), + ) + +__version_string__ = version_string diff --git a/apps/cic-eth/config/bancor.ini b/apps/cic-eth/config/bancor.ini new file mode 100644 index 00000000..443924f5 --- /dev/null +++ b/apps/cic-eth/config/bancor.ini @@ -0,0 +1,2 @@ +[bancor] +dir = /usr/local/share/cic/bancor diff --git a/apps/cic-eth/config/celery.ini b/apps/cic-eth/config/celery.ini new file mode 100644 index 00000000..af9fe5b1 --- /dev/null +++ b/apps/cic-eth/config/celery.ini @@ -0,0 +1,3 @@ +[celery] +broker_url = redis:// +result_url = redis:// diff --git a/apps/cic-eth/config/cic.ini b/apps/cic-eth/config/cic.ini new file mode 100644 index 00000000..2ad870e2 --- /dev/null +++ b/apps/cic-eth/config/cic.ini @@ -0,0 +1,8 @@ +[cic] +registry_address = +token_index_address = +accounts_index_address = +declarator_address = +approval_escrow_address = +chain_spec = +tx_retry_delay = diff --git a/apps/cic-eth/config/custody.ini b/apps/cic-eth/config/custody.ini new file mode 100644 index 00000000..8523f03e --- /dev/null +++ b/apps/cic-eth/config/custody.ini @@ -0,0 +1,2 @@ +[custody] +account_index_address = diff --git a/apps/cic-eth/config/database.ini b/apps/cic-eth/config/database.ini new file mode 100644 index 00000000..43de56bf --- /dev/null +++ b/apps/cic-eth/config/database.ini @@ -0,0 +1,9 @@ +[database] +NAME=cic-eth +USER=postgres +PASSWORD= +HOST=localhost +PORT=5432 +ENGINE=postgresql +DRIVER=psycopg2 +DEBUG= diff --git a/apps/cic-eth/config/dispatcer.ini b/apps/cic-eth/config/dispatcer.ini new file mode 100644 index 00000000..85dea83e --- /dev/null +++ b/apps/cic-eth/config/dispatcer.ini @@ -0,0 +1,2 @@ +[dispatcher] +loop_interval = 0.9 diff --git a/apps/cic-eth/config/eth.ini b/apps/cic-eth/config/eth.ini new file mode 100644 index 00000000..1a6935e1 --- /dev/null +++ b/apps/cic-eth/config/eth.ini @@ -0,0 +1,8 @@ +[eth] +#ws_provider = ws://localhost:8546 +#ttp_provider = http://localhost:8545 +provider = http://localhost:8545 +gas_provider_address = +#chain_id = +abi_dir = /usr/local/share/cic/solidity/abi +account_accounts_index_writer = diff --git a/apps/cic-eth/config/lash/bancor.ini b/apps/cic-eth/config/lash/bancor.ini new file mode 100644 index 00000000..0bff1ce0 --- /dev/null +++ b/apps/cic-eth/config/lash/bancor.ini @@ -0,0 +1,3 @@ +[bancor] +registry_address = 0xb708175e3f6Cd850643aAF7B32212AFad50e2549 +dir = /home/lash/src/ext/cic/grassrootseconomics/cic-platform/contrib/bancor_0.6 diff --git a/apps/cic-eth/config/lash/database.ini b/apps/cic-eth/config/lash/database.ini new file mode 100644 index 00000000..77ac57d4 --- /dev/null +++ b/apps/cic-eth/config/lash/database.ini @@ -0,0 +1,8 @@ +[database] +NAME=cic-eth +USER=postgres +PASSWORD= +HOST=localhost +PORT=5432 +ENGINE=sqlite +DRIVER=pysqlite diff --git a/apps/cic-eth/config/lash/eth.ini b/apps/cic-eth/config/lash/eth.ini new file mode 100644 index 00000000..324dba08 --- /dev/null +++ b/apps/cic-eth/config/lash/eth.ini @@ -0,0 +1,3 @@ +[eth] +gas_provider_address = 0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C +provider = http://localhost:8545 diff --git a/apps/cic-eth/config/lash/redis.ini b/apps/cic-eth/config/lash/redis.ini new file mode 100644 index 00000000..d21df9f8 --- /dev/null +++ b/apps/cic-eth/config/lash/redis.ini @@ -0,0 +1,3 @@ +[celery] +broker_url = redis:// +result_url = file:// diff --git a/apps/cic-eth/config/lash/signer.ini b/apps/cic-eth/config/lash/signer.ini new file mode 100644 index 00000000..9222aef8 --- /dev/null +++ b/apps/cic-eth/config/lash/signer.ini @@ -0,0 +1,2 @@ +[signer] +socket_path = /tmp/crypto-dev-signer/jsonrpc.ipc diff --git a/apps/cic-eth/config/lash/ssl.ini b/apps/cic-eth/config/lash/ssl.ini new file mode 100644 index 00000000..746ff856 --- /dev/null +++ b/apps/cic-eth/config/lash/ssl.ini @@ -0,0 +1,6 @@ +[SSL] +enable_client = true +cert_file = /home/lash/src/ext/cic/grassrootseconomics/cic-auth/examples/client.crt +key_file = /home/lash/src/ext/cic/grassrootseconomics/cic-auth/examples/client.key +password = test +ca_file = /home/lash/src/ext/cic/grassrootseconomics/cic-auth/examples/ca.crt diff --git a/apps/cic-eth/config/lash/syncer.ini b/apps/cic-eth/config/lash/syncer.ini new file mode 100644 index 00000000..97236743 --- /dev/null +++ b/apps/cic-eth/config/lash/syncer.ini @@ -0,0 +1,2 @@ +[SYNCER] +loop_interval = 1 diff --git a/apps/cic-eth/config/redis.ini b/apps/cic-eth/config/redis.ini new file mode 100644 index 00000000..1a7acb52 --- /dev/null +++ b/apps/cic-eth/config/redis.ini @@ -0,0 +1,4 @@ +[redis] +host = +port = +db = diff --git a/apps/cic-eth/config/signer.ini b/apps/cic-eth/config/signer.ini new file mode 100644 index 00000000..0fa1f015 --- /dev/null +++ b/apps/cic-eth/config/signer.ini @@ -0,0 +1,5 @@ +[signer] +socket_path = /run/crypto-dev-signer/jsonrpc.ipc +secret = deedbeef +database_name = signer_test +dev_keys_path = diff --git a/apps/cic-eth/config/ssl.ini b/apps/cic-eth/config/ssl.ini new file mode 100644 index 00000000..bd494729 --- /dev/null +++ b/apps/cic-eth/config/ssl.ini @@ -0,0 +1,6 @@ +[SSL] +enable_client = false +cert_file = +key_file = +password = +ca_file = diff --git a/apps/cic-eth/config/syncer.ini b/apps/cic-eth/config/syncer.ini new file mode 100644 index 00000000..97236743 --- /dev/null +++ b/apps/cic-eth/config/syncer.ini @@ -0,0 +1,2 @@ +[SYNCER] +loop_interval = 1 diff --git a/apps/cic-eth/config/tasks.ini b/apps/cic-eth/config/tasks.ini new file mode 100644 index 00000000..5519eaac --- /dev/null +++ b/apps/cic-eth/config/tasks.ini @@ -0,0 +1,3 @@ +[tasks] +transfer_callbacks = taskcall:cic_eth.callbacks.noop.noop +trace_queue_status = diff --git a/apps/cic-eth/config/test/accounts.ini b/apps/cic-eth/config/test/accounts.ini new file mode 100644 index 00000000..819a83bc --- /dev/null +++ b/apps/cic-eth/config/test/accounts.ini @@ -0,0 +1,2 @@ +[accounts] +writer_address = diff --git a/apps/cic-eth/config/test/bancor.ini b/apps/cic-eth/config/test/bancor.ini new file mode 100644 index 00000000..961c0e6b --- /dev/null +++ b/apps/cic-eth/config/test/bancor.ini @@ -0,0 +1,2 @@ +[bancor] +dir = tests/testdata/bancor diff --git a/apps/cic-eth/config/test/celery.ini b/apps/cic-eth/config/test/celery.ini new file mode 100644 index 00000000..1f12b77f --- /dev/null +++ b/apps/cic-eth/config/test/celery.ini @@ -0,0 +1,5 @@ +[celery] +broker_url = filesystem:// +result_url = filesystem:// +#broker_url = redis:// +#result_url = redis:// diff --git a/apps/cic-eth/config/test/cic.ini b/apps/cic-eth/config/test/cic.ini new file mode 100644 index 00000000..efd8fc4b --- /dev/null +++ b/apps/cic-eth/config/test/cic.ini @@ -0,0 +1,8 @@ +[cic] +registry_address = +token_index_address = +accounts_index_address = +declarator_address = +approval_escrow_address = +chain_spec = +trusted_addresses = diff --git a/apps/cic-eth/config/test/database.ini b/apps/cic-eth/config/test/database.ini new file mode 100644 index 00000000..8c355ef3 --- /dev/null +++ b/apps/cic-eth/config/test/database.ini @@ -0,0 +1,9 @@ +[database] +NAME=cic-eth-test +USER=postgres +PASSWORD= +HOST=localhost +PORT=5432 +ENGINE=sqlite +DRIVER=pysqlite +DEBUG= diff --git a/apps/cic-eth/config/test/dispatcher.ini b/apps/cic-eth/config/test/dispatcher.ini new file mode 100644 index 00000000..f7b270a5 --- /dev/null +++ b/apps/cic-eth/config/test/dispatcher.ini @@ -0,0 +1,2 @@ +[dispatcher] +loop_interval = 0.1 diff --git a/apps/cic-eth/config/test/eth.ini b/apps/cic-eth/config/test/eth.ini new file mode 100644 index 00000000..4c9edda1 --- /dev/null +++ b/apps/cic-eth/config/test/eth.ini @@ -0,0 +1,8 @@ +[eth] +#ws_provider = ws://localhost:8546 +#ttp_provider = http://localhost:8545 +provider = http://localhost:8545 +gas_provider_address = +#chain_id = +abi_dir = +faucet_giver_address = diff --git a/apps/cic-eth/config/test/redis.ini b/apps/cic-eth/config/test/redis.ini new file mode 100644 index 00000000..2fb1d805 --- /dev/null +++ b/apps/cic-eth/config/test/redis.ini @@ -0,0 +1,4 @@ +[redis] +host = +port = +db = diff --git a/apps/cic-eth/config/test/signer.ini b/apps/cic-eth/config/test/signer.ini new file mode 100644 index 00000000..0fa1f015 --- /dev/null +++ b/apps/cic-eth/config/test/signer.ini @@ -0,0 +1,5 @@ +[signer] +socket_path = /run/crypto-dev-signer/jsonrpc.ipc +secret = deedbeef +database_name = signer_test +dev_keys_path = diff --git a/apps/cic-eth/config/test/ssl.ini b/apps/cic-eth/config/test/ssl.ini new file mode 100644 index 00000000..bd494729 --- /dev/null +++ b/apps/cic-eth/config/test/ssl.ini @@ -0,0 +1,6 @@ +[SSL] +enable_client = false +cert_file = +key_file = +password = +ca_file = diff --git a/apps/cic-eth/config/test/syncer.ini b/apps/cic-eth/config/test/syncer.ini new file mode 100644 index 00000000..97236743 --- /dev/null +++ b/apps/cic-eth/config/test/syncer.ini @@ -0,0 +1,2 @@ +[SYNCER] +loop_interval = 1 diff --git a/apps/cic-eth/crypto_dev_signer_config/config.ini b/apps/cic-eth/crypto_dev_signer_config/config.ini new file mode 100644 index 00000000..f87759df --- /dev/null +++ b/apps/cic-eth/crypto_dev_signer_config/config.ini @@ -0,0 +1,4 @@ +[signer] +secret = deadbeef +#database = crypto-dev-signer +socket_path = /run/crypto-dev-signer/jsonrpc.ipc diff --git a/apps/cic-eth/crypto_dev_signer_config/database.ini b/apps/cic-eth/crypto_dev_signer_config/database.ini new file mode 100644 index 00000000..5eec2537 --- /dev/null +++ b/apps/cic-eth/crypto_dev_signer_config/database.ini @@ -0,0 +1,8 @@ +[database] +NAME=cic-signer +USER= +PASSWORD= +HOST= +PORT= +ENGINE= +DRIVER= diff --git a/apps/cic-eth/doc/flowcharts/Makefile b/apps/cic-eth/doc/flowcharts/Makefile new file mode 100644 index 00000000..a5969abb --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/Makefile @@ -0,0 +1,15 @@ +INPUTS = $(wildcard *.dot) +OUTPUTS = $(patsubst %.dot, %.png, $(INPUTS)) + +.SUFFIXES: .dot .png + +.dot.png: + dot -T png $(basename $@).dot > $@ + +all: $(OUTPUTS) + +clean: + rm -vf *.png + +.PHONY: clean + diff --git a/apps/cic-eth/doc/flowcharts/account_tasks.dot b/apps/cic-eth/doc/flowcharts/account_tasks.dot new file mode 100644 index 00000000..29a628a8 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/account_tasks.dot @@ -0,0 +1,21 @@ +digraph { + + create_account [ + label="CIC-ETH API:\create account"; + shape="ellipse"; + ]; + + callback [ + label="callback"; + shape="ellipse"; + style="dashed"; + ]; + + create_account -> "eth.account.create"; + create_account -> "eth.account.register" -> "eth.account.cache_account_data"; + "eth.account.register" -> "queue.tx,create"; + "eth.account.register" -> "eth.tx.check_gas"; + "eth.tx.check_gas" -> "eth.tx.refill_gas" [ style="dashed" ]; + "eth.tx.check_gas" -> callback [ style="dashed" ]; + "eth.tx.refill_gas" -> callback [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/balance_tasks.dot b/apps/cic-eth/doc/flowcharts/balance_tasks.dot new file mode 100644 index 00000000..6a2d7fde --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/balance_tasks.dot @@ -0,0 +1,16 @@ +digraph { + balance [ + label="CIC-ETH API:\nbalance"; + shape="ellipse"; + ]; + + callback [ + label="callback"; + shape="ellipse"; + style="dashed"; + ]; + + balance -> "eth.token.resolve_tokens_by_symbol" + "eth.token.resolve_tokens_by_symbol" -> "eth.token.balance" + "eth.token.balance" -> callback [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/callback_gift.dot b/apps/cic-eth/doc/flowcharts/callback_gift.dot new file mode 100644 index 00000000..576fe4e6 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/callback_gift.dot @@ -0,0 +1,10 @@ +digraph { + + tx [ + label="CIC-MANAGER\ncallbacks filter, tokengift"; + shape="ellipse"; + ]; + + tx -> callback [ style="dashed" ]; + +} diff --git a/apps/cic-eth/doc/flowcharts/convert_tasks.dot b/apps/cic-eth/doc/flowcharts/convert_tasks.dot new file mode 100644 index 00000000..79bef521 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/convert_tasks.dot @@ -0,0 +1,57 @@ +digraph { + + convert_transfer [ + label="CIC-ETH API:\nconvert_transfer"; + shape="ellipse"; + ]; + + callback [ + label="callback"; + shape="ellipse"; + style="dashed"; + ]; + + convert_approve_zero [ + label="eth.token.approve (zero)"; + shape="ellipse"; + ]; + + convert_approve_amount [ + label="eth.token.approve (amount)"; + shape="ellipse"; + ]; + + cache_approve_zero [ + label="eth.token.otx_cache_approve"; + shape="ellipse"; + ]; + + cache_approve_amount [ + label="eth.token.otx_cache_approve"; + shape="ellipse"; + ]; + + queue_approve_zero [ + label="queue.tx.create"; + shape="ellipse"; + ]; + + queue_approve_amount [ + label="queue.tx.create"; + shape="ellipse"; + ]; + + convert_transfer -> "eth.token.resolve_tokens_by_symbol" -> "eth.bancor.convert_with_default_reserve"; + "eth.bancor.convert_with_default_reserve" -> convert_approve_zero -> cache_approve_zero; + convert_approve_zero -> queue_approve_zero; + "eth.bancor.convert_with_default_reserve" -> convert_approve_amount -> cache_approve_amount; + convert_approve_amount -> queue_approve_amount; + "eth.bancor.convert_with_default_reserve" -> "eth.bancor.otx_cache_convert"; + "eth.bancor.convert_with_default_reserve" -> "queue.tx.create"; + "eth.bancor.convert_with_default_reserve" -> "eth.tx.check_gas"; + "eth.bancor.convert_with_default_reserve" -> "eth.bancor.save_convert_recipient"; + "eth.tx.check_gas" -> "eth.tx.refill_gas" [ style="dashed" ]; + "eth.tx.check_gas" -> callback [ style="dashed" ]; + "eth.tx.refill_gas" -> callback [ style="dashed" ]; + +} diff --git a/apps/cic-eth/doc/flowcharts/converttransfer_tasks.dot b/apps/cic-eth/doc/flowcharts/converttransfer_tasks.dot new file mode 100644 index 00000000..93da1a6b --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/converttransfer_tasks.dot @@ -0,0 +1,15 @@ +digraph { + + tx [ + label="CIC-MANAGER;\nconvert_filter"; + shape="ellipse"; + ]; + + tx -> "eth.bancor.transfer_converted" -> "eth.token.otx_cache_transfer"; + "eth.bancor.transfer_converted" -> "queue.tx.create"; + "eth.bancor.transfer_converted" -> "eth.bancor.save_convert_transfer"; + "eth.bancor.transfer_converted" -> "eth.tx.check_gas"; + "eth.tx.check_gas" -> "eth.tx.refill_gas" [ style="dashed" ]; + "eth.tx.check_gas" -> callback [ style="dashed" ]; + "eth.tx.refill_gas" -> callback [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/dispatch.dot b/apps/cic-eth/doc/flowcharts/dispatch.dot new file mode 100644 index 00000000..b715aedc --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/dispatch.dot @@ -0,0 +1,159 @@ +digraph G { + + send [ + label = "transfer"; + shape = "ellipse"; + ]; + + params [ + label = "get token, value, sender, recipient"; + shape = "parallelogram"; + ]; + + token_lookup [ + label = "token known?"; + shape = "diamond"; + ]; + + token_lookup_x [ + xlabel = "UnknownTokenError"; + shape = "point"; + ]; + + nonce [ + label = "get sender nonce"; + shape = "box"; + style = "dashed"; + ]; + + sign_tx [ + label = "sign tx"; + shape = "box"; + ]; + + sign_tx_x [ + xlabel = "SignerError"; + shape = "point"; + ]; + + cache [ + label = "queue signed tx"; + shape = "cylinder"; + ]; + + gas [ + label = "safe sender balance for gas?"; + shape = "diamond"; + ]; + + gas_rq_exists [ + label = "gas request already pending?" + shape = "diamond"; + ]; + + gas_rq [ + label = "queue request for gas"; + shape = "parallelogram"; + ]; + + gas_tx [ + label = "enough gas for this tx?"; + shape = "diamond"; + ]; + + cache_waitforgas [ + label = "set status to WAITFORGAS"; + shape = "parallelogram"; + ]; + + gas_tx_x [ + xlabel = "OutOfGasError"; + shape = "point"; + ]; + + tx_fail [ + label = "temporary error?" + shape = "diamond" + ]; + + tx_fail_known [ + label = "known error?" + shape = "diamond" + ]; + + cache_sent [ + label = "set tx status to SENT"; + shape = "cylinder"; + ]; + + cache_unsent [ + label = "set tx status to SENDFAIL"; + shape = "cylinder"; + ]; + + cache_revert [ + label = "set tx status to REVERTED"; + shape = "cylinder"; + ]; + + cache_fubar [ + label = "set tx status to FUBAR"; + shape = "cylinder"; + ]; + + send_tx_x_tmp [ + xlabel = "TemporaryTxError"; + shape = "point"; + ]; + + send_tx_x_final [ + xlabel = "PermanentTxError"; + shape = "point"; + ]; + + ok [ + shape = "point"; + ]; + + + send -> params -> token_lookup; + + token_lookup -> token_lookup_x [ label = "no"; ]; + + token_lookup -> nonce [ label = "yes"; ]; + nonce -> sign_tx; + + sign_tx -> sign_tx_x [ label = "fail"; ]; + + sign_tx -> cache [ label = "ok"; ]; + cache -> gas; + + gas -> gas_rq_exists [ label = "no"; ]; + gas_rq_exists -> gas_rq [ label = "no"; ]; + gas_rq_exists -> gas_tx [ label = "yes"; ]; + gas_rq -> gas_tx; + + gas -> send_tx [ label = "yes"; ]; + + gas_tx -> cache_waitforgas -> gas_tx_x [ label = "no"; ]; + + gas_tx -> send_tx [ label = "yes"; ]; + + send_tx -> tx_fail [ label = "fail"; ]; + + tx_fail -> cache_unsent [ label = "yes"; ]; + cache_unsent -> send_tx_x_tmp; + + tx_fail -> tx_fail_known [ label = "no"; ]; + + tx_fail_known -> cache_fubar [ label = "no"; ]; + + cache_fubar -> send_tx_x_final; + + tx_fail_known -> cache_revert [ label = "yes"; ]; + cache_revert -> send_tx_x_final; + + send_tx -> cache_sent [ label = "ok"; ]; + cache_sent -> ok; + +} diff --git a/apps/cic-eth/doc/flowcharts/readme b/apps/cic-eth/doc/flowcharts/readme new file mode 100644 index 00000000..1246e436 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/readme @@ -0,0 +1,3 @@ +All *_tasks.dot files describe literal the literal tasks that get executed on the associated entry points. CIC-ETH API entrypoints refer to methods in "cic_eth/api/api_task.py" + +All *_semantic.dot files are flow charts decribing the processing of the associated entry points. diff --git a/apps/cic-eth/doc/flowcharts/register_tasks.dot b/apps/cic-eth/doc/flowcharts/register_tasks.dot new file mode 100644 index 00000000..2541b856 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/register_tasks.dot @@ -0,0 +1,12 @@ +digraph { + + send [ + label="CIC-MANAGER\nregistration filter"; + shape="ellipse"; + ]; + + send -> "eth.account.gift" -> "eth.account.cache_gift_data"; + "eth.account.gift" -> "queue.tx.create"; + "eth.account.gift" -> "eth.tx.check_gas"; + "eth.tx.check_gas" -> "eth.tx.refill_gas" [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/send_tasks.dot b/apps/cic-eth/doc/flowcharts/send_tasks.dot new file mode 100644 index 00000000..847960cd --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/send_tasks.dot @@ -0,0 +1,17 @@ +digraph { + + dispatcher [ + label="CIC-ETH-DISPATCHER"; + shape="ellipse"; + ]; + + send [ + label="eth.tx.send"; + shape="ellipse"; + ]; + + dispatcher -> send; + send -> "queue.tx.set_[sent|final|fubar]_status"; + send -> "(send tx on blockchain)"; + "queue.tx.set_[sent|final|fubar]_status" -> send [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/transaction_semantic.dot b/apps/cic-eth/doc/flowcharts/transaction_semantic.dot new file mode 100644 index 00000000..2374ac1d --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/transaction_semantic.dot @@ -0,0 +1,104 @@ +digraph G { + + send [ + label = "transfer"; + shape = "ellipse"; + ]; + + params [ + label = "get token, value, sender, recipient"; + shape = "parallelogram"; + ]; + + token_lookup [ + label = "token known?"; + shape = "diamond"; + ]; + + token_lookup_x [ + xlabel = "UnknownTokenError"; + shape = "point"; + ]; + + nonce [ + label = "get sender nonce"; + shape = "box"; + style = "dashed"; + ]; + + sign_tx [ + label = "sign tx"; + shape = "box"; + ]; + + sign_tx_x [ + xlabel = "SignerError"; + shape = "point"; + ]; + + cache [ + label = "queue signed tx"; + shape = "cylinder"; + ]; + + gas [ + label = "safe sender balance for gas?"; + shape = "diamond"; + ]; + + gas_rq_exists [ + label = "gas request already pending?" + shape = "diamond"; + ]; + + gas_rq [ + label = "queue request for gas"; + shape = "parallelogram"; + ]; + + gas_tx [ + label = "enough gas for this tx?"; + shape = "diamond"; + ]; + + cache_waitforgas [ + label = "set status to WAITFORGAS"; + shape = "parallelogram"; + ]; + + gas_tx_x [ + xlabel = "OutOfGasError"; + shape = "point"; + ]; + + ok [ + xlabel = "OK"; + shape = "point"; + ]; + + + send -> params -> token_lookup; + + token_lookup -> token_lookup_x [ label = "no"; ]; + + token_lookup -> nonce [ label = "yes"; ]; + nonce -> sign_tx; + + sign_tx -> sign_tx_x [ label = "fail"; ]; + + sign_tx -> cache [ label = "ok"; ]; + cache -> gas; + + gas -> gas_rq_exists [ label = "no"; ]; + gas_rq_exists -> gas_rq [ label = "no"; ]; + gas_rq_exists -> gas_tx [ label = "yes"; ]; + gas_rq -> gas_tx; + + gas -> ok [ label = "yes"; ]; + + gas_tx -> cache_waitforgas -> gas_tx_x [ label = "no"; ]; + + gas_tx -> ok [ label = "yes"; ]; + + +} diff --git a/apps/cic-eth/doc/flowcharts/transaction_tasks.dot b/apps/cic-eth/doc/flowcharts/transaction_tasks.dot new file mode 100644 index 00000000..41d82bd7 --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/transaction_tasks.dot @@ -0,0 +1,22 @@ +digraph { + + send [ + label="CIC-ETH API:\ntransfer"; + shape="ellipse"; + ]; + + callback [ + label="callback"; + shape="ellipse"; + style="dashed"; + ]; + + send -> "eth.token.resolve_tokens_by_symbol" + "eth.token.resolve_tokens_by_symbol" -> "eth.token.transfer" -> "eth.queue.otx_cache_transfer"; + "eth.token.transfer" -> "eth.queue.tx.create"; + "eth.token.transfer" -> "eth.tx.check_gas"; + "eth.tx.check_gas" -> "eth.tx.refill_gas" [ style="dashed" ]; + "eth.tx.check_gas" -> callback [ style="dashed" ]; + "eth.tx.refill_gas" -> callback [ style="dashed" ]; + +} diff --git a/apps/cic-eth/doc/flowcharts/transferauthorization_tasks.dot b/apps/cic-eth/doc/flowcharts/transferauthorization_tasks.dot new file mode 100644 index 00000000..86ee737c --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/transferauthorization_tasks.dot @@ -0,0 +1,65 @@ +digraph { + + transferauthorization [ + label="CIC-ETH API:\ntransfer authorization"; + shape="ellipse"; + ]; + + callback [ + label="callback"; + shape="ellipse"; + style="dashed"; + ]; + + resolve_transferauthorization [ + label="eth.token.resolve_tokens_by_symbol"; + shape="ellipse"; + ]; + + resolve_approve [ + label="eth.token.resolve_tokens_by_symbol"; + shape="ellipse"; + ]; + + checkgas_transferauthorization [ + label="eth.tx.check_gas"; + shape="ellipse"; + ]; + + checkgas_approve [ + label="eth.tx.check_gas"; + shape="ellipse"; + ]; + + refill_transferauthorization [ + label="eth.tx.refill_gas"; + shape="ellipse"; + ]; + + refill_approve [ + label="eth.tx.refill_gas"; + shape="ellipse"; + ]; + + queue_create_transferauthorization [ + label="queue.tx.create"; + shape="ellipse"; + ]; + + queue_create_approve [ + label="queue.tx.create"; + shape="ellipse"; + ]; + + transferauthorization -> resolve_approve -> "eth.token.approve" -> "eth.token.otx_cache_approve"; + "eth.token.approve" -> queue_create_approve; + "eth.token.approve" -> checkgas_approve; + checkgas_approve -> refill_approve [ style="dashed" ]; + + transferauthorization -> resolve_transferauthorization -> "eth.request.transfer_approve_request" -> "eth.token.otx_cache_transfer_approval_request"; + "eth.request.transfer_approve_request" -> queue_create_transferauthorization; + "eth.request.transfer_approve_request" -> checkgas_transferauthorization; + checkgas_transferauthorization -> refill_transferauthorization [ style="dashed" ]; + checkgas_approve -> callback [ style="dashed" ]; + refill_approve -> callback [ style="dashed" ]; +} diff --git a/apps/cic-eth/doc/flowcharts/tx_tasks.dot b/apps/cic-eth/doc/flowcharts/tx_tasks.dot new file mode 100644 index 00000000..0f3927cb --- /dev/null +++ b/apps/cic-eth/doc/flowcharts/tx_tasks.dot @@ -0,0 +1,9 @@ +digraph { + + tx [ + label="CIC-MANAGER;\ntx_filter"; + shape="ellipse"; + ]; + + tx -> "queue.tx.set_final_status"; +} diff --git a/apps/cic-eth/doc/sphinx/Makefile b/apps/cic-eth/doc/sphinx/Makefile new file mode 100644 index 00000000..f9d4fcb2 --- /dev/null +++ b/apps/cic-eth/doc/sphinx/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @PYTHONPATH=../.. $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @PYTHONPATH=../.. $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/apps/cic-eth/doc/sphinx/code.rst b/apps/cic-eth/doc/sphinx/code.rst new file mode 100644 index 00000000..97fd314e --- /dev/null +++ b/apps/cic-eth/doc/sphinx/code.rst @@ -0,0 +1,56 @@ +Package cic_eth +=============== + +.. automodule:: cic_eth + + +Module eth +========== + +.. automodule:: cic_eth.eth + :members: + +.. automodule:: cic_eth.eth.factory + :members: + +.. automodule:: cic_eth.eth.tx + :members: + +.. automodule:: cic_eth.eth.account + :members: + +.. automodule:: cic_eth.eth.bancor + :members: + +.. automodule:: cic_eth.eth.token + :members: + +.. automodule:: cic_eth.eth.tasks + :members: + + +Module queue +============ + +.. automodule:: cic_eth.queue.tx + :members: + + +Module sync +=========== + +.. automodule:: cic_eth.sync.base + :members: + +.. automodule:: cic_eth.sync.mined + :members: + +.. automodule:: cic_eth.sync.mined + :members: + +.. automodule:: cic_eth.sync.head + :members: + +.. automodule:: cic_eth.sync.history + :members: + diff --git a/apps/cic-eth/doc/sphinx/conf.py b/apps/cic-eth/doc/sphinx/conf.py new file mode 100644 index 00000000..679d1d71 --- /dev/null +++ b/apps/cic-eth/doc/sphinx/conf.py @@ -0,0 +1,57 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'cic-eth' +copyright = '2020, Louis Holbrook' +author = 'Louis Holbrook' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'celery.contrib.sphinx', + 'sphinx.ext.todo', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +todo_include_todos = True diff --git a/apps/cic-eth/doc/sphinx/index.rst b/apps/cic-eth/doc/sphinx/index.rst new file mode 100644 index 00000000..f22a8a22 --- /dev/null +++ b/apps/cic-eth/doc/sphinx/index.rst @@ -0,0 +1,19 @@ +.. cic-indexer documentation master file, created by + sphinx-quickstart on Sun Sep 20 13:49:02 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to cic-eth's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/apps/cic-eth/doc/texinfo/old.20210107/Makefile b/apps/cic-eth/doc/texinfo/old.20210107/Makefile new file mode 100644 index 00000000..0944d469 --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/Makefile @@ -0,0 +1,5 @@ +all: html + +.PHONY: html +html: + makeinfo --html --output html index.texi diff --git a/apps/cic-eth/doc/texinfo/old.20210107/api.texi b/apps/cic-eth/doc/texinfo/old.20210107/api.texi new file mode 100644 index 00000000..46f3096d --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/api.texi @@ -0,0 +1,34 @@ +@node Python API +@chapter Python API + +@section Installation + +A @code{setuptools} file is provided to install @code{cic-eth} as a normal python package. + +The API will send tasks to the celery and immediately return task @code{uuid}. If an HTTP callback is provided, the result of the operation will be sent to it as a @code{POST} request with @code{application/json} content-type, with the following payload as pseudo-schema: + +@verbatim +{ + 'root': , + 'status': , + 'message': , + 'result': +} +@end verbatim + +@subsection API calls + +Please refer to inline code docstrings in @file{cic_eth/api.py} for details on API function signatures and behaviors. + +@itemize +@item +@code{create_account(...)} - Create a new account and add the private key to the keystore +@item +@code{balance(...)} - Query the token balance of an address +@item +@code{transfer(...)} - Transfer tokens between addresses +@item +@code{convert(...)} - Convert between tokens for same address +@item +@code{convert_transfer(...)} - Convert tokens and send destination token to a specified address +@end itemize diff --git a/apps/cic-eth/doc/texinfo/old.20210107/index.texi b/apps/cic-eth/doc/texinfo/old.20210107/index.texi new file mode 100644 index 00000000..793ef244 --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/index.texi @@ -0,0 +1,28 @@ +\input texinfo +@settitle Grassroots Economics CIC ETH 0.4.1 + +@copying +Released 2020 under GPL3 +@end copying + +@titlepage +@title Community Inclusion Currency Network +@author Louis Holbrook + +@end titlepage + +@c +@contents + +@ifnottex +@node Top +@top Grassroots Economics CIC ETH + +This document describes microservices that send transactions to and process events from an EVM blockchain. +@end ifnottex + + +@include overview.texi +@include setup.texi +@include run.texi +@include api.texi diff --git a/apps/cic-eth/doc/texinfo/old.20210107/overview.texi b/apps/cic-eth/doc/texinfo/old.20210107/overview.texi new file mode 100644 index 00000000..216ddba2 --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/overview.texi @@ -0,0 +1,42 @@ +@node Overview +@chapter Overview +This is the core component for the CIC token network system. It provides a task worker infrastructure to interact with the Ethereum blockchain, aswell as daemons to monitor transactions. + +@section Reading this document + +Any paths in this document are relative to the root of the cic-eth git repository. + +@section Contents + +@itemize @bullet +@item Python API that dispatches celery tasks for high-level actions +@item Daemon for monitoring the state of and retrying outgoing transactions +@item Daemon for monitoring new transactions of interest confirmed onchain +@end itemize + +@section Dependencies + +Python dependencies can be acquired by running the usual python setup and/or using the provided requiremens.txt file. + +The application has the following non-python dependencies: + +@itemize @bullet +@item +@strong{PostgreSQL}: Database backend. +@item +@strong{Redis}: Broker and results for Celery workers. +@item +@strong{Bancor contracts}: A clone of the Bancor contact repository +@item +@strong{Ethereum node}: A synced ethereum node with keystore +@end itemize + +@section Caveats + +The application @emph{must not} use private keys for which transactions may be generated from other sources. + +It application retrieves the transaction nonce for every transaction directly from the network. Any transaction submitted to it are passed on to the network with sequential nonces. The caller code needs to keep this in mind when considering whether to allow the account holder to submit additional transaction tasks before the current has been completed. + +@section Known issues + +The author has not yet figured out how to get @code{pytest-celery} to work with queues. Currently the functional tests hang when trying to run them. diff --git a/apps/cic-eth/doc/texinfo/old.20210107/queue.texi b/apps/cic-eth/doc/texinfo/old.20210107/queue.texi new file mode 100644 index 00000000..e69de29b diff --git a/apps/cic-eth/doc/texinfo/old.20210107/run.texi b/apps/cic-eth/doc/texinfo/old.20210107/run.texi new file mode 100644 index 00000000..a7ee7d9c --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/run.texi @@ -0,0 +1,34 @@ +@node Running the application +@chapter Running the application + +@section Celery worker + +The helper script @file{scripts/cic-eth-tasker.py} will connect to redis and the ethereum node and spawn a worker for all celery tasks. + +@section Transaction controller + +The celery task chains the process outgoing transactions only send the transactions to the network, after which their responsibility ends. And further processing is handled by @file{scripts/cic-eth-manager.py}. + +@subsection Monitor transaction state + +Records of transactions are added to the database, and the daemon looks for confirmations in block for these transaction, updating their state accordingly. The resulting state may @emph{only} by either @strong{SUCCESS} or @strong{REVERT}. A transaction is any of these states is finalized and won't be retried. + +@subsection Perform transfer after convert + +Handles the compound workflow where sender with token @code{A} wishes to send tokens to recipient with token @code{B}. + +The task worker only submits the convert transaction, because the actual amount of received tokens is not known before the convert takes place. The full amount of recevied tokens will be transferred after the successful convert. + +Convert-then-transfer tasks are recorded separately, and if the controller receive a confirmed convert transaction that has a local record, it submits a new transfer task to the task workers. + +@subsection Retry after timeout + +@strong{Not yet implemented!}. + +If a transaction lingers too long without being confirmed, the controller will attempt to re-submit the task and all its dependent tasks with a higher gas price. + + +@section Transaction monitor + +@file{scripts/cic-eth-track.py} looks for token transfer or convert transaction for all known tokens on the network, and stores them in a local database cache. + diff --git a/apps/cic-eth/doc/texinfo/old.20210107/setup.texi b/apps/cic-eth/doc/texinfo/old.20210107/setup.texi new file mode 100644 index 00000000..49cafb9d --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/setup.texi @@ -0,0 +1,98 @@ +@node Setup +@chapter Setup + +@section Prerequisites + +@itemize +@item A running ETH provider with: +@itemize +@item Deployed bancor contracts +@item Sufficient balances for system accounts +@end itemize +@item A running ETH signer provider, that can handle the following 'web3' JSON-RPC calls: +@itemize +@item @command{personal_newAccount} +@item @command{eth_signTransaction} +@end itemize +@end itemize + +@section Database migration + +Execute @code{alembic upgrade head} in @file{cic_eth/db/migrations} to generate the schema in the database. + +@section Configuration settings + +@file{cic-eth} uses configuration files in @code{'ini'} format. All names are translated to upper case letters, and all values are concatenated to sections with a @key{_}. Example: + +@verbatim +[foo] +bar_baz = 42 +@end verbatim + +The above entry becomes @code{FOO_BAR_BAZ} with value @code{42} + +@subsection Database +@table @code +@item DATABASE_NAME +@item DATABASE_USER +@item DATABASE_PASSWORD +@item DATABASE_HOST +@item DATABASE_PORT +Postgres database settings +@end table + +@subsection Redis + +@table @code +@item REDIS_BROKER_URL +Redis settings +@end table + +@subsection SSL + +@table @code +@item SSL_ENABLE_CLIENT +Use SSL client certification for outgoing web requests (boolean) +@item SSL_CERT_FILE +Absolute path to client certificate file +@item SSL_KEY_FILE +Absolute path to client key file +@item SSL_PASSWORD +Password to unlock client key +@item SSL_CA_FILE +The client certificate's authority chain +@end table + +@subsection Ethereum + +@table @code +@item ETH_PROVIDER +URL to JSON-RPC API provider +@item ETH_GAS_PROVIDER_ADDRESS +Address providing gas to fund transactions for accounts in keystore +@end table + +@subsection Bancor + +@table @code +@item BANCOR_REGISTRY_ADDRESS +Contract address for the ContractRegistry contract +@item BANCOR_DIR +Absolute path to root of the Bancor Solidity contract GIT repository +@end table + +@subsection Syncer + +@table @code +@item SYNCER_LOOP_DELAY +Delay in seconds to wait between polls when no data has been found +@end table + +@subsection Signer + +@table @code +@item SIGNER_SECRET (development only) +Key used by keystore to encrypt secrets +@item SIGNER_PASSWORD +Password for additional private key encryption on keystore +@end table diff --git a/apps/cic-eth/doc/texinfo/old.20210107/transactions.texi b/apps/cic-eth/doc/texinfo/old.20210107/transactions.texi new file mode 100644 index 00000000..b6e48aa3 --- /dev/null +++ b/apps/cic-eth/doc/texinfo/old.20210107/transactions.texi @@ -0,0 +1,26 @@ +@chapter Transactions + +@section States + +@subsection Send transaction to network + +@multitable @columnfractions .35 .15 .15 .35 +@headitem Item @tab Exception @tab Action + +@item Chain node unreachable +@tab ChainUnavailableError +@tab Retry: unlimited, backoff + +@item Cannot save tx state to database +@tab DatabaseUnavailableError +@tab Crash: Notify by email + +@item Signer unreachable +@tab SignerUnavailableError +@tab Retry: unlimited, backoff + +@item Unknown address +@tab SignerAccountUnknownError +@tab Fail + + diff --git a/apps/cic-eth/doc/texinfo/overview.texi b/apps/cic-eth/doc/texinfo/overview.texi new file mode 100644 index 00000000..46d36f0d --- /dev/null +++ b/apps/cic-eth/doc/texinfo/overview.texi @@ -0,0 +1,24 @@ +@node cic-eth +@chapter cic-eth + +@section Overview + +@code{cic-eth} is the heart of the custodial account component. It is a combination of python-celery task queues and daemons that sign, dispatch and monitor blockchain transactions, aswell as triggering tasks contingent on other transactions. + +@subsection Dependencies + +The @code{cic-registry} module is used as a cache for contracts and tokens on the network. + +A web3 JSON-RPC service that transparently proxies a keystore and provides transaction and message signing. The current development version uses the python web3 middleware feature to route methodsi involving the keystore to the module @code{crypto-dev-signer}, which is hosted on @file{pypi.org}. + +@subsection What does it do + + + +@subsection Tasks + +Two main categories exist for tasks, @code{eth} and @code{queue}. + +The @code{eth} tasks provide means to construct and decode Ethereum transactions, as well as interfacing the underlying key store. + +Tasks in the @code{queue} module operate on the state of transactions queued for processing by @code{cic-eth}. diff --git a/apps/cic-eth/docker/Dockerfile b/apps/cic-eth/docker/Dockerfile new file mode 100644 index 00000000..88dfea8c --- /dev/null +++ b/apps/cic-eth/docker/Dockerfile @@ -0,0 +1,43 @@ +# FROM grassrootseconomics:cic + +#FROM python:3.8.6-alpine +FROM python:3.8.6-slim-buster + +#COPY --from=0 /usr/local/share/cic/solidity/ /usr/local/share/cic/solidity/ + +WORKDIR /usr/src/cic-eth + +ARG pip_extra_index_url_flag='--index https://pypi.org/simple --extra-index-url https://pip.grassrootseconomics.net:8433' +ARG root_requirement_file='requirements.txt' + +#RUN apk update && \ +# apk add gcc musl-dev gnupg libpq +#RUN apk add postgresql-dev +#RUN apk add linux-headers +#RUN apk add libffi-dev +RUN apt-get update && \ + apt install -y gcc gnupg libpq-dev wget make g++ gnupg bash procps + +# Copy shared requirements from top of mono-repo +RUN echo "copying root req file ${root_requirement_file}" +COPY $root_requirement_file . +RUN pip install -r $root_requirement_file $pip_extra_index_url_flag + +COPY cic-eth/scripts/ scripts/ +COPY cic-eth/setup.cfg cic-eth/setup.py ./ +COPY cic-eth/cic_eth/ cic_eth/ +# Copy app specific requirements +COPY cic-eth/requirements.txt . +COPY cic-eth/test_requirements.txt . +RUN pip install $pip_extra_index_url_flag . + +COPY cic-eth/docker/* ./ +RUN chmod 755 *.sh +COPY cic-eth/tests/ tests/ + +# # ini files in config directory defines the configurable parameters for the application +# # they can all be overridden by environment variables +# # to generate a list of environment variables from configuration, use: confini-dump -z (executable provided by confini package) +COPY cic-eth/config/ /usr/local/etc/cic-eth/ +COPY cic-eth/cic_eth/db/migrations/ /usr/local/share/cic-eth/alembic/ +COPY cic-eth/crypto_dev_signer_config/ /usr/local/etc/crypto-dev-signer/ diff --git a/apps/cic-eth/docker/db.sh b/apps/cic-eth/docker/db.sh new file mode 100644 index 00000000..bc239cf6 --- /dev/null +++ b/apps/cic-eth/docker/db.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +migrate.py -c /usr/local/etc/cic-eth --migrations-dir /usr/local/share/cic-eth/alembic -vv + diff --git a/apps/cic-eth/docker/start_dispatcher.sh b/apps/cic-eth/docker/start_dispatcher.sh new file mode 100644 index 00000000..86ac06f7 --- /dev/null +++ b/apps/cic-eth/docker/start_dispatcher.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +. ./db.sh + +/usr/local/bin/cic-eth-dispatcher $@ diff --git a/apps/cic-eth/docker/start_manager.sh b/apps/cic-eth/docker/start_manager.sh new file mode 100644 index 00000000..383e888d --- /dev/null +++ b/apps/cic-eth/docker/start_manager.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +. ./db.sh + +/usr/local/bin/cic-eth-manager $@ diff --git a/apps/cic-eth/docker/start_retry.sh b/apps/cic-eth/docker/start_retry.sh new file mode 100644 index 00000000..721d5bcf --- /dev/null +++ b/apps/cic-eth/docker/start_retry.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +. ./db.sh + +/usr/local/bin/cic-eth-retrier $@ diff --git a/apps/cic-eth/docker/start_tasker.sh b/apps/cic-eth/docker/start_tasker.sh new file mode 100644 index 00000000..0dc729ac --- /dev/null +++ b/apps/cic-eth/docker/start_tasker.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +. ./db.sh + +# set CONFINI_ENV_PREFIX to override the env prefix to override env vars + +echo "!!! starting signer" +python /usr/local/bin/crypto-dev-daemon -vv -c /usr/local/etc/crypto-dev-signer & + +echo "!!! starting tracker" +/usr/local/bin/cic-eth-tasker $@ + +# thanks! https://docs.docker.com/config/containers/multi-service_container/ +sleep 1; +echo "!!! entering monitor loop" +while true; do + ps aux | grep crypto-dev-daemon | grep -q -v grep + PROCESS_1_STATUS=$? + ps aux | grep cic-eth-tasker |grep -q -v grep + PROCESS_2_STATUS=$? + # If the greps above find anything, they exit with 0 status + # If they are not both 0, then something is wrong + if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then + echo "One of the processes has already exited." + exit 1 + fi + sleep 15; +done + diff --git a/apps/cic-eth/examples/api_callback.py b/apps/cic-eth/examples/api_callback.py new file mode 100644 index 00000000..20eaa469 --- /dev/null +++ b/apps/cic-eth/examples/api_callback.py @@ -0,0 +1,76 @@ +# standard imports +import logging +import uuid +import socket + +# third-party imports +import celery +import redis + +# local imports +import cic_eth + +logging.basicConfig(level=logging.DEBUG) +logg = logging.getLogger() + +celery_app = celery.Celery(broker='redis://') + +uu = uuid.uuid4() + +r = redis.Redis() +r_key = '{}-results'.format(uu) + +c = 3 +results = [] +for i in range(c): + x = uuid.uuid4() + results.append(str(x)) + + +@celery_app.task(queue=str(uu), names='customcustom') +def custom_callback(result_from_chain, static_param_from_api, status_code_from_chain=0, message_from_chain={}): + global c + + r.rpush(r_key, result_from_chain) + l = r.llen(r_key) + logg.debug('i {} l {} result {} url {} statuscode {} message {}'.format( + i, + l, + result_from_chain, + static_param_from_api, + status_code_from_chain, + message_from_chain, + ) + ) + if l == c: + r.delete(r_key) + celery_app.control.broadcast('shutdown', destination=['{}@{}'.format(uu, socket.gethostname())]) + + +@celery_app.task(queue=str(uu), name='dodorunrunrun') +def custom_run(results): + for z in results: + logg.debug('sending {}'.format(z)) + a = cic_eth.Api(callback_param=uu, callback_task=custom_callback) + a.ping(z) + + +if __name__ == '__main__': + r.delete(r_key) + s = celery.signature( + 'dodorunrunrun', + [results], + queue=str(uu), + ) + s.apply_async() + + worker = celery_app.worker_main( + [ + 'api_callback', + '--loglevel=DEBUG', + '-n', + '{}@%h'.format(uu), + '-Q', + str(uu), + ], + ) diff --git a/apps/cic-eth/requirements.txt b/apps/cic-eth/requirements.txt new file mode 100644 index 00000000..15c397bf --- /dev/null +++ b/apps/cic-eth/requirements.txt @@ -0,0 +1,18 @@ +web3==5.12.2 +celery==4.4.7 +crypto-dev-signer~=0.4.13b13 +confini~=0.3.6b1 +cic-registry~=0.5.3a10 +cic-bancor~=0.0.6 +redis==3.5.3 +alembic==1.4.2 +websockets==8.1 +requests~=2.24.0 +eth_accounts_index~=0.0.10a5 +erc20-approval-escrow~=0.3.0a3 +erc20-single-shot-faucet~=0.2.0a4 +rlp==2.0.1 +uWSGI==2.0.19.1 +semver==2.13.0 +eth-gas-proxy==0.0.1a4 +websocket-client==0.57.0 diff --git a/apps/cic-eth/scripts/generator.py b/apps/cic-eth/scripts/generator.py new file mode 100644 index 00000000..4e939663 --- /dev/null +++ b/apps/cic-eth/scripts/generator.py @@ -0,0 +1,181 @@ +import os +import logging +import random +import alembic +import argparse +import datetime +import hashlib +import math + +import confini + +from cic_eth.db import SessionBase +from cic_eth.db import dsn_from_config +from cic_eth.db.enum import StatusEnum +from cic_eth.db.models.tx import Tx +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.otx import Otx + + +# connect to database +dsn = dsn_from_config(config) +SessionBase.connect(dsn) + +pending_states = [ + StatusEnum.PENDING, + StatusEnum.SENDFAIL, + StatusEnum.WAITFORGAS, + ] + +synced_states = [ + StatusEnum.SENT, + StatusEnum.CANCELLED, + ] + +failed_states = [ + StatusEnum.REJECTED, + StatusEnum.FUBAR, + ] + +mined_states = [ + StatusEnum.REVERTED, + StatusEnum.SUCCESS, + ] + +all_states = pending_states + synced_states + failed_states + mined_states + + +class MalarkeyCommitter(): + """Adds entries to the cic-eth transaction cache backend. + + All values generated by this class are deterministic but completely arbitrary. + + :param generator: Generator instance used to generate the transactions + :type generator: Generator + :param block_change_factor: Probabiliy of advancing to next block per entry (Optional; default: 0.6) + :type block_change_factor: float + :param tx_index_max: Maximum transaction index number to generate (Optional; default: 200) + :type ix_index_max: int + :param block_time_seconds: Seconds to advance block timestamp datetime on block advance + :type block_time_seconds: int + """ + def __init__(self, generator, block_change_factor=0.6, tx_index_max=200, block_time_seconds=15): + self.g = generator + self.s = SessionBase.create_session() + self.datetime = datetime.datetime.utcnow() + self.block = 0 + self.tx = 0 + self.block_change_factor = block_change_factor + self.tx_index_max = tx_index_max + self.block_time_seconds = block_time_seconds + + + def advance(self): + """Randomly advances block number and transaction index. + """ + if random.random() < self.block_change_factor: + self.block_advance() + tx_advance = random.randint(0, self.tx_index_max - self.tx) + self.tx_advance(tx_advance) + + + def tx_advance(self, n=1): + """Advance tx index number. + + :param n: Will be added to tx index (Optional; default: 1) + :type n: int + """ + self.tx += n + + + def block_advance(self, n=1): + """Advance block number. + + :param n: Will be added to tx index (Optional; default: 1) + :type n: int + """ + self.block += n + self.datetime += datetime.timedelta(seconds=self.block_time_seconds) + self.tx = 0 + + + def stamp(self, entry): + """Calls the random advance method, and sets the corresponding block, tx index and dates on the entry. + """ + self.advance() + entry.mine(self.block, self.tx, self.datetime) + + + def commit_func(self, entry): + """Implements interface needed for GeneratorSession.commit_func, storing a given entry. + + Generates random block and tx index for entry, advancing date correspondingly. + + Also generates random transaction queue states for the entries: + + - For any entry with foreign origin, queue state will always be in the set of "mined" states if applicable. + - For any entry with local origin and "mined" queue state, an incoming transaction record will be added. + + :param entry: Entry to commit + :type entry: GeneratorEntry + """ + self.stamp(entry) + nonce = self.g.get_nonce(entry.sender) + tx_hash = '0x{:064x}'.format(random.getrandbits(256)) + signed_tx_bytes = b'' + h = hashlib.sha256() + for i in range(4): + h.update(tx_hash.encode('utf-8')) + signed_tx_bytes += h.digest() + signed_tx = '0x' + signed_tx_bytes.hex() + + state = None + if entry.sender in self.g.addresses['foreign']: + state = random.choice(mined_states) + else: + state = random.choice(all_states) + + otx = None + tx = None + + if entry.sender in self.g.addresses['local']: + otx = Otx( + nonce, + entry.sender, + tx_hash, + signed_tx, + ) + otx.status = state + self.s.add(otx) + self.s.flush() + + if state in mined_states: + tx = Tx( + tx_hash, + state == StatusEnum.SUCCESS, + ) + self.s.add(tx) + self.s.flush() + + self.s.commit() + + txc = TxCache( + tx_hash, + entry.sender, + entry.recipient, + entry.source_token, + entry.destination_token, + entry.from_value, + entry.to_value, + entry.block, + entry.tx, + entry.sender in self.g.addresses['local'], + ) + txc.date_registered = entry.datetime + self.s.add(txc) + self.s.commit() + + logg.info('committed {}'.format(entry)) + + diff --git a/apps/cic-eth/scripts/insert_tx.py b/apps/cic-eth/scripts/insert_tx.py new file mode 100644 index 00000000..1a9727b7 --- /dev/null +++ b/apps/cic-eth/scripts/insert_tx.py @@ -0,0 +1,57 @@ +# standard imports +import os +import sys +import logging +import time +import argparse + +# third-party imports +import confini +import celery + +# local imports +import cic_eth +from cic_eth import db +from cic_eth import eth +from cic_eth.eth.token import transfer + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +app = celery.Celery(backend='redis://', broker='redis://') + +if __name__ == '__main__': + + config_dir = os.path.join('/etc/cic-eth/watcher') + + argparser = argparse.ArgumentParser(description='daemon that monitors transactions in new blocks') + argparser.add_argument('-c', type=str, default=config_dir, help='config root to use') + argparser.add_argument('-v', help='be verbose', action='store_true') + argparser.add_argument('-vv', help='be more verbose', action='store_true') + args = argparser.parse_args(sys.argv[1:]) + + config_dir = os.path.join(args.c) + os.makedirs(config_dir, 0o777, True) + + if args.v == True: + logging.getLogger().setLevel(logging.INFO) + elif args.vv == True: + logging.getLogger().setLevel(logging.DEBUG) + + config = confini.Config(config_dir) + config.process() + logg.debug('config loaded from {}'.format(config_dir)) + + token_address = '0x528c3E8B3e6dC646530440D88F83da0e45DaC25b' + #sender = '0xa2e85B7F1d61522A88f446C52D09F724C807d7ad' + sender = '0xc14958CD9A605AB0d9A36850362AaD2b9D42DF97' + recipient = '0xe3C4db5947409Aff0FF8D643047EA41515cA4B8e' + + transfer.delay( + [{ + 'address': token_address + }], + sender, + recipient, + 1000000000000000000000, + ) diff --git a/apps/cic-eth/scripts/migrate.py b/apps/cic-eth/scripts/migrate.py new file mode 100644 index 00000000..4a2c0139 --- /dev/null +++ b/apps/cic-eth/scripts/migrate.py @@ -0,0 +1,56 @@ +#!/usr/bin/python +import os +import argparse +import logging + +import alembic +from alembic.config import Config as AlembicConfig +import confini + +from cic_eth.db import dsn_from_config + +logging.basicConfig(level=logging.WARNING) +logg = logging.getLogger() + +# BUG: the dbdir doesn't work after script install +rootdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) +dbdir = os.path.join(rootdir, 'cic_eth', 'db') +migrationsdir = os.path.join(dbdir, 'migrations') + +config_dir = os.path.join('/usr/local/etc/cic-eth') + +argparser = argparse.ArgumentParser() +argparser.add_argument('-c', type=str, default=config_dir, help='config file') +argparser.add_argument('--env-prefix', default=os.environ.get('CONFINI_ENV_PREFIX'), dest='env_prefix', type=str, help='environment prefix for variables to overwrite configuration') +argparser.add_argument('--migrations-dir', dest='migrations_dir', default=migrationsdir, type=str, help='path to alembic migrations directory') +argparser.add_argument('-v', action='store_true', help='be verbose') +argparser.add_argument('-vv', action='store_true', help='be more verbose') +args = argparser.parse_args() + +if args.vv: + logging.getLogger().setLevel(logging.DEBUG) +elif args.v: + logging.getLogger().setLevel(logging.INFO) + +config = confini.Config(args.c, args.env_prefix) +config.process() +config.censor('PASSWORD', 'DATABASE') +config.censor('PASSWORD', 'SSL') +logg.debug('config:\n{}'.format(config)) + +migrations_dir = os.path.join(args.migrations_dir, config.get('DATABASE_ENGINE')) +if not os.path.isdir(migrations_dir): + logg.debug('migrations dir for engine {} not found, reverting to default'.format(config.get('DATABASE_ENGINE'))) + migrations_dir = os.path.join(args.migrations_dir, 'default') + +# connect to database +dsn = dsn_from_config(config) + + +logg.info('using migrations dir {}'.format(migrations_dir)) +logg.info('using db {}'.format(dsn)) +ac = AlembicConfig(os.path.join(migrations_dir, 'alembic.ini')) +ac.set_main_option('sqlalchemy.url', dsn) +ac.set_main_option('script_location', migrations_dir) + +alembic.command.upgrade(ac, 'head') diff --git a/apps/cic-eth/setup.cfg b/apps/cic-eth/setup.cfg new file mode 100644 index 00000000..5d5a5c4a --- /dev/null +++ b/apps/cic-eth/setup.cfg @@ -0,0 +1,49 @@ +[metadata] +name = cic-eth +version = attr: cic_eth.version.__version_string__ +description = CIC Network Ethereum interaction +author = Louis Holbrook +author_email = dev@holbrook.no +url = https://gitlab.com/grassrootseconomics/cic-eth +keywords = + cic + cryptocurrency + ethereum +classifiers = + Programming Language :: Python :: 3 + Operating System :: OS Independent + Development Status :: 3 - Alpha + Environment :: No Input/Output (Daemon) + Intended Audience :: Developers + License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) + Topic :: Internet +# Topic :: Blockchain :: EVM +license = GPL3 +licence_files = + LICENSE.txt + +[options] +python_requires = >= 3.6 +packages = + cic_eth + cic_eth.admin + cic_eth.eth + cic_eth.api + cic_eth.db + cic_eth.db.models + cic_eth.queue + cic_eth.sync + cic_eth.runnable + cic_eth.callbacks +scripts = + ./scripts/migrate.py + +[options.entry_points] +console_scripts = + cic-eth-tasker = cic_eth.runnable.tasker:main + cic-eth-manager = cic_eth.runnable.manager:main + cic-eth-tag = cic_eth.runnable.tag:main + cic-eth-dispatcher = cic_eth.runnable.dispatcher:main + cic-eth-retrier = cic_eth.runnable.retry:main + cic-eth-inspect = cic_eth.runnable.view:main + cic-eth-ctl = cic_eth.runnable.ctrl:main diff --git a/apps/cic-eth/setup.py b/apps/cic-eth/setup.py new file mode 100644 index 00000000..624baab4 --- /dev/null +++ b/apps/cic-eth/setup.py @@ -0,0 +1,27 @@ +from setuptools import setup +import configparser +import os + +requirements = [] +f = open('requirements.txt', 'r') +while True: + l = f.readline() + if l == '': + break + requirements.append(l.rstrip()) +f.close() + +test_requirements = [] +f = open('test_requirements.txt', 'r') +while True: + l = f.readline() + if l == '': + break + test_requirements.append(l.rstrip()) +f.close() + + +setup( + install_requires=requirements, + tests_require=test_requirements, + ) diff --git a/apps/cic-eth/test_requirements.txt b/apps/cic-eth/test_requirements.txt new file mode 100644 index 00000000..d168bb66 --- /dev/null +++ b/apps/cic-eth/test_requirements.txt @@ -0,0 +1,7 @@ +pytest==6.0.1 +pytest-celery==0.0.0a1 +pytest-mock==3.3.1 +py-eth==0.1.1 +pytest-cov==2.10.1 +eth-tester==0.5.0b3 +py-evm==0.3.0a20 diff --git a/apps/cic-eth/tests/conftest.py b/apps/cic-eth/tests/conftest.py new file mode 100644 index 00000000..aa6df8ba --- /dev/null +++ b/apps/cic-eth/tests/conftest.py @@ -0,0 +1,47 @@ +# standard imports +import os +import logging +import sys + +# third-party imports +import pytest +from cic_registry import CICRegistry + +script_dir = os.path.dirname(os.path.realpath(__file__)) +root_dir = os.path.dirname(script_dir) +sys.path.insert(0, root_dir) +data_dir = os.path.join(script_dir, 'testdata', 'abi') +CICRegistry.add_path(data_dir) + +# fixtures +from tests.fixtures_registry import * +from cic_registry.pytest import * +from cic_bancor.pytest import * +from tests.fixtures_config import * +from tests.fixtures_celery import * +from tests.fixtures_web3 import * +from tests.fixtures_database import * +from tests.fixtures_faucet import * +from tests.fixtures_transferapproval import * +from tests.fixtures_account import * + +logg = logging.getLogger() + + +@pytest.fixture(scope='session') +def init_registry( + init_w3_conn, + ): + return CICRegistry + + +@pytest.fixture(scope='function') +def eth_empty_accounts( + init_wallet_extension, + ): + a = [] + for i in range(10): + address = init_wallet_extension.new_account() + a.append(address) + logg.info('added address {}'.format(a)) + return a diff --git a/apps/cic-eth/tests/fixtures_account.py b/apps/cic-eth/tests/fixtures_account.py new file mode 100644 index 00000000..9fbe7899 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_account.py @@ -0,0 +1,30 @@ +# standard imports +import logging + +# third-party imports +import pytest +from eth_accounts_index import AccountRegistry +from cic_registry import CICRegistry + +logg = logging.getLogger(__name__) + + +@pytest.fixture(scope='session') +def accounts_registry( + default_chain_spec, + cic_registry, + w3, + ): + abi = AccountRegistry.abi() + constructor = w3.eth.contract(abi=abi, bytecode=AccountRegistry.bytecode()) + tx_hash = constructor.constructor().transact() + r = w3.eth.getTransactionReceipt(tx_hash) + logg.debug('accounts registry deployed {}'.format(r.contractAddress)) + account_registry = AccountRegistry(w3, r.contractAddress) + + c = w3.eth.contract(abi=abi, address=r.contractAddress) + c.functions.addWriter(w3.eth.accounts[0]).transact() + + CICRegistry.add_contract(default_chain_spec, c, 'AccountRegistry') + + return account_registry diff --git a/apps/cic-eth/tests/fixtures_bancor.py b/apps/cic-eth/tests/fixtures_bancor.py new file mode 100644 index 00000000..9d973a31 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_bancor.py @@ -0,0 +1,234 @@ +# standard imports +import os +import logging +import json + +# third-party imports +import pytest +from cic_registry.bancor import contract_ids +from cic_registry import bancor + +# local imports +from cic_eth.eth import rpc + +script_dir = os.path.dirname(os.path.realpath(__file__)) +root_dir = os.path.dirname(script_dir) + +logg = logging.getLogger(__file__) + + +class BancorContractLoader: + + bancor_path = os.path.join(root_dir, 'bancor') + registry_contract = None + + @staticmethod + def build_path(): + return BancorContractLoader.bancor_path +# return os.path.join(BancorContractLoader.bancor_path, 'solidity', 'build', 'contracts') + + + @staticmethod + def contract(w3, bundle_id, registry_id=None): + if registry_id == None: + registry_id = bundle_id + contract_id_hex = w3.toHex(text=registry_id) + contract_address = BancorContractLoader.registry_contract.functions.addressOf(contract_id_hex).call() + contract_build_file = os.path.join( + BancorContractLoader.build_path(), + '{}.json'.format(bundle_id), + ) + f = open(os.path.join(contract_build_file)) + j = json.load(f) + f.close() + contract_abi = j['abi'] + logg.debug('creating contract interface {} ({}) at address {}'.format(registry_id, bundle_id, contract_address)) + contract = w3.eth.contract(abi=contract_abi, address=contract_address) + return contract + + + +# TODO: DRY +@pytest.fixture(scope='session') +def bancor_deploy( + load_config, + init_w3_conn, + ): + bancor_dir_default = os.path.join(root_dir, 'bancor') + logg.debug('bancor deploy "{}"'.format(bancor_dir_default)) + BancorContractLoader.bancor_path = load_config.get('BANCOR_DIR', bancor_dir_default) + bancor_build_dir = BancorContractLoader.build_path() + + # deploy registry + registry_build_file = os.path.join(bancor_build_dir, 'ContractRegistry.json') + f = open(os.path.join(registry_build_file)) + j = json.load(f) + f.close() + registry_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode']) + tx = registry_constructor.constructor().transact() + rcpt = init_w3_conn.eth.getTransactionReceipt(tx) + registry_address = rcpt['contractAddress'] + registry_contract = init_w3_conn.eth.contract(abi=j['abi'], address=registry_address) + BancorContractLoader.registry_contract = registry_contract + + # deply reserve token + reservetoken_build_file = os.path.join(bancor_build_dir, 'EtherToken.json') + f = open(os.path.join(reservetoken_build_file)) + j = json.load(f) + f.close() + reservetoken_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode']) + tx = reservetoken_constructor.constructor('Reserve', 'RSV').transact() + rcpt = init_w3_conn.eth.getTransactionReceipt(tx) + reservetoken_address = rcpt['contractAddress'] + reservetoken_contract = init_w3_conn.eth.contract(abi=j['abi'], address=reservetoken_address) + + # register reserve token as bancor hub token + key_hex = init_w3_conn.toHex(text='BNTToken') + registry_contract.functions.registerAddress(key_hex, reservetoken_address).transact() + + # deposit balances for minting liquid tokens with reserve + init_w3_conn.eth.sendTransaction({ + 'from': init_w3_conn.eth.accounts[1], + 'to': reservetoken_address, + 'value': init_w3_conn.toWei('101', 'ether'), + 'nonce': 0, + }) + init_w3_conn.eth.sendTransaction({ + 'from': init_w3_conn.eth.accounts[2], + 'to': reservetoken_address, + 'value': init_w3_conn.toWei('101', 'ether'), + 'nonce': 0, + }) + + # deploy converter factory contract for creating liquid token exchanges + build_file = os.path.join(bancor_build_dir, 'LiquidTokenConverterFactory.json') + f = open(build_file) + j = json.load(f) + f.close() + converterfactory_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode']) + tx = converterfactory_constructor.constructor().transact() + rcpt = init_w3_conn.eth.getTransactionReceipt(tx) + converter_factory_address = rcpt['contractAddress'] + + # deploy the remaining contracts managed by the registry + for k in contract_ids.keys(): + build_file = os.path.join(bancor_build_dir, '{}.json'.format(k)) + f = open(build_file) + j = json.load(f) + f.close() + contract_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode']) + tx = None + + # include the registry address as constructor parameters for the contracts that require it + if k in ['ConverterRegistry', 'ConverterRegistryData', 'BancorNetwork', 'ConversionPathFinder']: + tx = contract_constructor.constructor(registry_address).transact() + else: + tx = contract_constructor.constructor().transact() + rcpt = init_w3_conn.eth.getTransactionReceipt(tx) + contract_address = rcpt['contractAddress'] + + # register contract in registry + key_hex = init_w3_conn.toHex(text=contract_ids[k]) + registry_contract.functions.registerAddress(key_hex, contract_address).transact() + contract = init_w3_conn.eth.contract(abi=j['abi'], address=contract_address) + + # bancor formula needs to be initialized before use + if k == 'BancorFormula': + logg.debug('init bancor formula {}'.format(contract_address)) + contract.functions.init().transact() + + # converter factory needs liquid token converter factory to be able to issue our liquid tokens + if k == 'ConverterFactory': + logg.debug('register converter factory {}'.format(converter_factory_address)) + contract.functions.registerTypedConverterFactory(converter_factory_address).transact() + + logg.info('deployed registry at address {}'.format(registry_address)) + return registry_contract + + + +def __create_converter(w3, converterregistry_contract, reserve_address, owner_address, token_name, token_symbol): + converterregistry_contract.functions.newConverter( + 0, + token_name, + token_symbol, + 18, + 100000, + [reserve_address], + [250000], + ).transact({ + 'from': owner_address, + }) + + +@pytest.fixture(scope='session') +def tokens_to_deploy( + ): + return [ + (1, 'Bert Token', 'BRT'), # account_index, token name, token symbol + (2, 'Ernie Token', 'RNI'), + ] + + +@pytest.fixture(scope='session') +def bancor_tokens( + init_w3_conn, + bancor_deploy, + tokens_to_deploy, + ): + + registry_contract = bancor_deploy + + reserve_contract = BancorContractLoader.contract(init_w3_conn, 'ERC20Token', 'BNTToken') + reserve_address = reserve_contract.address + + network_id = init_w3_conn.toHex(text='BancorNetwork') + network_address = registry_contract.functions.addressOf(network_id).call() + + converterregistry_contract = BancorContractLoader.contract(init_w3_conn, 'ConverterRegistry', 'BancorConverterRegistry') + + for p in tokens_to_deploy: + __create_converter(init_w3_conn, converterregistry_contract, reserve_address, init_w3_conn.eth.accounts[p[0]], p[1], p[2]) + + tokens = converterregistry_contract.functions.getAnchors().call() + + network_contract = BancorContractLoader.contract(init_w3_conn, 'BancorNetwork') + + mint_amount = init_w3_conn.toWei('100', 'ether') + i = 0 + for token in tokens: + i += 1 + owner = init_w3_conn.eth.accounts[i] + logg.debug('owner {} is {}'.format(owner, token)) + reserve_contract.functions.approve(network_address, 0).transact({ + 'from': owner + }) + reserve_contract.functions.approve(network_address, mint_amount).transact({ + 'from': owner + }) + logg.debug('convert {} {} {} {}'.format(reserve_address, token, mint_amount, owner)) + network_contract.functions.convert([ + reserve_address, + token, + token, + ], + mint_amount, + mint_amount, + ).transact({ + 'from': owner, + }) + + return tokens + + +@pytest.fixture(scope='session') +def bancor_load( + load_config, + init_w3_conn, + bancor_deploy, + bancor_tokens, + ): + registry_address = bancor_deploy.address + bancor_dir_default = os.path.join(root_dir, 'bancor') + bancor_dir = load_config.get('BANCOR_DIR', bancor_dir_default) + bancor.load(init_w3_conn, registry_address, bancor_dir) diff --git a/apps/cic-eth/tests/fixtures_celery.py b/apps/cic-eth/tests/fixtures_celery.py new file mode 100644 index 00000000..a57c6b94 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_celery.py @@ -0,0 +1,57 @@ +# third-party imports +import pytest +import tempfile +import logging +import shutil + +logg = logging.getLogger(__name__) + + +# celery fixtures +@pytest.fixture(scope='session') +def celery_includes(): + return [ + 'cic_eth.eth.bancor', + 'cic_eth.eth.token', + 'cic_eth.eth.request', + 'cic_eth.eth.tx', + 'cic_eth.queue.tx', + 'cic_eth.admin.ctrl', + 'cic_eth.admin.nonce', + 'cic_eth.eth.account', + 'cic_eth.callbacks.noop', + 'cic_eth.callbacks.http', + ] + + +@pytest.fixture(scope='session') +def celery_config(): + bq = tempfile.mkdtemp() + bp = tempfile.mkdtemp() + rq = tempfile.mkdtemp() + logg.debug('celery broker queue {} processed {}'.format(bq, bp)) + logg.debug('celery backend store {}'.format(rq)) + yield { + 'broker_url': 'filesystem://', + 'broker_transport_options': { + 'data_folder_in': bq, + 'data_folder_out': bq, + 'data_folder_processed': bp, + }, + 'result_backend': 'file://{}'.format(rq), + } + logg.debug('cleaning up celery filesystem backend files {} {} {}'.format(bq, bp, rq)) + shutil.rmtree(bq) + shutil.rmtree(bp) + shutil.rmtree(rq) + + +@pytest.fixture(scope='session') +def celery_worker_parameters(): + return { +# 'queues': ('cic-eth'), + } + +@pytest.fixture(scope='session') +def celery_enable_logging(): + return True diff --git a/apps/cic-eth/tests/fixtures_config.py b/apps/cic-eth/tests/fixtures_config.py new file mode 100644 index 00000000..135df0fd --- /dev/null +++ b/apps/cic-eth/tests/fixtures_config.py @@ -0,0 +1,27 @@ +# standard imports +import os +import logging + +# third-party imports +import pytest +import confini + +script_dir = os.path.dirname(os.path.realpath(__file__)) +root_dir = os.path.dirname(script_dir) +logg = logging.getLogger(__file__) + + +@pytest.fixture(scope='session') +def load_config(): + config_dir = os.path.join(root_dir, 'config/test') + conf = confini.Config(config_dir, 'CICTEST') + conf.process() + logg.debug('config {}'.format(conf)) + return conf + + +@pytest.fixture(scope='session') +def config( + load_config + ): + return load_config diff --git a/apps/cic-eth/tests/fixtures_database.py b/apps/cic-eth/tests/fixtures_database.py new file mode 100644 index 00000000..b4fddd8c --- /dev/null +++ b/apps/cic-eth/tests/fixtures_database.py @@ -0,0 +1,58 @@ +# standard imports +import os +import logging + +# third-party imports +import pytest +import alembic +from alembic.config import Config as AlembicConfig + +# local imports +from cic_eth.db import SessionBase +from cic_eth.db import dsn_from_config + +logg = logging.getLogger(__file__) + + +@pytest.fixture(scope='session') +def database_engine( + load_config, + ): + if load_config.get('DATABASE_ENGINE') == 'sqlite': + try: + os.unlink(load_config.get('DATABASE_NAME')) + except FileNotFoundError: + pass + SessionBase.transactional = False + SessionBase.poolable = False + dsn = dsn_from_config(load_config) + #SessionBase.connect(dsn, True) + SessionBase.connect(dsn, load_config.get('DATABASE_DEBUG') != None) + return dsn + + +@pytest.fixture(scope='function') +def init_database( + load_config, + database_engine, + ): + + rootdir = os.path.dirname(os.path.dirname(__file__)) + dbdir = os.path.join(rootdir, 'cic_eth', 'db') + migrationsdir = os.path.join(dbdir, 'migrations', load_config.get('DATABASE_ENGINE')) + if not os.path.isdir(migrationsdir): + migrationsdir = os.path.join(dbdir, 'migrations', 'default') + logg.info('using migrations directory {}'.format(migrationsdir)) + + session = SessionBase.create_session() + + ac = AlembicConfig(os.path.join(migrationsdir, 'alembic.ini')) + ac.set_main_option('sqlalchemy.url', database_engine) + ac.set_main_option('script_location', migrationsdir) + + alembic.command.downgrade(ac, 'base') + alembic.command.upgrade(ac, 'head') + + yield session + session.commit() + session.close() diff --git a/apps/cic-eth/tests/fixtures_faucet.py b/apps/cic-eth/tests/fixtures_faucet.py new file mode 100644 index 00000000..3bfa6972 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_faucet.py @@ -0,0 +1,74 @@ +# third-party imports +import pytest +from cic_registry.pytest import * +from erc20_single_shot_faucet import Faucet +from cic_registry import zero_address + + +@pytest.fixture(scope='session') +def faucet_amount(): + return 50 + + +@pytest.fixture(scope='session') +def faucet( + faucet_amount, + config, + default_chain_spec, + cic_registry, + bancor_tokens, + w3_account_roles, + w3_account_token_owners, + solidity_abis, + w3, + #accounts_registry, + ): + + + abi = Faucet.abi('storage') + bytecode = Faucet.bytecode('storage') + + cs = w3.eth.contract(abi=abi, bytecode=bytecode) + tx_hash = cs.constructor().transact({'from': w3_account_roles['eth_account_faucet_owner']}) + rcpt = w3.eth.getTransactionReceipt(tx_hash) + cs_address = rcpt.contractAddress + + abi = Faucet.abi() + bytecode = Faucet.bytecode() + cf = w3.eth.contract(abi=abi, bytecode=bytecode) + + tx_hash = cf.constructor( + [ + w3_account_roles['eth_account_faucet_owner'] + ], + bancor_tokens[0], + cs_address, + zero_address, + #accounts_registry, + ).transact({ + 'from': w3_account_roles['eth_account_faucet_owner'] + } + ) + + rcpt = w3.eth.getTransactionReceipt(tx_hash) + cf_address = rcpt.contractAddress + + c = w3.eth.contract(abi=abi, address=cf_address) + c.functions.setAmount(50).transact({ + 'from': w3_account_roles['eth_account_faucet_owner'] + } + ) + + logg.debug('foo {} bar {}'.format(cf_address, w3_account_roles)) + + # fund the faucet with token balance + token = w3.eth.contract(abi=solidity_abis['ERC20'], address=bancor_tokens[0]) + token_symbol = token.functions.symbol().call() + tx_hash = token.functions.transfer(cf_address, 100000).transact({ + 'from': w3_account_token_owners[token_symbol], + }) + + CICRegistry.add_contract(default_chain_spec, c, 'Faucet') + + return cf_address + diff --git a/apps/cic-eth/tests/fixtures_keystore.py b/apps/cic-eth/tests/fixtures_keystore.py new file mode 100644 index 00000000..c8864cb8 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_keystore.py @@ -0,0 +1,52 @@ +# standard imports +import os +import json +import logging + +# third-party imports +import pytest +from cic_eth.eth.rpc import RpcClient +from crypto_dev_signer.keystore import ReferenceKeystore +#from crypto_dev_signer.eth.web3ext import Web3 as Web3ext + +logg = logging.getLogger(__file__) + + +# TODO: need mock for deterministic signatures +# depends on mock blockchain (ganache) where private key is passed directly to this module +@pytest.fixture(scope='session') +def init_mock_keystore( + ): + raise NotImplementedError + + +@pytest.fixture(scope='session') +def init_keystore( + load_config, + database_engine, + ): + #symkey_hex = os.environ.get('CIC_SIGNER_SECRET') + symkey_hex = load_config.get('SIGNER_SECRET') + symkey = bytes.fromhex(symkey_hex) + opt = { + 'symmetric_key': symkey, + } + k = ReferenceKeystore(database_engine, **opt) + k.db_session.execute('DELETE from ethereum') + k.db_session.commit() + keys_file = load_config.get('SIGNER_DEV_KEYS_PATH') + addresses = [] + if keys_file: + logg.debug('loading keys from {}'.format(keys_file)) + f = open(keys_file, 'r') + j = json.load(f) + f.close() + signer_password = load_config.get('SIGNER_PASSWORD') + for pk in j['private']: + address_hex = k.import_raw_key(bytes.fromhex(pk[2:]), signer_password) + addresses.append(address_hex) + + RpcClient.set_provider_address(addresses[0]) + return addresses + + diff --git a/apps/cic-eth/tests/fixtures_registry.py b/apps/cic-eth/tests/fixtures_registry.py new file mode 100644 index 00000000..8f3067e4 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_registry.py @@ -0,0 +1,10 @@ +# third-party imports +import pytest +import os +import json + +# local imports +from cic_registry import CICRegistry +from cic_registry.contract import Contract +from cic_registry.error import ChainExistsError + diff --git a/apps/cic-eth/tests/fixtures_token.py b/apps/cic-eth/tests/fixtures_token.py new file mode 100644 index 00000000..b4aa426a --- /dev/null +++ b/apps/cic-eth/tests/fixtures_token.py @@ -0,0 +1,27 @@ +# third-party imports +import pytest +from cic_registry import CICRegistry + + +@pytest.fixture(scope='session') +def token_registry( + default_chain_spec, + cic_registry, + solidity_abis, + evm_bytecodes, + w3, + ): + + abi = solidity_abis['TokenRegistry'] + bytecode = evm_bytecodes['TokenRegistry'] + + c = w3.eth.contract(abi=abi, bytecode=bytecode) + tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]}) + rcpt = w3.eth.getTransactionReceipt(tx_hash) + address = rcpt.contractAddress + + c = w3.eth.contract(abi=abi, address=address) + + CICRegistry.add_contract(default_chain_spec, c, 'TokenRegistry') + + return address diff --git a/apps/cic-eth/tests/fixtures_transferapproval.py b/apps/cic-eth/tests/fixtures_transferapproval.py new file mode 100644 index 00000000..5c93cfe8 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_transferapproval.py @@ -0,0 +1,30 @@ +# third-party imports +import pytest +from cic_registry.pytest import * +from erc20_approval_escrow import TransferApproval + + +@pytest.fixture(scope='session') +def transfer_approval( + config, + default_chain_spec, + default_chain_registry, + bancor_tokens, + w3_account_roles, + cic_registry, + w3, + ): + + abi = TransferApproval.abi() + bytecode = TransferApproval.bytecode() + + c = w3.eth.contract(abi=abi, bytecode=bytecode) + approvers = [w3_account_roles['eth_account_approval_owner']] + tx_hash = c.constructor(approvers).transact({'from': w3_account_roles['eth_account_approval_owner']}) + rcpt = w3.eth.getTransactionReceipt(tx_hash) + + c = w3.eth.contract(abi=abi, address=rcpt.contractAddress) + + CICRegistry.add_contract(default_chain_spec, c, 'TransferApproval') + + return rcpt.contractAddress diff --git a/apps/cic-eth/tests/fixtures_web3.py b/apps/cic-eth/tests/fixtures_web3.py new file mode 100644 index 00000000..44999ff9 --- /dev/null +++ b/apps/cic-eth/tests/fixtures_web3.py @@ -0,0 +1,203 @@ +# standard imports +import os +import logging + +# third-party imports +import hexbytes +import pytest +import web3 +import eth_tester +from crypto_dev_signer.eth.transaction import EIP155Transaction +from crypto_dev_signer.eth.signer.defaultsigner import ReferenceSigner as EIP155Signer +from eth_keys import KeyAPI + +# local imports +from cic_eth.eth import RpcClient +from cic_eth.eth.rpc import GasOracle +from cic_eth.db.models.role import AccountRole + +#logg = logging.getLogger(__name__) +logg = logging.getLogger() + + +@pytest.fixture(scope='session') +def init_w3_nokey( + ): + provider = 'http://localhost:8545' + return web3.Web3(provider) + + +class ProviderWalletExtension: + + def __init__(self, provider, gas_price=1000000): + self.provider = provider + self.signer = EIP155Signer(provider) + self.default_gas_price = gas_price + + + def get(self, address, password=None): + return self.provider.get(address, password) + + + def new_account(self, password=None): + keys = KeyAPI() + pk = os.urandom(32) + account = self.provider.add_account(pk.hex()) + self.provider.accounts[account] = keys.PrivateKey(pk) + return account + + + def sign_transaction(self, tx): + tx['chainId'] = int(tx['chainId']) + logg.debug('signing {}'.format(tx)) + signer_tx = EIP155Transaction(tx, tx['nonce'], tx['chainId']) + tx_signed = self.signer.signTransaction(signer_tx) + tx_signed_dict = signer_tx.serialize() + tx_signed_dict['raw'] = '0x' + signer_tx.rlp_serialize().hex() + return tx_signed_dict + + + def sign(self, address, text=None, bytes=None): + logg.debug('sign message {} {}'.format(address[2:], text)) + return self.signer.signEthereumMessage(address[2:], text) + + + def send_raw_transaction(self, rlp_tx_hex): + raw_tx = self.provider.backend.send_raw_transaction(bytes.fromhex(rlp_tx_hex[2:])) + return raw_tx + + + def gas_price(self): + return self.default_gas_price + + +@pytest.fixture(scope='session') +def init_wallet_extension( + init_eth_tester, + eth_provider, + ): + + x = ProviderWalletExtension(init_eth_tester) + + def _rpcclient_web3_constructor(): + w3 = web3.Web3(eth_provider) + setattr(w3.eth, 'personal', x) + setattr(w3.eth, 'sign_transaction', x.sign_transaction) + setattr(w3.eth, 'send_raw_transaction', x.send_raw_transaction) + setattr(w3.eth, 'sign', x.sign) + setattr(w3.eth, 'gas_price', x.gas_price) + return (init_eth_tester, w3) + + RpcClient.set_constructor(_rpcclient_web3_constructor) + init_eth_tester.signer = EIP155Signer(x) + return x + + +@pytest.fixture(scope='session') +def init_w3_conn( + default_chain_spec, + init_eth_tester, + init_wallet_extension, + ): + + c = RpcClient(default_chain_spec) + x = ProviderWalletExtension(init_eth_tester) + + # a hack to make available missing rpc calls we need + setattr(c.w3.eth, 'personal', x) + setattr(c.w3.eth, 'sign_transaction', x.sign_transaction) + setattr(c.w3.eth, 'send_raw_transaction', x.send_raw_transaction) + setattr(c.w3.eth, 'sign', x.sign) + return c.w3 + + +@pytest.fixture(scope='function') +def init_w3( + init_eth_tester, + init_eth_account_roles, + init_w3_conn, + ): + + yield init_w3_conn + logg.debug('mining om nom nom... {}'.format(init_eth_tester.mine_block())) + + +@pytest.fixture(scope='function') +def init_eth_account_roles( + init_database, + w3_account_roles, + ): + + role = AccountRole.set('GAS_GIFTER', w3_account_roles.get('eth_account_gas_provider')) + init_database.add(role) + init_database.commit() + return w3_account_roles + + +@pytest.fixture(scope='function') +def init_rpc( + default_chain_spec, + init_eth_account_roles, + init_eth_tester, + init_wallet_extension, + ): + + c = RpcClient(default_chain_spec) + x = ProviderWalletExtension(init_eth_tester) + + # a hack to make available missing rpc calls we need + setattr(c.w3.eth, 'personal', x) + setattr(c.w3.eth, 'sign_transaction', x.sign_transaction) + setattr(c.w3.eth, 'send_raw_transaction', x.send_raw_transaction) + setattr(c.w3.eth, 'sign', x.sign) + yield c + logg.debug('mining om nom nom... {}'.format(init_eth_tester.mine_block())) + + + +@pytest.fixture(scope='session') +def w3_account_roles( + config, + w3, + ): + + role_ids = [ + 'eth_account_bancor_deployer', + 'eth_account_gas_provider', + 'eth_account_reserve_owner', + 'eth_account_reserve_minter', + 'eth_account_accounts_index_owner', + 'eth_account_accounts_index_writer', + 'eth_account_sarafu_owner', + 'eth_account_sarafu_gifter', + 'eth_account_approval_owner', + 'eth_account_faucet_owner', + ] + roles = {} + + i = 0 + for r in role_ids: + a = w3.eth.accounts[i] + try: + a = config.get(r.upper()) + except KeyError: + pass + roles[r] = a + i += 1 + + return roles + +@pytest.fixture(scope='session') +def w3_account_token_owners( + tokens_to_deploy, + w3, + ): + + token_owners = {} + + i = 1 + for t in tokens_to_deploy: + token_owners[t[2]] = w3.eth.accounts[i] + i += 1 + + return token_owners diff --git a/apps/cic-eth/tests/functional/test_admin.py b/apps/cic-eth/tests/functional/test_admin.py new file mode 100644 index 00000000..9d653814 --- /dev/null +++ b/apps/cic-eth/tests/functional/test_admin.py @@ -0,0 +1,215 @@ +# standard imports +import os +import logging + +# third-party imports +import celery +import pytest +import web3 + +# local imports +from cic_eth.api import AdminApi +from cic_eth.db.models.role import AccountRole +from cic_eth.db.enum import StatusEnum +from cic_eth.error import InitializationError +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.tx import cache_gas_refill_data +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.rpc import RpcClient +from cic_eth.eth.task import sign_tx +from cic_eth.eth.tx import otx_cache_parse_tx +from cic_eth.queue.tx import create as queue_create +from cic_eth.queue.tx import get_tx + +logg = logging.getLogger() + + +def test_resend_inplace( + default_chain_spec, + init_database, + init_w3, + celery_session_worker, + ): + + chain_str = str(default_chain_spec) + c = RpcClient(default_chain_spec) + + sigs = [] + s = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + init_w3.eth.accounts[0], + chain_str, + ], + queue=None, + ) + t = s.apply_async() + tx_raw = t.get() + assert t.successful() + + tx_dict = unpack_signed_raw_tx(bytes.fromhex(tx_raw[2:]), default_chain_spec.chain_id()) + gas_price_before = tx_dict['gasPrice'] + + s = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + chain_str, + init_w3.eth.accounts[0], + ], + queue=None, + ) + t = s.apply_async() + t.get() + assert t.successful() + + api = AdminApi(c, queue=None) + t = api.resend(tx_dict['hash'], chain_str, unlock=True) + tx_hash_new_hex = t.get() + assert t.successful() + + tx_raw_new = get_tx(tx_hash_new_hex) + logg.debug('get {}'.format(tx_raw_new)) + tx_dict_new = unpack_signed_raw_tx(bytes.fromhex(tx_raw_new['signed_tx'][2:]), default_chain_spec.chain_id()) + assert tx_hash_new_hex != tx_dict['hash'] + assert tx_dict_new['gasPrice'] > gas_price_before + + tx_dict_after = get_tx(tx_dict['hash']) + assert tx_dict_after['status'] == StatusEnum.OVERRIDDEN + + +def test_check_fix_nonce( + default_chain_spec, + init_database, + init_eth_account_roles, + init_w3, + eth_empty_accounts, + celery_session_worker, + ): + + chain_str = str(default_chain_spec) + + sigs = [] + for i in range(5): + s = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + eth_empty_accounts[i], + chain_str, + ], + queue=None, + ) + sigs.append(s) + + t = celery.group(sigs)() + txs = t.get() + assert t.successful() + + tx_hash = web3.Web3.keccak(hexstr=txs[2]) + c = RpcClient(default_chain_spec) + api = AdminApi(c, queue=None) + address = init_eth_account_roles['eth_account_gas_provider'] + nonce_spec = api.check_nonce(address) + assert nonce_spec['nonce']['network'] == 0 + assert nonce_spec['nonce']['queue'] == 4 + assert nonce_spec['nonce']['blocking'] == None + + s_set = celery.signature( + 'cic_eth.queue.tx.set_rejected', + [ + tx_hash.hex(), + ], + queue=None, + ) + t = s_set.apply_async() + t.get() + t.collect() + assert t.successful() + + + nonce_spec = api.check_nonce(address) + assert nonce_spec['nonce']['blocking'] == 2 + assert nonce_spec['tx']['blocking'] == tx_hash.hex() + + t = api.fix_nonce(address, nonce_spec['nonce']['blocking']) + t.get() + t.collect() + assert t.successful() + + for tx in txs[3:]: + tx_hash = web3.Web3.keccak(hexstr=tx) + tx_dict = get_tx(tx_hash.hex()) + assert tx_dict['status'] == StatusEnum.OVERRIDDEN + + +def test_tag_account( + init_database, + eth_empty_accounts, + init_rpc, + ): + + api = AdminApi(init_rpc) + + api.tag_account('foo', eth_empty_accounts[0]) + api.tag_account('bar', eth_empty_accounts[1]) + api.tag_account('bar', eth_empty_accounts[2]) + + assert AccountRole.get_address('foo') == eth_empty_accounts[0] + assert AccountRole.get_address('bar') == eth_empty_accounts[2] + + +def test_ready( + init_database, + eth_empty_accounts, + init_rpc, + w3, + ): + + api = AdminApi(init_rpc) + + with pytest.raises(InitializationError): + api.ready() + + bogus_account = os.urandom(20) + bogus_account_hex = '0x' + bogus_account.hex() + + api.tag_account('ETH_GAS_PROVIDER_ADDRESS', web3.Web3.toChecksumAddress(bogus_account_hex)) + with pytest.raises(KeyError): + api.ready() + + api.tag_account('ETH_GAS_PROVIDER_ADDRESS', eth_empty_accounts[0]) + api.ready() + + +def test_tx( + default_chain_spec, + cic_registry, + init_database, + init_rpc, + init_w3, + celery_session_worker, + ): + + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': default_chain_spec.chain_id(), + 'data': '', + } + + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, str(default_chain_spec)) + queue_create( + tx['nonce'], + tx['from'], + tx_hash_hex, + tx_signed_raw_hex, + str(default_chain_spec), + ) + tx_recovered = unpack_signed_raw_tx(bytes.fromhex(tx_signed_raw_hex[2:]), default_chain_spec.chain_id()) + cache_gas_refill_data(tx_hash_hex, tx_recovered) + + api = AdminApi(init_rpc, queue=None) + tx = api.tx(default_chain_spec, tx_hash=tx_hash_hex) diff --git a/apps/cic-eth/tests/functional/test_app.py b/apps/cic-eth/tests/functional/test_app.py new file mode 100644 index 00000000..29426ea5 --- /dev/null +++ b/apps/cic-eth/tests/functional/test_app.py @@ -0,0 +1,162 @@ +# standard imports +import os +import logging +import time + +# third-party imports +import pytest +import celery +from cic_registry import CICRegistry + +# platform imports +from cic_eth.api import Api +from cic_eth.eth.factory import TxFactory + +logg = logging.getLogger(__name__) + +def test_account_api( + default_chain_spec, + init_w3, + init_database, + init_eth_account_roles, + celery_session_worker, + ): + api = Api(str(default_chain_spec), callback_param='accounts', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.create_account('', register=False) + t.get() + for r in t.collect(): + print(r) + assert t.successful() + + +def test_balance_api( + default_chain_spec, + default_chain_registry, + init_w3, + cic_registry, + init_database, + bancor_tokens, + bancor_registry, + celery_session_worker, + ): + + token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + + api = Api(str(default_chain_spec), callback_param='balance', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.balance(init_w3.eth.accounts[2], token.symbol()) + t.get() + for r in t.collect(): + print(r) + assert t.successful() + + +def test_transfer_api( + default_chain_spec, + init_w3, + cic_registry, + init_database, + bancor_registry, + bancor_tokens, + celery_session_worker, + ): + + token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + + api = Api(str(default_chain_spec), callback_param='transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.transfer(init_w3.eth.accounts[2], init_w3.eth.accounts[4], 111, token.symbol()) + t.get() + for r in t.collect(): + print(r) + assert t.successful() + + +def test_transfer_approval_api( + default_chain_spec, + init_w3, + cic_registry, + init_database, + bancor_registry, + bancor_tokens, + transfer_approval, + celery_session_worker, + ): + + token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + approval_contract = CICRegistry.get_contract(default_chain_spec, 'TransferApproval') + + api = Api(str(default_chain_spec), callback_param='transfer_request', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.transfer_request(init_w3.eth.accounts[2], init_w3.eth.accounts[4], approval_contract.address(), 111, token.symbol()) + t.get() + #for r in t.collect(): + # print(r) + assert t.successful() + + +def test_convert_api( + default_chain_spec, + init_w3, + cic_registry, + init_database, + bancor_registry, + bancor_tokens, + celery_session_worker, + ): + + token_alice = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + token_bob = CICRegistry.get_address(default_chain_spec, bancor_tokens[1]) + + api = Api(str(default_chain_spec), callback_param='convert', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.convert(init_w3.eth.accounts[2], 110, 100, token_alice.symbol(), token_bob.symbol()) + for r in t.collect(): + print(r) + assert t.successful() + + +def test_convert_transfer_api( + default_chain_spec, + init_w3, + cic_registry, + init_database, + bancor_registry, + bancor_tokens, + celery_session_worker, + ): + + token_alice = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + token_bob = CICRegistry.get_address(default_chain_spec, bancor_tokens[1]) + + api = Api(str(default_chain_spec), callback_param='convert_transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.convert_transfer(init_w3.eth.accounts[2], init_w3.eth.accounts[4], 110, 100, token_alice.symbol(), token_bob.symbol()) + t.get() + for r in t.collect(): + print(r) + assert t.successful() + + +def test_refill_gas( + default_chain_spec, + cic_registry, + init_database, + init_w3, + celery_session_worker, + eth_empty_accounts, + ): + + api = Api(str(default_chain_spec), callback_param='convert_transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.refill_gas(eth_empty_accounts[0]) + t.get() + for r in t.collect(): + print(r) + assert t.successful() + + +def test_ping( + default_chain_spec, + celery_session_worker, + ): + api = Api(str(default_chain_spec), callback_param='ping', callback_task='cic_eth.callbacks.noop.noop', queue=None) + t = api.ping('pong') + t.get() + for r in t.collect(): + print(r) + assert t.successful() diff --git a/apps/cic-eth/tests/tasks/test_account.py b/apps/cic-eth/tests/tasks/test_account.py new file mode 100644 index 00000000..b98436b0 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_account.py @@ -0,0 +1,128 @@ +# standard imports +import os +import logging +import time + +# third-party imports +import pytest +import web3 +import celery + +# local imports +from cic_eth.error import OutOfGasError +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.base import SessionBase +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import StatusEnum +from cic_eth.db.models.nonce import Nonce +from cic_eth.db.models.role import AccountRole +from cic_eth.eth.account import AccountTxFactory + +logg = logging.getLogger() #__name__) + + +def test_create_account( + default_chain_spec, + init_w3, + init_database, + celery_session_worker, + ): + + s = celery.signature( + 'cic_eth.eth.account.create', + [ + 'foo', + str(default_chain_spec), + ], + ) + t = s.apply_async() + r = t.get() + logg.debug('got account {}'.format(r)) + + session = SessionBase.create_session() + q = session.query(Nonce).filter(Nonce.address_hex==r) + o = q.first() + logg.debug('oooo s {}'.format(o)) + session.close() + assert o != None + assert o.nonce == 0 + + s = celery.signature( + 'cic_eth.eth.account.have', + [ + r, + str(default_chain_spec), + ], + ) + t = s.apply_async() + assert r == t.get() + + +def test_register_account( + default_chain_spec, + accounts_registry, + init_database, + init_eth_tester, + init_w3, + cic_registry, + celery_session_worker, + eth_empty_accounts, + ): + + logg.debug('chainspec {}'.format(str(default_chain_spec))) + + s = celery.signature( + 'cic_eth.eth.account.register', + [ + eth_empty_accounts[0], + str(default_chain_spec), + init_w3.eth.accounts[0], + ], + ) + t = s.apply_async() + address = t.get() + r = t.collect() + t.successful() + + session = SessionBase.create_session() + o = session.query(Otx).first() + tx_signed_hex = o.signed_tx + session.close() + + s_send = celery.signature( + 'cic_eth.eth.tx.send', + [ + [tx_signed_hex], + str(default_chain_spec), + ], + ) + t = s_send.apply_async() + address = t.get() + r = t.collect() + t.successful() + + init_eth_tester.mine_block() + + assert accounts_registry.have(eth_empty_accounts[0]) + + +def test_role_task( + init_database, + celery_session_worker, + default_chain_spec, + ): + + address = '0x' + os.urandom(20).hex() + role = AccountRole.set('foo', address) + init_database.add(role) + init_database.commit() + s = celery.signature( + 'cic_eth.eth.account.role', + [ + address, + str(default_chain_spec), + ], + ) + t = s.apply_async() + r = t.get() + assert r == 'foo' diff --git a/apps/cic-eth/tests/tasks/test_convert.py b/apps/cic-eth/tests/tasks/test_convert.py new file mode 100644 index 00000000..46857b69 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_convert.py @@ -0,0 +1,45 @@ +import logging +import os + +import celery + +from cic_eth.db import TxConvertTransfer +from cic_eth.eth.bancor import BancorTxFactory + +logg = logging.getLogger() + + +def test_transfer_after_convert( + init_w3, + init_database, + cic_registry, + bancor_tokens, + bancor_registry, + default_chain_spec, + celery_session_worker, + ): + + tx_hash = os.urandom(32).hex() + txct = TxConvertTransfer(tx_hash, init_w3.eth.accounts[1], default_chain_spec) + init_database.add(txct) + init_database.commit() + + s = celery.signature( + 'cic_eth.eth.bancor.transfer_converted', + [ + [ + { + 'address': bancor_tokens[0], + }, + ], + init_w3.eth.accounts[0], + init_w3.eth.accounts[1], + 1024, + tx_hash, + str(default_chain_spec), + ], + ) + t = s.apply_async() + t.get() + t.collect() + assert t.successful() diff --git a/apps/cic-eth/tests/tasks/test_faucet.py b/apps/cic-eth/tests/tasks/test_faucet.py new file mode 100644 index 00000000..b6575ef4 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_faucet.py @@ -0,0 +1,66 @@ +# standard imports +import os +import json +import logging + +# third-party imports +import celery + +# local imports +from cic_eth.eth.account import unpack_gift +from cic_eth.eth.factory import TxFactory +from cic_eth.eth.util import unpack_signed_raw_tx + +logg = logging.getLogger() + +script_dir = os.path.dirname(__file__) + + +def test_faucet( + default_chain_spec, + faucet_amount, + faucet, + eth_empty_accounts, + bancor_tokens, + w3_account_roles, + w3_account_token_owners, + init_w3, + solidity_abis, + init_eth_tester, + cic_registry, + celery_session_worker, + init_database, + ): + + s = celery.signature( + 'cic_eth.eth.account.gift', + [ + init_w3.eth.accounts[7], + str(default_chain_spec), + ], + ) + s_send = celery.signature( + 'cic_eth.eth.tx.send', + [ + str(default_chain_spec), + ], + ) + s.link(s_send) + t = s.apply_async() + signed_tx = t.get() + for r in t.collect(): + logg.debug('result {}'.format(r)) + + assert t.successful() + + tx = unpack_signed_raw_tx(bytes.fromhex(signed_tx[0][2:]), default_chain_spec.chain_id()) + giveto = unpack_gift(tx['data']) + assert giveto['to'] == init_w3.eth.accounts[7] + + init_eth_tester.mine_block() + + token = init_w3.eth.contract(abi=solidity_abis['ERC20'], address=bancor_tokens[0]) + + balance = token.functions.balanceOf(init_w3.eth.accounts[7]).call() + + assert balance == faucet_amount diff --git a/apps/cic-eth/tests/tasks/test_gas_tasks.py b/apps/cic-eth/tests/tasks/test_gas_tasks.py new file mode 100644 index 00000000..c3fa07c7 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_gas_tasks.py @@ -0,0 +1,246 @@ +# standard imports +import logging +import time + +# third-party imports +import pytest +import celery +from web3.exceptions import ValidationError + +# local imports +from cic_eth.db.enum import StatusEnum +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.base import SessionBase +from cic_eth.eth.task import sign_and_register_tx +from cic_eth.eth.task import sign_tx +from cic_eth.eth.token import TokenTxFactory +from cic_eth.eth.token import TxFactory +from cic_eth.eth.token import cache_transfer_data +from cic_eth.eth.rpc import RpcClient +from cic_eth.queue.tx import create as queue_create +from cic_eth.error import OutOfGasError +from cic_eth.db.models.role import AccountRole +from cic_eth.error import AlreadyFillingGasError + +logg = logging.getLogger() + + +def test_refill_gas( + default_chain_spec, + init_eth_tester, + init_rpc, + init_database, + cic_registry, + init_eth_account_roles, + celery_session_worker, + eth_empty_accounts, + ): + + provider_address = AccountRole.get_address('GAS_GIFTER') + receiver_address = eth_empty_accounts[0] + + c = init_rpc + refill_amount = c.refill_amount() + + balance = init_rpc.w3.eth.getBalance(receiver_address) + s = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + receiver_address, + str(default_chain_spec), + ], + ) + + t = s.apply_async() + r = t.get() + t.collect() + assert t.successful() + + s = celery.signature( + 'cic_eth.eth.tx.send', + [ + [r], + str(default_chain_spec), + ], + ) + t = s.apply_async() + r = t.get() + t.collect() + assert t.successful() + + init_eth_tester.mine_block() + balance_new = init_rpc.w3.eth.getBalance(receiver_address) + assert balance_new == (balance + refill_amount) + + # Verify that entry is added in TxCache + session = SessionBase.create_session() + q = session.query(Otx) + q = q.join(TxCache) + q = q.filter(TxCache.recipient==receiver_address) + r = q.first() + + assert r.status == StatusEnum.SENT + + +def test_refill_deduplication( + default_chain_spec, + init_rpc, + init_database, + init_eth_account_roles, + cic_registry, + celery_session_worker, + eth_empty_accounts, + ): + + provider_address = AccountRole.get_address('ETH_GAS_PROVIDER_ADDRESS') + receiver_address = eth_empty_accounts[0] + + c = init_rpc + refill_amount = c.refill_amount() + + s = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + receiver_address, + str(default_chain_spec), + ], + ) + + t = s.apply_async() + r = t.get() + for e in t.collect(): + pass + assert t.successful() + + s = celery.signature( + 'cic_eth.eth.tx.refill_gas', + [ + receiver_address, + str(default_chain_spec), + ], + ) + + t = s.apply_async() + with pytest.raises(AlreadyFillingGasError): + t.get() + + +def test_check_gas( + default_chain_spec, + init_eth_tester, + init_w3, + init_rpc, + eth_empty_accounts, + init_database, + cic_registry, + celery_session_worker, + bancor_registry, + bancor_tokens, + ): + + provider_address = init_w3.eth.accounts[0] + gas_receiver_address = eth_empty_accounts[0] + token_receiver_address = init_w3.eth.accounts[1] + + c = init_rpc + txf = TokenTxFactory(gas_receiver_address, c) + tx_transfer = txf.transfer(bancor_tokens[0], token_receiver_address, 42, default_chain_spec) + + (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, str(default_chain_spec), None) + + gas_price = c.gas_price() + gas_limit = tx_transfer['gas'] + + s = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + [tx_hash_hex], + str(default_chain_spec), + [], + gas_receiver_address, + gas_limit * gas_price, + ], + ) + t = s.apply_async() + with pytest.raises(OutOfGasError): + r = t.get() + #assert len(r) == 0 + + time.sleep(1) + t.collect() + + session = SessionBase.create_session() + q = session.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash_hex) + r = q.first() + session.close() + assert r.status == StatusEnum.WAITFORGAS + + +def test_resend_with_higher_gas( + default_chain_spec, + init_eth_tester, + init_w3, + init_rpc, + init_database, + cic_registry, + celery_session_worker, + bancor_registry, + bancor_tokens, + ): + + c = init_rpc + txf = TokenTxFactory(init_w3.eth.accounts[0], c) + + tx_transfer = txf.transfer(bancor_tokens[0], init_w3.eth.accounts[1], 1024, default_chain_spec) + logg.debug('txtransfer {}'.format(tx_transfer)) + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx_transfer, str(default_chain_spec)) + logg.debug('signed raw {}'.format(tx_signed_raw_hex)) + queue_create( + tx_transfer['nonce'], + tx_transfer['from'], + tx_hash_hex, + tx_signed_raw_hex, + str(default_chain_spec), + ) + logg.debug('create {}'.format(tx_transfer['from'])) + cache_transfer_data( + tx_hash_hex, + tx_transfer, #_signed_raw_hex, + ) + + s_resend = celery.signature( + 'cic_eth.eth.tx.resend_with_higher_gas', + [ + tx_hash_hex, + str(default_chain_spec), + ], + ) + t = s_resend.apply_async() + + i = 0 + for r in t.collect(): + logg.debug('{} {}'.format(i, r[0].get())) + i += 1 + + assert t.successful() + +# +#def test_resume( +# default_chain_spec, +# init_eth_tester, +# w3, +# w3_account_roles, +# init_database, +# bancor_tokens, +# celery_session_worker, +# eth_empty_accounts, +# ): +# +# txf = TokenTxFactory() +# +# tx_transfer = txf.transfer(bancor_tokens[0], eth_empty_accounts[1], 1024) +# (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer) +# +# resume_tx() diff --git a/apps/cic-eth/tests/tasks/test_lock_tasks.py b/apps/cic-eth/tests/tasks/test_lock_tasks.py new file mode 100644 index 00000000..cd077ea2 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_lock_tasks.py @@ -0,0 +1,355 @@ +# standard imports +import os + +# third-party imports +import celery +import pytest + +# local imports +from cic_eth.db.models.lock import Lock +from cic_eth.db.models.otx import Otx +from cic_eth.db.enum import LockEnum +from cic_eth.error import LockedError + + +@pytest.mark.parametrize( + 'task_postfix,flag_enum', + [ + ('send', LockEnum.SEND), + ('queue', LockEnum.QUEUE), + ], + ) +def test_lock_task( + init_database, + celery_session_worker, + default_chain_spec, + task_postfix, + flag_enum, + ): + + chain_str = str(default_chain_spec) + address = '0x' + os.urandom(20).hex() + + s = celery.signature( + 'cic_eth.admin.ctrl.lock_{}'.format(task_postfix), + [ + 'foo', + chain_str, + address, + ], + ) + t = s.apply_async() + r = t.get() + assert t.successful() + assert r == 'foo' + + q = init_database.query(Lock) + q = q.filter(Lock.address==address) + lock = q.first() + assert lock != None + assert lock.flags == flag_enum + + s = celery.signature( + 'cic_eth.admin.ctrl.unlock_{}'.format(task_postfix), + [ + 'foo', + chain_str, + address, + ], + ) + t = s.apply_async() + r = t.get() + assert t.successful() + assert r == 'foo' + + q = init_database.query(Lock) + q = q.filter(Lock.address==address) + lock = q.first() + assert lock == None + + +def test_lock_check_task( + init_database, + celery_session_worker, + default_chain_spec, + ): + + chain_str = str(default_chain_spec) + address = '0x' + os.urandom(20).hex() + + s = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + 'foo', + chain_str, + address, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.admin.ctrl.lock_queue', + [ + 'foo', + chain_str, + address, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + 'foo', + chain_str, + LockEnum.SEND, + address, + ], + ) + t = s.apply_async() + + with pytest.raises(LockedError): + r = t.get() + + + s = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + 'foo', + chain_str, + LockEnum.CREATE, + address, + ], + ) + t = s.apply_async() + r = t.get() + assert r == 'foo' + + +def test_lock_arbitrary_task( + init_database, + celery_session_worker, + default_chain_spec, + ): + + chain_str = str(default_chain_spec) + address = '0x' + os.urandom(20).hex() + + s = celery.signature( + 'cic_eth.admin.ctrl.lock', + [ + 'foo', + chain_str, + address, + LockEnum.SEND | LockEnum.QUEUE, + ], + ) + t = s.apply_async() + r = t.get() + assert r == 'foo' + + s = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + 'foo', + chain_str, + LockEnum.SEND | LockEnum.QUEUE, + address, + ], + ) + t = s.apply_async() + with pytest.raises(LockedError): + r = t.get() + assert r == 'foo' + + s = celery.signature( + 'cic_eth.admin.ctrl.unlock', + [ + 'foo', + chain_str, + address, + LockEnum.SEND, + ], + ) + t = s.apply_async() + r = t.get() + assert r == 'foo' + + + s = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + 'foo', + chain_str, + LockEnum.SEND, + address, + ], + ) + t = s.apply_async() + r = t.get() + + + s = celery.signature( + 'cic_eth.admin.ctrl.unlock', + [ + 'foo', + chain_str, + address, + ], + ) + t = s.apply_async() + r = t.get() + assert r == 'foo' + + + s = celery.signature( + 'cic_eth.admin.ctrl.check_lock', + [ + 'foo', + chain_str, + LockEnum.QUEUE, + address, + ], + ) + t = s.apply_async() + r = t.get() + + +def test_lock_list( + default_chain_spec, + init_database, + celery_session_worker, + ): + + chain_str = str(default_chain_spec) + + # Empty list of no lock set + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [], + ) + t = s.apply_async() + r = t.get() + + assert len(r) == 0 + + # One element if lock set and no link with otx + tx_hash = '0x' + os.urandom(32).hex() + address_foo = '0x' + os.urandom(20).hex() + s = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + 'foo', + chain_str, + address_foo, + tx_hash, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [], + ) + t = s.apply_async() + r = t.get() + + assert len(r) == 1 + assert r[0]['tx_hash'] == None + assert r[0]['address'] == address_foo + assert r[0]['flags'] == LockEnum.SEND + + # One element if lock set and link with otx, tx_hash now available + signed_tx = '0x' + os.urandom(128).hex() + otx = Otx.add( + 0, + address_foo, + tx_hash, + signed_tx, + ) + s = celery.signature( + 'cic_eth.admin.ctrl.unlock_send', + [ + 'foo', + chain_str, + address_foo, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.admin.ctrl.lock_send', + [ + 'foo', + chain_str, + address_foo, + tx_hash, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [], + ) + t = s.apply_async() + r = t.get() + + assert r[0]['tx_hash'] == tx_hash + + + # Two elements if two locks in place + address_bar = '0x' + os.urandom(20).hex() + tx_hash = '0x' + os.urandom(32).hex() + s = celery.signature( + 'cic_eth.admin.ctrl.lock_queue', + [ + 'bar', + chain_str, + address_bar, + tx_hash, + ], + ) + t = s.apply_async() + r = t.get() + + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [], + ) + t = s.apply_async() + r = t.get() + + assert len(r) == 2 + + # One element if filtered by address + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [ + address_bar, + ], + ) + t = s.apply_async() + r = t.get() + + assert len(r) == 1 + assert r[0]['tx_hash'] == None + assert r[0]['address'] == address_bar + assert r[0]['flags'] == LockEnum.QUEUE + + address_bogus = '0x' + os.urandom(20).hex() + # No elements if filtered by non-existent address + s = celery.signature( + 'cic_eth.queue.tx.get_lock', + [ + address_bogus, + ], + ) + t = s.apply_async() + r = t.get() + diff --git a/apps/cic-eth/tests/tasks/test_nonce_tasks.py b/apps/cic-eth/tests/tasks/test_nonce_tasks.py new file mode 100644 index 00000000..0f3e2685 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_nonce_tasks.py @@ -0,0 +1,49 @@ +# third-party imports +import celery + +# local imports +from cic_eth.admin.nonce import shift_nonce +from cic_eth.queue.tx import create as queue_create +from cic_eth.eth.tx import otx_cache_parse_tx +from cic_eth.eth.task import sign_tx + +def test_shift_nonce( + default_chain_spec, + init_database, + init_w3, + celery_session_worker, + ): + + chain_str = str(default_chain_spec) + + tx_hashes = [] + for i in range(5): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[i], + 'nonce': i, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': default_chain_spec.chain_id(), + 'data': '', + } + + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str) + queue_create(tx['nonce'], init_w3.eth.accounts[0], tx_hash_hex, tx_signed_raw_hex, chain_str) + otx_cache_parse_tx(tx_hash_hex, tx_signed_raw_hex, chain_str) + tx_hashes.append(tx_hash_hex) + + s = celery.signature( + 'cic_eth.admin.nonce.shift_nonce', + [ + chain_str, + tx_hashes[2], + ], + queue=None, + ) + t = s.apply_async() + r = t.get() + for _ in t.collect(): + pass + assert t.successful() diff --git a/apps/cic-eth/tests/tasks/test_otx_tasks.py b/apps/cic-eth/tests/tasks/test_otx_tasks.py new file mode 100644 index 00000000..44ed3024 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_otx_tasks.py @@ -0,0 +1,174 @@ +# standard imports +import os +import logging + +# third-party imports +import pytest +import celery +from cic_registry import zero_address + +# local imports +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache +from cic_eth.db.enum import StatusEnum + +logg = logging.getLogger() + +# TODO: Refactor to use test vector decorator +def test_status_success( + init_w3, + init_database, + celery_session_worker, + ): + + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + account = '0x' + os.urandom(20).hex() + + otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx) + init_database.add(otx) + init_database.commit() + assert otx.status == StatusEnum.PENDING + + txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13) + init_database.add(txc) + init_database.commit() + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [tx_hash], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SENT + + s = celery.signature( + 'cic_eth.queue.tx.set_final_status', + [tx_hash, 13], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SUCCESS + + +def test_status_tempfail_resend( + init_w3, + init_database, + celery_session_worker, + ): + + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + account = '0x' + os.urandom(20).hex() + + otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx) + init_database.add(otx) + init_database.commit() + + txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13) + init_database.add(txc) + init_database.commit() + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [tx_hash, True], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SENDFAIL + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [tx_hash], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SENT + + + +def test_status_fail( + init_w3, + init_database, + celery_session_worker, + ): + + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + account = '0x' + os.urandom(20).hex() + + otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx) + init_database.add(otx) + init_database.commit() + + txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13) + init_database.add(txc) + init_database.commit() + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [tx_hash], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SENT + + s = celery.signature( + 'cic_eth.queue.tx.set_final_status', + [tx_hash, 13, True], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.REVERTED + + + +def test_status_fubar( + init_w3, + init_database, + celery_session_worker, + ): + + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + account = '0x' + os.urandom(20).hex() + + otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx) + init_database.add(otx) + init_database.commit() + + txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13) + init_database.add(txc) + init_database.commit() + + s = celery.signature( + 'cic_eth.queue.tx.set_sent_status', + [tx_hash], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.SENT + + s = celery.signature( + 'cic_eth.queue.tx.set_fubar', + [tx_hash], + ) + t = s.apply_async() + t.get() + assert t.successful() + init_database.refresh(otx) + assert otx.status == StatusEnum.FUBAR diff --git a/apps/cic-eth/tests/tasks/test_states.py b/apps/cic-eth/tests/tasks/test_states.py new file mode 100644 index 00000000..99ad4914 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_states.py @@ -0,0 +1,125 @@ +# standard imports +import logging +import time + +# third-party imports +import celery + +# local imports +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.otx import Otx +from cic_eth.db.enum import StatusEnum +from cic_eth.eth.task import sign_and_register_tx + +logg = logging.getLogger() + + +def test_states_initial( + init_w3, + init_database, + init_eth_account_roles, + celery_session_worker, + ): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': 666, + 'data': '', + } + (tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'Foo:666', None) + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.status == StatusEnum.PENDING.value + + s = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + [tx_hash_hex], + 'Foo:666', + [tx_raw_signed_hex], + init_w3.eth.accounts[0], + 8000000, + ], + queue=None, + ) + t = s.apply_async() + r = t.get() + for c in t.collect(): + pass + assert t.successful() + + session = SessionBase.create_session() + otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.status == StatusEnum.READYSEND.value + + otx.waitforgas(session=session) + session.commit() + + s = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + [tx_hash_hex], + 'Foo:666', + [tx_raw_signed_hex], + init_w3.eth.accounts[0], + 8000000, + ], + queue=None, + ) + t = s.apply_async() + r = t.get() + for c in t.collect(): + pass + assert t.successful() + + session = SessionBase.create_session() + otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.status == StatusEnum.READYSEND.value + + +def test_states_failed( + init_w3, + init_database, + init_eth_account_roles, + celery_session_worker, + ): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': 666, + 'data': '', + } + (tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'Foo:666', None) + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + otx.sendfail(session=init_database) + init_database.add(otx) + init_database.commit() + + s = celery.signature( + 'cic_eth.eth.tx.check_gas', + [ + [tx_hash_hex], + 'Foo:666', + [tx_raw_signed_hex], + init_w3.eth.accounts[0], + 8000000, + ], + queue=None, + ) + t = s.apply_async() + r = t.get() + for c in t.collect(): + pass + assert t.successful() + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.status == StatusEnum.RETRY.value diff --git a/apps/cic-eth/tests/tasks/test_token_tasks.py b/apps/cic-eth/tests/tasks/test_token_tasks.py new file mode 100644 index 00000000..1c5f860d --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_token_tasks.py @@ -0,0 +1,42 @@ +# standard imports +import logging + +# third-party imports +import celery + +# local imports +from cic_eth.eth.token import TokenTxFactory + + +logg = logging.getLogger() + + +def test_approve( + init_rpc, + default_chain_spec, + celery_session_worker, + bancor_tokens, + bancor_registry, + cic_registry, + ): + + s = celery.signature( + 'cic_eth.eth.token.approve', + [ + [ + { + 'address': bancor_tokens[0], + }, + ], + init_rpc.w3.eth.accounts[0], + init_rpc.w3.eth.accounts[1], + 1024, + str(default_chain_spec), + ], + ) + t = s.apply_async() + t.get() + for r in t.collect(): + logg.debug('result {}'.format(r)) + + assert t.successful() diff --git a/apps/cic-eth/tests/tasks/test_transfer_approval.py b/apps/cic-eth/tests/tasks/test_transfer_approval.py new file mode 100644 index 00000000..574cd4c3 --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_transfer_approval.py @@ -0,0 +1,76 @@ +# standard imports +import logging +import time + +# third-party imports +from erc20_approval_escrow import TransferApproval +import celery +import sha3 + +# local imports +from cic_eth.eth.token import TokenTxFactory + +logg = logging.getLogger() + + +# BUG: transaction receipt only found sometimes +def test_transfer_approval( + default_chain_spec, + transfer_approval, + bancor_tokens, + w3_account_roles, + eth_empty_accounts, + cic_registry, + init_database, + celery_session_worker, + init_eth_tester, + init_w3, + ): + + s = celery.signature( + 'cic_eth.eth.request.transfer_approval_request', + [ + [ + { + 'address': bancor_tokens[0], + }, + ], + w3_account_roles['eth_account_sarafu_owner'], + eth_empty_accounts[0], + 1024, + str(default_chain_spec), + ], + ) + + s_send = celery.signature( + 'cic_eth.eth.tx.send', + [ + str(default_chain_spec), + ], + + ) + s.link(s_send) + t = s.apply_async() + + tx_signed_raws = t.get() + for r in t.collect(): + logg.debug('result {}'.format(r)) + + assert t.successful() + + init_eth_tester.mine_block() + + h = sha3.keccak_256() + tx_signed_raw = tx_signed_raws[0] + tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw[2:]) + h.update(tx_signed_raw_bytes) + tx_hash = h.digest() + rcpt = init_w3.eth.getTransactionReceipt(tx_hash) + + assert rcpt.status == 1 + + a = TransferApproval(init_w3, transfer_approval) + assert a.last_serial() == 1 + + logg.debug('requests {}'.format(a.requests(1)['serial'])) + diff --git a/apps/cic-eth/tests/tasks/test_tx_tasks.py b/apps/cic-eth/tests/tasks/test_tx_tasks.py new file mode 100644 index 00000000..82f5a18b --- /dev/null +++ b/apps/cic-eth/tests/tasks/test_tx_tasks.py @@ -0,0 +1,168 @@ +# standard imports +import logging +import os + +# third-party imports +import celery +import pytest + +# local imports +import cic_eth +from cic_eth.db.models.lock import Lock +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import LockEnum +from cic_eth.error import LockedError +from cic_eth.queue.tx import create as queue_create +from cic_eth.queue.tx import set_sent_status +from cic_eth.eth.tx import cache_gas_refill_data +from cic_eth.error import PermanentTxError +from cic_eth.queue.tx import get_tx +from cic_eth.eth.task import sign_tx + +logg = logging.getLogger() + + +# TODO: There is no +def test_send_reject( + default_chain_spec, + init_w3, + mocker, + init_database, + celery_session_worker, + ): + + nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending') + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': nonce, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': default_chain_spec.chain_id(), + 'data': '', + } + + chain_str = str(default_chain_spec) + + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str) + queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed_raw_hex, str(default_chain_spec)) + cache_gas_refill_data(tx_hash_hex, tx) + s = celery.signature( + 'cic_eth.eth.tx.send', + [ + [tx_signed_raw_hex], + chain_str, + ], + ) + t = s.apply_async() + r = t.get() + + +def test_sync_tx( + default_chain_spec, + init_database, + init_w3, + init_wallet_extension, + init_eth_tester, + celery_session_worker, + eth_empty_accounts, + ): + + nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending') + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': nonce, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': default_chain_spec.chain_id(), + 'data': '', + } + + chain_str = str(default_chain_spec) + + (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str) + queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed_raw_hex, str(default_chain_spec)) + cache_gas_refill_data(tx_hash_hex, tx) + + init_w3.eth.send_raw_transaction(tx_signed_raw_hex) + + s = celery.signature( + 'cic_eth.eth.tx.sync_tx', + [ + tx_hash_hex, + chain_str, + ], + queue=None + ) + t = s.apply_async() + r = t.get() + for _ in t.collect(): + pass + assert t.successful() + + tx_dict = get_tx(tx_hash_hex) + assert tx_dict['status'] == StatusEnum.SENT + + init_eth_tester.mine_block() + + s = celery.signature( + 'cic_eth.eth.tx.sync_tx', + [ + tx_hash_hex, + chain_str, + ], + queue=None + ) + t = s.apply_async() + r = t.get() + for _ in t.collect(): + pass + assert t.successful() + + tx_dict = get_tx(tx_hash_hex) + assert tx_dict['status'] == StatusEnum.SUCCESS + + + +def test_resume_tx( + default_chain_spec, + init_database, + init_w3, + celery_session_worker, + ): + + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 , + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': default_chain_spec.chain_id(), + 'data': '', + } + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + tx_hash_hex = tx_hash.hex() + queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash_hex, tx) + + set_sent_status(tx_hash_hex, True) + + s = celery.signature( + 'cic_eth.eth.tx.resume_tx', + [ + tx_hash_hex, + str(default_chain_spec), + ], + ) + t = s.apply_async() + t.get() + for r in t.collect(): + logg.debug('collect {}'.format(r)) + assert t.successful() + + diff --git a/apps/cic-eth/tests/test_basic.py b/apps/cic-eth/tests/test_basic.py new file mode 100644 index 00000000..6c3bde7e --- /dev/null +++ b/apps/cic-eth/tests/test_basic.py @@ -0,0 +1,10 @@ + +def test_default( + init_database, + ): + pass + +def test_w3( + init_w3, + ): + a = init_w3.eth.accounts[0] diff --git a/apps/cic-eth/tests/test_sign.py b/apps/cic-eth/tests/test_sign.py new file mode 100644 index 00000000..57897e65 --- /dev/null +++ b/apps/cic-eth/tests/test_sign.py @@ -0,0 +1,27 @@ +# standard imports +import logging +import sha3 + +# third-party imports +import pytest + +logg = logging.getLogger() + + +def test_sign( + init_w3, + init_eth_tester, + ): + nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending') + tx = init_w3.eth.sign_transaction({ + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': nonce, + 'value': 101, + 'gasPrice': 2000000000, + 'gas': 21000, + 'data': '', + 'chainId': 8995, + }) + tx_hash = init_w3.eth.send_raw_transaction(tx['raw']) + logg.debug('have tx {}'.format(tx_hash)) diff --git a/apps/cic-eth/tests/testdata/abi/AccountRegistry.json b/apps/cic-eth/tests/testdata/abi/AccountRegistry.json new file mode 100644 index 00000000..59de177f --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/AccountRegistry.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addedAccount","type":"address"},{"indexed":true,"internalType":"uint256","name":"accountIndex","type":"uint256"}],"name":"AccountAdded","type":"event"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"accounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"accountsIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"add","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"count","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/Converter.json b/apps/cic-eth/tests/testdata/abi/Converter.json new file mode 100644 index 00000000..89c75dd9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/Converter.json @@ -0,0 +1 @@ +[{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reserveToken","type":"address"}],"name":"reserveBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveRatio","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveTokenCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reserveToken","type":"address"}],"name":"reserveWeight","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_conversionFee","type":"uint32"}],"name":"setConversionFee","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/ConverterRegistry.json b/apps/cic-eth/tests/testdata/abi/ConverterRegistry.json new file mode 100644 index 00000000..b405748a --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/ConverterRegistry.json @@ -0,0 +1 @@ +[{"inputs":[],"name":"getConvertibleTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_type","type":"uint16"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint32","name":"_maxConversionFee","type":"uint32"},{"internalType":"address[]","name":"_reserveTokens","type":"address[]"},{"internalType":"uint32[]","name":"_reserveWeights","type":"uint32[]"}],"name":"newConverter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/ERC20.json b/apps/cic-eth/tests/testdata/abi/ERC20.json new file mode 100644 index 00000000..d50ea47a --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/ERC20.json @@ -0,0 +1 @@ +[{"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":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","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":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","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":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/Faucet.json b/apps/cic-eth/tests/testdata/abi/Faucet.json new file mode 100644 index 00000000..0c437e69 --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/Faucet.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"FaucetFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"FaucetUsed","type":"event"},{"inputs":[],"name":"amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"giveTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/Network.json b/apps/cic-eth/tests/testdata/abi/Network.json new file mode 100644 index 00000000..68e237a4 --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/Network.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_smartToken","type":"address"},{"indexed":true,"internalType":"address","name":"_fromToken","type":"address"},{"indexed":true,"internalType":"address","name":"_toToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_trader","type":"address"}],"name":"Conversion","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"convert","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rateByPath","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/Registry.json b/apps/cic-eth/tests/testdata/abi/Registry.json new file mode 100644 index 00000000..aa058777 --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/Registry.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"}],"name":"chainOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_chain","type":"bytes32"}],"name":"configSumOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identifiers","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32","name":"_chainDescriptor","type":"bytes32"},{"internalType":"bytes32","name":"_chainConfig","type":"bytes32"}],"name":"set","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/RegistryClient.json b/apps/cic-eth/tests/testdata/abi/RegistryClient.json new file mode 100644 index 00000000..2b3baa8a --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/RegistryClient.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/abi/TransferApproval.json b/apps/cic-eth/tests/testdata/abi/TransferApproval.json new file mode 100644 index 00000000..dcbf2d68 --- /dev/null +++ b/apps/cic-eth/tests/testdata/abi/TransferApproval.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"serial","type":"uint256"}],"name":"NewExecution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"serial","type":"uint256"}],"name":"NewRejection","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"NewRequest","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"execute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"reject","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"request","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] diff --git a/apps/cic-eth/tests/testdata/bancor/BancorFormula.json b/apps/cic-eth/tests/testdata/bancor/BancorFormula.json new file mode 100644 index 00000000..460e0089 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/BancorFormula.json @@ -0,0 +1,151530 @@ +{ + "contractName": "BancorFormula", + "abi": [ + { + "inputs": [], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "purchaseTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "saleTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "crossReserveTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundSupplyAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidateReserveAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_primaryReserveStakedBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_primaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_secondaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateDenominator", + "type": "uint256" + } + ], + "name": "balancedWeights", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculatePurchaseReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateSaleReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateCrossReserveReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateCrossConnectorReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateFundCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateLiquidateReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "purchaseRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "saleRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "crossReserveRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidateRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_primaryReserveStakedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_primaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_secondaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateDenominator\",\"type\":\"uint256\"}],\"name\":\"balancedWeights\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateCrossConnectorReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateCrossReserveReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateFundCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateLiquidateReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculatePurchaseReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateSaleReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"crossReserveRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"crossReserveTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundSupplyAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidateRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidateReserveAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"purchaseRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"purchaseTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"saleRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"saleTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balancedWeights(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price. We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance. In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance. Formula input: - let t denote the primary reserve token staked balance - let s denote the primary reserve token balance - let r denote the secondary reserve token balance - let q denote the numerator of the rate between the tokens - let p denote the denominator of the rate between the tokens Where p primary tokens are equal to q secondary tokens Formula output: - compute x = W(t / r * q / p * log(s / t)) / log(s / t) - return x / (1 + x) as the weight of the primary reserve token - return 1 / (1 + x) as the weight of the secondary reserve token Where W is the Lambert W Function If the rate-provider provides the rates for a common unit, for example: - P = 2 ==> 2 primary reserve tokens = 1 ether - Q = 3 ==> 3 secondary reserve tokens = 1 ether Then you can simply use p = P and q = Q If the rate-provider provides the rates for a single unit, for example: - P = 2 ==> 1 primary reserve token = 2 ethers - Q = 3 ==> 1 secondary reserve token = 3 ethers Then you can simply use p = Q and q = P\",\"params\":{\"_primaryReserveBalance\":\"the primary reserve token balance\",\"_primaryReserveStakedBalance\":\"the primary reserve token staked balance\",\"_reserveRateDenominator\":\"the denominator of the rate between the tokens Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token\",\"_reserveRateNumerator\":\"the numerator of the rate between the tokens\",\"_secondaryReserveBalance\":\"the secondary reserve token balance\"},\"returns\":{\"_0\":\"the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)\"}},\"calculateCrossConnectorReturn(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateCrossReserveReturn(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateFundCost(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateLiquidateReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculatePurchaseReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateSaleReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"crossReserveRate(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"crossReserveTargetAmount(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"given two reserve balances/weights and a sell amount (in the first reserve token), calculates the target amount for a conversion from the source reserve token to the target reserve token Formula: return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))\",\"params\":{\"_amount\":\"source reserve amount\",\"_sourceReserveBalance\":\"source reserve balance\",\"_sourceReserveWeight\":\"source reserve weight, represented in ppm (1-1000000)\",\"_targetReserveBalance\":\"target reserve balance\",\"_targetReserveWeight\":\"target reserve weight, represented in ppm (1-1000000)\"},\"returns\":{\"_0\":\"target reserve amount\"}},\"fundCost(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens, calculates the amount of reserve tokens required for purchasing the given amount of smart tokens Formula: return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)\",\"params\":{\"_amount\":\"requested amount of smart tokens\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}},\"fundSupplyAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with, calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens Formula: return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)\",\"params\":{\"_amount\":\"amount of reserve tokens to fund with\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"smart token amount\"}},\"init()\":{\"details\":\"should be executed after construction (too large for the constructor)\"},\"liquidateRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"liquidateReserveAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate, calculates the amount of reserve tokens received for selling the given amount of smart tokens Formula: return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))\",\"params\":{\"_amount\":\"amount of smart tokens to liquidate\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}},\"purchaseRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"purchaseTargetAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a token supply, reserve balance, weight and a deposit amount (in the reserve token), calculates the target amount for a given conversion (in the main token) Formula: return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)\",\"params\":{\"_amount\":\"amount of reserve tokens to get the target amount for\",\"_reserveBalance\":\"reserve balance\",\"_reserveWeight\":\"reserve weight, represented in ppm (1-1000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"smart token amount\"}},\"saleRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"saleTargetAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a token supply, reserve balance, weight and a sell amount (in the main token), calculates the target amount for a given conversion (in the reserve token) Formula: return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))\",\"params\":{\"_amount\":\"amount of smart tokens to get the target amount for\",\"_reserveBalance\":\"reserve balance\",\"_reserveWeight\":\"reserve weight, represented in ppm (1-1000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol\":\"BancorFormula\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol\":{\"keccak256\":\"0x24ae54f35c6099ecb1cb077e96ba2a956d4ca344ed65473e04cf8bf52d65b81e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://59f6e37cc90b585f381faebb13ff42fd18025b3f650bfa59f1c46bc226515d9a\",\"dweb:/ipfs/QmVCFUq8gqtvB1AyjRwuN331e6vR3WZeE75mBdC7p5dZgZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50613bf2806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638074590a116100a2578063abfd231d11610071578063abfd231d146101cc578063e1c7392a14610378578063ebbb215814610382578063f3250fe2146103b7578063f732f1c91461020157610116565b80638074590a146102a857806394491fab146102dd5780639d11410814610236578063a11aa1b41461031a57610116565b806348d73fed116100e957806348d73fed1461016257806349f9b0f71461020157806365098bb31461023657806376cf0b561461027357806379c1b4501461023657610116565b80631da6bbfb1461011b57806329a00e7c146101625780632f55bdb51461019757806335b49af4146101cc575b600080fd5b6101506004803603608081101561013157600080fd5b5080359060208101359063ffffffff60408201351690606001356103ec565b60408051918252519081900360200190f35b6101506004803603608081101561017857600080fd5b5080359060208101359063ffffffff6040820135169060600135610405565b610150600480360360808110156101ad57600080fd5b5080359060208101359063ffffffff6040820135169060600135610413565b610150600480360360808110156101e257600080fd5b5080359060208101359063ffffffff604082013516906060013561058b565b6101506004803603608081101561021757600080fd5b5080359060208101359063ffffffff6040820135169060600135610599565b610150600480360360a081101561024c57600080fd5b5080359063ffffffff602082013581169160408101359160608201351690608001356105a7565b6101506004803603608081101561028957600080fd5b5080359060208101359063ffffffff60408201351690606001356105c2565b610150600480360360808110156102be57600080fd5b5080359060208101359063ffffffff6040820135169060600135610788565b610150600480360360a08110156102f357600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610904565b61034f600480360360a081101561033057600080fd5b5080359060208101359060408101359060608101359060800135610a70565b604051808363ffffffff1681526020018263ffffffff1681526020019250505060405180910390f35b610380610bf8565b005b6101506004803603608081101561039857600080fd5b5080359060208101359063ffffffff6040820135169060600135610c0a565b610150600480360360808110156103cd57600080fd5b5080359060208101359063ffffffff6040820135169060600135610d8f565b60006103fa85858585610c0a565b90505b949350505050565b60006103fa85858585610d8f565b600080851161045e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116104a1576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff161180156104c05750621e848063ffffffff841611155b61050d576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b8161051a575060006103fd565b63ffffffff8316620f4240141561054557836105368387610ec1565b8161053d57fe5b0490506103fd565b600080806105538786610f28565b9050610564818888620f4240610f71565b9093509150600060ff83166105798a86610ec1565b901c9890980398975050505050505050565b60006103fa85858585610788565b60006103fa858585856105c2565b60006105b68686868686610904565b90505b95945050505050565b600080851161060d576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610650576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008363ffffffff1611801561066f5750620f424063ffffffff841611155b6106bd576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b84821115610707576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b81610714575060006103fd565b848214156107235750826103fd565b63ffffffff8316620f4240141561073f57846105368584610ec1565b6000808387036107548882620f424089610f71565b909350915060006107658885610ec1565b905060ff831688901b848183038161077957fe5b049a9950505050505050505050565b60008085116107d3576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610816576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff161180156108355750621e848063ffffffff841611155b610882576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b848211156108cc576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b816108d9575060006103fd565b848214156108e85750826103fd565b63ffffffff8316620f4240141561073f57846105368386610ec1565b600080861180156109155750600084115b610954576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008563ffffffff161180156109735750620f424063ffffffff861611155b8015610985575060008363ffffffff16115b801561099a5750620f424063ffffffff841611155b6109e8576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8263ffffffff168563ffffffff161415610a1f57610a068683610f28565b610a108584610ec1565b81610a1757fe5b0490506105b9565b60008080610a2d8986610f28565b9050610a3b818a8a89610f71565b90935091506000610a4c8885610ec1565b905060ff831688901b8481830381610a6057fe5b049b9a5050505050505050505050565b60008085871415610ace576000871180610a8a5750600085115b610ac9576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b610b29565b600087118015610ade5750600086115b8015610aea5750600085115b610b29576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b600084118015610b395750600083115b610b8a576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f524553455256455f524154450000000000000000604482015290519081900360640190fd5b6000610b968886610ec1565b90506000610ba48786610ec1565b905087891015610bc757610bbc888a84846001611043565b935093505050610bee565b87891115610bdd57610bbc898984846000611043565b610be7828261110c565b9350935050505b9550959350505050565b610c00611144565b610c0861191a565b565b6000808511610c55576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610c98576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610cb75750621e848063ffffffff841611155b610d04576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b81610d11575060006103fd565b63ffffffff8316620f42401415610d4257846001610d2f8487610ec1565b0381610d3757fe5b0460010190506103fd565b60008080610d508886610f28565b9050610d618189620f424089610f71565b9093509150600060ff83166001610d788a87610ec1565b03901c889003600101945050505050949350505050565b6000808511610dda576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610e1d576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008363ffffffff16118015610e3c5750620f424063ffffffff841611155b610e8a576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b81610e97575060006103fd565b63ffffffff8316620f42401415610eb357836105368684610ec1565b600080806105538588610f28565b600082610ed057506000610f22565b82820282848281610edd57fe5b0414610f1f576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b600082820183811015610f1f576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080600160811b8610610f8457600080fd5b600080866001607f1b890281610f9657fe5b04905070015bf0a8b1457695355fb8ac404e7a79e3811015610fc257610fbb81612321565b9150610fce565b610fcb81612705565b91505b60008563ffffffff168763ffffffff16840281610fe757fe5b049050600160831b81101561100d57610fff816127b0565b607f9450945050505061103a565b600061101882612b54565b905061102d81607f0360ff1683901c82612be4565b9550935061103a92505050565b94509492505050565b6000806110508585612f7e565b9095509350600086611066896001607f1b610ec1565b8161106d57fe5b049050600070015bf0a8b1457695355fb8ac404e7a79e382106110985761109382612705565b6110a1565b6110a182612321565b90506000866110b0838a610ec1565b816110b757fe5b0490506000866110cf576110ca82613031565b6110d8565b6110d88261306e565b90506110fa6110e7828b610ec1565b6110f58a6001607f1b610ec1565b61110c565b95509550505050509550959350505050565b6000808284116111295761112084846130d2565b9150915061113d565b60008061113685876130d2565b9450925050505b9250929050565b701c35fedd14ffffffffffffffffffffffff602055701b0ce43b323fffffffffffffffffffffff6021557019f0028ec1ffffffffffffffffffffffff6022557018ded91f0e7fffffffffffffffffffffff6023557017d8ec7f0417ffffffffffffffffffffff6024557016ddc6556cdbffffffffffffffffffffff6025557015ecf52776a1ffffffffffffffffffffff6026557015060c256cb2ffffffffffffffffffffff602755701428a2f98d72ffffffffffffffffffffff6028557013545598e5c23fffffffffffffffffffff602955701288c4161ce1dfffffffffffffffffffff602a557011c592761c666fffffffffffffffffffff602b5570110a688680a757ffffffffffffffffffff602c55701056f1b5bedf77ffffffffffffffffffff602d55700faadceceeff8bffffffffffffffffffff602e55700f05dc6b27edadffffffffffffffffffff602f55700e67a5a25da4107fffffffffffffffffff603055700dcff115b14eedffffffffffffffffffff603155700d3e7a392431239fffffffffffffffffff603255700cb2ff529eb71e4fffffffffffffffffff603355700c2d415c3db974afffffffffffffffffff603455700bad03e7d883f69bffffffffffffffffff603555700b320d03b2c343d5ffffffffffffffffff603655700abc25204e02828dffffffffffffffffff603755700a4b16f74ee4bb207fffffffffffffffff6038557009deaf736ac1f569ffffffffffffffffff603955700976bd9952c7aa957fffffffffffffffff603a557009131271922eaa606fffffffffffffffff603b557008b380f3558668c46fffffffffffffffff603c55700857ddf0117efa215bffffffffffffffff603d557007ffffffffffffffffffffffffffffffff603e557007abbf6f6abb9d087fffffffffffffffff603f5570075af62cbac95f7dfa7fffffffffffffff60405570070d7fb7452e187ac13fffffffffffffff6041557006c3390ecc8af379295fffffffffffffff60425570067c00a3b07ffc01fd6fffffffffffffff604355700637b647c39cbb9d3d27ffffffffffffff6044557005f63b1fc104dbd39587ffffffffffffff6045557005b771955b36e12f7235ffffffffffffff60465570057b3d49dda84556d6f6ffffffffffffff60475570054183095b2c8ececf30ffffffffffffff60485570050a28be635ca2b888f77fffffffffffff6049557004d5156639708c9db33c3fffffffffffff604a557004a23105873875bd52dfdfffffffffffff604b55700471649d87199aa990756fffffffffffff604c557004429a21a029d4c1457cfbffffffffffff604d55700415bc6d6fb7dd71af2cb3ffffffffffff604e557003eab73b3bbfe282243ce1ffffffffffff604f557003c1771ac9fb6b4c18e229ffffffffffff605055700399e96897690418f785257fffffffffff605155700373fc456c53bb779bf0ea9fffffffffff60525570034f9e8e490c48e67e6ab8bfffffffffff60535570032cbfd4a7adc790560b3337ffffffffff60545570030b50570f6e5d2acca94613ffffffffff6055557002eb40f9f620fda6b56c2861ffffffffff6056557002cc8340ecb0d0f520a6af58ffffffffff6057557002af09481380a0a35cf1ba02ffffffffff605855700292c5bdd3b92ec810287b1b3fffffffff605955700277abdcdab07d5a77ac6d6b9fffffffff605a5570025daf6654b1eaa55fd64df5efffffffff605b55700244c49c648baa98192dce88b7ffffffff605c5570022ce03cd5619a311b2471268bffffffff605d55700215f77c045fbe885654a44a0fffffffff605e557001ffffffffffffffffffffffffffffffff605f557001eaefdbdaaee7421fc4d3ede5ffffffff6060557001d6bd8b2eb257df7e8ca57b09bfffffff6061557001c35fedd14b861eb0443f7f133fffffff6062557001b0ce43b322bcde4a56e8ada5afffffff60635570019f0028ec1fff007f5a195a39dfffffff60645570018ded91f0e72ee74f49b15ba527ffffff60655570017d8ec7f04136f4e5615fd41a63ffffff60665570016ddc6556cdb84bdc8d12d22e6fffffff60675570015ecf52776a1155b5bd8395814f7fffff60685570015060c256cb23b3b3cc3754cf40ffffff6069557001428a2f98d728ae223ddab715be3fffff606a5570013545598e5c23276ccf0ede68034fffff606b557001288c4161ce1d6f54b7f61081194fffff606c5570011c592761c666aa641d5a01a40f17ffff606d55700110a688680a7530515f3e6e6cfdcdffff606e557001056f1b5bedf75c6bcb2ce8aed428ffff606f556ffaadceceeff8a0890f3875f008277fff6070556ff05dc6b27edad306388a600f6ba0bfff6071556fe67a5a25da41063de1495d5b18cdbfff6072556fdcff115b14eedde6fc3aa5353f2e4fff6073556fd3e7a3924312399f9aae2e0f868f8fff6074556fcb2ff529eb71e41582cccd5a1ee26fff6075556fc2d415c3db974ab32a51840c0b67edff6076556fbad03e7d883f69ad5b0a186184e06bff6077556fb320d03b2c343d4829abd6075f0cc5ff6078556fabc25204e02828d73c6e80bcdb1a95bf6079556fa4b16f74ee4bb2040a1ec6c15fbbf2df607a556f9deaf736ac1f569deb1b5ae3f36c130f607b556f976bd9952c7aa957f5937d790ef65037607c556f9131271922eaa6064b73a22d0bd4f2bf607d556f8b380f3558668c46c91c49a2f8e967b9607e556f857ddf0117efa215952912839f6473e66000607f5b0155565b6f60e393c68d20b1bd09deaabc0373b9c560809081556f5f8f46e4854120989ed94719fb4c20116081556f5e479ebb9129fb1b7e72a648f992b6066082556f5d0bd23fe42dfedde2e9586be12b85fe6083556f5bdb29ddee979308ddfca81aeeb8095a6084556f5ab4fd8a260d2c7e2c0d2afcf0009dad6085556f5998b31359a55d48724c65cf090012216086556f5885bcad2b322dfc43e8860f9c018cf56087556f577b97aa1fe222bb452fdf111b1f0be26088556f5679cb5e3575632e5baa27e2b949f7046089556f557fe8241b3a31c83c732f1cdff4a1c5608a556f548d868026504875d6e59bbe95fc2a6b608b556f53a2465ce347cf34d05a867c17dd3088608c556f52bdce5dcd4faed59c7f5511cf8f8acc608d556f51dfcb453c07f8da817606e7885f7c3e608e556f5107ef6b0a5a2be8f8ff15590daa3cce608f556f5035f241d6eae0cd7bacba119993de7b6090556f4f698fe90d5b53d532171e1210164c666091556f4ea288ca297a0e6a09a0eee240e16c856092556f4de0a13fdcf5d4213fc398ba6e3becde6093556f4d23a145eef91fec06b06140804c48086094556f4c6b5430d4c1ee5526473db4ae0f11de6095556f4bb7886c240562eba11f4963a53b42406096556f4b080f3f1cb491d2d521e0ea4583521e6097556f4a5cbc96a05589cb4d86be1db31683646098556f49b566d40243517658d78c33162d6ece6099556f4911e6a02e5507a30f947383fd9a3276609a556f487216c2b31be4adc41db8a8d5cc0c88609b556f47d5d3fc4a7a1b188cd3d788b5c5e9fc609c556f473cfce4871a2c40bc4f9e1c32b955d0609d556f46a771ca578ab878485810e285e31c67609e556f4615149718aed4c258c373dc676aa72d609f556f4585c8b3f8fe489c6e1833ca4787138460a0556f44f972f174e41e5efb7e9d63c29ce73560a1556f446ff970ba86d8b00beb05ecebf3c4dc60a2556f43e9438ec88971812d6f198b5ccaad9660a3556f436539d11ff7bea657aeddb394e809ef60a4556f42e3c5d3e5a913401d86f66db5d81c2c60a5556f4264d2395303070ea726cbe98df6217460a6556f41e84a9a593bb7194c3a6349ecae4eea60a7556f416e1b785d13eba07a08f3f18876a5ab60a8556f40f6322ff389d423ba9dd7e7e7b7e80960a9556f40807cec8a466880ecf4184545d240a460aa556f400cea9ce88a8d3ae668e8ea0d9bf07f60ab556f3f9b6ae8772d4c55091e0ed7dfea0ac160ac556f3f2bee253fd84594f54bcaafac383a1360ad556f3ebe654e95208bb9210c575c081c595860ae556f3e52c1fc5665635b78ce1f05ad53c08660af556f3de8f65ac388101ddf718a6f5c1eff6560b0556f3d80f522d59bd0b328ca012df4cd2d4960b1556f3d1ab193129ea72b23648a161163a85a60b2556f3cb61f68d32576c135b95cfb53f76d7560b3556f3c5332d9f1aae851a3619e77e4cc847360b4556f3bf1e08edbe2aa109e1525f65759ef7360b5556f3b921d9cff13fa2c197746a3dfc4918f60b6556f3b33df818910bfc1a5aefb8f63ae2ac460b7556f3ad71c1c77e34fa32a9f184967eccbf660b8556f3a7bc9abf2c5bb53e2f7384a8a16521a60b9556f3a21dec7e76369783a68a0c6385a1c5760ba556f39c9525de6c9cdf7c1c157ca4a7a6ee360bb556f39721bad3dc85d1240ff0190e0adaac360bc556f391c324344d3248f0469eb28dd3d77e060bd556f38c78df7e3c796279fb4ff84394ab3da60be556f387426ea4638ae9aae08049d3554c20a60bf556f3821f57dbd2763256c1a99bbd205137860c0556f37d0f256cb46a8c92ff62fbbef28969860c1556f37811658591ffc7abdd1feaf3cef9b7360c2556f37325aa10e9e82f7df0f380f7997154b60c3556f36e4b888cfb408d873b9a80d439311c660c4556f3698299e59f4bb9de645fc9b08c64cca60c5556f364ca7a5012cb603023b57dd3ebfd50d60c6556f36022c928915b778ab1b06aaee7e61d460c7556f35b8b28d1a73dc27500ffe35559cc02860c8556f357033e951fe250ec5eb4e60955132d760c9556f3528ab2867934e3a21b5412e4c4f888160ca556f34e212f66c55057f9676c80094a61d5960cb556f349c66289e5b3c4b540c24f42fa4b9bb60cc556f34579fbbd0c733a9c8d6af6b0f7d00f760cd556f3413bad2e712288b924b5882b5b369bf60ce556f33d0b2b56286510ef730e213f71f12e960cf556f338e82ce00e2496262c64457535ba1a160d0556f334d26a96b373bb7c2f8ea1827f27a9260d1556f330c99f4f4211469e00b3e18c31475ea60d2556f32ccd87d6486094999c7d5e6f33237d860d3556f328dde2dd617b6665a2e8556f250c1af60d4556f324fa70e9adc270f8262755af5a99af960d5556f32122f443110611ca51040f41fa6e1e360d6556f31d5730e42c0831482f0f1485c4263d860d7556f31996ec6b07b4a83421b5ebc4ab4e1f160d8556f315e1ee0a68ff46bb43ec2b85032e87660d9556f31237fe7bc4deacf6775b9efa1a145f860da556f30e98e7f1cc5a356e44627a6972ea2ff60db556f30b04760b8917ec74205a3002650ec0560dc556f3077a75c803468e9132ce0cf3224241d60dd556f303fab57a6a275c36f19cda9bace667a60de556f3008504beb8dcbd2cf3bc1f6d5a064f060df556f2fd19346ed17dac61219ce0c2c5ac4b060e0556f2f9b7169808c324b5852fd3d54ba971460e1556f2f65e7e711cf4b064eea9c08cbdad57460e2556f2f30f405093042ddff8a251b6bf6d10360e3556f2efc931a3750f2e8bfe323edfe03757460e4556f2ec8c28e46dbe56d98685278339400cb60e5556f2e957fd933c3926d8a599b602379b85160e6556f2e62c882c7c9ed4473412702f08ba0e560e7556f2e309a221c12ba361e3ed695167feee260e8556f2dfef25d1f865ae18dd07cfea4bcea1060e9556f2dcdcee821cdc80decc02c44344aeb3160ea556f2d9d2d8562b34944d0b201bb87260c8360eb556f2d6d0c04a5b62a2c42636308669b729a60ec556f2d3d6842c9a235517fc5a0332691528f60ed556f2d0e402963fe1ea2834abc408c437c1060ee556f2cdf91ae602647908aff975e4d6a2a8c60ef556f2cb15ad3a1eb65f6d74a75da09a1b6c560f0556f2c8399a6ab8e9774d6fcff373d21072760f1556f2c564c4046f64edba6883ca06bbc453560f2556f2c2970c431f952641e05cb493e23eed360f3556f2bfd0560cd9eb14563bc7c0732856c1860f4556f2bd1084ed0332f7ff4150f9d0ef41a2c60f5556f2ba577d0fa1628b76d040b12a82492fb60f6556f2b7a5233cd21581e855e89dc2f1e8a9260f7556f2b4f95cd46904d05d72bdcde337d9cc760f8556f2b2540fc9b4d9abba3faca669191467560f9556f2afb5229f68d0830d8be8adb0a0db70f60fa556f2ad1c7c63a9b294c5bc73a3ba3ab7a2b60fb556f2aa8a04ac3cbe1ee1c9c86361465dbb860fc556f2a7fda392d725a44a2c8aeb9ab35430d60fd556f2a57741b18cde618717792b4faa216db60fe556f2a2f6c81f5d84dd950a35626d6d5503a90607f611916565b6000808080806fd3094c70f034de4b96ff7d5b6f99fcd8861061236a576001607e1b840193506fd3094c70f034de4b96ff7d5b6f99fcd86001607f1b87028161236657fe5b0495505b6fa45af1e1f40c333b3de1db4dd55f29a786106123ad576001607d1b840193506fa45af1e1f40c333b3de1db4dd55f29a76001607f1b8702816123a957fe5b0495505b6f910b022db7ae67ce76b441c27035c6a186106123f0576001607c1b840193506f910b022db7ae67ce76b441c27035c6a16001607f1b8702816123ec57fe5b0495505b6f88415abbe9a76bead8d00cf112e4d4a88610612433576001607b1b840193506f88415abbe9a76bead8d00cf112e4d4a86001607f1b87028161242f57fe5b0495505b6f84102b00893f64c705e841d5d4064bd38610612476576001607a1b840193506f84102b00893f64c705e841d5d4064bd36001607f1b87028161247257fe5b0495505b6f8204055aaef1c8bd5c3259f4822735a286106124b957600160791b840193506f8204055aaef1c8bd5c3259f4822735a26001607f1b8702816124b557fe5b0495505b6f810100ab00222d861931c15e39b44e9986106124fc57600160781b840193506f810100ab00222d861931c15e39b44e996001607f1b8702816124f857fe5b0495505b6f808040155aabbbe9451521693554f733861061253f57600160771b840193506f808040155aabbbe9451521693554f7336001607f1b87028161253b57fe5b0495505b6f7fffffffffffffffffffffffffffffff19860192508291506001607f1b828002049050600160801b838103830204840193506001607f1b8183028161258157fe5b049150600160811b836faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa038302816125a557fe5b04840193506001607f1b818302816125b957fe5b049150600360801b836f99999999999999999999999999999999038302816125dd57fe5b04840193506001607f1b818302816125f157fe5b049150600160821b836f924924924924924924924924924924920383028161261557fe5b04840193506001607f1b8183028161262957fe5b049150600560801b836f8e38e38e38e38e38e38e38e38e38e38e0383028161264d57fe5b04840193506001607f1b8183028161266157fe5b049150600360811b836f8ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b0383028161268557fe5b04840193506001607f1b8183028161269957fe5b049150600760801b836f89d89d89d89d89d89d89d89d89d89d89038302816126bd57fe5b04840193506001607f1b818302816126d157fe5b049150600160831b836f88888888888888888888888888888888038302816126f557fe5b049390930193505050505b919050565b600080600160801b83106127365760006127256001607f1b855b04613164565b60ff1693841c936001607f1b029150505b6001607f1b83111561278457607f5b60ff811615612782576001607f1b848002049350600160801b841061277957600193841c9360ff6000198301161b91909101905b60001901612745565b505b6f05b9de1d10bf4103d647b0955897ba806f03f80fe03f80fe03f80fe03f80fe03f88202049392505050565b6000670168244fdac780006001607f1b6f0fffffffffffffffffffffffffffffff84168080028290048082028390048083028490049485026710e1b3be415a00009092026705a0913f6b1e000091909102010192909181830204905080664807432bc1800002830192506001607f1b8282028161282957fe5b04905080660c0135dca0400002830192506001607f1b8282028161284957fe5b049050806601b707b1cdc00002830192506001607f1b8282028161286957fe5b049050806536e0f639b80002830192506001607f1b8282028161288857fe5b04905080650618fee9f80002830192506001607f1b828202816128a757fe5b04905080649c197dcc0002830192506001607f1b828202816128c557fe5b04905080640e30dce40002830192506001607f1b828202816128e357fe5b0490508064012ebd130002830192506001607f1b8282028161290157fe5b049050806317499f0002830192506001607f1b8282028161291e57fe5b049050806301a9d48002830192506001607f1b8282028161293b57fe5b04905080621c638002830192506001607f1b8282028161295757fe5b049050806201c63802830192506001607f1b8282028161297357fe5b04905080611ab802830192506001607f1b8282028161298e57fe5b0490508061017c02830192506001607f1b828202816129a957fe5b04905080601402830192506001607f1b828202816129c357fe5b6721c3677c82b400009190049384010482016001607f1b019290506001607c1b851615612a145770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f984020492505b6001607d1b851615612a4a577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77884020492505b6001607e1b851615612a7f576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed584020492505b6001607f1b851615612ab3576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e84020492505b600160801b851615612ae7576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c584020492505b600160811b851615612b1a576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d784020492505b600160821b851615612b4b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30784020492505b50909392505050565b60006020607f5b8060ff168260010160ff161015612ba3576000600260ff848401160490508460008260ff1660808110612b8a57fe5b015410612b9957809250612b9d565b8091505b50612b5b565b8360008260ff1660808110612bb457fe5b015410612bc45791506127009050565b8360008360ff1660808110612bd557fe5b01541061011657509050612700565b60008083905060008360ff16858302901c9150816f03442c4e6074a82f1797f72ac000000002810190508360ff16858302901c9150816f0116b96f757c380fb287fd0e4000000002810190508360ff16858302901c9150816e45ae5bdd5f0e03eca1ff439000000002810190508360ff16858302901c9150816e0defabf91302cd95b9ffda5000000002810190508360ff16858302901c9150816e02529ca9832b22439efff9b800000002810190508360ff16858302901c9150816d54f1cf12bd04e516b6da8800000002810190508360ff16858302901c9150816d0a9e39e257a09ca2d6db5100000002810190508360ff16858302901c9150816d012e066e7b839fa050c30900000002810190508360ff16858302901c9150816c1e33d7d926c329a1ad1a80000002810190508360ff16858302901c9150816c02bee513bdb4a6b19b5f80000002810190508360ff16858302901c9150816b3a9316fa79b88eccf2a0000002810190508360ff16858302901c9150816b048177ebe1fa81237520000002810190508360ff16858302901c9150816a5263fe90242dcbacf0000002810190508360ff16858302901c9150816a057e22099c030d9410000002810190508360ff16858302901c9150816957e22099c030d941000002810190508360ff16858302901c91508169052b6b5456997631000002810190508360ff16858302901c915081684985f67696bf74800002810190508360ff16858302901c9150816803dea12ea99e49800002810190508360ff16858302901c9150816731880f2214b6e00002810190508360ff16858302901c91508167025bcff56eb3600002810190508360ff16858302901c915081661b722e10ab100002810190508360ff16858302901c9150816601317c7007700002810190508360ff16858302901c915081650cba84aafa0002810190508360ff16858302901c9150816482573a0a0002810190508360ff16858302901c9150816405035ad90002810190508360ff16858302901c915081632f881b0002810190508360ff16858302901c9150816301b2934002810190508360ff16858302901c915081620efc4002810190508360ff16858302901c915081617fe002810190508360ff16858302901c91508161042002810190508360ff16858302901c915081602102810190508360ff16858302901c915081600102810190508360ff166001901b856f0688589cc0e9505e2f2fee55800000008381612f7257fe5b04010195945050505050565b600080600160801b8411158015612f995750600160801b8311155b15612fa857508290508161113d565b600160801b841015612fd25782600160801b850281612fc357fe5b04600160801b9150915061113d565b600160801b831015612ffc57600160801b84600160801b850281612ff257fe5b049150915061113d565b600083851161300b578361300d565b845b9050600061301f6001607f1b8361271f565b60ff1695861c969490951c9450505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161305a57613053826131c5565b9050612700565b81600160fe1b8161306757fe5b0492915050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c8682116130905761305382613607565b7001af16ac6c59de6f8d5d6f63c1482a7c8082116130b15761305382613a67565b706b22d43e72c326539cceeef8bb48f255ff82116101165761305382613ae7565b6000807d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea98411156131395760017d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9eaa85040180858161312857fe5b04945080848161313457fe5b049350505b6000613153620f4240860261314e8787610f28565b613b70565b95620f424087900395509350505050565b60008061010083101561318c575b600183111561318757600192831c9201613172565b610f22565b60805b60ff8116156131be57600160ff82161b84106131b35760ff81169390931c92908117905b60011c607f1661318f565b5092915050565b600081816001607f1b82800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be48000000008202016001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a000000008202016001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b41124184000000000008202016001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf2000000008202016001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f87000000000008202016001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba9564000000008202016001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b8202016001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f82000000008202016001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b00000000000008202016001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c000000008202016001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b8202016001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d4000000008202016001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b8202016001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a08000000008202016001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b8202016001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e2422000000008202016001607f1b846fde1bc4d19efcac82445da75b0000000083040101949350505050565b6000816001607f1b8181036fde1bc4d19efcac82445da75b00000000029082800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be4800000000820290036001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a00000000820290036001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b4112418400000000000820290036001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf200000000820290036001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f8700000000000820290036001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba956400000000820290036001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b820290036001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f8200000000820290036001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b0000000000000820290036001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c00000000820290036001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b820290036001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d400000000820290036001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b820290036001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a0800000000820290036001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b820290036001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e242200000000820290036fde1bc4d19efcac82445da75b00000000815b04949350505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c861982016f03060c183060c183060c183060c183068082049081810290600183010284608084818110613aa857fe5b01549050600060808560010160808110613abe57fe5b01546f03060c183060c183060c183060c183069487030295909203029390930104949350505050565b60008070015bf0a8b1457695355fb8ac404e7a79e38310613b1057613b0b83612705565b613b19565b613b1983612321565b9050600070015bf0a8b1457695355fb8ac404e7a79e38210613b4357613b3e82612705565b613b4c565b613b4c82612321565b9050836001607f1b836001607f1b840281613b6357fe5b04838503010281613a5e57fe5b6000600282048203828481613b8157fe5b0681613b8957fe5b04828481613b9357fe5b0401939250505056fe4552525f494e56414c49445f524553455256455f42414c414e43450000000000a2646970667358221220d73468a9ed248ca029851e62b5a45ea7dacb44f19454ff40af5f79d9b61ce1f764736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c80638074590a116100a2578063abfd231d11610071578063abfd231d146101cc578063e1c7392a14610378578063ebbb215814610382578063f3250fe2146103b7578063f732f1c91461020157610116565b80638074590a146102a857806394491fab146102dd5780639d11410814610236578063a11aa1b41461031a57610116565b806348d73fed116100e957806348d73fed1461016257806349f9b0f71461020157806365098bb31461023657806376cf0b561461027357806379c1b4501461023657610116565b80631da6bbfb1461011b57806329a00e7c146101625780632f55bdb51461019757806335b49af4146101cc575b600080fd5b6101506004803603608081101561013157600080fd5b5080359060208101359063ffffffff60408201351690606001356103ec565b60408051918252519081900360200190f35b6101506004803603608081101561017857600080fd5b5080359060208101359063ffffffff6040820135169060600135610405565b610150600480360360808110156101ad57600080fd5b5080359060208101359063ffffffff6040820135169060600135610413565b610150600480360360808110156101e257600080fd5b5080359060208101359063ffffffff604082013516906060013561058b565b6101506004803603608081101561021757600080fd5b5080359060208101359063ffffffff6040820135169060600135610599565b610150600480360360a081101561024c57600080fd5b5080359063ffffffff602082013581169160408101359160608201351690608001356105a7565b6101506004803603608081101561028957600080fd5b5080359060208101359063ffffffff60408201351690606001356105c2565b610150600480360360808110156102be57600080fd5b5080359060208101359063ffffffff6040820135169060600135610788565b610150600480360360a08110156102f357600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610904565b61034f600480360360a081101561033057600080fd5b5080359060208101359060408101359060608101359060800135610a70565b604051808363ffffffff1681526020018263ffffffff1681526020019250505060405180910390f35b610380610bf8565b005b6101506004803603608081101561039857600080fd5b5080359060208101359063ffffffff6040820135169060600135610c0a565b610150600480360360808110156103cd57600080fd5b5080359060208101359063ffffffff6040820135169060600135610d8f565b60006103fa85858585610c0a565b90505b949350505050565b60006103fa85858585610d8f565b600080851161045e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116104a1576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff161180156104c05750621e848063ffffffff841611155b61050d576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b8161051a575060006103fd565b63ffffffff8316620f4240141561054557836105368387610ec1565b8161053d57fe5b0490506103fd565b600080806105538786610f28565b9050610564818888620f4240610f71565b9093509150600060ff83166105798a86610ec1565b901c9890980398975050505050505050565b60006103fa85858585610788565b60006103fa858585856105c2565b60006105b68686868686610904565b90505b95945050505050565b600080851161060d576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610650576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008363ffffffff1611801561066f5750620f424063ffffffff841611155b6106bd576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b84821115610707576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b81610714575060006103fd565b848214156107235750826103fd565b63ffffffff8316620f4240141561073f57846105368584610ec1565b6000808387036107548882620f424089610f71565b909350915060006107658885610ec1565b905060ff831688901b848183038161077957fe5b049a9950505050505050505050565b60008085116107d3576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610816576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff161180156108355750621e848063ffffffff841611155b610882576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b848211156108cc576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b816108d9575060006103fd565b848214156108e85750826103fd565b63ffffffff8316620f4240141561073f57846105368386610ec1565b600080861180156109155750600084115b610954576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008563ffffffff161180156109735750620f424063ffffffff861611155b8015610985575060008363ffffffff16115b801561099a5750620f424063ffffffff841611155b6109e8576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8263ffffffff168563ffffffff161415610a1f57610a068683610f28565b610a108584610ec1565b81610a1757fe5b0490506105b9565b60008080610a2d8986610f28565b9050610a3b818a8a89610f71565b90935091506000610a4c8885610ec1565b905060ff831688901b8481830381610a6057fe5b049b9a5050505050505050505050565b60008085871415610ace576000871180610a8a5750600085115b610ac9576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b610b29565b600087118015610ade5750600086115b8015610aea5750600085115b610b29576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b600084118015610b395750600083115b610b8a576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f524553455256455f524154450000000000000000604482015290519081900360640190fd5b6000610b968886610ec1565b90506000610ba48786610ec1565b905087891015610bc757610bbc888a84846001611043565b935093505050610bee565b87891115610bdd57610bbc898984846000611043565b610be7828261110c565b9350935050505b9550959350505050565b610c00611144565b610c0861191a565b565b6000808511610c55576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610c98576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610cb75750621e848063ffffffff841611155b610d04576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b81610d11575060006103fd565b63ffffffff8316620f42401415610d4257846001610d2f8487610ec1565b0381610d3757fe5b0460010190506103fd565b60008080610d508886610f28565b9050610d618189620f424089610f71565b9093509150600060ff83166001610d788a87610ec1565b03901c889003600101945050505050949350505050565b6000808511610dda576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610e1d576040805162461bcd60e51b815260206004820152601b6024820152600080516020613b9d833981519152604482015290519081900360640190fd5b60008363ffffffff16118015610e3c5750620f424063ffffffff841611155b610e8a576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b81610e97575060006103fd565b63ffffffff8316620f42401415610eb357836105368684610ec1565b600080806105538588610f28565b600082610ed057506000610f22565b82820282848281610edd57fe5b0414610f1f576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b600082820183811015610f1f576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080600160811b8610610f8457600080fd5b600080866001607f1b890281610f9657fe5b04905070015bf0a8b1457695355fb8ac404e7a79e3811015610fc257610fbb81612321565b9150610fce565b610fcb81612705565b91505b60008563ffffffff168763ffffffff16840281610fe757fe5b049050600160831b81101561100d57610fff816127b0565b607f9450945050505061103a565b600061101882612b54565b905061102d81607f0360ff1683901c82612be4565b9550935061103a92505050565b94509492505050565b6000806110508585612f7e565b9095509350600086611066896001607f1b610ec1565b8161106d57fe5b049050600070015bf0a8b1457695355fb8ac404e7a79e382106110985761109382612705565b6110a1565b6110a182612321565b90506000866110b0838a610ec1565b816110b757fe5b0490506000866110cf576110ca82613031565b6110d8565b6110d88261306e565b90506110fa6110e7828b610ec1565b6110f58a6001607f1b610ec1565b61110c565b95509550505050509550959350505050565b6000808284116111295761112084846130d2565b9150915061113d565b60008061113685876130d2565b9450925050505b9250929050565b701c35fedd14ffffffffffffffffffffffff602055701b0ce43b323fffffffffffffffffffffff6021557019f0028ec1ffffffffffffffffffffffff6022557018ded91f0e7fffffffffffffffffffffff6023557017d8ec7f0417ffffffffffffffffffffff6024557016ddc6556cdbffffffffffffffffffffff6025557015ecf52776a1ffffffffffffffffffffff6026557015060c256cb2ffffffffffffffffffffff602755701428a2f98d72ffffffffffffffffffffff6028557013545598e5c23fffffffffffffffffffff602955701288c4161ce1dfffffffffffffffffffff602a557011c592761c666fffffffffffffffffffff602b5570110a688680a757ffffffffffffffffffff602c55701056f1b5bedf77ffffffffffffffffffff602d55700faadceceeff8bffffffffffffffffffff602e55700f05dc6b27edadffffffffffffffffffff602f55700e67a5a25da4107fffffffffffffffffff603055700dcff115b14eedffffffffffffffffffff603155700d3e7a392431239fffffffffffffffffff603255700cb2ff529eb71e4fffffffffffffffffff603355700c2d415c3db974afffffffffffffffffff603455700bad03e7d883f69bffffffffffffffffff603555700b320d03b2c343d5ffffffffffffffffff603655700abc25204e02828dffffffffffffffffff603755700a4b16f74ee4bb207fffffffffffffffff6038557009deaf736ac1f569ffffffffffffffffff603955700976bd9952c7aa957fffffffffffffffff603a557009131271922eaa606fffffffffffffffff603b557008b380f3558668c46fffffffffffffffff603c55700857ddf0117efa215bffffffffffffffff603d557007ffffffffffffffffffffffffffffffff603e557007abbf6f6abb9d087fffffffffffffffff603f5570075af62cbac95f7dfa7fffffffffffffff60405570070d7fb7452e187ac13fffffffffffffff6041557006c3390ecc8af379295fffffffffffffff60425570067c00a3b07ffc01fd6fffffffffffffff604355700637b647c39cbb9d3d27ffffffffffffff6044557005f63b1fc104dbd39587ffffffffffffff6045557005b771955b36e12f7235ffffffffffffff60465570057b3d49dda84556d6f6ffffffffffffff60475570054183095b2c8ececf30ffffffffffffff60485570050a28be635ca2b888f77fffffffffffff6049557004d5156639708c9db33c3fffffffffffff604a557004a23105873875bd52dfdfffffffffffff604b55700471649d87199aa990756fffffffffffff604c557004429a21a029d4c1457cfbffffffffffff604d55700415bc6d6fb7dd71af2cb3ffffffffffff604e557003eab73b3bbfe282243ce1ffffffffffff604f557003c1771ac9fb6b4c18e229ffffffffffff605055700399e96897690418f785257fffffffffff605155700373fc456c53bb779bf0ea9fffffffffff60525570034f9e8e490c48e67e6ab8bfffffffffff60535570032cbfd4a7adc790560b3337ffffffffff60545570030b50570f6e5d2acca94613ffffffffff6055557002eb40f9f620fda6b56c2861ffffffffff6056557002cc8340ecb0d0f520a6af58ffffffffff6057557002af09481380a0a35cf1ba02ffffffffff605855700292c5bdd3b92ec810287b1b3fffffffff605955700277abdcdab07d5a77ac6d6b9fffffffff605a5570025daf6654b1eaa55fd64df5efffffffff605b55700244c49c648baa98192dce88b7ffffffff605c5570022ce03cd5619a311b2471268bffffffff605d55700215f77c045fbe885654a44a0fffffffff605e557001ffffffffffffffffffffffffffffffff605f557001eaefdbdaaee7421fc4d3ede5ffffffff6060557001d6bd8b2eb257df7e8ca57b09bfffffff6061557001c35fedd14b861eb0443f7f133fffffff6062557001b0ce43b322bcde4a56e8ada5afffffff60635570019f0028ec1fff007f5a195a39dfffffff60645570018ded91f0e72ee74f49b15ba527ffffff60655570017d8ec7f04136f4e5615fd41a63ffffff60665570016ddc6556cdb84bdc8d12d22e6fffffff60675570015ecf52776a1155b5bd8395814f7fffff60685570015060c256cb23b3b3cc3754cf40ffffff6069557001428a2f98d728ae223ddab715be3fffff606a5570013545598e5c23276ccf0ede68034fffff606b557001288c4161ce1d6f54b7f61081194fffff606c5570011c592761c666aa641d5a01a40f17ffff606d55700110a688680a7530515f3e6e6cfdcdffff606e557001056f1b5bedf75c6bcb2ce8aed428ffff606f556ffaadceceeff8a0890f3875f008277fff6070556ff05dc6b27edad306388a600f6ba0bfff6071556fe67a5a25da41063de1495d5b18cdbfff6072556fdcff115b14eedde6fc3aa5353f2e4fff6073556fd3e7a3924312399f9aae2e0f868f8fff6074556fcb2ff529eb71e41582cccd5a1ee26fff6075556fc2d415c3db974ab32a51840c0b67edff6076556fbad03e7d883f69ad5b0a186184e06bff6077556fb320d03b2c343d4829abd6075f0cc5ff6078556fabc25204e02828d73c6e80bcdb1a95bf6079556fa4b16f74ee4bb2040a1ec6c15fbbf2df607a556f9deaf736ac1f569deb1b5ae3f36c130f607b556f976bd9952c7aa957f5937d790ef65037607c556f9131271922eaa6064b73a22d0bd4f2bf607d556f8b380f3558668c46c91c49a2f8e967b9607e556f857ddf0117efa215952912839f6473e66000607f5b0155565b6f60e393c68d20b1bd09deaabc0373b9c560809081556f5f8f46e4854120989ed94719fb4c20116081556f5e479ebb9129fb1b7e72a648f992b6066082556f5d0bd23fe42dfedde2e9586be12b85fe6083556f5bdb29ddee979308ddfca81aeeb8095a6084556f5ab4fd8a260d2c7e2c0d2afcf0009dad6085556f5998b31359a55d48724c65cf090012216086556f5885bcad2b322dfc43e8860f9c018cf56087556f577b97aa1fe222bb452fdf111b1f0be26088556f5679cb5e3575632e5baa27e2b949f7046089556f557fe8241b3a31c83c732f1cdff4a1c5608a556f548d868026504875d6e59bbe95fc2a6b608b556f53a2465ce347cf34d05a867c17dd3088608c556f52bdce5dcd4faed59c7f5511cf8f8acc608d556f51dfcb453c07f8da817606e7885f7c3e608e556f5107ef6b0a5a2be8f8ff15590daa3cce608f556f5035f241d6eae0cd7bacba119993de7b6090556f4f698fe90d5b53d532171e1210164c666091556f4ea288ca297a0e6a09a0eee240e16c856092556f4de0a13fdcf5d4213fc398ba6e3becde6093556f4d23a145eef91fec06b06140804c48086094556f4c6b5430d4c1ee5526473db4ae0f11de6095556f4bb7886c240562eba11f4963a53b42406096556f4b080f3f1cb491d2d521e0ea4583521e6097556f4a5cbc96a05589cb4d86be1db31683646098556f49b566d40243517658d78c33162d6ece6099556f4911e6a02e5507a30f947383fd9a3276609a556f487216c2b31be4adc41db8a8d5cc0c88609b556f47d5d3fc4a7a1b188cd3d788b5c5e9fc609c556f473cfce4871a2c40bc4f9e1c32b955d0609d556f46a771ca578ab878485810e285e31c67609e556f4615149718aed4c258c373dc676aa72d609f556f4585c8b3f8fe489c6e1833ca4787138460a0556f44f972f174e41e5efb7e9d63c29ce73560a1556f446ff970ba86d8b00beb05ecebf3c4dc60a2556f43e9438ec88971812d6f198b5ccaad9660a3556f436539d11ff7bea657aeddb394e809ef60a4556f42e3c5d3e5a913401d86f66db5d81c2c60a5556f4264d2395303070ea726cbe98df6217460a6556f41e84a9a593bb7194c3a6349ecae4eea60a7556f416e1b785d13eba07a08f3f18876a5ab60a8556f40f6322ff389d423ba9dd7e7e7b7e80960a9556f40807cec8a466880ecf4184545d240a460aa556f400cea9ce88a8d3ae668e8ea0d9bf07f60ab556f3f9b6ae8772d4c55091e0ed7dfea0ac160ac556f3f2bee253fd84594f54bcaafac383a1360ad556f3ebe654e95208bb9210c575c081c595860ae556f3e52c1fc5665635b78ce1f05ad53c08660af556f3de8f65ac388101ddf718a6f5c1eff6560b0556f3d80f522d59bd0b328ca012df4cd2d4960b1556f3d1ab193129ea72b23648a161163a85a60b2556f3cb61f68d32576c135b95cfb53f76d7560b3556f3c5332d9f1aae851a3619e77e4cc847360b4556f3bf1e08edbe2aa109e1525f65759ef7360b5556f3b921d9cff13fa2c197746a3dfc4918f60b6556f3b33df818910bfc1a5aefb8f63ae2ac460b7556f3ad71c1c77e34fa32a9f184967eccbf660b8556f3a7bc9abf2c5bb53e2f7384a8a16521a60b9556f3a21dec7e76369783a68a0c6385a1c5760ba556f39c9525de6c9cdf7c1c157ca4a7a6ee360bb556f39721bad3dc85d1240ff0190e0adaac360bc556f391c324344d3248f0469eb28dd3d77e060bd556f38c78df7e3c796279fb4ff84394ab3da60be556f387426ea4638ae9aae08049d3554c20a60bf556f3821f57dbd2763256c1a99bbd205137860c0556f37d0f256cb46a8c92ff62fbbef28969860c1556f37811658591ffc7abdd1feaf3cef9b7360c2556f37325aa10e9e82f7df0f380f7997154b60c3556f36e4b888cfb408d873b9a80d439311c660c4556f3698299e59f4bb9de645fc9b08c64cca60c5556f364ca7a5012cb603023b57dd3ebfd50d60c6556f36022c928915b778ab1b06aaee7e61d460c7556f35b8b28d1a73dc27500ffe35559cc02860c8556f357033e951fe250ec5eb4e60955132d760c9556f3528ab2867934e3a21b5412e4c4f888160ca556f34e212f66c55057f9676c80094a61d5960cb556f349c66289e5b3c4b540c24f42fa4b9bb60cc556f34579fbbd0c733a9c8d6af6b0f7d00f760cd556f3413bad2e712288b924b5882b5b369bf60ce556f33d0b2b56286510ef730e213f71f12e960cf556f338e82ce00e2496262c64457535ba1a160d0556f334d26a96b373bb7c2f8ea1827f27a9260d1556f330c99f4f4211469e00b3e18c31475ea60d2556f32ccd87d6486094999c7d5e6f33237d860d3556f328dde2dd617b6665a2e8556f250c1af60d4556f324fa70e9adc270f8262755af5a99af960d5556f32122f443110611ca51040f41fa6e1e360d6556f31d5730e42c0831482f0f1485c4263d860d7556f31996ec6b07b4a83421b5ebc4ab4e1f160d8556f315e1ee0a68ff46bb43ec2b85032e87660d9556f31237fe7bc4deacf6775b9efa1a145f860da556f30e98e7f1cc5a356e44627a6972ea2ff60db556f30b04760b8917ec74205a3002650ec0560dc556f3077a75c803468e9132ce0cf3224241d60dd556f303fab57a6a275c36f19cda9bace667a60de556f3008504beb8dcbd2cf3bc1f6d5a064f060df556f2fd19346ed17dac61219ce0c2c5ac4b060e0556f2f9b7169808c324b5852fd3d54ba971460e1556f2f65e7e711cf4b064eea9c08cbdad57460e2556f2f30f405093042ddff8a251b6bf6d10360e3556f2efc931a3750f2e8bfe323edfe03757460e4556f2ec8c28e46dbe56d98685278339400cb60e5556f2e957fd933c3926d8a599b602379b85160e6556f2e62c882c7c9ed4473412702f08ba0e560e7556f2e309a221c12ba361e3ed695167feee260e8556f2dfef25d1f865ae18dd07cfea4bcea1060e9556f2dcdcee821cdc80decc02c44344aeb3160ea556f2d9d2d8562b34944d0b201bb87260c8360eb556f2d6d0c04a5b62a2c42636308669b729a60ec556f2d3d6842c9a235517fc5a0332691528f60ed556f2d0e402963fe1ea2834abc408c437c1060ee556f2cdf91ae602647908aff975e4d6a2a8c60ef556f2cb15ad3a1eb65f6d74a75da09a1b6c560f0556f2c8399a6ab8e9774d6fcff373d21072760f1556f2c564c4046f64edba6883ca06bbc453560f2556f2c2970c431f952641e05cb493e23eed360f3556f2bfd0560cd9eb14563bc7c0732856c1860f4556f2bd1084ed0332f7ff4150f9d0ef41a2c60f5556f2ba577d0fa1628b76d040b12a82492fb60f6556f2b7a5233cd21581e855e89dc2f1e8a9260f7556f2b4f95cd46904d05d72bdcde337d9cc760f8556f2b2540fc9b4d9abba3faca669191467560f9556f2afb5229f68d0830d8be8adb0a0db70f60fa556f2ad1c7c63a9b294c5bc73a3ba3ab7a2b60fb556f2aa8a04ac3cbe1ee1c9c86361465dbb860fc556f2a7fda392d725a44a2c8aeb9ab35430d60fd556f2a57741b18cde618717792b4faa216db60fe556f2a2f6c81f5d84dd950a35626d6d5503a90607f611916565b6000808080806fd3094c70f034de4b96ff7d5b6f99fcd8861061236a576001607e1b840193506fd3094c70f034de4b96ff7d5b6f99fcd86001607f1b87028161236657fe5b0495505b6fa45af1e1f40c333b3de1db4dd55f29a786106123ad576001607d1b840193506fa45af1e1f40c333b3de1db4dd55f29a76001607f1b8702816123a957fe5b0495505b6f910b022db7ae67ce76b441c27035c6a186106123f0576001607c1b840193506f910b022db7ae67ce76b441c27035c6a16001607f1b8702816123ec57fe5b0495505b6f88415abbe9a76bead8d00cf112e4d4a88610612433576001607b1b840193506f88415abbe9a76bead8d00cf112e4d4a86001607f1b87028161242f57fe5b0495505b6f84102b00893f64c705e841d5d4064bd38610612476576001607a1b840193506f84102b00893f64c705e841d5d4064bd36001607f1b87028161247257fe5b0495505b6f8204055aaef1c8bd5c3259f4822735a286106124b957600160791b840193506f8204055aaef1c8bd5c3259f4822735a26001607f1b8702816124b557fe5b0495505b6f810100ab00222d861931c15e39b44e9986106124fc57600160781b840193506f810100ab00222d861931c15e39b44e996001607f1b8702816124f857fe5b0495505b6f808040155aabbbe9451521693554f733861061253f57600160771b840193506f808040155aabbbe9451521693554f7336001607f1b87028161253b57fe5b0495505b6f7fffffffffffffffffffffffffffffff19860192508291506001607f1b828002049050600160801b838103830204840193506001607f1b8183028161258157fe5b049150600160811b836faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa038302816125a557fe5b04840193506001607f1b818302816125b957fe5b049150600360801b836f99999999999999999999999999999999038302816125dd57fe5b04840193506001607f1b818302816125f157fe5b049150600160821b836f924924924924924924924924924924920383028161261557fe5b04840193506001607f1b8183028161262957fe5b049150600560801b836f8e38e38e38e38e38e38e38e38e38e38e0383028161264d57fe5b04840193506001607f1b8183028161266157fe5b049150600360811b836f8ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b0383028161268557fe5b04840193506001607f1b8183028161269957fe5b049150600760801b836f89d89d89d89d89d89d89d89d89d89d89038302816126bd57fe5b04840193506001607f1b818302816126d157fe5b049150600160831b836f88888888888888888888888888888888038302816126f557fe5b049390930193505050505b919050565b600080600160801b83106127365760006127256001607f1b855b04613164565b60ff1693841c936001607f1b029150505b6001607f1b83111561278457607f5b60ff811615612782576001607f1b848002049350600160801b841061277957600193841c9360ff6000198301161b91909101905b60001901612745565b505b6f05b9de1d10bf4103d647b0955897ba806f03f80fe03f80fe03f80fe03f80fe03f88202049392505050565b6000670168244fdac780006001607f1b6f0fffffffffffffffffffffffffffffff84168080028290048082028390048083028490049485026710e1b3be415a00009092026705a0913f6b1e000091909102010192909181830204905080664807432bc1800002830192506001607f1b8282028161282957fe5b04905080660c0135dca0400002830192506001607f1b8282028161284957fe5b049050806601b707b1cdc00002830192506001607f1b8282028161286957fe5b049050806536e0f639b80002830192506001607f1b8282028161288857fe5b04905080650618fee9f80002830192506001607f1b828202816128a757fe5b04905080649c197dcc0002830192506001607f1b828202816128c557fe5b04905080640e30dce40002830192506001607f1b828202816128e357fe5b0490508064012ebd130002830192506001607f1b8282028161290157fe5b049050806317499f0002830192506001607f1b8282028161291e57fe5b049050806301a9d48002830192506001607f1b8282028161293b57fe5b04905080621c638002830192506001607f1b8282028161295757fe5b049050806201c63802830192506001607f1b8282028161297357fe5b04905080611ab802830192506001607f1b8282028161298e57fe5b0490508061017c02830192506001607f1b828202816129a957fe5b04905080601402830192506001607f1b828202816129c357fe5b6721c3677c82b400009190049384010482016001607f1b019290506001607c1b851615612a145770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f984020492505b6001607d1b851615612a4a577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77884020492505b6001607e1b851615612a7f576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed584020492505b6001607f1b851615612ab3576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e84020492505b600160801b851615612ae7576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c584020492505b600160811b851615612b1a576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d784020492505b600160821b851615612b4b576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30784020492505b50909392505050565b60006020607f5b8060ff168260010160ff161015612ba3576000600260ff848401160490508460008260ff1660808110612b8a57fe5b015410612b9957809250612b9d565b8091505b50612b5b565b8360008260ff1660808110612bb457fe5b015410612bc45791506127009050565b8360008360ff1660808110612bd557fe5b01541061011657509050612700565b60008083905060008360ff16858302901c9150816f03442c4e6074a82f1797f72ac000000002810190508360ff16858302901c9150816f0116b96f757c380fb287fd0e4000000002810190508360ff16858302901c9150816e45ae5bdd5f0e03eca1ff439000000002810190508360ff16858302901c9150816e0defabf91302cd95b9ffda5000000002810190508360ff16858302901c9150816e02529ca9832b22439efff9b800000002810190508360ff16858302901c9150816d54f1cf12bd04e516b6da8800000002810190508360ff16858302901c9150816d0a9e39e257a09ca2d6db5100000002810190508360ff16858302901c9150816d012e066e7b839fa050c30900000002810190508360ff16858302901c9150816c1e33d7d926c329a1ad1a80000002810190508360ff16858302901c9150816c02bee513bdb4a6b19b5f80000002810190508360ff16858302901c9150816b3a9316fa79b88eccf2a0000002810190508360ff16858302901c9150816b048177ebe1fa81237520000002810190508360ff16858302901c9150816a5263fe90242dcbacf0000002810190508360ff16858302901c9150816a057e22099c030d9410000002810190508360ff16858302901c9150816957e22099c030d941000002810190508360ff16858302901c91508169052b6b5456997631000002810190508360ff16858302901c915081684985f67696bf74800002810190508360ff16858302901c9150816803dea12ea99e49800002810190508360ff16858302901c9150816731880f2214b6e00002810190508360ff16858302901c91508167025bcff56eb3600002810190508360ff16858302901c915081661b722e10ab100002810190508360ff16858302901c9150816601317c7007700002810190508360ff16858302901c915081650cba84aafa0002810190508360ff16858302901c9150816482573a0a0002810190508360ff16858302901c9150816405035ad90002810190508360ff16858302901c915081632f881b0002810190508360ff16858302901c9150816301b2934002810190508360ff16858302901c915081620efc4002810190508360ff16858302901c915081617fe002810190508360ff16858302901c91508161042002810190508360ff16858302901c915081602102810190508360ff16858302901c915081600102810190508360ff166001901b856f0688589cc0e9505e2f2fee55800000008381612f7257fe5b04010195945050505050565b600080600160801b8411158015612f995750600160801b8311155b15612fa857508290508161113d565b600160801b841015612fd25782600160801b850281612fc357fe5b04600160801b9150915061113d565b600160801b831015612ffc57600160801b84600160801b850281612ff257fe5b049150915061113d565b600083851161300b578361300d565b845b9050600061301f6001607f1b8361271f565b60ff1695861c969490951c9450505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161305a57613053826131c5565b9050612700565b81600160fe1b8161306757fe5b0492915050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c8682116130905761305382613607565b7001af16ac6c59de6f8d5d6f63c1482a7c8082116130b15761305382613a67565b706b22d43e72c326539cceeef8bb48f255ff82116101165761305382613ae7565b6000807d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea98411156131395760017d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9eaa85040180858161312857fe5b04945080848161313457fe5b049350505b6000613153620f4240860261314e8787610f28565b613b70565b95620f424087900395509350505050565b60008061010083101561318c575b600183111561318757600192831c9201613172565b610f22565b60805b60ff8116156131be57600160ff82161b84106131b35760ff81169390931c92908117905b60011c607f1661318f565b5092915050565b600081816001607f1b82800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be48000000008202016001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a000000008202016001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b41124184000000000008202016001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf2000000008202016001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f87000000000008202016001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba9564000000008202016001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b8202016001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f82000000008202016001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b00000000000008202016001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c000000008202016001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b8202016001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d4000000008202016001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b8202016001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a08000000008202016001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b8202016001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e2422000000008202016001607f1b846fde1bc4d19efcac82445da75b0000000083040101949350505050565b6000816001607f1b8181036fde1bc4d19efcac82445da75b00000000029082800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be4800000000820290036001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a00000000820290036001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b4112418400000000000820290036001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf200000000820290036001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f8700000000000820290036001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba956400000000820290036001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b820290036001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f8200000000820290036001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b0000000000000820290036001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c00000000820290036001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b820290036001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d400000000820290036001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b820290036001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a0800000000820290036001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b820290036001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e242200000000820290036fde1bc4d19efcac82445da75b00000000815b04949350505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c861982016f03060c183060c183060c183060c183068082049081810290600183010284608084818110613aa857fe5b01549050600060808560010160808110613abe57fe5b01546f03060c183060c183060c183060c183069487030295909203029390930104949350505050565b60008070015bf0a8b1457695355fb8ac404e7a79e38310613b1057613b0b83612705565b613b19565b613b1983612321565b9050600070015bf0a8b1457695355fb8ac404e7a79e38210613b4357613b3e82612705565b613b4c565b613b4c82612321565b9050836001607f1b836001607f1b840281613b6357fe5b04838503010281613a5e57fe5b6000600282048203828481613b8157fe5b0681613b8957fe5b04828481613b9357fe5b0401939250505056fe4552525f494e56414c49445f524553455256455f42414c414e43450000000000a2646970667358221220d73468a9ed248ca029851e62b5a45ea7dacb44f19454ff40af5f79d9b61ce1f764736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "157:69425:7:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "157:69425:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66935:355;;;;;;;;;;;;;;;;-1:-1:-1;66935:355:7;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;64717:399;;;;;;;;;;;;;;;;-1:-1:-1;64717:399:7;;;;;;;;;;;;;;;;;;;:::i;27312:1068::-;;;;;;;;;;;;;;;;-1:-1:-1;27312:1068:7;;;;;;;;;;;;;;;;;;;:::i;69230:349::-;;;;;;;;;;;;;;;;-1:-1:-1;69230:349:7;;;;;;;;;;;;;;;;;;;:::i;65190:375::-;;;;;;;;;;;;;;;;-1:-1:-1;65190:375:7;;;;;;;;;;;;;;;;;;;:::i;66281:580::-;;;;;;;;;;;;;;;;-1:-1:-1;66281:580:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;21415:1297::-;;;;;;;;;;;;;;;;-1:-1:-1;21415:1297:7;;;;;;;;;;;;;;;;;;;:::i;29062:1331::-;;;;;;;;;;;;;;;;-1:-1:-1;29062:1331:7;;;;;;;;;;;;;;;;;;;:::i;23568:::-;;;;;;;;;;;;;;;;-1:-1:-1;23568:1331:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;32724:1425::-;;;;;;;;;;;;;;;;-1:-1:-1;32724:1425:7;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18929:88;;;:::i;:::-;;25578:1050;;;;;;;;;;;;;;;;-1:-1:-1;25578:1050:7;;;;;;;;;;;;;;;;;;;:::i;19672:1091::-;;;;;;;;;;;;;;;;-1:-1:-1;19672:1091:7;;;;;;;;;;;;;;;;;;;:::i;66935:355::-;67192:7;67224:58;67233:7;67242:15;67259:13;67274:7;67224:8;:58::i;:::-;67217:65;;66935:355;;;;;;;:::o;64717:399::-;65005:7;65037:71;65058:7;65067:15;65084:14;65100:7;65037:20;:71::i;27312:1068::-;27573:7;27643:1;27633:7;:11;27625:42;;;;;-1:-1:-1;;;27625:42:7;;;;;;;;;;;;-1:-1:-1;;;27625:42:7;;;;;;;;;;;;;;;27704:1;27686:15;:19;27678:59;;;;;-1:-1:-1;;;27678:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;27678:59:7;;;;;;;;;;;;;;;27772:1;27756:13;:17;;;:52;;;;-1:-1:-1;27794:14:7;27777:31;;;;;27756:52;27748:90;;;;;-1:-1:-1;;;27748:90:7;;;;;;;;;;;;-1:-1:-1;;;27748:90:7;;;;;;;;;;;;;;;27893:12;27889:39;;-1:-1:-1;27927:1:7;27920:8;;27889:39;27998:27;;;316:7;27998:27;27994:91;;;28070:15;28047:20;:7;28059;28047:11;:20::i;:::-;:38;;;;;;28040:45;;;;27994:91;28098:14;;;28165:28;:15;28185:7;28165:19;:28::i;:::-;28149:44;;28226:56;28232:5;28239:15;28256:13;316:7;28226:5;:56::i;:::-;28204:78;;-1:-1:-1;28204:78:7;-1:-1:-1;28293:12:7;28308:32;;;:19;:7;28204:78;28308:11;:19::i;:::-;:32;;28358:14;;;;;27312:1068;-1:-1:-1;;;;;;;;27312:1068:7:o;69230:349::-;69467:7;69499:72;69522:7;69531:15;69548:13;69563:7;69499:22;:72::i;65190:375::-;65458:7;65490:67;65507:7;65516:15;65533:14;65549:7;65490:16;:67::i;66281:580::-;66698:7;66730:123;66755:21;66778:20;66800:21;66823:20;66845:7;66730:24;:123::i;:::-;66723:130;;66281:580;;;;;;;;:::o;21415:1297::-;21677:7;21747:1;21737:7;:11;21729:42;;;;;-1:-1:-1;;;21729:42:7;;;;;;;;;;;;-1:-1:-1;;;21729:42:7;;;;;;;;;;;;;;;21808:1;21790:15;:19;21782:59;;;;;-1:-1:-1;;;21782:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21782:59:7;;;;;;;;;;;;;;;21877:1;21860:14;:18;;;:50;;;;-1:-1:-1;316:7:7;21882:28;;;;;21860:50;21852:89;;;;;-1:-1:-1;;;21852:89:7;;;;;;;;;;;;-1:-1:-1;;;21852:89:7;;;;;;;;;;;;;;;21971:7;21960;:18;;21952:49;;;;;-1:-1:-1;;;21952:49:7;;;;;;;;;;;;-1:-1:-1;;;21952:49:7;;;;;;;;;;;;;;;22061:12;22057:39;;-1:-1:-1;22095:1:7;22088:8;;22057:39;22179:7;22168;:18;22164:59;;;-1:-1:-1;22208:15:7;22201:22;;22164:59;22286:28;;;316:7;22286:28;22282:92;;;22367:7;22336:28;:15;22356:7;22336:19;:28::i;22282:92::-;22387:14;;22454:17;;;22504:49;22454:7;:17;316:7;22538:14;22504:5;:49::i;:::-;22482:71;;-1:-1:-1;22482:71:7;-1:-1:-1;22564:13:7;22580:27;:15;22482:71;22580:19;:27::i;:::-;22564:43;-1:-1:-1;22634:28:7;;;;;;22698:6;22681:13;;;22698:6;22680:24;;;;;;21415:1297;-1:-1:-1;;;;;;;;;;21415:1297:7:o;29062:1331::-;29353:7;29423:1;29413:7;:11;29405:42;;;;;-1:-1:-1;;;29405:42:7;;;;;;;;;;;;-1:-1:-1;;;29405:42:7;;;;;;;;;;;;;;;29484:1;29466:15;:19;29458:59;;;;;-1:-1:-1;;;29458:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;29458:59:7;;;;;;;;;;;;;;;29552:1;29536:13;:17;;;:52;;;;-1:-1:-1;29574:14:7;29557:31;;;;;29536:52;29528:90;;;;;-1:-1:-1;;;29528:90:7;;;;;;;;;;;;-1:-1:-1;;;29528:90:7;;;;;;;;;;;;;;;29648:7;29637;:18;;29629:49;;;;;-1:-1:-1;;;29629:49:7;;;;;;;;;;;;-1:-1:-1;;;29629:49:7;;;;;;;;;;;;;;;29733:12;29729:39;;-1:-1:-1;29767:1:7;29760:8;;29729:39;29855:7;29844;:18;29840:59;;;-1:-1:-1;29884:15:7;29877:22;;29840:59;29969:27;;;316:7;29969:27;29965:91;;;30049:7;30018:28;:7;30030:15;30018:11;:28::i;23568:1331::-;23964:7;24048:1;24024:21;:25;:54;;;;;24077:1;24053:21;:25;24024:54;24016:94;;;;;-1:-1:-1;;;24016:94:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24016:94:7;;;;;;;;;;;;;;;24152:1;24129:20;:24;;;:62;;;;-1:-1:-1;316:7:7;24157:34;;;;;24129:62;:107;;;;;24235:1;24212:20;:24;;;24129:107;:145;;;;-1:-1:-1;316:7:7;24240:34;;;;;24129:145;24121:184;;;;;-1:-1:-1;;;24121:184:7;;;;;;;;;;;;-1:-1:-1;;;24121:184:7;;;;;;;;;;;;;;;24389:20;24365:44;;:20;:44;;;24361:141;;;24468:34;:21;24494:7;24468:25;:34::i;:::-;24431;:21;24457:7;24431:25;:34::i;:::-;:71;;;;;;24424:78;;;;24361:141;24515:14;;;24582:34;:21;24608:7;24582:25;:34::i;:::-;24566:50;;24649:79;24655:5;24662:21;24685:20;24707;24649:5;:79::i;:::-;24627:101;;-1:-1:-1;24627:101:7;-1:-1:-1;24739:13:7;24755:33;:21;24627:101;24755:25;:33::i;:::-;24739:49;-1:-1:-1;24815:34:7;;;;;;24885:6;24868:13;;;24885:6;24867:24;;;;;;23568:1331;-1:-1:-1;;;;;;;;;;;23568:1331:7:o;32724:1425::-;33097:6;33105;33165:22;33133:28;:54;33129:340;;;33241:1;33210:28;:32;:64;;;;33273:1;33246:24;:28;33210:64;33202:104;;;;;-1:-1:-1;;;33202:104:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;33202:104:7;;;;;;;;;;;;;;;33129:340;;;33374:1;33343:28;:32;:62;;;;;33404:1;33379:22;:26;33343:62;:94;;;;;33436:1;33409:24;:28;33343:94;33335:134;;;;;-1:-1:-1;;;33335:134:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;33335:134:7;;;;;;;;;;;;;;;33512:1;33488:21;:25;:56;;;;;33543:1;33517:23;:27;33488:56;33480:93;;;;;-1:-1:-1;;;33480:93:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;33586:10;33599:55;:28;33632:21;33599:32;:55::i;:::-;33586:68;-1:-1:-1;33665:10:7;33678:53;:24;33707:23;33678:28;:53::i;:::-;33665:66;;33779:22;33748:28;:53;33744:169;;;33823:90;33846:22;33870:28;33900:2;33904;33908:4;33823:22;:90::i;:::-;33816:97;;;;;;;;33744:169;33961:22;33930:28;:53;33926:170;;;34005:91;34028:28;34058:22;34082:2;34086;34090:5;34005:22;:91::i;33926:170::-;34116:25;34134:2;34138;34116:17;:25::i;:::-;34109:32;;;;;;32724:1425;;;;;;;;;:::o;18929:88::-;18963:17;:15;:17::i;:::-;18991:18;:16;:18::i;:::-;18929:88::o;25578:1050::-;25799:7;25869:1;25859:7;:11;25851:42;;;;;-1:-1:-1;;;25851:42:7;;;;;;;;;;;;-1:-1:-1;;;25851:42:7;;;;;;;;;;;;;;;25930:1;25912:15;:19;25904:59;;;;;-1:-1:-1;;;25904:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25904:59:7;;;;;;;;;;;;;;;25998:1;25982:13;:17;;;:52;;;;-1:-1:-1;26020:14:7;26003:31;;;;;25982:52;25974:90;;;;;-1:-1:-1;;;25974:90:7;;;;;;;;;;;;-1:-1:-1;;;25974:90:7;;;;;;;;;;;;;;;26119:12;26115:39;;-1:-1:-1;26153:1:7;26146:8;;26115:39;26224:27;;;316:7;26224:27;26220:101;;;26310:7;26305:1;26274:28;:7;26286:15;26274:11;:28::i;:::-;:32;26273:44;;;;;;26320:1;26273:48;26266:55;;;;26220:101;26334:14;;;26401:20;:7;26413;26401:11;:20::i;:::-;26385:36;;26454:48;26460:5;26467:7;316;26488:13;26454:5;:48::i;:::-;26432:70;;-1:-1:-1;26432:70:7;-1:-1:-1;26513:12:7;26529:46;;;26560:1;26530:27;:15;26432:70;26530:19;:27::i;:::-;:31;26529:46;;26598:22;;;26579:1;26598:22;;-1:-1:-1;;;;;25578:1050:7;;;;;;:::o;19672:1091::-;19954:7;20024:1;20014:7;:11;20006:42;;;;;-1:-1:-1;;;20006:42:7;;;;;;;;;;;;-1:-1:-1;;;20006:42:7;;;;;;;;;;;;;;;20085:1;20067:15;:19;20059:59;;;;;-1:-1:-1;;;20059:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20059:59:7;;;;;;;;;;;;;;;20154:1;20137:14;:18;;;:50;;;;-1:-1:-1;316:7:7;20159:28;;;;;20137:50;20129:89;;;;;-1:-1:-1;;;20129:89:7;;;;;;;;;;;;-1:-1:-1;;;20129:89:7;;;;;;;;;;;;;;;20281:12;20277:39;;-1:-1:-1;20315:1:7;20308:8;;20277:39;20379:28;;;316:7;20379:28;20375:92;;;20452:15;20429:20;:7;20441;20429:11;:20::i;20375:92::-;20480:14;;;20547:28;:7;20559:15;20547:11;:28::i;1149:250:60:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;;1390:1;-1:-1:-1;1149:250:60;;;;;:::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;35739:791:7;35837:7;35846:5;-1:-1:-1;;;35872:6:7;:16;35864:25;;;;;;35902:15;35928:12;35962:6;-1:-1:-1;;;35943:6:7;:16;:25;;;;;;35928:40;;1072:35;35983:4;:22;35979:149;;;36032:16;36043:4;36032:10;:16::i;:::-;36022:26;;35979:149;;;36100:16;36111:4;36100:10;:16::i;:::-;36090:26;;35979:149;36140:23;36184:5;36166:23;;36176:5;36166:15;;:7;:15;:23;;;;;;36140:49;;-1:-1:-1;;;36204:15:7;:33;36200:323;;;36262:27;36273:15;36262:10;:27::i;:::-;417:3;36254:51;;;;;;;;;36200:323;36347:15;36365:42;36391:15;36365:25;:42::i;:::-;36347:60;;36430:69;36477:9;417:3;36461:25;36441:46;;:15;:46;;36489:9;36430:10;:69::i;:::-;36422:89;-1:-1:-1;36501:9:7;-1:-1:-1;36422:89:7;;-1:-1:-1;;;36422:89:7;35739:791;;;;;;;;:::o;62502:484::-;62627:6;62635;62667:21;62679:3;62684;62667:11;:21::i;:::-;62654:34;;-1:-1:-1;62654:34:7;-1:-1:-1;62699:9:7;62730:3;62711:16;:3;-1:-1:-1;;;62711:7:7;:16::i;:::-;:22;;;;;;62699:34;;62744:9;1072:35;62756:1;:19;:51;;62794:13;62805:1;62794:10;:13::i;:::-;62756:51;;;62778:13;62789:1;62778:10;:13::i;:::-;62744:63;-1:-1:-1;62818:9:7;62843:3;62830:10;62744:63;62836:3;62830:5;:10::i;:::-;:16;;;;;;62818:28;;62857:9;62869:11;:44;;62899:14;62911:1;62899:11;:14::i;:::-;62869:44;;;62883:13;62894:1;62883:10;:13::i;:::-;62857:56;-1:-1:-1;62931:47:7;62949:10;62857:56;62955:3;62949:5;:10::i;:::-;62961:16;:3;-1:-1:-1;;;62961:7:7;:16::i;:::-;62931:17;:47::i;:::-;62924:54;;;;;;;;62502:484;;;;;;;;:::o;63627:247::-;63701:6;63709;63738:2;63732;:8;63728:57;;63762:23;63778:2;63782;63762:15;:23::i;:::-;63755:30;;;;;;63728:57;63797:8;63807;63819:23;63835:2;63839;63819:15;:23::i;:::-;63796:46;-1:-1:-1;63796:46:7;-1:-1:-1;;;63627:247:7;;;;;;:::o;1867:8491::-;4044:36;4038:2;4025:55;4110:36;4104:2;4091:55;4176:36;4170:2;4157:55;4242:36;4236:2;4223:55;4308:36;4302:2;4289:55;4374:36;4368:2;4355:55;4440:36;4434:2;4421:55;4506:36;4500:2;4487:55;4572:36;4566:2;4553:55;4638:36;4632:2;4619:55;4704:36;4698:2;4685:55;4770:36;4764:2;4751:55;4836:36;4830:2;4817:55;4902:36;4896:2;4883:55;4968:36;4962:2;4949:55;5034:36;5028:2;5015:55;5100:36;5094:2;5081:55;5166:36;5160:2;5147:55;5232:36;5226:2;5213:55;5298:36;5292:2;5279:55;5364:36;5358:2;5345:55;5430:36;5424:2;5411:55;5496:36;5490:2;5477:55;5562:36;5556:2;5543:55;5628:36;5622:2;5609:55;5694:36;5688:2;5675:55;5760:36;5754:2;5741:55;5826:36;5820:2;5807:55;5892:36;5886:2;5873:55;5958:36;5952:2;5939:55;6024:36;6018:2;6005:55;6090:36;6084:2;6071:55;6156:36;6150:2;6137:55;6222:36;6216:2;6203:55;6288:36;6282:2;6269:55;6354:36;6348:2;6335:55;6420:36;6414:2;6401:55;6486:36;6480:2;6467:55;6552:36;6546:2;6533:55;6618:36;6612:2;6599:55;6684:36;6678:2;6665:55;6750:36;6744:2;6731:55;6816:36;6810:2;6797:55;6882:36;6876:2;6863:55;6948:36;6942:2;6929:55;7014:36;7008:2;6995:55;7080:36;7074:2;7061:55;7146:36;7140:2;7127:55;7212:36;7206:2;7193:55;7278:36;7272:2;7259:55;7344:36;7338:2;7325:55;7410:36;7404:2;7391:55;7476:36;7470:2;7457:55;7542:36;7536:2;7523:55;7608:36;7602:2;7589:55;7674:36;7668:2;7655:55;7740:36;7734:2;7721:55;7806:36;7800:2;7787:55;7872:36;7866:2;7853:55;7938:36;7932:2;7919:55;8004:36;7998:2;7985:55;8070:36;8064:2;8051:55;8136:36;8130:2;8117:55;8202:36;8196:2;8183:55;8268:36;8262:2;8249:55;8334:36;8328:2;8315:55;8400:36;8394:2;8381:55;8466:36;8460:2;8447:55;8532:36;8525:3;8513:55;8598:36;8591:3;8579:55;8664:36;8657:3;8645:55;8730:36;8723:3;8711:55;8796:36;8789:3;8777:55;8862:36;8855:3;8843:55;8928:36;8921:3;8909:55;8994:36;8987:3;8975:55;9060:36;9053:3;9041:55;9126:36;9119:3;9107:55;9192:36;9185:3;9173:55;9258:36;9251:3;9239:55;9324:36;9317:3;9305:55;9390:36;9383:3;9371:55;9456:36;9449:3;9437:55;9522:36;9515:3;9503:55;9588:36;9581:3;9569:55;9654:36;9647:3;9635:55;9720:36;9713:3;9701:55;9786:36;9779:3;9767:55;9852:36;9845:3;9833:55;9918:36;9911:3;9899:55;9984:36;9977:3;9965:55;10050:36;10043:3;10031:55;10116:36;10109:3;10097:55;10182:36;10175:3;10163:55;10248:36;10241:3;10229:55;10314:36;4025:11;10307:3;10295:16;;:55;1867:8491::o;10456:8364::-;10523:34;10503:12;:54;;;10588:34;10568:17;:54;10653:34;10633:17;:54;10718:34;10698:17;:54;10783:34;10763:17;:54;10848:34;10828:17;:54;10913:34;10893:17;:54;10978:34;10958:17;:54;11043:34;11023:17;:54;11108:34;11088:17;:54;11173:34;11153:17;:54;11238:34;11218:17;:54;11303:34;11283:17;:54;11368:34;11348:17;:54;11433:34;11413:17;:54;11498:34;11478:17;:54;11563:34;11543:17;:54;11628:34;11608:17;:54;11693:34;11673:17;:54;11758:34;11738:17;:54;11823:34;11803:17;:54;11888:34;11868:17;:54;11953:34;11933:17;:54;12018:34;11998:17;:54;12083:34;12063:17;:54;12148:34;12128:17;:54;12213:34;12193:17;:54;12278:34;12258:17;:54;12343:34;12323:17;:54;12408:34;12388:17;:54;12473:34;12453:17;:54;12538:34;12518:17;:54;12603:34;12583:17;:54;12668:34;12648:17;:54;12733:34;12713:17;:54;12798:34;12778:17;:54;12863:34;12843:17;:54;12928:34;12908:17;:54;12993:34;12973:17;:54;13058:34;13038:17;:54;13123:34;13103:17;:54;13188:34;13168:17;:54;13253:34;13233:17;:54;13318:34;13298:17;:54;13383:34;13363:17;:54;13448:34;13428:17;:54;13513:34;13493:17;:54;13578:34;13558:17;:54;13643:34;13623:17;:54;13708:34;13688:17;:54;13773:34;13753:17;:54;13838:34;13818:17;:54;13903:34;13883:17;:54;13968:34;13948:17;:54;14033:34;14013:17;:54;14098:34;14078:17;:54;14163:34;14143:17;:54;14228:34;14208:17;:54;14293:34;14273:17;:54;14358:34;14338:17;:54;14423:34;14403:17;:54;14488:34;14468:17;:54;14553:34;14533:17;:54;14618:34;14598:17;:54;14683:34;14663:17;:54;14748:34;14728:17;:54;14813:34;14793:17;:54;14878:34;14858:17;:54;14943:34;14923:17;:54;15008:34;14988:17;:54;15073:34;15053:17;:54;15138:34;15118:17;:54;15203:34;15183:17;:54;15268:34;15248:17;:54;15333:34;15313:17;:54;15398:34;15378:17;:54;15463:34;15443:17;:54;15528:34;15508:17;:54;15593:34;15573:17;:54;15658:34;15638:17;:54;15723:34;15703:17;:54;15788:34;15768:17;:54;15853:34;15833:17;:54;15918:34;15898:17;:54;15983:34;15963:17;:54;16048:34;16028:17;:54;16113:34;16093:17;:54;16178:34;16158:17;:54;16243:34;16223:17;:54;16308:34;16288:17;:54;16373:34;16353:17;:54;16438:34;16418:17;:54;16503:34;16483:17;:54;16568:34;16548:17;:54;16633:34;16613:17;:54;16698:34;16678:17;:54;16763:34;16743:17;:54;16828:34;16808:17;:54;16893:34;16873:17;:54;16958:34;16938:17;:54;17023:34;17003:17;:54;17088:34;17068:17;:54;17153:34;17133:17;:54;17218:34;17198:17;:54;17283:34;17263:17;:54;17348:34;17328:17;:54;17413:34;17393:17;:54;17478:34;17458:17;:54;17543:34;17523:17;:54;17608:34;17588:17;:54;17673:34;17653:17;:54;17738:34;17718:17;:54;17803:34;17783:17;:54;17868:34;17848:17;:54;17933:34;17913:17;:54;17998:34;17978:17;:54;18063:34;18043:17;:54;18128:34;18108:17;:54;18193:34;18173:17;:54;18258:34;18238:17;:54;18323:34;18303:17;:54;18388:34;18368:17;:54;18453:34;18433:17;:54;18518:34;18498:17;:54;18583:34;18563:17;:54;18648:34;18628:17;:54;18713:34;18693:17;:54;18778:34;;18771:3;18758:17;;44252:2798;44306:7;;;;;44425:34;44420:39;;44416:143;;-1:-1:-1;;;44462:41:7;;;;44523:34;-1:-1:-1;;;44509:1:7;:11;:48;;;;;;44505:52;;44416:143;44593:34;44588:1;:39;44584:143;;-1:-1:-1;;;44630:41:7;;;;44691:34;-1:-1:-1;;;44677:1:7;:11;:48;;;;;;44673:52;;44584:143;44761:34;44756:1;:39;44752:143;;-1:-1:-1;;;44798:41:7;;;;44859:34;-1:-1:-1;;;44845:1:7;:11;:48;;;;;;44841:52;;44752:143;44929:34;44924:1;:39;44920:143;;-1:-1:-1;;;44966:41:7;;;;45027:34;-1:-1:-1;;;45013:1:7;:11;:48;;;;;;45009:52;;44920:143;45097:34;45092:1;:39;45088:143;;-1:-1:-1;;;45134:41:7;;;;45195:34;-1:-1:-1;;;45181:1:7;:11;:48;;;;;;45177:52;;45088:143;45265:34;45260:1;:39;45256:143;;-1:-1:-1;;;45302:41:7;;;;45363:34;-1:-1:-1;;;45349:1:7;:11;:48;;;;;;45345:52;;45256:143;45433:34;45428:1;:39;45424:143;;-1:-1:-1;;;45470:41:7;;;;45531:34;-1:-1:-1;;;45517:1:7;:11;:48;;;;;;45513:52;;45424:143;45601:34;45596:1;:39;45592:143;;-1:-1:-1;;;45638:41:7;;;;45699:34;-1:-1:-1;;;45685:1:7;:11;:48;;;;;;45681:52;;45592:143;-1:-1:-1;;45770:11:7;;;-1:-1:-1;45770:11:7;;-1:-1:-1;;;;45796:5:7;;;:15;;-1:-1:-1;;;;45834:39:7;;;45829:45;;:83;45822:90;;;;-1:-1:-1;;;45922:1:7;45918;:5;:15;;;;;;45914:19;;-1:-1:-1;;;46023:1:7;45985:35;:39;45980:1;:45;:83;;;;;;45973:90;;;;-1:-1:-1;;;46073:1:7;46069;:5;:15;;;;;;46065:19;;-1:-1:-1;;;46174:1:7;46136:35;:39;46131:1;:45;:83;;;;;;46124:90;;;;-1:-1:-1;;;46224:1:7;46220;:5;:15;;;;;;46216:19;;-1:-1:-1;;;46325:1:7;46287:35;:39;46282:1;:45;:83;;;;;;46275:90;;;;-1:-1:-1;;;46375:1:7;46371;:5;:15;;;;;;46367:19;;-1:-1:-1;;;46476:1:7;46438:35;:39;46433:1;:45;:83;;;;;;46426:90;;;;-1:-1:-1;;;46526:1:7;46522;:5;:15;;;;;;46518:19;;-1:-1:-1;;;46627:1:7;46589:35;:39;46584:1;:45;:83;;;;;;46577:90;;;;-1:-1:-1;;;46677:1:7;46673;:5;:15;;;;;;46669:19;;-1:-1:-1;;;46778:1:7;46740:35;:39;46735:1;:45;:83;;;;;;46728:90;;;;-1:-1:-1;;;46828:1:7;46824;:5;:15;;;;;;46820:19;;-1:-1:-1;;;46929:1:7;46891:35;:39;46886:1;:45;:83;;;;;;46879:90;;;;;-1:-1:-1;;;;44252:2798:7;;;;:::o;36707:823::-;36761:7;;-1:-1:-1;;;36905:12:7;;36901:156;;36934:11;36948:22;-1:-1:-1;;;36958:1:7;:11;;36948:9;:22::i;:::-;36985:11;;;;;;-1:-1:-1;;;37030:15:7;;-1:-1:-1;;36901:156:7;-1:-1:-1;;;37165:1:7;:11;37161:305;;;417:3;37193:262;37223:5;;;;37193:262;;-1:-1:-1;;;37259:5:7;;;37258:17;37254:21;;-1:-1:-1;;;37315:1:7;:12;37311:129;;37358:1;37352:7;;;;37406:14;-1:-1:-1;;37414:5:7;;37406:14;;37399:21;;;;;37311:129;-1:-1:-1;;37230:3:7;37193:262;;;;37161:305;898:33;815;37485:19;;:37;;36707:823;-1:-1:-1;;;36707:823:7:o;47747:3216::-;47801:7;48185:18;-1:-1:-1;;;47899:38:7;;;47983:5;;;:15;;;48070:5;;;:15;;;48157:5;;;:15;;;48181:22;;;48011:18;48007:22;;;48098:18;48094:22;;;;48087:29;48174;;47899:38;;48244:5;;;:15;48240:19;;48268:1;48272:18;48268:22;48261:29;;;;-1:-1:-1;;;48335:1:7;48331;:5;:15;;;;;;48327:19;;48355:1;48359:18;48355:22;48348:29;;;;-1:-1:-1;;;48422:1:7;48418;:5;:15;;;;;;48414:19;;48442:1;48446:18;48442:22;48435:29;;;;-1:-1:-1;;;48509:1:7;48505;:5;:15;;;;;;48501:19;;48529:1;48533:18;48529:22;48522:29;;;;-1:-1:-1;;;48596:1:7;48592;:5;:15;;;;;;48588:19;;48616:1;48620:18;48616:22;48609:29;;;;-1:-1:-1;;;48683:1:7;48679;:5;:15;;;;;;48675:19;;48703:1;48707:18;48703:22;48696:29;;;;-1:-1:-1;;;48770:1:7;48766;:5;:15;;;;;;48762:19;;48790:1;48794:18;48790:22;48783:29;;;;-1:-1:-1;;;48857:1:7;48853;:5;:15;;;;;;48849:19;;48877:1;48881:18;48877:22;48870:29;;;;-1:-1:-1;;;48944:1:7;48940;:5;:15;;;;;;48936:19;;48964:1;48968:18;48964:22;48957:29;;;;-1:-1:-1;;;49031:1:7;49027;:5;:15;;;;;;49023:19;;49051:1;49055:18;49051:22;49044:29;;;;-1:-1:-1;;;49118:1:7;49114;:5;:15;;;;;;49110:19;;49138:1;49142:18;49138:22;49131:29;;;;-1:-1:-1;;;49205:1:7;49201;:5;:15;;;;;;49197:19;;49225:1;49229:18;49225:22;49218:29;;;;-1:-1:-1;;;49292:1:7;49288;:5;:15;;;;;;49284:19;;49312:1;49316:18;49312:22;49305:29;;;;-1:-1:-1;;;49379:1:7;49375;:5;:15;;;;;;49371:19;;49399:1;49403:18;49399:22;49392:29;;;;-1:-1:-1;;;49466:1:7;49462;:5;:15;;;;;;49458:19;;49486:1;49490:18;49486:22;49479:29;;;;-1:-1:-1;;;49553:1:7;49549;:5;:15;;;;;49644:18;49549:15;;;49566:29;;;49638:24;:28;;-1:-1:-1;;;49638:38:7;;49549:15;-1:-1:-1;;;;49744:39:7;;49743:46;49739:137;;49841:35;49803;49797:41;;:79;49791:85;;49739:137;-1:-1:-1;;;49916:39:7;;49915:46;49911:137;;50013:35;49975;49969:41;;:79;49963:85;;49911:137;-1:-1:-1;;;50088:39:7;;50087:46;50083:137;;50185:35;50147;50141:41;;:79;50135:85;;50083:137;-1:-1:-1;;;50260:39:7;;50259:46;50255:137;;50357:35;50319;50313:41;;:79;50307:85;;50255:137;-1:-1:-1;;;50432:39:7;;50431:46;50427:137;;50529:35;50491;50485:41;;:79;50479:85;;50427:137;-1:-1:-1;;;50604:39:7;;50603:46;50599:137;;50701:35;50663;50657:41;;:79;50651:85;;50599:137;-1:-1:-1;;;50776:39:7;;50775:46;50771:137;;50873:35;50835;50829:41;;:79;50823:85;;50771:137;-1:-1:-1;50952:3:7;;47747:3216;-1:-1:-1;;;47747:3216:7:o;38573:501::-;38643:5;369:2;417:3;38733:185;38749:2;38740:11;;:2;38745:1;38740:6;:11;;;38733:185;;;38768:9;38792:1;38780:13;38781:7;;;38780:13;;38768:25;;38832:2;38812:11;38824:3;38812:16;;;;;;;;;;;:22;38808:98;;38858:3;38853:8;;38808:98;;;38903:3;38898:8;;38808:98;38733:185;;;;38953:2;38934:11;38946:2;38934:15;;;;;;;;;;;:21;38930:49;;38977:2;-1:-1:-1;38970:9:7;;-1:-1:-1;38970:9:7;38930:49;39013:2;38994:11;39006:2;38994:15;;;;;;;;;;;:21;38990:49;;-1:-1:-1;39037:2:7;-1:-1:-1;39030:9:7;;39646:3864;39719:7;39739:10;39752:2;39739:15;;39765:11;39811:10;39798:23;;39804:2;39799;:7;39798:23;;39793:28;;39830:2;39835:33;39830:38;39823:45;;;;39923:10;39910:23;;39916:2;39911;:7;39910:23;;39905:28;;39942:2;39947:33;39942:38;39935:45;;;;40035:10;40022:23;;40028:2;40023;:7;40022:23;;40017:28;;40054:2;40059:33;40054:38;40047:45;;;;40147:10;40134:23;;40140:2;40135;:7;40134:23;;40129:28;;40166:2;40171:33;40166:38;40159:45;;;;40259:10;40246:23;;40252:2;40247;:7;40246:23;;40241:28;;40278:2;40283:33;40278:38;40271:45;;;;40371:10;40358:23;;40364:2;40359;:7;40358:23;;40353:28;;40390:2;40395:33;40390:38;40383:45;;;;40483:10;40470:23;;40476:2;40471;:7;40470:23;;40465:28;;40502:2;40507:33;40502:38;40495:45;;;;40595:10;40582:23;;40588:2;40583;:7;40582:23;;40577:28;;40614:2;40619:33;40614:38;40607:45;;;;40707:10;40694:23;;40700:2;40695;:7;40694:23;;40689:28;;40726:2;40731:33;40726:38;40719:45;;;;40819:10;40806:23;;40812:2;40807;:7;40806:23;;40801:28;;40838:2;40843:33;40838:38;40831:45;;;;40931:10;40918:23;;40924:2;40919;:7;40918:23;;40913:28;;40950:2;40955:33;40950:38;40943:45;;;;41043:10;41030:23;;41036:2;41031;:7;41030:23;;41025:28;;41062:2;41067:33;41062:38;41055:45;;;;41155:10;41142:23;;41148:2;41143;:7;41142:23;;41137:28;;41174:2;41179:33;41174:38;41167:45;;;;41267:10;41254:23;;41260:2;41255;:7;41254:23;;41249:28;;41286:2;41291:33;41286:38;41279:45;;;;41379:10;41366:23;;41372:2;41367;:7;41366:23;;41361:28;;41398:2;41403:33;41398:38;41391:45;;;;41491:10;41478:23;;41484:2;41479;:7;41478:23;;41473:28;;41510:2;41515:33;41510:38;41503:45;;;;41603:10;41590:23;;41596:2;41591;:7;41590:23;;41585:28;;41622:2;41627:33;41622:38;41615:45;;;;41715:10;41702:23;;41708:2;41703;:7;41702:23;;41697:28;;41734:2;41739:33;41734:38;41727:45;;;;41827:10;41814:23;;41820:2;41815;:7;41814:23;;41809:28;;41846:2;41851:33;41846:38;41839:45;;;;41939:10;41926:23;;41932:2;41927;:7;41926:23;;41921:28;;41958:2;41963:33;41958:38;41951:45;;;;42051:10;42038:23;;42044:2;42039;:7;42038:23;;42033:28;;42070:2;42075:33;42070:38;42063:45;;;;42163:10;42150:23;;42156:2;42151;:7;42150:23;;42145:28;;42182:2;42187:33;42182:38;42175:45;;;;42275:10;42262:23;;42268:2;42263;:7;42262:23;;42257:28;;42294:2;42299:33;42294:38;42287:45;;;;42387:10;42374:23;;42380:2;42375;:7;42374:23;;42369:28;;42406:2;42411:33;42406:38;42399:45;;;;42499:10;42486:23;;42492:2;42487;:7;42486:23;;42481:28;;42518:2;42523:33;42518:38;42511:45;;;;42611:10;42598:23;;42604:2;42599;:7;42598:23;;42593:28;;42630:2;42635:33;42630:38;42623:45;;;;42723:10;42710:23;;42716:2;42711;:7;42710:23;;42705:28;;42742:2;42747:33;42742:38;42735:45;;;;42835:10;42822:23;;42828:2;42823;:7;42822:23;;42817:28;;42854:2;42859:33;42854:38;42847:45;;;;42947:10;42934:23;;42940:2;42935;:7;42934:23;;42929:28;;42966:2;42971:33;42966:38;42959:45;;;;43059:10;43046:23;;43052:2;43047;:7;43046:23;;43041:28;;43078:2;43083:33;43078:38;43071:45;;;;43171:10;43158:23;;43164:2;43159;:7;43158:23;;43153:28;;43190:2;43195:33;43190:38;43183:45;;;;43283:10;43270:23;;43276:2;43271;:7;43270:23;;43265:28;;43302:2;43307:33;43302:38;43295:45;;;;43441:10;43434:17;;271:1;43434:17;;43428:2;43392:33;43386:3;:39;;;;;;:44;:66;;39646:3864;-1:-1:-1;;;;;39646:3864:7:o;63076:444::-;63144:7;63153;-1:-1:-1;;;63177:2:7;:13;;:30;;;;;-1:-1:-1;;;63194:2:7;:13;;63177:30;63173:64;;;-1:-1:-1;63230:2:7;;-1:-1:-1;63234:2:7;63222:15;;63173:64;-1:-1:-1;;;63252:2:7;:12;63248:66;;;63302:2;-1:-1:-1;;;63287:2:7;:12;:17;;;;;;-1:-1:-1;;;63279:35:7;;;;;;63248:66;-1:-1:-1;;;63329:2:7;:12;63325:66;;;-1:-1:-1;;;63388:2:7;-1:-1:-1;;;63373:2:7;:12;:17;;;;;;63356:35;;;;;;63325:66;63402:9;63419:2;63414;:7;:17;;63429:2;63414:17;;;63424:2;63414:17;63402:29;-1:-1:-1;63442:9:7;63454:22;-1:-1:-1;;;63402:29:7;63464:11;;63454:22;63442:34;;63495:7;;;;63504;;;;;-1:-1:-1;;;;63076:444:7:o;51471:190::-;51527:7;1300:36;51551:2;:25;51547:66;;51598:15;51610:2;51598:11;:15::i;:::-;51591:22;;;;51547:66;51651:2;-1:-1:-1;;;51651:2:7;51631:22;;;;;;51471:190;-1:-1:-1;;51471:190:7:o;51052:328::-;51107:7;1300:36;51131:2;:25;51127:66;;51178:15;51190:2;51178:11;:15::i;51127:66::-;1480:36;51208:2;:25;51204:66;;51255:15;51267:2;51255:11;:15::i;51204:66::-;1570:36;51285:2;:25;51281:66;;51332:15;51344:2;51332:11;:15::i;64005:380::-;64077:6;64085;1708:62;64108:2;:19;64104:137;;;64184:1;64162:18;64156:25;;:29;;:2;:29;64200:7;;;;;;;64228:1;64222:7;;;;;;;;;64104:137;;64251:9;64263:37;316:7;64272:15;;64289:10;64272:2;64296;64289:6;:10::i;:::-;64263:8;:37::i;:::-;64251:49;316:7;64323:14;;;;-1:-1:-1;64005:380:7;-1:-1:-1;;;;64005:380:7:o;37658:542::-;37712:5;;37765:3;37760:8;;37756:414;;;37822:85;37834:1;37829:2;:6;37822:85;;;37863:1;37856:8;;;;37883;37822:85;;;37756:414;;;38000:3;37985:174;38005:5;;;;37985:174;;271:1;38051:8;;;;38044:16;;38040:104;;38085:8;;;;;;;;38116;;;;38040:104;38018:1;38012:7;;;37985:174;;;;38189:3;37658:542;-1:-1:-1;;37658:542:7:o;57726:4616::-;57782:7;57815:2;57782:7;-1:-1:-1;;;57862:7:7;;;57861:19;;-1:-1:-1;57894:44:7;57889:49;;57882:56;-1:-1:-1;;;57997:7:7;;;57996:19;;-1:-1:-1;58029:44:7;58024:49;;58017:56;-1:-1:-1;;;58132:7:7;;;58131:19;;-1:-1:-1;58164:44:7;58159:49;;58152:56;-1:-1:-1;;;58267:7:7;;;58266:19;;-1:-1:-1;58299:44:7;58294:49;;58287:56;-1:-1:-1;;;58402:7:7;;;58401:19;;-1:-1:-1;58434:44:7;58429:49;;58422:56;-1:-1:-1;;;58537:7:7;;;58536:19;;-1:-1:-1;58569:44:7;58564:49;;58557:56;-1:-1:-1;;;58672:7:7;;;58671:19;;-1:-1:-1;58704:44:7;58699:49;;58692:56;-1:-1:-1;;;58807:7:7;;;58806:19;;-1:-1:-1;58839:44:7;58834:49;;58827:56;-1:-1:-1;;;58942:7:7;;;58941:19;;-1:-1:-1;58974:44:7;58969:49;;58962:56;-1:-1:-1;;;59077:7:7;;;59076:19;;-1:-1:-1;59109:44:7;59104:49;;59097:56;-1:-1:-1;;;59212:7:7;;;59211:19;;-1:-1:-1;59244:44:7;59239:49;;59232:56;-1:-1:-1;;;59347:7:7;;;59346:19;;-1:-1:-1;59379:44:7;59374:49;;59367:56;-1:-1:-1;;;59482:7:7;;;59481:19;;-1:-1:-1;59514:44:7;59509:49;;59502:56;-1:-1:-1;;;59617:7:7;;;59616:19;;-1:-1:-1;;;;59644:49:7;;59637:56;-1:-1:-1;;;59752:7:7;;;59751:19;;-1:-1:-1;59784:44:7;59779:49;;59772:56;-1:-1:-1;;;59887:7:7;;;59886:19;;-1:-1:-1;59919:44:7;59914:49;;59907:56;-1:-1:-1;;;60022:7:7;;;60021:19;;-1:-1:-1;60054:44:7;60049:49;;60042:56;-1:-1:-1;;;60157:7:7;;;60156:19;;-1:-1:-1;60189:44:7;60184:49;;60177:56;-1:-1:-1;;;60292:7:7;;;60291:19;;-1:-1:-1;60324:44:7;60319:49;;60312:56;-1:-1:-1;;;60427:7:7;;;60426:19;;-1:-1:-1;60459:44:7;60454:49;;60447:56;-1:-1:-1;;;60562:7:7;;;60561:19;;-1:-1:-1;60594:44:7;60589:49;;60582:56;-1:-1:-1;;;60697:7:7;;;60696:19;;-1:-1:-1;;;;60724:49:7;;60717:56;-1:-1:-1;;;60832:7:7;;;60831:19;;-1:-1:-1;60864:44:7;60859:49;;60852:56;-1:-1:-1;;;60967:7:7;;;60966:19;;-1:-1:-1;60999:44:7;60994:49;;60987:56;-1:-1:-1;;;61102:7:7;;;61101:19;;-1:-1:-1;61134:44:7;61129:49;;61122:56;-1:-1:-1;;;61237:7:7;;;61236:19;;-1:-1:-1;;;;61264:49:7;;61257:56;-1:-1:-1;;;61372:7:7;;;61371:19;;-1:-1:-1;61404:44:7;61399:49;;61392:56;-1:-1:-1;;;61507:7:7;;;61506:19;;-1:-1:-1;61539:44:7;61534:49;;61527:56;-1:-1:-1;;;61642:7:7;;;61641:19;;-1:-1:-1;61674:44:7;61669:49;;61662:56;-1:-1:-1;;;61777:7:7;;;61776:19;;-1:-1:-1;;;;61804:49:7;;61797:56;-1:-1:-1;;;61912:7:7;;;61911:19;;-1:-1:-1;61944:44:7;61939:49;;61932:56;-1:-1:-1;;;62047:7:7;;;62046:19;;-1:-1:-1;62079:44:7;62074:49;;62067:56;-1:-1:-1;;;62228:2:7;62191:34;62067:56;62185:40;:45;:55;;57726:4616;-1:-1:-1;;;;57726:4616:7:o;51856:4641::-;51912:7;51945:2;-1:-1:-1;;;51973:12:7;;;51989:34;51972:51;;52109:7;;;52108:19;;-1:-1:-1;52141:44:7;52136:49;;52129:56;-1:-1:-1;;;52244:7:7;;;52243:19;;-1:-1:-1;52276:44:7;52271:49;;52264:56;;-1:-1:-1;;;52379:7:7;;;52378:19;;-1:-1:-1;52411:44:7;52406:49;;52399:56;-1:-1:-1;;;52514:7:7;;;52513:19;;-1:-1:-1;52546:44:7;52541:49;;52534:56;;-1:-1:-1;;;52649:7:7;;;52648:19;;-1:-1:-1;52681:44:7;52676:49;;52669:56;-1:-1:-1;;;52784:7:7;;;52783:19;;-1:-1:-1;52816:44:7;52811:49;;52804:56;;-1:-1:-1;;;52919:7:7;;;52918:19;;-1:-1:-1;52951:44:7;52946:49;;52939:56;-1:-1:-1;;;53054:7:7;;;53053:19;;-1:-1:-1;53086:44:7;53081:49;;53074:56;;-1:-1:-1;;;53189:7:7;;;53188:19;;-1:-1:-1;53221:44:7;53216:49;;53209:56;-1:-1:-1;;;53324:7:7;;;53323:19;;-1:-1:-1;53356:44:7;53351:49;;53344:56;;-1:-1:-1;;;53459:7:7;;;53458:19;;-1:-1:-1;53491:44:7;53486:49;;53479:56;-1:-1:-1;;;53594:7:7;;;53593:19;;-1:-1:-1;53626:44:7;53621:49;;53614:56;;-1:-1:-1;;;53729:7:7;;;53728:19;;-1:-1:-1;53761:44:7;53756:49;;53749:56;-1:-1:-1;;;53864:7:7;;;53863:19;;-1:-1:-1;;;;53891:49:7;;53884:56;;-1:-1:-1;;;53999:7:7;;;53998:19;;-1:-1:-1;54031:44:7;54026:49;;54019:56;-1:-1:-1;;;54134:7:7;;;54133:19;;-1:-1:-1;54166:44:7;54161:49;;54154:56;;-1:-1:-1;;;54269:7:7;;;54268:19;;-1:-1:-1;54301:44:7;54296:49;;54289:56;-1:-1:-1;;;54404:7:7;;;54403:19;;-1:-1:-1;54436:44:7;54431:49;;54424:56;;-1:-1:-1;;;54539:7:7;;;54538:19;;-1:-1:-1;54571:44:7;54566:49;;54559:56;-1:-1:-1;;;54674:7:7;;;54673:19;;-1:-1:-1;54706:44:7;54701:49;;54694:56;;-1:-1:-1;;;54809:7:7;;;54808:19;;-1:-1:-1;54841:44:7;54836:49;;54829:56;-1:-1:-1;;;54944:7:7;;;54943:19;;-1:-1:-1;;;;54971:49:7;;54964:56;;-1:-1:-1;;;55079:7:7;;;55078:19;;-1:-1:-1;55111:44:7;55106:49;;55099:56;-1:-1:-1;;;55214:7:7;;;55213:19;;-1:-1:-1;55246:44:7;55241:49;;55234:56;;-1:-1:-1;;;55349:7:7;;;55348:19;;-1:-1:-1;55381:44:7;55376:49;;55369:56;-1:-1:-1;;;55484:7:7;;;55483:19;;-1:-1:-1;;;;55511:49:7;;55504:56;;-1:-1:-1;;;55619:7:7;;;55618:19;;-1:-1:-1;55651:44:7;55646:49;;55639:56;-1:-1:-1;;;55754:7:7;;;55753:19;;-1:-1:-1;55786:44:7;55781:49;;55774:56;;-1:-1:-1;;;55889:7:7;;;55888:19;;-1:-1:-1;55921:44:7;55916:49;;55909:56;-1:-1:-1;;;56024:7:7;;;56023:19;;-1:-1:-1;;;;56051:49:7;;56044:56;;-1:-1:-1;;;56159:7:7;;;56158:19;;-1:-1:-1;56191:44:7;56186:49;;56179:56;-1:-1:-1;;;56294:7:7;;;56293:19;;-1:-1:-1;56326:44:7;56321:49;;56314:56;;56438:34;56314:56;56432:40;;;51856:4641;-1:-1:-1;;;;51856:4641:7:o;56660:415::-;56716:7;-1:-1:-1;;56748:28:7;;1390:36;56799:23;;;;56845;;;;56918:1;56914:5;;56891:29;56716:7;56943:12;56799:23;56943:15;;;;;;;;;56931:27;;56969:9;56981:12;56994:1;56998;56994:5;56981:19;;;;;;;;;1390:36;57038:5;;;57033:11;57024:5;;;;57019:11;:25;;;;57018:49;;;-1:-1:-1;;;;56660:415:7:o;57238:291::-;57294:7;57314:10;1072:35;57327:2;:20;:54;;57367:14;57378:2;57367:10;:14::i;:::-;57327:54;;;57350:14;57361:2;57350:10;:14::i;:::-;57314:67;;57392:10;1072:35;57405:2;:20;:54;;57445:14;57456:2;57445:10;:14::i;:::-;57405:54;;;57428:14;57439:2;57428:10;:14::i;:::-;57392:67;;57519:2;-1:-1:-1;;;57503:2:7;-1:-1:-1;;;57488:2:7;:12;:17;;;;;;57483:2;57478;:7;:27;57477:39;:44;;;;64510:133;64575:7;64633:1;64628:2;:6;64623:2;:11;64617:2;64612;:7;;;;;;:23;;;;;;64607:2;64602;:7;;;;;;:33;;64510:133;-1:-1:-1;;;64510:133:7:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IBancorFormula.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\ncontract BancorFormula is IBancorFormula {\r\n using SafeMath for uint256;\r\n\r\n uint256 private constant ONE = 1;\r\n uint32 private constant MAX_WEIGHT = 1000000;\r\n uint8 private constant MIN_PRECISION = 32;\r\n uint8 private constant MAX_PRECISION = 127;\r\n\r\n // Auto-generated via 'PrintIntScalingFactors.py'\r\n uint256 private constant FIXED_1 = 0x080000000000000000000000000000000;\r\n uint256 private constant FIXED_2 = 0x100000000000000000000000000000000;\r\n uint256 private constant MAX_NUM = 0x200000000000000000000000000000000;\r\n\r\n // Auto-generated via 'PrintLn2ScalingFactors.py'\r\n uint256 private constant LN2_NUMERATOR = 0x3f80fe03f80fe03f80fe03f80fe03f8;\r\n uint256 private constant LN2_DENOMINATOR = 0x5b9de1d10bf4103d647b0955897ba80;\r\n\r\n // Auto-generated via 'PrintFunctionOptimalLog.py' and 'PrintFunctionOptimalExp.py'\r\n uint256 private constant OPT_LOG_MAX_VAL = 0x15bf0a8b1457695355fb8ac404e7a79e3;\r\n uint256 private constant OPT_EXP_MAX_VAL = 0x800000000000000000000000000000000;\r\n\r\n // Auto-generated via 'PrintLambertFactors.py'\r\n uint256 private constant LAMBERT_CONV_RADIUS = 0x002f16ac6c59de6f8d5d6f63c1482a7c86;\r\n uint256 private constant LAMBERT_POS2_SAMPLE = 0x0003060c183060c183060c183060c18306;\r\n uint256 private constant LAMBERT_POS2_MAXVAL = 0x01af16ac6c59de6f8d5d6f63c1482a7c80;\r\n uint256 private constant LAMBERT_POS3_MAXVAL = 0x6b22d43e72c326539cceeef8bb48f255ff;\r\n\r\n // Auto-generated via 'PrintWeightFactors.py'\r\n uint256 private constant MAX_UNF_WEIGHT = 0x10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea9;\r\n\r\n // Auto-generated via 'PrintMaxExpArray.py'\r\n uint256[128] private maxExpArray;\r\n function initMaxExpArray() private {\r\n // maxExpArray[ 0] = 0x6bffffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 1] = 0x67ffffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 2] = 0x637fffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 3] = 0x5f6fffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 4] = 0x5b77ffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 5] = 0x57b3ffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 6] = 0x5419ffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 7] = 0x50a2ffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 8] = 0x4d517fffffffffffffffffffffffffffff;\r\n // maxExpArray[ 9] = 0x4a233fffffffffffffffffffffffffffff;\r\n // maxExpArray[ 10] = 0x47165fffffffffffffffffffffffffffff;\r\n // maxExpArray[ 11] = 0x4429afffffffffffffffffffffffffffff;\r\n // maxExpArray[ 12] = 0x415bc7ffffffffffffffffffffffffffff;\r\n // maxExpArray[ 13] = 0x3eab73ffffffffffffffffffffffffffff;\r\n // maxExpArray[ 14] = 0x3c1771ffffffffffffffffffffffffffff;\r\n // maxExpArray[ 15] = 0x399e96ffffffffffffffffffffffffffff;\r\n // maxExpArray[ 16] = 0x373fc47fffffffffffffffffffffffffff;\r\n // maxExpArray[ 17] = 0x34f9e8ffffffffffffffffffffffffffff;\r\n // maxExpArray[ 18] = 0x32cbfd5fffffffffffffffffffffffffff;\r\n // maxExpArray[ 19] = 0x30b5057fffffffffffffffffffffffffff;\r\n // maxExpArray[ 20] = 0x2eb40f9fffffffffffffffffffffffffff;\r\n // maxExpArray[ 21] = 0x2cc8340fffffffffffffffffffffffffff;\r\n // maxExpArray[ 22] = 0x2af09481ffffffffffffffffffffffffff;\r\n // maxExpArray[ 23] = 0x292c5bddffffffffffffffffffffffffff;\r\n // maxExpArray[ 24] = 0x277abdcdffffffffffffffffffffffffff;\r\n // maxExpArray[ 25] = 0x25daf6657fffffffffffffffffffffffff;\r\n // maxExpArray[ 26] = 0x244c49c65fffffffffffffffffffffffff;\r\n // maxExpArray[ 27] = 0x22ce03cd5fffffffffffffffffffffffff;\r\n // maxExpArray[ 28] = 0x215f77c047ffffffffffffffffffffffff;\r\n // maxExpArray[ 29] = 0x1fffffffffffffffffffffffffffffffff;\r\n // maxExpArray[ 30] = 0x1eaefdbdabffffffffffffffffffffffff;\r\n // maxExpArray[ 31] = 0x1d6bd8b2ebffffffffffffffffffffffff;\r\n maxExpArray[ 32] = 0x1c35fedd14ffffffffffffffffffffffff;\r\n maxExpArray[ 33] = 0x1b0ce43b323fffffffffffffffffffffff;\r\n maxExpArray[ 34] = 0x19f0028ec1ffffffffffffffffffffffff;\r\n maxExpArray[ 35] = 0x18ded91f0e7fffffffffffffffffffffff;\r\n maxExpArray[ 36] = 0x17d8ec7f0417ffffffffffffffffffffff;\r\n maxExpArray[ 37] = 0x16ddc6556cdbffffffffffffffffffffff;\r\n maxExpArray[ 38] = 0x15ecf52776a1ffffffffffffffffffffff;\r\n maxExpArray[ 39] = 0x15060c256cb2ffffffffffffffffffffff;\r\n maxExpArray[ 40] = 0x1428a2f98d72ffffffffffffffffffffff;\r\n maxExpArray[ 41] = 0x13545598e5c23fffffffffffffffffffff;\r\n maxExpArray[ 42] = 0x1288c4161ce1dfffffffffffffffffffff;\r\n maxExpArray[ 43] = 0x11c592761c666fffffffffffffffffffff;\r\n maxExpArray[ 44] = 0x110a688680a757ffffffffffffffffffff;\r\n maxExpArray[ 45] = 0x1056f1b5bedf77ffffffffffffffffffff;\r\n maxExpArray[ 46] = 0x0faadceceeff8bffffffffffffffffffff;\r\n maxExpArray[ 47] = 0x0f05dc6b27edadffffffffffffffffffff;\r\n maxExpArray[ 48] = 0x0e67a5a25da4107fffffffffffffffffff;\r\n maxExpArray[ 49] = 0x0dcff115b14eedffffffffffffffffffff;\r\n maxExpArray[ 50] = 0x0d3e7a392431239fffffffffffffffffff;\r\n maxExpArray[ 51] = 0x0cb2ff529eb71e4fffffffffffffffffff;\r\n maxExpArray[ 52] = 0x0c2d415c3db974afffffffffffffffffff;\r\n maxExpArray[ 53] = 0x0bad03e7d883f69bffffffffffffffffff;\r\n maxExpArray[ 54] = 0x0b320d03b2c343d5ffffffffffffffffff;\r\n maxExpArray[ 55] = 0x0abc25204e02828dffffffffffffffffff;\r\n maxExpArray[ 56] = 0x0a4b16f74ee4bb207fffffffffffffffff;\r\n maxExpArray[ 57] = 0x09deaf736ac1f569ffffffffffffffffff;\r\n maxExpArray[ 58] = 0x0976bd9952c7aa957fffffffffffffffff;\r\n maxExpArray[ 59] = 0x09131271922eaa606fffffffffffffffff;\r\n maxExpArray[ 60] = 0x08b380f3558668c46fffffffffffffffff;\r\n maxExpArray[ 61] = 0x0857ddf0117efa215bffffffffffffffff;\r\n maxExpArray[ 62] = 0x07ffffffffffffffffffffffffffffffff;\r\n maxExpArray[ 63] = 0x07abbf6f6abb9d087fffffffffffffffff;\r\n maxExpArray[ 64] = 0x075af62cbac95f7dfa7fffffffffffffff;\r\n maxExpArray[ 65] = 0x070d7fb7452e187ac13fffffffffffffff;\r\n maxExpArray[ 66] = 0x06c3390ecc8af379295fffffffffffffff;\r\n maxExpArray[ 67] = 0x067c00a3b07ffc01fd6fffffffffffffff;\r\n maxExpArray[ 68] = 0x0637b647c39cbb9d3d27ffffffffffffff;\r\n maxExpArray[ 69] = 0x05f63b1fc104dbd39587ffffffffffffff;\r\n maxExpArray[ 70] = 0x05b771955b36e12f7235ffffffffffffff;\r\n maxExpArray[ 71] = 0x057b3d49dda84556d6f6ffffffffffffff;\r\n maxExpArray[ 72] = 0x054183095b2c8ececf30ffffffffffffff;\r\n maxExpArray[ 73] = 0x050a28be635ca2b888f77fffffffffffff;\r\n maxExpArray[ 74] = 0x04d5156639708c9db33c3fffffffffffff;\r\n maxExpArray[ 75] = 0x04a23105873875bd52dfdfffffffffffff;\r\n maxExpArray[ 76] = 0x0471649d87199aa990756fffffffffffff;\r\n maxExpArray[ 77] = 0x04429a21a029d4c1457cfbffffffffffff;\r\n maxExpArray[ 78] = 0x0415bc6d6fb7dd71af2cb3ffffffffffff;\r\n maxExpArray[ 79] = 0x03eab73b3bbfe282243ce1ffffffffffff;\r\n maxExpArray[ 80] = 0x03c1771ac9fb6b4c18e229ffffffffffff;\r\n maxExpArray[ 81] = 0x0399e96897690418f785257fffffffffff;\r\n maxExpArray[ 82] = 0x0373fc456c53bb779bf0ea9fffffffffff;\r\n maxExpArray[ 83] = 0x034f9e8e490c48e67e6ab8bfffffffffff;\r\n maxExpArray[ 84] = 0x032cbfd4a7adc790560b3337ffffffffff;\r\n maxExpArray[ 85] = 0x030b50570f6e5d2acca94613ffffffffff;\r\n maxExpArray[ 86] = 0x02eb40f9f620fda6b56c2861ffffffffff;\r\n maxExpArray[ 87] = 0x02cc8340ecb0d0f520a6af58ffffffffff;\r\n maxExpArray[ 88] = 0x02af09481380a0a35cf1ba02ffffffffff;\r\n maxExpArray[ 89] = 0x0292c5bdd3b92ec810287b1b3fffffffff;\r\n maxExpArray[ 90] = 0x0277abdcdab07d5a77ac6d6b9fffffffff;\r\n maxExpArray[ 91] = 0x025daf6654b1eaa55fd64df5efffffffff;\r\n maxExpArray[ 92] = 0x0244c49c648baa98192dce88b7ffffffff;\r\n maxExpArray[ 93] = 0x022ce03cd5619a311b2471268bffffffff;\r\n maxExpArray[ 94] = 0x0215f77c045fbe885654a44a0fffffffff;\r\n maxExpArray[ 95] = 0x01ffffffffffffffffffffffffffffffff;\r\n maxExpArray[ 96] = 0x01eaefdbdaaee7421fc4d3ede5ffffffff;\r\n maxExpArray[ 97] = 0x01d6bd8b2eb257df7e8ca57b09bfffffff;\r\n maxExpArray[ 98] = 0x01c35fedd14b861eb0443f7f133fffffff;\r\n maxExpArray[ 99] = 0x01b0ce43b322bcde4a56e8ada5afffffff;\r\n maxExpArray[100] = 0x019f0028ec1fff007f5a195a39dfffffff;\r\n maxExpArray[101] = 0x018ded91f0e72ee74f49b15ba527ffffff;\r\n maxExpArray[102] = 0x017d8ec7f04136f4e5615fd41a63ffffff;\r\n maxExpArray[103] = 0x016ddc6556cdb84bdc8d12d22e6fffffff;\r\n maxExpArray[104] = 0x015ecf52776a1155b5bd8395814f7fffff;\r\n maxExpArray[105] = 0x015060c256cb23b3b3cc3754cf40ffffff;\r\n maxExpArray[106] = 0x01428a2f98d728ae223ddab715be3fffff;\r\n maxExpArray[107] = 0x013545598e5c23276ccf0ede68034fffff;\r\n maxExpArray[108] = 0x01288c4161ce1d6f54b7f61081194fffff;\r\n maxExpArray[109] = 0x011c592761c666aa641d5a01a40f17ffff;\r\n maxExpArray[110] = 0x0110a688680a7530515f3e6e6cfdcdffff;\r\n maxExpArray[111] = 0x01056f1b5bedf75c6bcb2ce8aed428ffff;\r\n maxExpArray[112] = 0x00faadceceeff8a0890f3875f008277fff;\r\n maxExpArray[113] = 0x00f05dc6b27edad306388a600f6ba0bfff;\r\n maxExpArray[114] = 0x00e67a5a25da41063de1495d5b18cdbfff;\r\n maxExpArray[115] = 0x00dcff115b14eedde6fc3aa5353f2e4fff;\r\n maxExpArray[116] = 0x00d3e7a3924312399f9aae2e0f868f8fff;\r\n maxExpArray[117] = 0x00cb2ff529eb71e41582cccd5a1ee26fff;\r\n maxExpArray[118] = 0x00c2d415c3db974ab32a51840c0b67edff;\r\n maxExpArray[119] = 0x00bad03e7d883f69ad5b0a186184e06bff;\r\n maxExpArray[120] = 0x00b320d03b2c343d4829abd6075f0cc5ff;\r\n maxExpArray[121] = 0x00abc25204e02828d73c6e80bcdb1a95bf;\r\n maxExpArray[122] = 0x00a4b16f74ee4bb2040a1ec6c15fbbf2df;\r\n maxExpArray[123] = 0x009deaf736ac1f569deb1b5ae3f36c130f;\r\n maxExpArray[124] = 0x00976bd9952c7aa957f5937d790ef65037;\r\n maxExpArray[125] = 0x009131271922eaa6064b73a22d0bd4f2bf;\r\n maxExpArray[126] = 0x008b380f3558668c46c91c49a2f8e967b9;\r\n maxExpArray[127] = 0x00857ddf0117efa215952912839f6473e6;\r\n }\r\n\r\n // Auto-generated via 'PrintLambertArray.py'\r\n uint256[128] private lambertArray;\r\n function initLambertArray() private {\r\n lambertArray[ 0] = 0x60e393c68d20b1bd09deaabc0373b9c5;\r\n lambertArray[ 1] = 0x5f8f46e4854120989ed94719fb4c2011;\r\n lambertArray[ 2] = 0x5e479ebb9129fb1b7e72a648f992b606;\r\n lambertArray[ 3] = 0x5d0bd23fe42dfedde2e9586be12b85fe;\r\n lambertArray[ 4] = 0x5bdb29ddee979308ddfca81aeeb8095a;\r\n lambertArray[ 5] = 0x5ab4fd8a260d2c7e2c0d2afcf0009dad;\r\n lambertArray[ 6] = 0x5998b31359a55d48724c65cf09001221;\r\n lambertArray[ 7] = 0x5885bcad2b322dfc43e8860f9c018cf5;\r\n lambertArray[ 8] = 0x577b97aa1fe222bb452fdf111b1f0be2;\r\n lambertArray[ 9] = 0x5679cb5e3575632e5baa27e2b949f704;\r\n lambertArray[ 10] = 0x557fe8241b3a31c83c732f1cdff4a1c5;\r\n lambertArray[ 11] = 0x548d868026504875d6e59bbe95fc2a6b;\r\n lambertArray[ 12] = 0x53a2465ce347cf34d05a867c17dd3088;\r\n lambertArray[ 13] = 0x52bdce5dcd4faed59c7f5511cf8f8acc;\r\n lambertArray[ 14] = 0x51dfcb453c07f8da817606e7885f7c3e;\r\n lambertArray[ 15] = 0x5107ef6b0a5a2be8f8ff15590daa3cce;\r\n lambertArray[ 16] = 0x5035f241d6eae0cd7bacba119993de7b;\r\n lambertArray[ 17] = 0x4f698fe90d5b53d532171e1210164c66;\r\n lambertArray[ 18] = 0x4ea288ca297a0e6a09a0eee240e16c85;\r\n lambertArray[ 19] = 0x4de0a13fdcf5d4213fc398ba6e3becde;\r\n lambertArray[ 20] = 0x4d23a145eef91fec06b06140804c4808;\r\n lambertArray[ 21] = 0x4c6b5430d4c1ee5526473db4ae0f11de;\r\n lambertArray[ 22] = 0x4bb7886c240562eba11f4963a53b4240;\r\n lambertArray[ 23] = 0x4b080f3f1cb491d2d521e0ea4583521e;\r\n lambertArray[ 24] = 0x4a5cbc96a05589cb4d86be1db3168364;\r\n lambertArray[ 25] = 0x49b566d40243517658d78c33162d6ece;\r\n lambertArray[ 26] = 0x4911e6a02e5507a30f947383fd9a3276;\r\n lambertArray[ 27] = 0x487216c2b31be4adc41db8a8d5cc0c88;\r\n lambertArray[ 28] = 0x47d5d3fc4a7a1b188cd3d788b5c5e9fc;\r\n lambertArray[ 29] = 0x473cfce4871a2c40bc4f9e1c32b955d0;\r\n lambertArray[ 30] = 0x46a771ca578ab878485810e285e31c67;\r\n lambertArray[ 31] = 0x4615149718aed4c258c373dc676aa72d;\r\n lambertArray[ 32] = 0x4585c8b3f8fe489c6e1833ca47871384;\r\n lambertArray[ 33] = 0x44f972f174e41e5efb7e9d63c29ce735;\r\n lambertArray[ 34] = 0x446ff970ba86d8b00beb05ecebf3c4dc;\r\n lambertArray[ 35] = 0x43e9438ec88971812d6f198b5ccaad96;\r\n lambertArray[ 36] = 0x436539d11ff7bea657aeddb394e809ef;\r\n lambertArray[ 37] = 0x42e3c5d3e5a913401d86f66db5d81c2c;\r\n lambertArray[ 38] = 0x4264d2395303070ea726cbe98df62174;\r\n lambertArray[ 39] = 0x41e84a9a593bb7194c3a6349ecae4eea;\r\n lambertArray[ 40] = 0x416e1b785d13eba07a08f3f18876a5ab;\r\n lambertArray[ 41] = 0x40f6322ff389d423ba9dd7e7e7b7e809;\r\n lambertArray[ 42] = 0x40807cec8a466880ecf4184545d240a4;\r\n lambertArray[ 43] = 0x400cea9ce88a8d3ae668e8ea0d9bf07f;\r\n lambertArray[ 44] = 0x3f9b6ae8772d4c55091e0ed7dfea0ac1;\r\n lambertArray[ 45] = 0x3f2bee253fd84594f54bcaafac383a13;\r\n lambertArray[ 46] = 0x3ebe654e95208bb9210c575c081c5958;\r\n lambertArray[ 47] = 0x3e52c1fc5665635b78ce1f05ad53c086;\r\n lambertArray[ 48] = 0x3de8f65ac388101ddf718a6f5c1eff65;\r\n lambertArray[ 49] = 0x3d80f522d59bd0b328ca012df4cd2d49;\r\n lambertArray[ 50] = 0x3d1ab193129ea72b23648a161163a85a;\r\n lambertArray[ 51] = 0x3cb61f68d32576c135b95cfb53f76d75;\r\n lambertArray[ 52] = 0x3c5332d9f1aae851a3619e77e4cc8473;\r\n lambertArray[ 53] = 0x3bf1e08edbe2aa109e1525f65759ef73;\r\n lambertArray[ 54] = 0x3b921d9cff13fa2c197746a3dfc4918f;\r\n lambertArray[ 55] = 0x3b33df818910bfc1a5aefb8f63ae2ac4;\r\n lambertArray[ 56] = 0x3ad71c1c77e34fa32a9f184967eccbf6;\r\n lambertArray[ 57] = 0x3a7bc9abf2c5bb53e2f7384a8a16521a;\r\n lambertArray[ 58] = 0x3a21dec7e76369783a68a0c6385a1c57;\r\n lambertArray[ 59] = 0x39c9525de6c9cdf7c1c157ca4a7a6ee3;\r\n lambertArray[ 60] = 0x39721bad3dc85d1240ff0190e0adaac3;\r\n lambertArray[ 61] = 0x391c324344d3248f0469eb28dd3d77e0;\r\n lambertArray[ 62] = 0x38c78df7e3c796279fb4ff84394ab3da;\r\n lambertArray[ 63] = 0x387426ea4638ae9aae08049d3554c20a;\r\n lambertArray[ 64] = 0x3821f57dbd2763256c1a99bbd2051378;\r\n lambertArray[ 65] = 0x37d0f256cb46a8c92ff62fbbef289698;\r\n lambertArray[ 66] = 0x37811658591ffc7abdd1feaf3cef9b73;\r\n lambertArray[ 67] = 0x37325aa10e9e82f7df0f380f7997154b;\r\n lambertArray[ 68] = 0x36e4b888cfb408d873b9a80d439311c6;\r\n lambertArray[ 69] = 0x3698299e59f4bb9de645fc9b08c64cca;\r\n lambertArray[ 70] = 0x364ca7a5012cb603023b57dd3ebfd50d;\r\n lambertArray[ 71] = 0x36022c928915b778ab1b06aaee7e61d4;\r\n lambertArray[ 72] = 0x35b8b28d1a73dc27500ffe35559cc028;\r\n lambertArray[ 73] = 0x357033e951fe250ec5eb4e60955132d7;\r\n lambertArray[ 74] = 0x3528ab2867934e3a21b5412e4c4f8881;\r\n lambertArray[ 75] = 0x34e212f66c55057f9676c80094a61d59;\r\n lambertArray[ 76] = 0x349c66289e5b3c4b540c24f42fa4b9bb;\r\n lambertArray[ 77] = 0x34579fbbd0c733a9c8d6af6b0f7d00f7;\r\n lambertArray[ 78] = 0x3413bad2e712288b924b5882b5b369bf;\r\n lambertArray[ 79] = 0x33d0b2b56286510ef730e213f71f12e9;\r\n lambertArray[ 80] = 0x338e82ce00e2496262c64457535ba1a1;\r\n lambertArray[ 81] = 0x334d26a96b373bb7c2f8ea1827f27a92;\r\n lambertArray[ 82] = 0x330c99f4f4211469e00b3e18c31475ea;\r\n lambertArray[ 83] = 0x32ccd87d6486094999c7d5e6f33237d8;\r\n lambertArray[ 84] = 0x328dde2dd617b6665a2e8556f250c1af;\r\n lambertArray[ 85] = 0x324fa70e9adc270f8262755af5a99af9;\r\n lambertArray[ 86] = 0x32122f443110611ca51040f41fa6e1e3;\r\n lambertArray[ 87] = 0x31d5730e42c0831482f0f1485c4263d8;\r\n lambertArray[ 88] = 0x31996ec6b07b4a83421b5ebc4ab4e1f1;\r\n lambertArray[ 89] = 0x315e1ee0a68ff46bb43ec2b85032e876;\r\n lambertArray[ 90] = 0x31237fe7bc4deacf6775b9efa1a145f8;\r\n lambertArray[ 91] = 0x30e98e7f1cc5a356e44627a6972ea2ff;\r\n lambertArray[ 92] = 0x30b04760b8917ec74205a3002650ec05;\r\n lambertArray[ 93] = 0x3077a75c803468e9132ce0cf3224241d;\r\n lambertArray[ 94] = 0x303fab57a6a275c36f19cda9bace667a;\r\n lambertArray[ 95] = 0x3008504beb8dcbd2cf3bc1f6d5a064f0;\r\n lambertArray[ 96] = 0x2fd19346ed17dac61219ce0c2c5ac4b0;\r\n lambertArray[ 97] = 0x2f9b7169808c324b5852fd3d54ba9714;\r\n lambertArray[ 98] = 0x2f65e7e711cf4b064eea9c08cbdad574;\r\n lambertArray[ 99] = 0x2f30f405093042ddff8a251b6bf6d103;\r\n lambertArray[100] = 0x2efc931a3750f2e8bfe323edfe037574;\r\n lambertArray[101] = 0x2ec8c28e46dbe56d98685278339400cb;\r\n lambertArray[102] = 0x2e957fd933c3926d8a599b602379b851;\r\n lambertArray[103] = 0x2e62c882c7c9ed4473412702f08ba0e5;\r\n lambertArray[104] = 0x2e309a221c12ba361e3ed695167feee2;\r\n lambertArray[105] = 0x2dfef25d1f865ae18dd07cfea4bcea10;\r\n lambertArray[106] = 0x2dcdcee821cdc80decc02c44344aeb31;\r\n lambertArray[107] = 0x2d9d2d8562b34944d0b201bb87260c83;\r\n lambertArray[108] = 0x2d6d0c04a5b62a2c42636308669b729a;\r\n lambertArray[109] = 0x2d3d6842c9a235517fc5a0332691528f;\r\n lambertArray[110] = 0x2d0e402963fe1ea2834abc408c437c10;\r\n lambertArray[111] = 0x2cdf91ae602647908aff975e4d6a2a8c;\r\n lambertArray[112] = 0x2cb15ad3a1eb65f6d74a75da09a1b6c5;\r\n lambertArray[113] = 0x2c8399a6ab8e9774d6fcff373d210727;\r\n lambertArray[114] = 0x2c564c4046f64edba6883ca06bbc4535;\r\n lambertArray[115] = 0x2c2970c431f952641e05cb493e23eed3;\r\n lambertArray[116] = 0x2bfd0560cd9eb14563bc7c0732856c18;\r\n lambertArray[117] = 0x2bd1084ed0332f7ff4150f9d0ef41a2c;\r\n lambertArray[118] = 0x2ba577d0fa1628b76d040b12a82492fb;\r\n lambertArray[119] = 0x2b7a5233cd21581e855e89dc2f1e8a92;\r\n lambertArray[120] = 0x2b4f95cd46904d05d72bdcde337d9cc7;\r\n lambertArray[121] = 0x2b2540fc9b4d9abba3faca6691914675;\r\n lambertArray[122] = 0x2afb5229f68d0830d8be8adb0a0db70f;\r\n lambertArray[123] = 0x2ad1c7c63a9b294c5bc73a3ba3ab7a2b;\r\n lambertArray[124] = 0x2aa8a04ac3cbe1ee1c9c86361465dbb8;\r\n lambertArray[125] = 0x2a7fda392d725a44a2c8aeb9ab35430d;\r\n lambertArray[126] = 0x2a57741b18cde618717792b4faa216db;\r\n lambertArray[127] = 0x2a2f6c81f5d84dd950a35626d6d5503a;\r\n }\r\n\r\n /**\r\n * @dev should be executed after construction (too large for the constructor)\r\n */\r\n function init() public {\r\n initMaxExpArray();\r\n initLambertArray();\r\n }\r\n\r\n /**\r\n * @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token),\r\n * calculates the target amount for a given conversion (in the main token)\r\n *\r\n * Formula:\r\n * return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)\r\n *\r\n * @param _supply smart token supply\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveWeight reserve weight, represented in ppm (1-1000000)\r\n * @param _amount amount of reserve tokens to get the target amount for\r\n *\r\n * @return smart token amount\r\n */\r\n function purchaseTargetAmount(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_supply > 0, \"ERR_INVALID_SUPPLY\");\r\n require(_reserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveWeight > 0 && _reserveWeight <= MAX_WEIGHT, \"ERR_INVALID_RESERVE_WEIGHT\");\r\n\r\n // special case for 0 deposit amount\r\n if (_amount == 0)\r\n return 0;\r\n\r\n // special case if the weight = 100%\r\n if (_reserveWeight == MAX_WEIGHT)\r\n return _supply.mul(_amount) / _reserveBalance;\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseN = _amount.add(_reserveBalance);\r\n (result, precision) = power(baseN, _reserveBalance, _reserveWeight, MAX_WEIGHT);\r\n uint256 temp = _supply.mul(result) >> precision;\r\n return temp - _supply;\r\n }\r\n\r\n /**\r\n * @dev given a token supply, reserve balance, weight and a sell amount (in the main token),\r\n * calculates the target amount for a given conversion (in the reserve token)\r\n *\r\n * Formula:\r\n * return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))\r\n *\r\n * @param _supply smart token supply\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveWeight reserve weight, represented in ppm (1-1000000)\r\n * @param _amount amount of smart tokens to get the target amount for\r\n *\r\n * @return reserve token amount\r\n */\r\n function saleTargetAmount(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_supply > 0, \"ERR_INVALID_SUPPLY\");\r\n require(_reserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveWeight > 0 && _reserveWeight <= MAX_WEIGHT, \"ERR_INVALID_RESERVE_WEIGHT\");\r\n require(_amount <= _supply, \"ERR_INVALID_AMOUNT\");\r\n\r\n // special case for 0 sell amount\r\n if (_amount == 0)\r\n return 0;\r\n\r\n // special case for selling the entire supply\r\n if (_amount == _supply)\r\n return _reserveBalance;\r\n\r\n // special case if the weight = 100%\r\n if (_reserveWeight == MAX_WEIGHT)\r\n return _reserveBalance.mul(_amount) / _supply;\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseD = _supply - _amount;\r\n (result, precision) = power(_supply, baseD, MAX_WEIGHT, _reserveWeight);\r\n uint256 temp1 = _reserveBalance.mul(result);\r\n uint256 temp2 = _reserveBalance << precision;\r\n return (temp1 - temp2) / result;\r\n }\r\n\r\n /**\r\n * @dev given two reserve balances/weights and a sell amount (in the first reserve token),\r\n * calculates the target amount for a conversion from the source reserve token to the target reserve token\r\n *\r\n * Formula:\r\n * return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))\r\n *\r\n * @param _sourceReserveBalance source reserve balance\r\n * @param _sourceReserveWeight source reserve weight, represented in ppm (1-1000000)\r\n * @param _targetReserveBalance target reserve balance\r\n * @param _targetReserveWeight target reserve weight, represented in ppm (1-1000000)\r\n * @param _amount source reserve amount\r\n *\r\n * @return target reserve amount\r\n */\r\n function crossReserveTargetAmount(uint256 _sourceReserveBalance,\r\n uint32 _sourceReserveWeight,\r\n uint256 _targetReserveBalance,\r\n uint32 _targetReserveWeight,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_sourceReserveBalance > 0 && _targetReserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_sourceReserveWeight > 0 && _sourceReserveWeight <= MAX_WEIGHT &&\r\n _targetReserveWeight > 0 && _targetReserveWeight <= MAX_WEIGHT, \"ERR_INVALID_RESERVE_WEIGHT\");\r\n\r\n // special case for equal weights\r\n if (_sourceReserveWeight == _targetReserveWeight)\r\n return _targetReserveBalance.mul(_amount) / _sourceReserveBalance.add(_amount);\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseN = _sourceReserveBalance.add(_amount);\r\n (result, precision) = power(baseN, _sourceReserveBalance, _sourceReserveWeight, _targetReserveWeight);\r\n uint256 temp1 = _targetReserveBalance.mul(result);\r\n uint256 temp2 = _targetReserveBalance << precision;\r\n return (temp1 - temp2) / result;\r\n }\r\n\r\n /**\r\n * @dev given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens,\r\n * calculates the amount of reserve tokens required for purchasing the given amount of smart tokens\r\n *\r\n * Formula:\r\n * return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)\r\n *\r\n * @param _supply smart token supply\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\r\n * @param _amount requested amount of smart tokens\r\n *\r\n * @return reserve token amount\r\n */\r\n function fundCost(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_supply > 0, \"ERR_INVALID_SUPPLY\");\r\n require(_reserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveRatio > 1 && _reserveRatio <= MAX_WEIGHT * 2, \"ERR_INVALID_RESERVE_RATIO\");\r\n\r\n // special case for 0 amount\r\n if (_amount == 0)\r\n return 0;\r\n\r\n // special case if the reserve ratio = 100%\r\n if (_reserveRatio == MAX_WEIGHT)\r\n return (_amount.mul(_reserveBalance) - 1) / _supply + 1;\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseN = _supply.add(_amount);\r\n (result, precision) = power(baseN, _supply, MAX_WEIGHT, _reserveRatio);\r\n uint256 temp = ((_reserveBalance.mul(result) - 1) >> precision) + 1;\r\n return temp - _reserveBalance;\r\n }\r\n\r\n /**\r\n * @dev given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with,\r\n * calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens\r\n *\r\n * Formula:\r\n * return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)\r\n *\r\n * @param _supply smart token supply\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\r\n * @param _amount amount of reserve tokens to fund with\r\n *\r\n * @return smart token amount\r\n */\r\n function fundSupplyAmount(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_supply > 0, \"ERR_INVALID_SUPPLY\");\r\n require(_reserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveRatio > 1 && _reserveRatio <= MAX_WEIGHT * 2, \"ERR_INVALID_RESERVE_RATIO\");\r\n\r\n // special case for 0 amount\r\n if (_amount == 0)\r\n return 0;\r\n\r\n // special case if the reserve ratio = 100%\r\n if (_reserveRatio == MAX_WEIGHT)\r\n return _amount.mul(_supply) / _reserveBalance;\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseN = _reserveBalance.add(_amount);\r\n (result, precision) = power(baseN, _reserveBalance, _reserveRatio, MAX_WEIGHT);\r\n uint256 temp = _supply.mul(result) >> precision;\r\n return temp - _supply;\r\n }\r\n\r\n /**\r\n * @dev given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate,\r\n * calculates the amount of reserve tokens received for selling the given amount of smart tokens\r\n *\r\n * Formula:\r\n * return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))\r\n *\r\n * @param _supply smart token supply\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\r\n * @param _amount amount of smart tokens to liquidate\r\n *\r\n * @return reserve token amount\r\n */\r\n function liquidateReserveAmount(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view override returns (uint256)\r\n {\r\n // validate input\r\n require(_supply > 0, \"ERR_INVALID_SUPPLY\");\r\n require(_reserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveRatio > 1 && _reserveRatio <= MAX_WEIGHT * 2, \"ERR_INVALID_RESERVE_RATIO\");\r\n require(_amount <= _supply, \"ERR_INVALID_AMOUNT\");\r\n\r\n // special case for 0 amount\r\n if (_amount == 0)\r\n return 0;\r\n\r\n // special case for liquidating the entire supply\r\n if (_amount == _supply)\r\n return _reserveBalance;\r\n\r\n // special case if the reserve ratio = 100%\r\n if (_reserveRatio == MAX_WEIGHT)\r\n return _amount.mul(_reserveBalance) / _supply;\r\n\r\n uint256 result;\r\n uint8 precision;\r\n uint256 baseD = _supply - _amount;\r\n (result, precision) = power(_supply, baseD, MAX_WEIGHT, _reserveRatio);\r\n uint256 temp1 = _reserveBalance.mul(result);\r\n uint256 temp2 = _reserveBalance << precision;\r\n return (temp1 - temp2) / result;\r\n }\r\n\r\n /**\r\n * @dev The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price.\r\n * We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance.\r\n * In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance.\r\n *\r\n * Formula input:\r\n * - let t denote the primary reserve token staked balance\r\n * - let s denote the primary reserve token balance\r\n * - let r denote the secondary reserve token balance\r\n * - let q denote the numerator of the rate between the tokens\r\n * - let p denote the denominator of the rate between the tokens\r\n * Where p primary tokens are equal to q secondary tokens\r\n *\r\n * Formula output:\r\n * - compute x = W(t / r * q / p * log(s / t)) / log(s / t)\r\n * - return x / (1 + x) as the weight of the primary reserve token\r\n * - return 1 / (1 + x) as the weight of the secondary reserve token\r\n * Where W is the Lambert W Function\r\n *\r\n * If the rate-provider provides the rates for a common unit, for example:\r\n * - P = 2 ==> 2 primary reserve tokens = 1 ether\r\n * - Q = 3 ==> 3 secondary reserve tokens = 1 ether\r\n * Then you can simply use p = P and q = Q\r\n *\r\n * If the rate-provider provides the rates for a single unit, for example:\r\n * - P = 2 ==> 1 primary reserve token = 2 ethers\r\n * - Q = 3 ==> 1 secondary reserve token = 3 ethers\r\n * Then you can simply use p = Q and q = P\r\n *\r\n * @param _primaryReserveStakedBalance the primary reserve token staked balance\r\n * @param _primaryReserveBalance the primary reserve token balance\r\n * @param _secondaryReserveBalance the secondary reserve token balance\r\n * @param _reserveRateNumerator the numerator of the rate between the tokens\r\n * @param _reserveRateDenominator the denominator of the rate between the tokens\r\n *\r\n * Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token\r\n *\r\n * @return the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)\r\n */\r\n function balancedWeights(uint256 _primaryReserveStakedBalance,\r\n uint256 _primaryReserveBalance,\r\n uint256 _secondaryReserveBalance,\r\n uint256 _reserveRateNumerator,\r\n uint256 _reserveRateDenominator)\r\n public view override returns (uint32, uint32)\r\n {\r\n if (_primaryReserveStakedBalance == _primaryReserveBalance)\r\n require(_primaryReserveStakedBalance > 0 || _secondaryReserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n else\r\n require(_primaryReserveStakedBalance > 0 && _primaryReserveBalance > 0 && _secondaryReserveBalance > 0, \"ERR_INVALID_RESERVE_BALANCE\");\r\n require(_reserveRateNumerator > 0 && _reserveRateDenominator > 0, \"ERR_INVALID_RESERVE_RATE\");\r\n\r\n uint256 tq = _primaryReserveStakedBalance.mul(_reserveRateNumerator);\r\n uint256 rp = _secondaryReserveBalance.mul(_reserveRateDenominator);\r\n\r\n if (_primaryReserveStakedBalance < _primaryReserveBalance)\r\n return balancedWeightsByStake(_primaryReserveBalance, _primaryReserveStakedBalance, tq, rp, true);\r\n\r\n if (_primaryReserveStakedBalance > _primaryReserveBalance)\r\n return balancedWeightsByStake(_primaryReserveStakedBalance, _primaryReserveBalance, tq, rp, false);\r\n\r\n return normalizedWeights(tq, rp);\r\n }\r\n\r\n /**\r\n * @dev General Description:\r\n * Determine a value of precision.\r\n * Calculate an integer approximation of (_baseN / _baseD) ^ (_expN / _expD) * 2 ^ precision.\r\n * Return the result along with the precision used.\r\n *\r\n * Detailed Description:\r\n * Instead of calculating \"base ^ exp\", we calculate \"e ^ (log(base) * exp)\".\r\n * The value of \"log(base)\" is represented with an integer slightly smaller than \"log(base) * 2 ^ precision\".\r\n * The larger \"precision\" is, the more accurately this value represents the real value.\r\n * However, the larger \"precision\" is, the more bits are required in order to store this value.\r\n * And the exponentiation function, which takes \"x\" and calculates \"e ^ x\", is limited to a maximum exponent (maximum value of \"x\").\r\n * This maximum exponent depends on the \"precision\" used, and it is given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\r\n * Hence we need to determine the highest precision which can be used for the given input, before calling the exponentiation function.\r\n * This allows us to compute \"base ^ exp\" with maximum accuracy and without exceeding 256 bits in any of the intermediate computations.\r\n * This functions assumes that \"_expN < 2 ^ 256 / log(MAX_NUM - 1)\", otherwise the multiplication should be replaced with a \"safeMul\".\r\n * Since we rely on unsigned-integer arithmetic and \"base < 1\" ==> \"log(base) < 0\", this function does not support \"_baseN < _baseD\".\r\n */\r\n function power(uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD) internal view returns (uint256, uint8) {\r\n require(_baseN < MAX_NUM);\r\n\r\n uint256 baseLog;\r\n uint256 base = _baseN * FIXED_1 / _baseD;\r\n if (base < OPT_LOG_MAX_VAL) {\r\n baseLog = optimalLog(base);\r\n }\r\n else {\r\n baseLog = generalLog(base);\r\n }\r\n\r\n uint256 baseLogTimesExp = baseLog * _expN / _expD;\r\n if (baseLogTimesExp < OPT_EXP_MAX_VAL) {\r\n return (optimalExp(baseLogTimesExp), MAX_PRECISION);\r\n }\r\n else {\r\n uint8 precision = findPositionInMaxExpArray(baseLogTimesExp);\r\n return (generalExp(baseLogTimesExp >> (MAX_PRECISION - precision), precision), precision);\r\n }\r\n }\r\n\r\n /**\r\n * @dev computes log(x / FIXED_1) * FIXED_1.\r\n * This functions assumes that \"x >= FIXED_1\", because the output would be negative otherwise.\r\n */\r\n function generalLog(uint256 x) internal pure returns (uint256) {\r\n uint256 res = 0;\r\n\r\n // If x >= 2, then we compute the integer part of log2(x), which is larger than 0.\r\n if (x >= FIXED_2) {\r\n uint8 count = floorLog2(x / FIXED_1);\r\n x >>= count; // now x < 2\r\n res = count * FIXED_1;\r\n }\r\n\r\n // If x > 1, then we compute the fraction part of log2(x), which is larger than 0.\r\n if (x > FIXED_1) {\r\n for (uint8 i = MAX_PRECISION; i > 0; --i) {\r\n x = (x * x) / FIXED_1; // now 1 < x < 4\r\n if (x >= FIXED_2) {\r\n x >>= 1; // now 1 < x < 2\r\n res += ONE << (i - 1);\r\n }\r\n }\r\n }\r\n\r\n return res * LN2_NUMERATOR / LN2_DENOMINATOR;\r\n }\r\n\r\n /**\r\n * @dev computes the largest integer smaller than or equal to the binary logarithm of the input.\r\n */\r\n function floorLog2(uint256 _n) internal pure returns (uint8) {\r\n uint8 res = 0;\r\n\r\n if (_n < 256) {\r\n // At most 8 iterations\r\n while (_n > 1) {\r\n _n >>= 1;\r\n res += 1;\r\n }\r\n }\r\n else {\r\n // Exactly 8 iterations\r\n for (uint8 s = 128; s > 0; s >>= 1) {\r\n if (_n >= (ONE << s)) {\r\n _n >>= s;\r\n res |= s;\r\n }\r\n }\r\n }\r\n\r\n return res;\r\n }\r\n\r\n /**\r\n * @dev the global \"maxExpArray\" is sorted in descending order, and therefore the following statements are equivalent:\r\n * - This function finds the position of [the smallest value in \"maxExpArray\" larger than or equal to \"x\"]\r\n * - This function finds the highest position of [a value in \"maxExpArray\" larger than or equal to \"x\"]\r\n */\r\n function findPositionInMaxExpArray(uint256 _x) internal view returns (uint8) {\r\n uint8 lo = MIN_PRECISION;\r\n uint8 hi = MAX_PRECISION;\r\n\r\n while (lo + 1 < hi) {\r\n uint8 mid = (lo + hi) / 2;\r\n if (maxExpArray[mid] >= _x)\r\n lo = mid;\r\n else\r\n hi = mid;\r\n }\r\n\r\n if (maxExpArray[hi] >= _x)\r\n return hi;\r\n if (maxExpArray[lo] >= _x)\r\n return lo;\r\n\r\n require(false);\r\n }\r\n\r\n /**\r\n * @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'.\r\n * it approximates \"e ^ x\" via maclaurin summation: \"(x^0)/0! + (x^1)/1! + ... + (x^n)/n!\".\r\n * it returns \"e ^ (x / 2 ^ precision) * 2 ^ precision\", that is, the result is upshifted for accuracy.\r\n * the global \"maxExpArray\" maps each \"precision\" to \"((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1\".\r\n * the maximum permitted value for \"x\" is therefore given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\r\n */\r\n function generalExp(uint256 _x, uint8 _precision) internal pure returns (uint256) {\r\n uint256 xi = _x;\r\n uint256 res = 0;\r\n\r\n xi = (xi * _x) >> _precision; res += xi * 0x3442c4e6074a82f1797f72ac0000000; // add x^02 * (33! / 02!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x116b96f757c380fb287fd0e40000000; // add x^03 * (33! / 03!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x045ae5bdd5f0e03eca1ff4390000000; // add x^04 * (33! / 04!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00defabf91302cd95b9ffda50000000; // add x^05 * (33! / 05!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x002529ca9832b22439efff9b8000000; // add x^06 * (33! / 06!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00054f1cf12bd04e516b6da88000000; // add x^07 * (33! / 07!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000a9e39e257a09ca2d6db51000000; // add x^08 * (33! / 08!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000012e066e7b839fa050c309000000; // add x^09 * (33! / 09!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000001e33d7d926c329a1ad1a800000; // add x^10 * (33! / 10!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000002bee513bdb4a6b19b5f800000; // add x^11 * (33! / 11!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000003a9316fa79b88eccf2a00000; // add x^12 * (33! / 12!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000048177ebe1fa812375200000; // add x^13 * (33! / 13!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000005263fe90242dcbacf00000; // add x^14 * (33! / 14!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000000000057e22099c030d94100000; // add x^15 * (33! / 15!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000057e22099c030d9410000; // add x^16 * (33! / 16!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000052b6b54569976310000; // add x^17 * (33! / 17!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000004985f67696bf748000; // add x^18 * (33! / 18!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000000000000003dea12ea99e498000; // add x^19 * (33! / 19!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000000031880f2214b6e000; // add x^20 * (33! / 20!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000000000000000025bcff56eb36000; // add x^21 * (33! / 21!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000000000000000001b722e10ab1000; // add x^22 * (33! / 22!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000001317c70077000; // add x^23 * (33! / 23!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000cba84aafa00; // add x^24 * (33! / 24!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000082573a0a00; // add x^25 * (33! / 25!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000005035ad900; // add x^26 * (33! / 26!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x000000000000000000000002f881b00; // add x^27 * (33! / 27!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000001b29340; // add x^28 * (33! / 28!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x00000000000000000000000000efc40; // add x^29 * (33! / 29!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000007fe0; // add x^30 * (33! / 30!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000420; // add x^31 * (33! / 31!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000021; // add x^32 * (33! / 32!)\r\n xi = (xi * _x) >> _precision; res += xi * 0x0000000000000000000000000000001; // add x^33 * (33! / 33!)\r\n\r\n return res / 0x688589cc0e9505e2f2fee5580000000 + _x + (ONE << _precision); // divide by 33! and then add x^1 / 1! + x^0 / 0!\r\n }\r\n\r\n /**\r\n * @dev computes log(x / FIXED_1) * FIXED_1\r\n * Input range: FIXED_1 <= x <= OPT_LOG_MAX_VAL - 1\r\n * Auto-generated via 'PrintFunctionOptimalLog.py'\r\n * Detailed description:\r\n * - Rewrite the input as a product of natural exponents and a single residual r, such that 1 < r < 2\r\n * - The natural logarithm of each (pre-calculated) exponent is the degree of the exponent\r\n * - The natural logarithm of r is calculated via Taylor series for log(1 + x), where x = r - 1\r\n * - The natural logarithm of the input is calculated by summing up the intermediate results above\r\n * - For example: log(250) = log(e^4 * e^1 * e^0.5 * 1.021692859) = 4 + 1 + 0.5 + log(1 + 0.021692859)\r\n */\r\n function optimalLog(uint256 x) internal pure returns (uint256) {\r\n uint256 res = 0;\r\n\r\n uint256 y;\r\n uint256 z;\r\n uint256 w;\r\n\r\n if (x >= 0xd3094c70f034de4b96ff7d5b6f99fcd8) {res += 0x40000000000000000000000000000000; x = x * FIXED_1 / 0xd3094c70f034de4b96ff7d5b6f99fcd8;} // add 1 / 2^1\r\n if (x >= 0xa45af1e1f40c333b3de1db4dd55f29a7) {res += 0x20000000000000000000000000000000; x = x * FIXED_1 / 0xa45af1e1f40c333b3de1db4dd55f29a7;} // add 1 / 2^2\r\n if (x >= 0x910b022db7ae67ce76b441c27035c6a1) {res += 0x10000000000000000000000000000000; x = x * FIXED_1 / 0x910b022db7ae67ce76b441c27035c6a1;} // add 1 / 2^3\r\n if (x >= 0x88415abbe9a76bead8d00cf112e4d4a8) {res += 0x08000000000000000000000000000000; x = x * FIXED_1 / 0x88415abbe9a76bead8d00cf112e4d4a8;} // add 1 / 2^4\r\n if (x >= 0x84102b00893f64c705e841d5d4064bd3) {res += 0x04000000000000000000000000000000; x = x * FIXED_1 / 0x84102b00893f64c705e841d5d4064bd3;} // add 1 / 2^5\r\n if (x >= 0x8204055aaef1c8bd5c3259f4822735a2) {res += 0x02000000000000000000000000000000; x = x * FIXED_1 / 0x8204055aaef1c8bd5c3259f4822735a2;} // add 1 / 2^6\r\n if (x >= 0x810100ab00222d861931c15e39b44e99) {res += 0x01000000000000000000000000000000; x = x * FIXED_1 / 0x810100ab00222d861931c15e39b44e99;} // add 1 / 2^7\r\n if (x >= 0x808040155aabbbe9451521693554f733) {res += 0x00800000000000000000000000000000; x = x * FIXED_1 / 0x808040155aabbbe9451521693554f733;} // add 1 / 2^8\r\n\r\n z = y = x - FIXED_1;\r\n w = y * y / FIXED_1;\r\n res += z * (0x100000000000000000000000000000000 - y) / 0x100000000000000000000000000000000; z = z * w / FIXED_1; // add y^01 / 01 - y^02 / 02\r\n res += z * (0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - y) / 0x200000000000000000000000000000000; z = z * w / FIXED_1; // add y^03 / 03 - y^04 / 04\r\n res += z * (0x099999999999999999999999999999999 - y) / 0x300000000000000000000000000000000; z = z * w / FIXED_1; // add y^05 / 05 - y^06 / 06\r\n res += z * (0x092492492492492492492492492492492 - y) / 0x400000000000000000000000000000000; z = z * w / FIXED_1; // add y^07 / 07 - y^08 / 08\r\n res += z * (0x08e38e38e38e38e38e38e38e38e38e38e - y) / 0x500000000000000000000000000000000; z = z * w / FIXED_1; // add y^09 / 09 - y^10 / 10\r\n res += z * (0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b - y) / 0x600000000000000000000000000000000; z = z * w / FIXED_1; // add y^11 / 11 - y^12 / 12\r\n res += z * (0x089d89d89d89d89d89d89d89d89d89d89 - y) / 0x700000000000000000000000000000000; z = z * w / FIXED_1; // add y^13 / 13 - y^14 / 14\r\n res += z * (0x088888888888888888888888888888888 - y) / 0x800000000000000000000000000000000; // add y^15 / 15 - y^16 / 16\r\n\r\n return res;\r\n }\r\n\r\n /**\r\n * @dev computes e ^ (x / FIXED_1) * FIXED_1\r\n * input range: 0 <= x <= OPT_EXP_MAX_VAL - 1\r\n * auto-generated via 'PrintFunctionOptimalExp.py'\r\n * Detailed description:\r\n * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\r\n * - The exponentiation of each binary exponent is given (pre-calculated)\r\n * - The exponentiation of r is calculated via Taylor series for e^x, where x = r\r\n * - The exponentiation of the input is calculated by multiplying the intermediate results above\r\n * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859\r\n */\r\n function optimalExp(uint256 x) internal pure returns (uint256) {\r\n uint256 res = 0;\r\n\r\n uint256 y;\r\n uint256 z;\r\n\r\n z = y = x % 0x10000000000000000000000000000000; // get the input modulo 2^(-3)\r\n z = z * y / FIXED_1; res += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\r\n z = z * y / FIXED_1; res += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\r\n z = z * y / FIXED_1; res += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\r\n z = z * y / FIXED_1; res += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\r\n z = z * y / FIXED_1; res += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\r\n z = z * y / FIXED_1; res += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\r\n z = z * y / FIXED_1; res += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\r\n z = z * y / FIXED_1; res += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\r\n z = z * y / FIXED_1; res += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\r\n z = z * y / FIXED_1; res += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\r\n z = z * y / FIXED_1; res += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\r\n z = z * y / FIXED_1; res += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\r\n z = z * y / FIXED_1; res += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\r\n z = z * y / FIXED_1; res += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\r\n z = z * y / FIXED_1; res += z * 0x000000000001c638; // add y^16 * (20! / 16!)\r\n z = z * y / FIXED_1; res += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\r\n z = z * y / FIXED_1; res += z * 0x000000000000017c; // add y^18 * (20! / 18!)\r\n z = z * y / FIXED_1; res += z * 0x0000000000000014; // add y^19 * (20! / 19!)\r\n z = z * y / FIXED_1; res += z * 0x0000000000000001; // add y^20 * (20! / 20!)\r\n res = res / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0!\r\n\r\n if ((x & 0x010000000000000000000000000000000) != 0) res = res * 0x1c3d6a24ed82218787d624d3e5eba95f9 / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^2^(-3)\r\n if ((x & 0x020000000000000000000000000000000) != 0) res = res * 0x18ebef9eac820ae8682b9793ac6d1e778 / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^2^(-2)\r\n if ((x & 0x040000000000000000000000000000000) != 0) res = res * 0x1368b2fc6f9609fe7aceb46aa619baed5 / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^2^(-1)\r\n if ((x & 0x080000000000000000000000000000000) != 0) res = res * 0x0bc5ab1b16779be3575bd8f0520a9f21e / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^2^(+0)\r\n if ((x & 0x100000000000000000000000000000000) != 0) res = res * 0x0454aaa8efe072e7f6ddbab84b40a55c5 / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^2^(+1)\r\n if ((x & 0x200000000000000000000000000000000) != 0) res = res * 0x00960aadc109e7a3bf4578099615711d7 / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^2^(+2)\r\n if ((x & 0x400000000000000000000000000000000) != 0) res = res * 0x0002bf84208204f5977f9a8cf01fdc307 / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^2^(+3)\r\n\r\n return res;\r\n }\r\n\r\n /**\r\n * @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\r\n */\r\n function lowerStake(uint256 _x) internal view returns (uint256) {\r\n if (_x <= LAMBERT_CONV_RADIUS)\r\n return lambertPos1(_x);\r\n if (_x <= LAMBERT_POS2_MAXVAL)\r\n return lambertPos2(_x);\r\n if (_x <= LAMBERT_POS3_MAXVAL)\r\n return lambertPos3(_x);\r\n require(false);\r\n }\r\n\r\n /**\r\n * @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1\r\n */\r\n function higherStake(uint256 _x) internal pure returns (uint256) {\r\n if (_x <= LAMBERT_CONV_RADIUS)\r\n return lambertNeg1(_x);\r\n return FIXED_1 * FIXED_1 / _x;\r\n }\r\n\r\n /**\r\n * @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\r\n * input range: 1 <= x <= 1 / e * FIXED_1\r\n * auto-generated via 'PrintFunctionLambertPos1.py'\r\n */\r\n function lambertPos1(uint256 _x) internal pure returns (uint256) {\r\n uint256 xi = _x;\r\n uint256 res = (FIXED_1 - _x) * 0xde1bc4d19efcac82445da75b00000000; // x^(1-1) * (34! * 1^(1-1) / 1!) - x^(2-1) * (34! * 2^(2-1) / 2!)\r\n\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000000014d29a73a6e7b02c3668c7b0880000000; // add x^(03-1) * (34! * 03^(03-1) / 03!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x0000000002504a0cd9a7f7215b60f9be4800000000; // sub x^(04-1) * (34! * 04^(04-1) / 04!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000000484d0a1191c0ead267967c7a4a0000000; // add x^(05-1) * (34! * 05^(05-1) / 05!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x00000000095ec580d7e8427a4baf26a90a00000000; // sub x^(06-1) * (34! * 06^(06-1) / 06!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000001440b0be1615a47dba6e5b3b1f10000000; // add x^(07-1) * (34! * 07^(07-1) / 07!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x000000002d207601f46a99b4112418400000000000; // sub x^(08-1) * (34! * 08^(08-1) / 08!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000066ebaac4c37c622dd8288a7eb1b2000000; // add x^(09-1) * (34! * 09^(09-1) / 09!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x00000000ef17240135f7dbd43a1ba10cf200000000; // sub x^(10-1) * (34! * 10^(10-1) / 10!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000233c33c676a5eb2416094a87b3657000000; // add x^(11-1) * (34! * 11^(11-1) / 11!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x0000000541cde48bc0254bed49a9f8700000000000; // sub x^(12-1) * (34! * 12^(12-1) / 12!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000; // add x^(13-1) * (34! * 13^(13-1) / 13!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x0000001edb2aa2f760d15c41ceedba956400000000; // sub x^(14-1) * (34! * 14^(14-1) / 14!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000004ba8d20d2dabd386c9529659841a2e200000; // add x^(15-1) * (34! * 15^(15-1) / 15!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x000000bac08546b867cdaa20000000000000000000; // sub x^(16-1) * (34! * 16^(16-1) / 16!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000001cfa8e70c03625b9db76c8ebf5bbf24820000; // add x^(17-1) * (34! * 17^(17-1) / 17!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x000004851d99f82060df265f3309b26f8200000000; // sub x^(18-1) * (34! * 18^(18-1) / 18!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000b550d19b129d270c44f6f55f027723cbb0000; // add x^(19-1) * (34! * 19^(19-1) / 19!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x00001c877dadc761dc272deb65d4b0000000000000; // sub x^(20-1) * (34! * 20^(20-1) / 20!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000048178ece97479f33a77f2ad22a81b64406c000; // add x^(21-1) * (34! * 21^(21-1) / 21!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000; // sub x^(22-1) * (34! * 22^(22-1) / 22!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000; // add x^(23-1) * (34! * 23^(23-1) / 23!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x0004a1c37bd9f85fd9c6c780000000000000000000; // sub x^(24-1) * (34! * 24^(24-1) / 24!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000bd8369f1b702bf491e2ebfcee08250313b65400; // add x^(25-1) * (34! * 25^(25-1) / 25!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x001e5c7c32a9f6c70ab2cb59d9225764d400000000; // sub x^(26-1) * (34! * 26^(26-1) / 26!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x004dff5820e165e910f95120a708e742496221e600; // add x^(27-1) * (34! * 27^(27-1) / 27!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x00c8c8f66db1fced378ee50e536000000000000000; // sub x^(28-1) * (34! * 28^(28-1) / 28!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0205db8dffff45bfa2938f128f599dbf16eb11d880; // add x^(29-1) * (34! * 29^(29-1) / 29!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x053a044ebd984351493e1786af38d39a0800000000; // sub x^(30-1) * (34! * 30^(30-1) / 30!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0d86dae2a4cc0f47633a544479735869b487b59c40; // add x^(31-1) * (34! * 31^(31-1) / 31!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0x231000000000000000000000000000000000000000; // sub x^(32-1) * (34! * 32^(32-1) / 32!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x5b0485a76f6646c2039db1507cdd51b08649680822; // add x^(33-1) * (34! * 33^(33-1) / 33!)\r\n xi = (xi * _x) / FIXED_1; res -= xi * 0xec983c46c49545bc17efa6b5b0055e242200000000; // sub x^(34-1) * (34! * 34^(34-1) / 34!)\r\n\r\n return res / 0xde1bc4d19efcac82445da75b00000000; // divide by 34!\r\n }\r\n\r\n /**\r\n * @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\r\n * input range: LAMBERT_CONV_RADIUS + 1 <= x <= LAMBERT_POS2_MAXVAL\r\n */\r\n function lambertPos2(uint256 _x) internal view returns (uint256) {\r\n uint256 x = _x - LAMBERT_CONV_RADIUS - 1;\r\n uint256 i = x / LAMBERT_POS2_SAMPLE;\r\n uint256 a = LAMBERT_POS2_SAMPLE * i;\r\n uint256 b = LAMBERT_POS2_SAMPLE * (i + 1);\r\n uint256 c = lambertArray[i];\r\n uint256 d = lambertArray[i + 1];\r\n return (c * (b - x) + d * (x - a)) / LAMBERT_POS2_SAMPLE;\r\n }\r\n\r\n /**\r\n * @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\r\n * input range: LAMBERT_POS2_MAXVAL + 1 <= x <= LAMBERT_POS3_MAXVAL\r\n */\r\n function lambertPos3(uint256 _x) internal pure returns (uint256) {\r\n uint256 l1 = _x < OPT_LOG_MAX_VAL ? optimalLog(_x) : generalLog(_x);\r\n uint256 l2 = l1 < OPT_LOG_MAX_VAL ? optimalLog(l1) : generalLog(l1);\r\n return (l1 - l2 + l2 * FIXED_1 / l1) * FIXED_1 / _x;\r\n }\r\n\r\n /**\r\n * @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1\r\n * input range: 1 <= x <= 1 / e * FIXED_1\r\n * auto-generated via 'PrintFunctionLambertNeg1.py'\r\n */\r\n function lambertNeg1(uint256 _x) internal pure returns (uint256) {\r\n uint256 xi = _x;\r\n uint256 res = 0;\r\n\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000000014d29a73a6e7b02c3668c7b0880000000; // add x^(03-1) * (34! * 03^(03-1) / 03!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000002504a0cd9a7f7215b60f9be4800000000; // add x^(04-1) * (34! * 04^(04-1) / 04!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000000484d0a1191c0ead267967c7a4a0000000; // add x^(05-1) * (34! * 05^(05-1) / 05!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000000095ec580d7e8427a4baf26a90a00000000; // add x^(06-1) * (34! * 06^(06-1) / 06!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000001440b0be1615a47dba6e5b3b1f10000000; // add x^(07-1) * (34! * 07^(07-1) / 07!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000002d207601f46a99b4112418400000000000; // add x^(08-1) * (34! * 08^(08-1) / 08!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000066ebaac4c37c622dd8288a7eb1b2000000; // add x^(09-1) * (34! * 09^(09-1) / 09!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000000ef17240135f7dbd43a1ba10cf200000000; // add x^(10-1) * (34! * 10^(10-1) / 10!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000233c33c676a5eb2416094a87b3657000000; // add x^(11-1) * (34! * 11^(11-1) / 11!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000541cde48bc0254bed49a9f8700000000000; // add x^(12-1) * (34! * 12^(12-1) / 12!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000; // add x^(13-1) * (34! * 13^(13-1) / 13!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000001edb2aa2f760d15c41ceedba956400000000; // add x^(14-1) * (34! * 14^(14-1) / 14!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000004ba8d20d2dabd386c9529659841a2e200000; // add x^(15-1) * (34! * 15^(15-1) / 15!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000000bac08546b867cdaa20000000000000000000; // add x^(16-1) * (34! * 16^(16-1) / 16!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000001cfa8e70c03625b9db76c8ebf5bbf24820000; // add x^(17-1) * (34! * 17^(17-1) / 17!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000004851d99f82060df265f3309b26f8200000000; // add x^(18-1) * (34! * 18^(18-1) / 18!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00000b550d19b129d270c44f6f55f027723cbb0000; // add x^(19-1) * (34! * 19^(19-1) / 19!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00001c877dadc761dc272deb65d4b0000000000000; // add x^(20-1) * (34! * 20^(20-1) / 20!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000048178ece97479f33a77f2ad22a81b64406c000; // add x^(21-1) * (34! * 21^(21-1) / 21!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000; // add x^(22-1) * (34! * 22^(22-1) / 22!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000; // add x^(23-1) * (34! * 23^(23-1) / 23!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0004a1c37bd9f85fd9c6c780000000000000000000; // add x^(24-1) * (34! * 24^(24-1) / 24!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x000bd8369f1b702bf491e2ebfcee08250313b65400; // add x^(25-1) * (34! * 25^(25-1) / 25!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x001e5c7c32a9f6c70ab2cb59d9225764d400000000; // add x^(26-1) * (34! * 26^(26-1) / 26!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x004dff5820e165e910f95120a708e742496221e600; // add x^(27-1) * (34! * 27^(27-1) / 27!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x00c8c8f66db1fced378ee50e536000000000000000; // add x^(28-1) * (34! * 28^(28-1) / 28!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0205db8dffff45bfa2938f128f599dbf16eb11d880; // add x^(29-1) * (34! * 29^(29-1) / 29!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x053a044ebd984351493e1786af38d39a0800000000; // add x^(30-1) * (34! * 30^(30-1) / 30!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x0d86dae2a4cc0f47633a544479735869b487b59c40; // add x^(31-1) * (34! * 31^(31-1) / 31!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x231000000000000000000000000000000000000000; // add x^(32-1) * (34! * 32^(32-1) / 32!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0x5b0485a76f6646c2039db1507cdd51b08649680822; // add x^(33-1) * (34! * 33^(33-1) / 33!)\r\n xi = (xi * _x) / FIXED_1; res += xi * 0xec983c46c49545bc17efa6b5b0055e242200000000; // add x^(34-1) * (34! * 34^(34-1) / 34!)\r\n\r\n return res / 0xde1bc4d19efcac82445da75b00000000 + _x + FIXED_1; // divide by 34! and then add x^(2-1) * (34! * 2^(2-1) / 2!) + x^(1-1) * (34! * 1^(1-1) / 1!)\r\n }\r\n\r\n /**\r\n * @dev computes the weights based on \"W(log(hi / lo) * tq / rp) * tq / rp\", where \"W\" is a variation of the Lambert W function.\r\n */\r\n function balancedWeightsByStake(uint256 _hi, uint256 _lo, uint256 _tq, uint256 _rp, bool _lowerStake) internal view returns (uint32, uint32) {\r\n (_tq, _rp) = safeFactors(_tq, _rp);\r\n uint256 f = _hi.mul(FIXED_1) / _lo;\r\n uint256 g = f < OPT_LOG_MAX_VAL ? optimalLog(f) : generalLog(f);\r\n uint256 x = g.mul(_tq) / _rp;\r\n uint256 y = _lowerStake ? lowerStake(x) : higherStake(x);\r\n return normalizedWeights(y.mul(_tq), _rp.mul(FIXED_1));\r\n }\r\n\r\n /**\r\n * @dev reduces \"a\" and \"b\" while maintaining their ratio.\r\n */\r\n function safeFactors(uint256 _a, uint256 _b) internal pure returns (uint256, uint256) {\r\n if (_a <= FIXED_2 && _b <= FIXED_2)\r\n return (_a, _b);\r\n if (_a < FIXED_2)\r\n return (_a * FIXED_2 / _b, FIXED_2);\r\n if (_b < FIXED_2)\r\n return (FIXED_2, _b * FIXED_2 / _a);\r\n uint256 c = _a > _b ? _a : _b;\r\n uint256 n = floorLog2(c / FIXED_1);\r\n return (_a >> n, _b >> n);\r\n }\r\n\r\n /**\r\n * @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\".\r\n */\r\n function normalizedWeights(uint256 _a, uint256 _b) internal pure returns (uint32, uint32) {\r\n if (_a <= _b)\r\n return accurateWeights(_a, _b);\r\n (uint32 y, uint32 x) = accurateWeights(_b, _a);\r\n return (x, y);\r\n }\r\n\r\n /**\r\n * @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\", assuming that \"a <= b\".\r\n */\r\n function accurateWeights(uint256 _a, uint256 _b) internal pure returns (uint32, uint32) {\r\n if (_a > MAX_UNF_WEIGHT) {\r\n uint256 c = _a / (MAX_UNF_WEIGHT + 1) + 1;\r\n _a /= c;\r\n _b /= c;\r\n }\r\n uint256 x = roundDiv(_a * MAX_WEIGHT, _a.add(_b));\r\n uint256 y = MAX_WEIGHT - x;\r\n return (uint32(x), uint32(y));\r\n }\r\n\r\n /**\r\n * @dev computes the nearest integer to a given quotient without overflowing or underflowing.\r\n */\r\n function roundDiv(uint256 _n, uint256 _d) internal pure returns (uint256) {\r\n return _n / _d + _n % _d / (_d - _d / 2);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculatePurchaseReturn(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return purchaseTargetAmount(_supply, _reserveBalance, _reserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculateSaleReturn(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return saleTargetAmount(_supply, _reserveBalance, _reserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculateCrossReserveReturn(uint256 _sourceReserveBalance,\r\n uint32 _sourceReserveWeight,\r\n uint256 _targetReserveBalance,\r\n uint32 _targetReserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return crossReserveTargetAmount(_sourceReserveBalance, _sourceReserveWeight, _targetReserveBalance, _targetReserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculateCrossConnectorReturn(uint256 _sourceReserveBalance,\r\n uint32 _sourceReserveWeight,\r\n uint256 _targetReserveBalance,\r\n uint32 _targetReserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return crossReserveTargetAmount(_sourceReserveBalance, _sourceReserveWeight, _targetReserveBalance, _targetReserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculateFundCost(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return fundCost(_supply, _reserveBalance, _reserveRatio, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function calculateLiquidateReturn(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return liquidateReserveAmount(_supply, _reserveBalance, _reserveRatio, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function purchaseRate(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return purchaseTargetAmount(_supply, _reserveBalance, _reserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function saleRate(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return saleTargetAmount(_supply, _reserveBalance, _reserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function crossReserveRate(uint256 _sourceReserveBalance,\r\n uint32 _sourceReserveWeight,\r\n uint256 _targetReserveBalance,\r\n uint32 _targetReserveWeight,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return crossReserveTargetAmount(_sourceReserveBalance, _sourceReserveWeight, _targetReserveBalance, _targetReserveWeight, _amount);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function liquidateRate(uint256 _supply,\r\n uint256 _reserveBalance,\r\n uint32 _reserveRatio,\r\n uint256 _amount)\r\n public view returns (uint256)\r\n {\r\n return liquidateReserveAmount(_supply, _reserveBalance, _reserveRatio, _amount);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol", + "exportedSymbols": { + "BancorFormula": [ + 8977 + ] + }, + "id": 8978, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3564, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:7" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./interfaces/IBancorFormula.sol", + "id": 3565, + "nodeType": "ImportDirective", + "scope": 8978, + "sourceUnit": 13178, + "src": "77:41:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 3566, + "nodeType": "ImportDirective", + "scope": 8978, + "sourceUnit": 22355, + "src": "120:33:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3567, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "183:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 3568, + "nodeType": "InheritanceSpecifier", + "src": "183:14:7" + } + ], + "contractDependencies": [ + 13177 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 8977, + "linearizedBaseContracts": [ + 8977, + 13177 + ], + "name": "BancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3571, + "libraryName": { + "contractScope": null, + "id": 3569, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "211:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "205:27:7", + "typeName": { + "id": 3570, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 3574, + "mutability": "constant", + "name": "ONE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "240:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 3573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "271:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3577, + "mutability": "constant", + "name": "MAX_WEIGHT", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "279:44:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 3575, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "279:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "316:7:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3580, + "mutability": "constant", + "name": "MIN_PRECISION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "330:41:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3578, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "330:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3332", + "id": 3579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "369:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3583, + "mutability": "constant", + "name": "MAX_PRECISION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "378:42:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3581, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "378:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "313237", + "id": 3582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "417:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3586, + "mutability": "constant", + "name": "FIXED_1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "484:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078303830303030303030303030303030303030303030303030303030303030303030", + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "519:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170141183460469231731687303715884105728_by_1", + "typeString": "int_const 1701...(31 digits omitted)...5728" + }, + "value": "0x080000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3589, + "mutability": "constant", + "name": "FIXED_2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "561:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3587, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "561:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "596:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3592, + "mutability": "constant", + "name": "MAX_NUM", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "638:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "638:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 3591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "673:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3595, + "mutability": "constant", + "name": "LN2_NUMERATOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "772:76:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "772:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307833663830666530336638306665303366383066653033663830666530336638", + "id": 3594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "815:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5275695611177340518812009417546793976_by_1", + "typeString": "int_const 5275...(29 digits omitted)...3976" + }, + "value": "0x3f80fe03f80fe03f80fe03f80fe03f8" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3598, + "mutability": "constant", + "name": "LN2_DENOMINATOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "855:76:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307835623964653164313062663431303364363437623039353538393762613830", + "id": 3597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "898:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7611219895485218073587121647846406784_by_1", + "typeString": "int_const 7611...(29 digits omitted)...6784" + }, + "value": "0x5b9de1d10bf4103d647b0955897ba80" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3601, + "mutability": "constant", + "name": "OPT_LOG_MAX_VAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1029:78:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1029:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313562663061386231343537363935333535666238616334303465376137396533", + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1072:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_462491687273110168575455517921668397539_by_1", + "typeString": "int_const 4624...(31 digits omitted)...7539" + }, + "value": "0x15bf0a8b1457695355fb8ac404e7a79e3" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3604, + "mutability": "constant", + "name": "OPT_EXP_MAX_VAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1114:78:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3602, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1114:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078383030303030303030303030303030303030303030303030303030303030303030", + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1157:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691648_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1648" + }, + "value": "0x800000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3607, + "mutability": "constant", + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1253:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830303266313661633663353964653666386435643666363363313438326137633836", + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1300:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62591443491685266058625363149075414150_by_1", + "typeString": "int_const 6259...(30 digits omitted)...4150" + }, + "value": "0x002f16ac6c59de6f8d5d6f63c1482a7c86" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3610, + "mutability": "constant", + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1343:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1343:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830303033303630633138333036306331383330363063313833303630633138333036", + "id": 3609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1390:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4019083073869351930669778827934270214_by_1", + "typeString": "int_const 4019...(29 digits omitted)...0214" + }, + "value": "0x0003060c183060c183060c183060c18306" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3613, + "mutability": "constant", + "name": "LAMBERT_POS2_MAXVAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1433:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1433:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830316166313661633663353964653666386435643666363363313438326137633830", + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1480:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_573014993873092961253687274296727731328_by_1", + "typeString": "int_const 5730...(31 digits omitted)...1328" + }, + "value": "0x01af16ac6c59de6f8d5d6f63c1482a7c80" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3616, + "mutability": "constant", + "name": "LAMBERT_POS3_MAXVAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1523:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1523:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307836623232643433653732633332363533396363656565663862623438663235356666", + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1570:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36456509045932913977692090597752865707519_by_1", + "typeString": "int_const 3645...(33 digits omitted)...7519" + }, + "value": "0x6b22d43e72c326539cceeef8bb48f255ff" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3619, + "mutability": "constant", + "name": "MAX_UNF_WEIGHT", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1666:104:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3617, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313063366637613062356564386433366234633766333439333835383336323166616663386230303739613238333464323666613366636339656139", + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:62:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129_by_1", + "typeString": "int_const 1157...(64 digits omitted)...3129" + }, + "value": "0x10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea9" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3623, + "mutability": "mutable", + "name": "maxExpArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1828:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128]" + }, + "typeName": { + "baseType": { + "id": 3620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3622, + "length": { + "argumentTypes": null, + "hexValue": "313238", + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1836:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "ArrayTypeName", + "src": "1828:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage_ptr", + "typeString": "uint256[128]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4202, + "nodeType": "Block", + "src": "1902:8456:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3626, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4025:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3628, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4038:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4025:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831633335666564643134666666666666666666666666666666666666666666666666", + "id": 3629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4044:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9599678685041259184274752310158947254271_by_1", + "typeString": "int_const 9599...(32 digits omitted)...4271" + }, + "value": "0x1c35fedd14ffffffffffffffffffffffff" + }, + "src": "4025:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3631, + "nodeType": "ExpressionStatement", + "src": "4025:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3632, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4091:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3634, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3333", + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4104:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "33" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4091:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831623063653433623332336666666666666666666666666666666666666666666666", + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4110:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9204759687141885226475603015507577405439_by_1", + "typeString": "int_const 9204...(32 digits omitted)...5439" + }, + "value": "0x1b0ce43b323fffffffffffffffffffffff" + }, + "src": "4091:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3637, + "nodeType": "ExpressionStatement", + "src": "4091:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3638, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4157:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3640, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3334", + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4170:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "34" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4157:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831396630303238656331666666666666666666666666666666666666666666666666", + "id": 3641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4176:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8826087172077985712041017634911355404287_by_1", + "typeString": "int_const 8826...(32 digits omitted)...4287" + }, + "value": "0x19f0028ec1ffffffffffffffffffffffff" + }, + "src": "4157:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3643, + "nodeType": "ExpressionStatement", + "src": "4157:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3644, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4223:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3646, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3335", + "id": 3645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4236:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35_by_1", + "typeString": "int_const 35" + }, + "value": "35" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4223:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831386465643931663065376666666666666666666666666666666666666666666666", + "id": 3647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4242:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8462992779488582574159642900919291478015_by_1", + "typeString": "int_const 8462...(32 digits omitted)...8015" + }, + "value": "0x18ded91f0e7fffffffffffffffffffffff" + }, + "src": "4223:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3649, + "nodeType": "ExpressionStatement", + "src": "4223:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3650, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4289:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3652, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3336", + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4302:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36_by_1", + "typeString": "int_const 36" + }, + "value": "36" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4289:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831376438656337663034313766666666666666666666666666666666666666666666", + "id": 3653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4308:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8114835644520100661580084966409403105279_by_1", + "typeString": "int_const 8114...(32 digits omitted)...5279" + }, + "value": "0x17d8ec7f0417ffffffffffffffffffffff" + }, + "src": "4289:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "4289:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3656, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4355:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3658, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3337", + "id": 3657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4368:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_37_by_1", + "typeString": "int_const 37" + }, + "value": "37" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4355:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831366464633635353663646266666666666666666666666666666666666666666666", + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4374:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7781001266736647064069662172832600162303_by_1", + "typeString": "int_const 7781...(32 digits omitted)...2303" + }, + "value": "0x16ddc6556cdbffffffffffffffffffffff" + }, + "src": "4355:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3661, + "nodeType": "ExpressionStatement", + "src": "4355:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3662, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4421:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3664, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3338", + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4434:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_38_by_1", + "typeString": "int_const 38" + }, + "value": "38" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4421:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831356563663532373736613166666666666666666666666666666666666666666666", + "id": 3665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4440:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7460900425488323202194551465008353509375_by_1", + "typeString": "int_const 7460...(32 digits omitted)...9375" + }, + "value": "0x15ecf52776a1ffffffffffffffffffffff" + }, + "src": "4421:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3667, + "nodeType": "ExpressionStatement", + "src": "4421:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3668, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4487:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3670, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 3669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4500:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4487:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831353036306332353663623266666666666666666666666666666666666666666666", + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4506:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7153968139937914349310206877837545177087_by_1", + "typeString": "int_const 7153...(32 digits omitted)...7087" + }, + "value": "0x15060c256cb2ffffffffffffffffffffff" + }, + "src": "4487:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3673, + "nodeType": "ExpressionStatement", + "src": "4487:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3674, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4553:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3676, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3430", + "id": 3675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4566:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4553:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831343238613266393864373266666666666666666666666666666666666666666666", + "id": 3677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4572:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6859662671868001546166128217910528704511_by_1", + "typeString": "int_const 6859...(32 digits omitted)...4511" + }, + "value": "0x1428a2f98d72ffffffffffffffffffffff" + }, + "src": "4553:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3679, + "nodeType": "ExpressionStatement", + "src": "4553:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3680, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4619:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3682, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3431", + "id": 3681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4632:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4619:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831333534353539386535633233666666666666666666666666666666666666666666", + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4638:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6577464569506365633454696454958677491711_by_1", + "typeString": "int_const 6577...(32 digits omitted)...1711" + }, + "value": "0x13545598e5c23fffffffffffffffffffff" + }, + "src": "4619:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3685, + "nodeType": "ExpressionStatement", + "src": "4619:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3686, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4685:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3688, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3432", + "id": 3687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4698:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42_by_1", + "typeString": "int_const 42" + }, + "value": "42" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4685:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831323838633431363163653164666666666666666666666666666666666666666666", + "id": 3689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4704:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6306875750689218484600399768107450630143_by_1", + "typeString": "int_const 6306...(32 digits omitted)...0143" + }, + "value": "0x1288c4161ce1dfffffffffffffffffffff" + }, + "src": "4685:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3691, + "nodeType": "ExpressionStatement", + "src": "4685:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3692, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4751:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3694, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3433", + "id": 3693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4764:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_43_by_1", + "typeString": "int_const 43" + }, + "value": "43" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4751:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831316335393237363163363636666666666666666666666666666666666666666666", + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4770:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6047418623741353042663269283551730728959_by_1", + "typeString": "int_const 6047...(32 digits omitted)...8959" + }, + "value": "0x11c592761c666fffffffffffffffffffff" + }, + "src": "4751:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3697, + "nodeType": "ExpressionStatement", + "src": "4751:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3698, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4817:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3700, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3434", + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4830:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_44_by_1", + "typeString": "int_const 44" + }, + "value": "44" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4817:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831313061363838363830613735376666666666666666666666666666666666666666", + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4836:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5798635244522972732941736303310812479487_by_1", + "typeString": "int_const 5798...(32 digits omitted)...9487" + }, + "value": "0x110a688680a757ffffffffffffffffffff" + }, + "src": "4817:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3703, + "nodeType": "ExpressionStatement", + "src": "4817:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3704, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4883:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3706, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3435", + "id": 3705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4896:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_45_by_1", + "typeString": "int_const 45" + }, + "value": "45" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4883:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831303536663162356265646637376666666666666666666666666666666666666666", + "id": 3707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4902:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5560086508154074440893281558760167309311_by_1", + "typeString": "int_const 5560...(32 digits omitted)...9311" + }, + "value": "0x1056f1b5bedf77ffffffffffffffffffff" + }, + "src": "4883:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3709, + "nodeType": "ExpressionStatement", + "src": "4883:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3710, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4949:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3712, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3436", + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4962:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_46_by_1", + "typeString": "int_const 46" + }, + "value": "46" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4949:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830666161646365636565666638626666666666666666666666666666666666666666", + "id": 3713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4968:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5331351373990447379730864460340651884543_by_1", + "typeString": "int_const 5331...(32 digits omitted)...4543" + }, + "value": "0x0faadceceeff8bffffffffffffffffffff" + }, + "src": "4949:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3715, + "nodeType": "ExpressionStatement", + "src": "4949:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3716, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5015:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3718, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3437", + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5028:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5015:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830663035646336623237656461646666666666666666666666666666666666666666", + "id": 3719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5034:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5112026122483163422598731111238626967551_by_1", + "typeString": "int_const 5112...(32 digits omitted)...7551" + }, + "value": "0x0f05dc6b27edadffffffffffffffffffff" + }, + "src": "5015:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3721, + "nodeType": "ExpressionStatement", + "src": "5015:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3722, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5081:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3724, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 3723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5094:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5081:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830653637613561323564613431303766666666666666666666666666666666666666", + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5100:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4901723642609993464238960471454494228479_by_1", + "typeString": "int_const 4901...(32 digits omitted)...8479" + }, + "value": "0x0e67a5a25da4107fffffffffffffffffff" + }, + "src": "5081:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3727, + "nodeType": "ExpressionStatement", + "src": "5081:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3728, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5147:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3730, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3439", + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5160:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "49" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5147:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830646366663131356231346565646666666666666666666666666666666666666666", + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5166:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4700072748620998500994433661760029327359_by_1", + "typeString": "int_const 4700...(32 digits omitted)...7359" + }, + "value": "0x0dcff115b14eedffffffffffffffffffff" + }, + "src": "5147:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3733, + "nodeType": "ExpressionStatement", + "src": "5147:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3734, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5213:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3736, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 3735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5226:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5213:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830643365376133393234333132333966666666666666666666666666666666666666", + "id": 3737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5232:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4506717524892375150236886652795301658623_by_1", + "typeString": "int_const 4506...(32 digits omitted)...8623" + }, + "value": "0x0d3e7a392431239fffffffffffffffffff" + }, + "src": "5213:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3739, + "nodeType": "ExpressionStatement", + "src": "5213:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3740, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5279:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3742, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3531", + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5292:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51_by_1", + "typeString": "int_const 51" + }, + "value": "51" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5279:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830636232666635323965623731653466666666666666666666666666666666666666", + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5298:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4321316697732212547034601541953113817087_by_1", + "typeString": "int_const 4321...(32 digits omitted)...7087" + }, + "value": "0x0cb2ff529eb71e4fffffffffffffffffff" + }, + "src": "5279:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3745, + "nodeType": "ExpressionStatement", + "src": "5279:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3746, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5345:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3748, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3532", + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5358:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_52_by_1", + "typeString": "int_const 52" + }, + "value": "52" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5345:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830633264343135633364623937346166666666666666666666666666666666666666", + "id": 3749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5364:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4143543033029384782309349805264440655871_by_1", + "typeString": "int_const 4143...(32 digits omitted)...5871" + }, + "value": "0x0c2d415c3db974afffffffffffffffffff" + }, + "src": "5345:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3751, + "nodeType": "ExpressionStatement", + "src": "5345:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3752, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5411:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3754, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3533", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5424:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_53_by_1", + "typeString": "int_const 53" + }, + "value": "53" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5411:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830626164303365376438383366363962666666666666666666666666666666666666", + "id": 3755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5430:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3973082758682431363936722477132055314431_by_1", + "typeString": "int_const 3973...(32 digits omitted)...4431" + }, + "value": "0x0bad03e7d883f69bffffffffffffffffff" + }, + "src": "5411:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3757, + "nodeType": "ExpressionStatement", + "src": "5411:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3758, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5477:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3760, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3534", + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5490:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_54_by_1", + "typeString": "int_const 54" + }, + "value": "54" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5477:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830623332306430336232633334336435666666666666666666666666666666666666", + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5496:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3809635010789003168527049097368437784575_by_1", + "typeString": "int_const 3809...(32 digits omitted)...4575" + }, + "value": "0x0b320d03b2c343d5ffffffffffffffffff" + }, + "src": "5477:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3763, + "nodeType": "ExpressionStatement", + "src": "5477:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3764, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5543:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3766, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3535", + "id": 3765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5556:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5543:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830616263323532303465303238323864666666666666666666666666666666666666", + "id": 3767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5562:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3652911302618395401280222488042819026943_by_1", + "typeString": "int_const 3652...(32 digits omitted)...6943" + }, + "value": "0x0abc25204e02828dffffffffffffffffff" + }, + "src": "5543:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3769, + "nodeType": "ExpressionStatement", + "src": "5543:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3770, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5609:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3772, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3536", + "id": 3771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5622:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5609:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830613462313666373465653462623230376666666666666666666666666666666666", + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5628:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3502635015429898674229017626613836152831_by_1", + "typeString": "int_const 3502...(32 digits omitted)...2831" + }, + "value": "0x0a4b16f74ee4bb207fffffffffffffffff" + }, + "src": "5609:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3775, + "nodeType": "ExpressionStatement", + "src": "5609:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3776, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5675:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3778, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3537", + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5688:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57_by_1", + "typeString": "int_const 57" + }, + "value": "57" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5675:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830396465616637333661633166353639666666666666666666666666666666666666", + "id": 3779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5694:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3358540910238258030536300376569398951935_by_1", + "typeString": "int_const 3358...(32 digits omitted)...1935" + }, + "value": "0x09deaf736ac1f569ffffffffffffffffff" + }, + "src": "5675:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3781, + "nodeType": "ExpressionStatement", + "src": "5675:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3782, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5741:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3784, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3538", + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5754:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5741:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830393736626439393532633761613935376666666666666666666666666666666666", + "id": 3785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5760:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3220374659664501751807634855053158776831_by_1", + "typeString": "int_const 3220...(32 digits omitted)...6831" + }, + "value": "0x0976bd9952c7aa957fffffffffffffffff" + }, + "src": "5741:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3787, + "nodeType": "ExpressionStatement", + "src": "5741:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3788, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5807:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3790, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3539", + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5820:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59_by_1", + "typeString": "int_const 59" + }, + "value": "59" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5807:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830393133313237313932326561613630366666666666666666666666666666666666", + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5826:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3087892399045852422628542596524428754943_by_1", + "typeString": "int_const 3087...(32 digits omitted)...4943" + }, + "value": "0x09131271922eaa606fffffffffffffffff" + }, + "src": "5807:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3793, + "nodeType": "ExpressionStatement", + "src": "5807:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3794, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5873:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3796, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3630", + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5886:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "60" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5873:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830386233383066333535383636386334366666666666666666666666666666666666", + "id": 3797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5892:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2960860296012425255212778080756987592703_by_1", + "typeString": "int_const 2960...(32 digits omitted)...2703" + }, + "value": "0x08b380f3558668c46fffffffffffffffff" + }, + "src": "5873:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3799, + "nodeType": "ExpressionStatement", + "src": "5873:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3800, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5939:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3802, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3631", + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5952:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61_by_1", + "typeString": "int_const 61" + }, + "value": "61" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5939:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830383537646466303131376566613231356266666666666666666666666666666666", + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5958:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2839054137771012724926516325250418868223_by_1", + "typeString": "int_const 2839...(32 digits omitted)...8223" + }, + "value": "0x0857ddf0117efa215bffffffffffffffff" + }, + "src": "5939:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3805, + "nodeType": "ExpressionStatement", + "src": "5939:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3806, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6005:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3808, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3632", + "id": 3807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6018:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62_by_1", + "typeString": "int_const 62" + }, + "value": "62" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6005:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830376666666666666666666666666666666666666666666666666666666666666666", + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6024:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691647_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1647" + }, + "value": "0x07ffffffffffffffffffffffffffffffff" + }, + "src": "6005:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3811, + "nodeType": "ExpressionStatement", + "src": "6005:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3812, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6071:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3814, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3633", + "id": 3813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6084:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63_by_1", + "typeString": "int_const 63" + }, + "value": "63" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6071:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830376162626636663661626239643038376666666666666666666666666666666666", + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6090:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2610268544229484780765045556213696167935_by_1", + "typeString": "int_const 2610...(32 digits omitted)...7935" + }, + "value": "0x07abbf6f6abb9d087fffffffffffffffff" + }, + "src": "6071:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3817, + "nodeType": "ExpressionStatement", + "src": "6071:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3818, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6137:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3820, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6150:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6137:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830373561663632636261633935663764666137666666666666666666666666666666", + "id": 3821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6156:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2502885300319193958571922333378000453631_by_1", + "typeString": "int_const 2502...(32 digits omitted)...3631" + }, + "value": "0x075af62cbac95f7dfa7fffffffffffffff" + }, + "src": "6137:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3823, + "nodeType": "ExpressionStatement", + "src": "6137:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3824, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6203:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3826, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3635", + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6216:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830373064376662373435326531383761633133666666666666666666666666666666", + "id": 3827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6222:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2399919671254773659805118819743970623487_by_1", + "typeString": "int_const 2399...(32 digits omitted)...3487" + }, + "value": "0x070d7fb7452e187ac13fffffffffffffff" + }, + "src": "6203:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3829, + "nodeType": "ExpressionStatement", + "src": "6203:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3830, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6269:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3832, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3636", + "id": 3831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6282:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66_by_1", + "typeString": "int_const 66" + }, + "value": "66" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6269:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830366333333930656363386166333739323935666666666666666666666666666666", + "id": 3833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6288:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2301189921783908737703717501630802821119_by_1", + "typeString": "int_const 2301...(32 digits omitted)...1119" + }, + "value": "0x06c3390ecc8af379295fffffffffffffff" + }, + "src": "6269:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3835, + "nodeType": "ExpressionStatement", + "src": "6269:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3836, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6335:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3838, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3637", + "id": 3837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6348:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67_by_1", + "typeString": "int_const 67" + }, + "value": "67" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6335:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830363763303061336230376666633031666436666666666666666666666666666666", + "id": 3839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6354:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2206521793019491601704439134261549727743_by_1", + "typeString": "int_const 2206...(32 digits omitted)...7743" + }, + "value": "0x067c00a3b07ffc01fd6fffffffffffffff" + }, + "src": "6335:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3841, + "nodeType": "ExpressionStatement", + "src": "6335:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3842, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3844, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3638", + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6414:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68_by_1", + "typeString": "int_const 68" + }, + "value": "68" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6401:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830363337623634376333396362623964336432376666666666666666666666666666", + "id": 3845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6420:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2115748194871134515168564783402692116479_by_1", + "typeString": "int_const 2115...(32 digits omitted)...6479" + }, + "value": "0x0637b647c39cbb9d3d27ffffffffffffff" + }, + "src": "6401:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3847, + "nodeType": "ExpressionStatement", + "src": "6401:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3848, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6467:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3850, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3639", + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6480:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69_by_1", + "typeString": "int_const 69" + }, + "value": "69" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6467:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830356636336231666331303464626433393538376666666666666666666666666666", + "id": 3851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6486:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2028708911129671949307566740521183346687_by_1", + "typeString": "int_const 2028...(32 digits omitted)...6687" + }, + "value": "0x05f63b1fc104dbd39587ffffffffffffff" + }, + "src": "6467:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3853, + "nodeType": "ExpressionStatement", + "src": "6467:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3854, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6533:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3856, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3730", + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6546:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70_by_1", + "typeString": "int_const 70" + }, + "value": "70" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6533:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830356237373139353562333665313266373233356666666666666666666666666666", + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6552:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1945250316684124513375052119057996185599_by_1", + "typeString": "int_const 1945...(32 digits omitted)...5599" + }, + "value": "0x05b771955b36e12f7235ffffffffffffff" + }, + "src": "6533:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3859, + "nodeType": "ExpressionStatement", + "src": "6533:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3860, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6599:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3862, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3731", + "id": 3861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6612:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6599:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353762336434396464613834353536643666366666666666666666666666666666", + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6618:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1865225106372009884014199587421481336831_by_1", + "typeString": "int_const 1865...(32 digits omitted)...6831" + }, + "value": "0x057b3d49dda84556d6f6ffffffffffffff" + }, + "src": "6599:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3865, + "nodeType": "ExpressionStatement", + "src": "6599:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3866, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6665:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3868, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3732", + "id": 3867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6678:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6665:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353431383330393562326338656365636633306666666666666666666666666666", + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6684:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1788492034984419117666073304513300660223_by_1", + "typeString": "int_const 1788...(32 digits omitted)...0223" + }, + "value": "0x054183095b2c8ececf30ffffffffffffff" + }, + "src": "6665:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3871, + "nodeType": "ExpressionStatement", + "src": "6665:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3872, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6731:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3874, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3733", + "id": 3873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6744:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73_by_1", + "typeString": "int_const 73" + }, + "value": "73" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6731:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353061323862653633356361326238383866373766666666666666666666666666", + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6750:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1714915667966964990208967912165996494847_by_1", + "typeString": "int_const 1714...(32 digits omitted)...4847" + }, + "value": "0x050a28be635ca2b888f77fffffffffffff" + }, + "src": "6731:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3877, + "nodeType": "ExpressionStatement", + "src": "6731:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3878, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6797:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3880, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3734", + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6810:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74_by_1", + "typeString": "int_const 74" + }, + "value": "74" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6797:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830346435313536363339373038633964623333633366666666666666666666666666", + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6816:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1644366142376587317378242124992063995903_by_1", + "typeString": "int_const 1644...(32 digits omitted)...5903" + }, + "value": "0x04d5156639708c9db33c3fffffffffffff" + }, + "src": "6797:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3883, + "nodeType": "ExpressionStatement", + "src": "6797:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3884, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6863:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3886, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3735", + "id": 3885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6876:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75_by_1", + "typeString": "int_const 75" + }, + "value": "75" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6863:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830346132333130353837333837356264353264666466666666666666666666666666", + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6882:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1576718937672301888428671268411708276735_by_1", + "typeString": "int_const 1576...(32 digits omitted)...6735" + }, + "value": "0x04a23105873875bd52dfdfffffffffffff" + }, + "src": "6863:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3889, + "nodeType": "ExpressionStatement", + "src": "6863:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3890, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6929:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3892, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3736", + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6942:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76_by_1", + "typeString": "int_const 76" + }, + "value": "76" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6929:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343731363439643837313939616139393037353666666666666666666666666666", + "id": 3893, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6948:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1511854655935336643558907106913628979199_by_1", + "typeString": "int_const 1511...(32 digits omitted)...9199" + }, + "value": "0x0471649d87199aa990756fffffffffffff" + }, + "src": "6929:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3895, + "nodeType": "ExpressionStatement", + "src": "6929:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3896, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6995:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3898, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3737", + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7008:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77_by_1", + "typeString": "int_const 77" + }, + "value": "77" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6995:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343432396132316130323964346331343537636662666666666666666666666666", + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7014:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1449658811130741678082357454851673161727_by_1", + "typeString": "int_const 1449...(32 digits omitted)...1727" + }, + "value": "0x04429a21a029d4c1457cfbffffffffffff" + }, + "src": "6995:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3901, + "nodeType": "ExpressionStatement", + "src": "6995:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3902, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7061:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3904, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3738", + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7074:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78_by_1", + "typeString": "int_const 78" + }, + "value": "78" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7061:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343135626336643666623764643731616632636233666666666666666666666666", + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7080:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1390021627038517938156314751863424548863_by_1", + "typeString": "int_const 1390...(32 digits omitted)...8863" + }, + "value": "0x0415bc6d6fb7dd71af2cb3ffffffffffff" + }, + "src": "7061:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3907, + "nodeType": "ExpressionStatement", + "src": "7061:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3908, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7127:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3910, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3739", + "id": 3909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79_by_1", + "typeString": "int_const 79" + }, + "value": "79" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7127:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830336561623733623362626665323832323433636531666666666666666666666666", + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7146:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1332837843497611250583009129150422188031_by_1", + "typeString": "int_const 1332...(32 digits omitted)...8031" + }, + "value": "0x03eab73b3bbfe282243ce1ffffffffffff" + }, + "src": "7127:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3913, + "nodeType": "ExpressionStatement", + "src": "7127:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3914, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7193:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3916, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3830", + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7206:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7193:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830336331373731616339666236623463313865323239666666666666666666666666", + "id": 3917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7212:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1278006530620790610545644364558728429567_by_1", + "typeString": "int_const 1278...(32 digits omitted)...9567" + }, + "value": "0x03c1771ac9fb6b4c18e229ffffffffffff" + }, + "src": "7193:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3919, + "nodeType": "ExpressionStatement", + "src": "7193:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3920, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7259:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3922, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3831", + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7272:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "81" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7259:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333939653936383937363930343138663738353235376666666666666666666666", + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7278:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1225430910652498332846748256431392161791_by_1", + "typeString": "int_const 1225...(32 digits omitted)...1791" + }, + "value": "0x0399e96897690418f785257fffffffffff" + }, + "src": "7259:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3925, + "nodeType": "ExpressionStatement", + "src": "7259:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3926, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7325:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3928, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3832", + "id": 3927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82_by_1", + "typeString": "int_const 82" + }, + "value": "82" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7325:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333733666334353663353362623737396266306561396666666666666666666666", + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7344:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1175018187155249585623915264673694351359_by_1", + "typeString": "int_const 1175...(32 digits omitted)...1359" + }, + "value": "0x0373fc456c53bb779bf0ea9fffffffffff" + }, + "src": "7325:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3931, + "nodeType": "ExpressionStatement", + "src": "7325:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3932, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7391:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3934, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3833", + "id": 3933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7404:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83_by_1", + "typeString": "int_const 83" + }, + "value": "83" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7391:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333466396538653439306334386536376536616238626666666666666666666666", + "id": 3935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7410:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1126679381223093780446468558216906145791_by_1", + "typeString": "int_const 1126...(32 digits omitted)...5791" + }, + "value": "0x034f9e8e490c48e67e6ab8bfffffffffff" + }, + "src": "7391:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3937, + "nodeType": "ExpressionStatement", + "src": "7391:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3938, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7457:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3940, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3834", + "id": 3939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7470:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84_by_1", + "typeString": "int_const 84" + }, + "value": "84" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7457:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333263626664346137616463373930353630623333333766666666666666666666", + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7476:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1080329174433053119456411494679599644671_by_1", + "typeString": "int_const 1080...(32 digits omitted)...4671" + }, + "value": "0x032cbfd4a7adc790560b3337ffffffffff" + }, + "src": "7457:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3943, + "nodeType": "ExpressionStatement", + "src": "7457:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3944, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7523:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3946, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3835", + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7536:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85_by_1", + "typeString": "int_const 85" + }, + "value": "85" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7523:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333062353035373066366535643261636361393436313366666666666666666666", + "id": 3947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7542:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1035885758257346189907937735244580388863_by_1", + "typeString": "int_const 1035...(32 digits omitted)...8863" + }, + "value": "0x030b50570f6e5d2acca94613ffffffffff" + }, + "src": "7523:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3949, + "nodeType": "ExpressionStatement", + "src": "7523:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3950, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7589:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3952, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3836", + "id": 3951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7602:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86_by_1", + "typeString": "int_const 86" + }, + "value": "86" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7589:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326562343066396636323066646136623536633238363166666666666666666666", + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7608:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_993270689670607839608468400662101622783_by_1", + "typeString": "int_const 9932...(31 digits omitted)...2783" + }, + "value": "0x02eb40f9f620fda6b56c2861ffffffffff" + }, + "src": "7589:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3955, + "nodeType": "ExpressionStatement", + "src": "7589:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3956, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7655:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3958, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3837", + "id": 3957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7668:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7655:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326363383334306563623064306635323061366166353866666666666666666666", + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7674:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_952408752697250790372885759853747765247_by_1", + "typeString": "int_const 9524...(31 digits omitted)...5247" + }, + "value": "0x02cc8340ecb0d0f520a6af58ffffffffff" + }, + "src": "7655:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3961, + "nodeType": "ExpressionStatement", + "src": "7655:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3962, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7721:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3964, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3838", + "id": 3963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7734:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7721:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326166303934383133383061306133356366316261303266666666666666666666", + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7740:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_913227825654598849673391073164504596479_by_1", + "typeString": "int_const 9132...(31 digits omitted)...6479" + }, + "value": "0x02af09481380a0a35cf1ba02ffffffffff" + }, + "src": "7721:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3967, + "nodeType": "ExpressionStatement", + "src": "7721:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3968, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7787:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3970, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3839", + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7800:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89_by_1", + "typeString": "int_const 89" + }, + "value": "89" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7787:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323932633562646433623932656338313032383762316233666666666666666666", + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7806:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_875658753857474668265023456619450597375_by_1", + "typeString": "int_const 8756...(31 digits omitted)...7375" + }, + "value": "0x0292c5bdd3b92ec810287b1b3fffffffff" + }, + "src": "7787:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3973, + "nodeType": "ExpressionStatement", + "src": "7787:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3974, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7853:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3976, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3930", + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7866:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90_by_1", + "typeString": "int_const 90" + }, + "value": "90" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7853:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323737616264636461623037643561373761633664366239666666666666666666", + "id": 3977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7872:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_839635227559564507480479102760887779327_by_1", + "typeString": "int_const 8396...(31 digits omitted)...9327" + }, + "value": "0x0277abdcdab07d5a77ac6d6b9fffffffff" + }, + "src": "7853:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3979, + "nodeType": "ExpressionStatement", + "src": "7853:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3980, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7919:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3982, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3931", + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7932:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91_by_1", + "typeString": "int_const 91" + }, + "value": "91" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7919:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323564616636363534623165616135356664363464663565666666666666666666", + "id": 3983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7938:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_805093664916125437948904238798044397567_by_1", + "typeString": "int_const 8050...(31 digits omitted)...7567" + }, + "value": "0x025daf6654b1eaa55fd64df5efffffffff" + }, + "src": "7919:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3985, + "nodeType": "ExpressionStatement", + "src": "7919:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3986, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7985:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3988, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3932", + "id": 3987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7998:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "92" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7985:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323434633439633634386261613938313932646365383862376666666666666666", + "id": 3989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8004:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_771973099761463105605096142810743046143_by_1", + "typeString": "int_const 7719...(31 digits omitted)...6143" + }, + "value": "0x0244c49c648baa98192dce88b7ffffffff" + }, + "src": "7985:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3991, + "nodeType": "ExpressionStatement", + "src": "7985:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3992, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8051:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3994, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3933", + "id": 3993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8064:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93_by_1", + "typeString": "int_const 93" + }, + "value": "93" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8051:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323263653033636435363139613331316232343731323638626666666666666666", + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_740215074003106313787373698556008333311_by_1", + "typeString": "int_const 7402...(31 digits omitted)...3311" + }, + "value": "0x022ce03cd5619a311b2471268bffffffff" + }, + "src": "8051:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3997, + "nodeType": "ExpressionStatement", + "src": "8051:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3998, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8117:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4000, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3934", + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8130:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94_by_1", + "typeString": "int_const 94" + }, + "value": "94" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8117:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323135663737633034356662653838353635346134346130666666666666666666", + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8136:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_709763534442753181219281418466841591807_by_1", + "typeString": "int_const 7097...(31 digits omitted)...1807" + }, + "value": "0x0215f77c045fbe885654a44a0fffffffff" + }, + "src": "8117:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4003, + "nodeType": "ExpressionStatement", + "src": "8117:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4004, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8183:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4006, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3935", + "id": 4005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8196:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95_by_1", + "typeString": "int_const 95" + }, + "value": "95" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8183:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316666666666666666666666666666666666666666666666666666666666666666", + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8202:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422911_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2911" + }, + "value": "0x01ffffffffffffffffffffffffffffffff" + }, + "src": "8183:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4009, + "nodeType": "ExpressionStatement", + "src": "8183:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4010, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8249:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4012, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3936", + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8262:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8249:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316561656664626461616565373432316663346433656465356666666666666666", + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8268:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_652567136057371195186997586203332575231_by_1", + "typeString": "int_const 6525...(31 digits omitted)...5231" + }, + "value": "0x01eaefdbdaaee7421fc4d3ede5ffffffff" + }, + "src": "8249:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4015, + "nodeType": "ExpressionStatement", + "src": "8249:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4016, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8315:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4018, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3937", + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8328:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97_by_1", + "typeString": "int_const 97" + }, + "value": "97" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8315:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316436626438623265623235376466376538636135376230396266666666666666", + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8334:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_625721325079798489641586010116704960511_by_1", + "typeString": "int_const 6257...(31 digits omitted)...0511" + }, + "value": "0x01d6bd8b2eb257df7e8ca57b09bfffffff" + }, + "src": "8315:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4021, + "nodeType": "ExpressionStatement", + "src": "8315:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4022, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8381:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4024, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3938", + "id": 4023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8394:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98_by_1", + "typeString": "int_const 98" + }, + "value": "98" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8381:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316333356665646431346238363165623034343366376631333366666666666666", + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8400:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599979917813693414950432886451725139967_by_1", + "typeString": "int_const 5999...(31 digits omitted)...9967" + }, + "value": "0x01c35fedd14b861eb0443f7f133fffffff" + }, + "src": "8381:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4027, + "nodeType": "ExpressionStatement", + "src": "8381:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4028, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8447:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4030, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3939", + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8460:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + }, + "value": "99" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8447:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316230636534336233323262636465346135366538616461356166666666666666", + "id": 4031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8466:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_575297480445977184425850753341355720703_by_1", + "typeString": "int_const 5752...(31 digits omitted)...0703" + }, + "value": "0x01b0ce43b322bcde4a56e8ada5afffffff" + }, + "src": "8447:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4033, + "nodeType": "ExpressionStatement", + "src": "8447:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4034, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8513:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4036, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 4035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8525:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8513:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313966303032386563316666663030376635613139356133396466666666666666", + "id": 4037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8532:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_551630448254872900425972804456347074559_by_1", + "typeString": "int_const 5516...(31 digits omitted)...4559" + }, + "value": "0x019f0028ec1fff007f5a195a39dfffffff" + }, + "src": "8513:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4039, + "nodeType": "ExpressionStatement", + "src": "8513:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4040, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8579:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4042, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313031", + "id": 4041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8591:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101_by_1", + "typeString": "int_const 101" + }, + "value": "101" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8579:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313864656439316630653732656537346634396231356261353237666666666666", + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8598:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_528937048717783628792119060092411707391_by_1", + "typeString": "int_const 5289...(31 digits omitted)...7391" + }, + "value": "0x018ded91f0e72ee74f49b15ba527ffffff" + }, + "src": "8579:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4045, + "nodeType": "ExpressionStatement", + "src": "8579:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4046, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8645:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4048, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313032", + "id": 4047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8657:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102_by_1", + "typeString": "int_const 102" + }, + "value": "102" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8645:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313764386563376630343133366634653536313566643431613633666666666666", + "id": 4049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8664:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_507177227782417987326846600868857380863_by_1", + "typeString": "int_const 5071...(31 digits omitted)...0863" + }, + "value": "0x017d8ec7f04136f4e5615fd41a63ffffff" + }, + "src": "8645:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4051, + "nodeType": "ExpressionStatement", + "src": "8645:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4052, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8711:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4054, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313033", + "id": 4053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8723:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8711:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313664646336353536636462383462646338643132643232653666666666666666", + "id": 4055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8730:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_486312579171031128343732298613950251007_by_1", + "typeString": "int_const 4863...(31 digits omitted)...1007" + }, + "value": "0x016ddc6556cdb84bdc8d12d22e6fffffff" + }, + "src": "8711:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4057, + "nodeType": "ExpressionStatement", + "src": "8711:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4058, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8777:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4060, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313034", + "id": 4059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8777:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313565636635323737366131313535623562643833393538313466376666666666", + "id": 4061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8796:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_466306276593002471003532891264408092671_by_1", + "typeString": "int_const 4663...(31 digits omitted)...2671" + }, + "value": "0x015ecf52776a1155b5bd8395814f7fffff" + }, + "src": "8777:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4063, + "nodeType": "ExpressionStatement", + "src": "8777:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4064, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8843:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4066, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313035", + "id": 4065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8855:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105_by_1", + "typeString": "int_const 105" + }, + "value": "105" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313530363063323536636232336233623363633337353463663430666666666666", + "id": 4067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8862:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_447123008746104779416515886102660251647_by_1", + "typeString": "int_const 4471...(31 digits omitted)...1647" + }, + "value": "0x015060c256cb23b3b3cc3754cf40ffffff" + }, + "src": "8843:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4069, + "nodeType": "ExpressionStatement", + "src": "8843:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4070, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8909:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4072, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313036", + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8921:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106_by_1", + "typeString": "int_const 106" + }, + "value": "106" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8909:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313432386132663938643732386165323233646461623731356265336666666666", + "id": 4073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8928:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_428728916991741247552240490495652921343_by_1", + "typeString": "int_const 4287...(31 digits omitted)...1343" + }, + "value": "0x01428a2f98d728ae223ddab715be3fffff" + }, + "src": "8909:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4075, + "nodeType": "ExpressionStatement", + "src": "8909:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4076, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8975:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4078, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313037", + "id": 4077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8987:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107_by_1", + "typeString": "int_const 107" + }, + "value": "107" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8975:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313335343535393865356332333237366363663065646536383033346666666666", + "id": 4079, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8994:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_411091535594146829344560212836376117247_by_1", + "typeString": "int_const 4110...(31 digits omitted)...7247" + }, + "value": "0x013545598e5c23276ccf0ede68034fffff" + }, + "src": "8975:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4081, + "nodeType": "ExpressionStatement", + "src": "8975:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4082, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9041:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4084, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313038", + "id": 4083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9053:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108_by_1", + "typeString": "int_const 108" + }, + "value": "108" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9041:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313238386334313631636531643666353462376636313038313139346666666666", + "id": 4085, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9060:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_394179734418075472107167272299635146751_by_1", + "typeString": "int_const 3941...(31 digits omitted)...6751" + }, + "value": "0x01288c4161ce1d6f54b7f61081194fffff" + }, + "src": "9041:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4087, + "nodeType": "ExpressionStatement", + "src": "9041:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4088, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9107:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4090, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313039", + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9119:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109_by_1", + "typeString": "int_const 109" + }, + "value": "109" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9107:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313163353932373631633636366161363431643561303161343066313766666666", + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9126:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_377963663983834160889726215582593318911_by_1", + "typeString": "int_const 3779...(31 digits omitted)...8911" + }, + "value": "0x011c592761c666aa641d5a01a40f17ffff" + }, + "src": "9107:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4093, + "nodeType": "ExpressionStatement", + "src": "9107:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4094, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9173:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4096, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313130", + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9185:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_110_by_1", + "typeString": "int_const 110" + }, + "value": "110" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9173:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313130613638383638306137353330353135663365366536636664636466666666", + "id": 4097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9192:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_362414702782685419520589203652335239167_by_1", + "typeString": "int_const 3624...(31 digits omitted)...9167" + }, + "value": "0x0110a688680a7530515f3e6e6cfdcdffff" + }, + "src": "9173:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4099, + "nodeType": "ExpressionStatement", + "src": "9173:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4100, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9239:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4102, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313131", + "id": 4101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9251:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111_by_1", + "typeString": "int_const 111" + }, + "value": "111" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9239:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313035366631623562656466373563366263623263653861656434323866666666", + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9258:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_347505406759629484539078662328460836863_by_1", + "typeString": "int_const 3475...(31 digits omitted)...6863" + }, + "value": "0x01056f1b5bedf75c6bcb2ce8aed428ffff" + }, + "src": "9239:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4105, + "nodeType": "ExpressionStatement", + "src": "9239:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4106, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9305:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4108, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313132", + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9317:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9305:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306661616463656365656666386130383930663338373566303038323737666666", + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9324:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_333209460874402812645752271223906598911_by_1", + "typeString": "int_const 3332...(31 digits omitted)...8911" + }, + "value": "0x00faadceceeff8a0890f3875f008277fff" + }, + "src": "9305:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4111, + "nodeType": "ExpressionStatement", + "src": "9305:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4112, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9371:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4114, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313133", + "id": 4113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9383:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113_by_1", + "typeString": "int_const 113" + }, + "value": "113" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9371:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306630356463366232376564616433303633383861363030663662613062666666", + "id": 4115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9390:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_319501632655197652636411056021540225023_by_1", + "typeString": "int_const 3195...(31 digits omitted)...5023" + }, + "value": "0x00f05dc6b27edad306388a600f6ba0bfff" + }, + "src": "9371:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4117, + "nodeType": "ExpressionStatement", + "src": "9371:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4118, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9437:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4120, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313134", + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9449:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114_by_1", + "typeString": "int_const 114" + }, + "value": "114" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9437:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306536376135613235646134313036336465313439356435623138636462666666", + "id": 4121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9456:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_306357727663124583211687061200571318271_by_1", + "typeString": "int_const 3063...(31 digits omitted)...8271" + }, + "value": "0x00e67a5a25da41063de1495d5b18cdbfff" + }, + "src": "9437:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4123, + "nodeType": "ExpressionStatement", + "src": "9437:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4124, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9503:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4126, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313135", + "id": 4125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9515:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115_by_1", + "typeString": "int_const 115" + }, + "value": "115" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9503:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306463666631313562313465656464653666633361613533353366326534666666", + "id": 4127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9522:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_293754546788812396405978813098581970943_by_1", + "typeString": "int_const 2937...(31 digits omitted)...0943" + }, + "value": "0x00dcff115b14eedde6fc3aa5353f2e4fff" + }, + "src": "9503:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4129, + "nodeType": "ExpressionStatement", + "src": "9503:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4130, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9569:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4132, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313136", + "id": 4131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9581:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116_by_1", + "typeString": "int_const 116" + }, + "value": "116" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9569:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306433653761333932343331323339396639616165326530663836386638666666", + "id": 4133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9588:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_281669845305773445111617137421885345791_by_1", + "typeString": "int_const 2816...(31 digits omitted)...5791" + }, + "value": "0x00d3e7a3924312399f9aae2e0f868f8fff" + }, + "src": "9569:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4135, + "nodeType": "ExpressionStatement", + "src": "9569:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4136, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9635:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4138, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313137", + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9647:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117_by_1", + "typeString": "int_const 117" + }, + "value": "117" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9635:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306362326666353239656237316534313538326363636435613165653236666666", + "id": 4139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9654:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_270082293608263279864102872957453496319_by_1", + "typeString": "int_const 2700...(31 digits omitted)...6319" + }, + "value": "0x00cb2ff529eb71e41582cccd5a1ee26fff" + }, + "src": "9635:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4141, + "nodeType": "ExpressionStatement", + "src": "9635:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4142, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9701:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4144, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313138", + "id": 4143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9713:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_118_by_1", + "typeString": "int_const 118" + }, + "value": "118" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9701:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306332643431356333646239373461623332613531383430633062363765646666", + "id": 4145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9720:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_258971439564336547476984432763364437503_by_1", + "typeString": "int_const 2589...(31 digits omitted)...7503" + }, + "value": "0x00c2d415c3db974ab32a51840c0b67edff" + }, + "src": "9701:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4147, + "nodeType": "ExpressionStatement", + "src": "9701:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4148, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9767:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4150, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313139", + "id": 4149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9779:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119_by_1", + "typeString": "int_const 119" + }, + "value": "119" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9767:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306261643033653764383833663639616435623061313836313834653036626666", + "id": 4151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9786:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_248317672417651959902117100034610719743_by_1", + "typeString": "int_const 2483...(31 digits omitted)...9743" + }, + "value": "0x00bad03e7d883f69ad5b0a186184e06bff" + }, + "src": "9767:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4153, + "nodeType": "ExpressionStatement", + "src": "9767:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4154, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9833:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4156, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313230", + "id": 4155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9845:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9833:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306233323064303362326333343364343832396162643630373566306363356666", + "id": 4157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9852:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_238102188174312697593221439720218478079_by_1", + "typeString": "int_const 2381...(31 digits omitted)...8079" + }, + "value": "0x00b320d03b2c343d4829abd6075f0cc5ff" + }, + "src": "9833:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4159, + "nodeType": "ExpressionStatement", + "src": "9833:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4160, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9899:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4162, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313231", + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9911:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_121_by_1", + "typeString": "int_const 121" + }, + "value": "121" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9899:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306162633235323034653032383238643733633665383062636462316139356266", + "id": 4163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9918:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228306956413649712418347768277622232511_by_1", + "typeString": "int_const 2283...(31 digits omitted)...2511" + }, + "value": "0x00abc25204e02828d73c6e80bcdb1a95bf" + }, + "src": "9899:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4165, + "nodeType": "ExpressionStatement", + "src": "9899:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4166, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9965:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4168, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313232", + "id": 4167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9977:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122_by_1", + "typeString": "int_const 122" + }, + "value": "122" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9965:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306134623136663734656534626232303430613165633663313566626266326466", + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9984:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218914688464368667066255864092044292831_by_1", + "typeString": "int_const 2189...(31 digits omitted)...2831" + }, + "value": "0x00a4b16f74ee4bb2040a1ec6c15fbbf2df" + }, + "src": "9965:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4171, + "nodeType": "ExpressionStatement", + "src": "9965:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4172, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10031:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4174, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313233", + "id": 4173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10043:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123_by_1", + "typeString": "int_const 123" + }, + "value": "123" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10031:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303964656166373336616331663536396465623162356165336633366331333066", + "id": 4175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10050:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_209908806889891126870119775672831054607_by_1", + "typeString": "int_const 2099...(31 digits omitted)...4607" + }, + "value": "0x009deaf736ac1f569deb1b5ae3f36c130f" + }, + "src": "10031:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4177, + "nodeType": "ExpressionStatement", + "src": "10031:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4178, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10097:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4180, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313234", + "id": 4179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10109:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_124_by_1", + "typeString": "int_const 124" + }, + "value": "124" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10097:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303937366264393935326337616139353766353933376437393065663635303337", + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_201273416229031359487226059686877220919_by_1", + "typeString": "int_const 2012...(31 digits omitted)...0919" + }, + "value": "0x00976bd9952c7aa957f5937d790ef65037" + }, + "src": "10097:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4183, + "nodeType": "ExpressionStatement", + "src": "10097:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4184, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10163:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4186, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313235", + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10175:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125_by_1", + "typeString": "int_const 125" + }, + "value": "125" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10163:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303931333132373139323265616136303634623733613232643062643466326266", + "id": 4187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10182:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192993274940365776401274035698589299391_by_1", + "typeString": "int_const 1929...(31 digits omitted)...9391" + }, + "value": "0x009131271922eaa6064b73a22d0bd4f2bf" + }, + "src": "10163:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4189, + "nodeType": "ExpressionStatement", + "src": "10163:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4190, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10229:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4192, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313236", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10241:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_126_by_1", + "typeString": "int_const 126" + }, + "value": "126" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10229:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303862333830663335353836363863343663393163343961326638653936376239", + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10248:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_185053768500776578446843424638883162041_by_1", + "typeString": "int_const 1850...(31 digits omitted)...2041" + }, + "value": "0x008b380f3558668c46c91c49a2f8e967b9" + }, + "src": "10229:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4195, + "nodeType": "ExpressionStatement", + "src": "10229:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4196, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10295:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4198, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313237", + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10307:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10295:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303835376464663031313765666132313539353239313238333966363437336536", + "id": 4199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10314:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_177440883610688295304820354615089591270_by_1", + "typeString": "int_const 1774...(31 digits omitted)...1270" + }, + "value": "0x00857ddf0117efa215952912839f6473e6" + }, + "src": "10295:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4201, + "nodeType": "ExpressionStatement", + "src": "10295:55:7" + } + ] + }, + "documentation": null, + "id": 4203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "initMaxExpArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3624, + "nodeType": "ParameterList", + "parameters": [], + "src": "1891:2:7" + }, + "returnParameters": { + "id": 3625, + "nodeType": "ParameterList", + "parameters": [], + "src": "1902:0:7" + }, + "scope": 8977, + "src": "1867:8491:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "constant": false, + "id": 4207, + "mutability": "mutable", + "name": "lambertArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "10416:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128]" + }, + "typeName": { + "baseType": { + "id": 4204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10416:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4206, + "length": { + "argumentTypes": null, + "hexValue": "313238", + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10424:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "ArrayTypeName", + "src": "10416:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage_ptr", + "typeString": "uint256[128]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4978, + "nodeType": "Block", + "src": "10492:8328:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4210, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10503:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4212, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10518:1:7", + "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": "10503:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783630653339336336386432306231626430396465616162633033373362396335", + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10523:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128787536227304155647383678419039664581_by_1", + "typeString": "int_const 1287...(31 digits omitted)...4581" + }, + "value": "0x60e393c68d20b1bd09deaabc0373b9c5" + }, + "src": "10503:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "10503:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4216, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10568:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4218, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 4217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10583:1:7", + "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": "10568:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783566386634366534383534313230393839656439343731396662346332303131", + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10588:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127020595924271037561532833511427022865_by_1", + "typeString": "int_const 1270...(31 digits omitted)...2865" + }, + "value": "0x5f8f46e4854120989ed94719fb4c2011" + }, + "src": "10568:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4221, + "nodeType": "ExpressionStatement", + "src": "10568:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4222, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10633:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4224, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10648:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10633:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783565343739656262393132396662316237653732613634386639393262363036", + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10653:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125319304162047910149801695424990590470_by_1", + "typeString": "int_const 1253...(31 digits omitted)...0470" + }, + "value": "0x5e479ebb9129fb1b7e72a648f992b606" + }, + "src": "10633:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4227, + "nodeType": "ExpressionStatement", + "src": "10633:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4228, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10698:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4230, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10713:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10698:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783564306264323366653432646665646465326539353836626531326238356665", + "id": 4231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10718:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123679583241450252008727309686047213054_by_1", + "typeString": "int_const 1236...(31 digits omitted)...3054" + }, + "value": "0x5d0bd23fe42dfedde2e9586be12b85fe" + }, + "src": "10698:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4233, + "nodeType": "ExpressionStatement", + "src": "10698:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4234, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10763:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4236, + "indexExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 4235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10778:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10763:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783562646232396464656539373933303864646663613831616565623830393561", + "id": 4237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10783:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122097709790504811543485325791668472154_by_1", + "typeString": "int_const 1220...(31 digits omitted)...2154" + }, + "value": "0x5bdb29ddee979308ddfca81aeeb8095a" + }, + "src": "10763:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4239, + "nodeType": "ExpressionStatement", + "src": "10763:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4240, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10828:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4242, + "indexExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10843:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10828:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783561623466643861323630643263376532633064326166636630303039646164", + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10848:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120570275450071204896029314248949669293_by_1", + "typeString": "int_const 1205...(31 digits omitted)...9293" + }, + "value": "0x5ab4fd8a260d2c7e2c0d2afcf0009dad" + }, + "src": "10828:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4245, + "nodeType": "ExpressionStatement", + "src": "10828:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4246, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10893:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4248, + "indexExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10908:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10893:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783539393862333133353961353564343837323463363563663039303031323231", + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10913:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119094152831753027058824439515169428001_by_1", + "typeString": "int_const 1190...(31 digits omitted)...8001" + }, + "value": "0x5998b31359a55d48724c65cf09001221" + }, + "src": "10893:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4251, + "nodeType": "ExpressionStatement", + "src": "10893:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4252, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10958:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4254, + "indexExpression": { + "argumentTypes": null, + "hexValue": "37", + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10973:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10958:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783538383562636164326233323264666334336538383630663963303138636635", + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10978:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117666465924103849245162796602282314997_by_1", + "typeString": "int_const 1176...(31 digits omitted)...4997" + }, + "value": "0x5885bcad2b322dfc43e8860f9c018cf5" + }, + "src": "10958:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4257, + "nodeType": "ExpressionStatement", + "src": "10958:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4258, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11023:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4260, + "indexExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 4259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11038:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11023:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783537376239376161316665323232626234353266646631313162316630626532", + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11043:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116284564269392660122793483482959907810_by_1", + "typeString": "int_const 1162...(31 digits omitted)...7810" + }, + "value": "0x577b97aa1fe222bb452fdf111b1f0be2" + }, + "src": "11023:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4263, + "nodeType": "ExpressionStatement", + "src": "11023:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4264, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11088:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4266, + "indexExpression": { + "argumentTypes": null, + "hexValue": "39", + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11103:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11088:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783536373963623565333537353633326535626161323765326239343966373034", + "id": 4267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11108:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114946000350526915053586759724674184964_by_1", + "typeString": "int_const 1149...(31 digits omitted)...4964" + }, + "value": "0x5679cb5e3575632e5baa27e2b949f704" + }, + "src": "11088:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4269, + "nodeType": "ExpressionStatement", + "src": "11088:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4270, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11153:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4272, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11153:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783535376665383234316233613331633833633733326631636466663461316335", + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11173:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113648509722420118059077800055408992709_by_1", + "typeString": "int_const 1136...(31 digits omitted)...2709" + }, + "value": "0x557fe8241b3a31c83c732f1cdff4a1c5" + }, + "src": "11153:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4275, + "nodeType": "ExpressionStatement", + "src": "11153:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4276, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11218:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4278, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11232:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_11_by_1", + "typeString": "int_const 11" + }, + "value": "11" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11218:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783534386438363830323635303438373564366535396262653935666332613662", + "id": 4279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11238:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112389993498935521792135674271903787627_by_1", + "typeString": "int_const 1123...(31 digits omitted)...7627" + }, + "value": "0x548d868026504875d6e59bbe95fc2a6b" + }, + "src": "11218:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4281, + "nodeType": "ExpressionStatement", + "src": "11218:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4282, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11283:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4284, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3132", + "id": 4283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11297:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12_by_1", + "typeString": "int_const 12" + }, + "value": "12" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11283:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783533613234363563653334376366333464303561383637633137646433303838", + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11303:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111168502869233775922830736618948472968_by_1", + "typeString": "int_const 1111...(31 digits omitted)...2968" + }, + "value": "0x53a2465ce347cf34d05a867c17dd3088" + }, + "src": "11283:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4287, + "nodeType": "ExpressionStatement", + "src": "11283:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4288, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11348:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4290, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3133", + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11362:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "13" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11348:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783532626463653564636434666165643539633766353531316366386638616363", + "id": 4291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11368:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109982225368764407855921799421290842828_by_1", + "typeString": "int_const 1099...(31 digits omitted)...2828" + }, + "value": "0x52bdce5dcd4faed59c7f5511cf8f8acc" + }, + "src": "11348:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4293, + "nodeType": "ExpressionStatement", + "src": "11348:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4294, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11413:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4296, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3134", + "id": 4295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11427:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_14_by_1", + "typeString": "int_const 14" + }, + "value": "14" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11413:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783531646663623435336330376638646138313736303665373838356637633365", + "id": 4297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11433:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108829472672502945287330645348712414270_by_1", + "typeString": "int_const 1088...(31 digits omitted)...4270" + }, + "value": "0x51dfcb453c07f8da817606e7885f7c3e" + }, + "src": "11413:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4299, + "nodeType": "ExpressionStatement", + "src": "11413:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4300, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11478:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4302, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3135", + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11492:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11478:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783531303765663662306135613262653866386666313535393064616133636365", + "id": 4303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11498:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107708669713100452055447769980296903886_by_1", + "typeString": "int_const 1077...(31 digits omitted)...3886" + }, + "value": "0x5107ef6b0a5a2be8f8ff15590daa3cce" + }, + "src": "11478:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4305, + "nodeType": "ExpressionStatement", + "src": "11478:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4306, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11543:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4308, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3136", + "id": 4307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11557:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11543:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783530333566323431643665616530636437626163626131313939393364653762", + "id": 4309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11563:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106618344955764005172185288135427743355_by_1", + "typeString": "int_const 1066...(31 digits omitted)...3355" + }, + "value": "0x5035f241d6eae0cd7bacba119993de7b" + }, + "src": "11543:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4311, + "nodeType": "ExpressionStatement", + "src": "11543:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4312, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11608:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4314, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3137", + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11622:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "17" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11608:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783466363938666539306435623533643533323137316531323130313634633636", + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11628:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105557121686023412139304113347686190182_by_1", + "typeString": "int_const 1055...(31 digits omitted)...0182" + }, + "value": "0x4f698fe90d5b53d532171e1210164c66" + }, + "src": "11608:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4317, + "nodeType": "ExpressionStatement", + "src": "11608:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4318, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11673:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4320, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3138", + "id": 4319, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11687:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11673:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783465613238386361323937613065366130396130656565323430653136633835", + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11693:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104523710186937447092740323392662629509_by_1", + "typeString": "int_const 1045...(31 digits omitted)...9509" + }, + "value": "0x4ea288ca297a0e6a09a0eee240e16c85" + }, + "src": "11673:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4323, + "nodeType": "ExpressionStatement", + "src": "11673:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4324, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11738:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4326, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3139", + "id": 4325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11752:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19_by_1", + "typeString": "int_const 19" + }, + "value": "19" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11738:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783464653061313366646366356434323133666333393862613665336265636465", + "id": 4327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11758:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103516900699454640661508604755841903838_by_1", + "typeString": "int_const 1035...(31 digits omitted)...3838" + }, + "value": "0x4de0a13fdcf5d4213fc398ba6e3becde" + }, + "src": "11738:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4329, + "nodeType": "ExpressionStatement", + "src": "11738:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4330, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11803:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4332, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3230", + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11817:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11803:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783464323361313435656566393166656330366230363134303830346334383038", + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11823:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102535557074135248197607991940341319688_by_1", + "typeString": "int_const 1025...(31 digits omitted)...9688" + }, + "value": "0x4d23a145eef91fec06b06140804c4808" + }, + "src": "11803:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4335, + "nodeType": "ExpressionStatement", + "src": "11803:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4336, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11868:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4338, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 4337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11868:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783463366235343330643463316565353532363437336462346165306631316465", + "id": 4339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11888:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101578611034720610581211104132006351326_by_1", + "typeString": "int_const 1015...(31 digits omitted)...1326" + }, + "value": "0x4c6b5430d4c1ee5526473db4ae0f11de" + }, + "src": "11868:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4341, + "nodeType": "ExpressionStatement", + "src": "11868:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4342, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11933:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4344, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3232", + "id": 4343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11947:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_22_by_1", + "typeString": "int_const 22" + }, + "value": "22" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11933:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783462623738383663323430353632656261313166343936336135336234323430", + "id": 4345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11953:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100645056984476184212709480501843018304_by_1", + "typeString": "int_const 1006...(31 digits omitted)...8304" + }, + "value": "0x4bb7886c240562eba11f4963a53b4240" + }, + "src": "11933:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4347, + "nodeType": "ExpressionStatement", + "src": "11933:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4348, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11998:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4350, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3233", + "id": 4349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12012:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23_by_1", + "typeString": "int_const 23" + }, + "value": "23" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11998:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783462303830663366316362343931643264353231653065613435383335323165", + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12018:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99733947295139137817365771348103877150_by_1", + "typeString": "int_const 9973...(30 digits omitted)...7150" + }, + "value": "0x4b080f3f1cb491d2d521e0ea4583521e" + }, + "src": "11998:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4353, + "nodeType": "ExpressionStatement", + "src": "11998:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4354, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12063:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4356, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3234", + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12077:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12063:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783461356362633936613035353839636234643836626531646233313638333634", + "id": 4357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12083:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98844388025919853370962885240683922276_by_1", + "typeString": "int_const 9884...(30 digits omitted)...2276" + }, + "value": "0x4a5cbc96a05589cb4d86be1db3168364" + }, + "src": "12063:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4359, + "nodeType": "ExpressionStatement", + "src": "12063:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4360, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12128:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4362, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3235", + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12142:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25_by_1", + "typeString": "int_const 25" + }, + "value": "25" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12128:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783439623536366434303234333531373635386437386333333136326436656365", + "id": 4363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12148:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97975535026544040761524270664520658638_by_1", + "typeString": "int_const 9797...(30 digits omitted)...8638" + }, + "value": "0x49b566d40243517658d78c33162d6ece" + }, + "src": "12128:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4365, + "nodeType": "ExpressionStatement", + "src": "12128:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4366, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12193:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4368, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3236", + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12207:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26_by_1", + "typeString": "int_const 26" + }, + "value": "26" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12193:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783439313165366130326535353037613330663934373338336664396133323736", + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12213:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97126590383947898169110886634107843190_by_1", + "typeString": "int_const 9712...(30 digits omitted)...3190" + }, + "value": "0x4911e6a02e5507a30f947383fd9a3276" + }, + "src": "12193:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4371, + "nodeType": "ExpressionStatement", + "src": "12193:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4372, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12258:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4374, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3237", + "id": 4373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12272:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_27_by_1", + "typeString": "int_const 27" + }, + "value": "27" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12258:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783438373231366332623331626534616463343164623861386435636330633838", + "id": 4375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12278:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96296799177093258962884240470124006536_by_1", + "typeString": "int_const 9629...(30 digits omitted)...6536" + }, + "value": "0x487216c2b31be4adc41db8a8d5cc0c88" + }, + "src": "12258:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4377, + "nodeType": "ExpressionStatement", + "src": "12258:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4378, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12323:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4380, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3238", + "id": 4379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12337:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_28_by_1", + "typeString": "int_const 28" + }, + "value": "28" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12323:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783437643564336663346137613162313838636433643738386235633565396663", + "id": 4381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12343:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95485446508569776991656929903084169724_by_1", + "typeString": "int_const 9548...(30 digits omitted)...9724" + }, + "value": "0x47d5d3fc4a7a1b188cd3d788b5c5e9fc" + }, + "src": "12323:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4383, + "nodeType": "ExpressionStatement", + "src": "12323:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4384, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12388:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4386, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3239", + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12402:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_29_by_1", + "typeString": "int_const 29" + }, + "value": "29" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12388:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783437336366636534383731613263343062633466396531633332623935356430", + "id": 4387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12408:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94691854785294407482575606759428806096_by_1", + "typeString": "int_const 9469...(30 digits omitted)...6096" + }, + "value": "0x473cfce4871a2c40bc4f9e1c32b955d0" + }, + "src": "12388:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4389, + "nodeType": "ExpressionStatement", + "src": "12388:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4390, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12453:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4392, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3330", + "id": 4391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12467:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30_by_1", + "typeString": "int_const 30" + }, + "value": "30" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12453:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783436613737316361353738616238373834383538313065323835653331633637", + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12473:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93915381223786366589204098840684338279_by_1", + "typeString": "int_const 9391...(30 digits omitted)...8279" + }, + "value": "0x46a771ca578ab878485810e285e31c67" + }, + "src": "12453:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4395, + "nodeType": "ExpressionStatement", + "src": "12453:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4396, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12518:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4398, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3331", + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12532:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "31" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12518:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783436313531343937313861656434633235386333373364633637366161373264", + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12538:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93155415558256953225873119289193178925_by_1", + "typeString": "int_const 9315...(30 digits omitted)...8925" + }, + "value": "0x4615149718aed4c258c373dc676aa72d" + }, + "src": "12518:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4401, + "nodeType": "ExpressionStatement", + "src": "12518:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4402, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12583:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4404, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12597:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12583:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783435383563386233663866653438396336653138333363613437383731333834", + "id": 4405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12603:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92411377932165840182246144520510444420_by_1", + "typeString": "int_const 9241...(30 digits omitted)...4420" + }, + "value": "0x4585c8b3f8fe489c6e1833ca47871384" + }, + "src": "12583:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4407, + "nodeType": "ExpressionStatement", + "src": "12583:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4408, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12648:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4410, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3333", + "id": 4409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "33" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12648:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783434663937326631373465343165356566623765396436336332396365373335", + "id": 4411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12668:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91682716956007473314355351160117585717_by_1", + "typeString": "int_const 9168...(30 digits omitted)...5717" + }, + "value": "0x44f972f174e41e5efb7e9d63c29ce735" + }, + "src": "12648:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4413, + "nodeType": "ExpressionStatement", + "src": "12648:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4414, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12713:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4416, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3334", + "id": 4415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12727:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "34" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12713:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783434366666393730626138366438623030626562303565636562663363346463", + "id": 4417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12733:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90968907915944387253011725111639917788_by_1", + "typeString": "int_const 9096...(30 digits omitted)...7788" + }, + "value": "0x446ff970ba86d8b00beb05ecebf3c4dc" + }, + "src": "12713:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4419, + "nodeType": "ExpressionStatement", + "src": "12713:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4420, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12778:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4422, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3335", + "id": 4421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12792:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35_by_1", + "typeString": "int_const 35" + }, + "value": "35" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12778:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783433653934333865633838393731383132643666313938623563636161643936", + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12798:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90269451119533660821329652693370318230_by_1", + "typeString": "int_const 9026...(30 digits omitted)...8230" + }, + "value": "0x43e9438ec88971812d6f198b5ccaad96" + }, + "src": "12778:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4425, + "nodeType": "ExpressionStatement", + "src": "12778:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4426, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12843:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4428, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3336", + "id": 4427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12857:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36_by_1", + "typeString": "int_const 36" + }, + "value": "36" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12843:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783433363533396431316666376265613635376165646462333934653830396566", + "id": 4429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12863:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89583870366228295001513378307654552047_by_1", + "typeString": "int_const 8958...(30 digits omitted)...2047" + }, + "value": "0x436539d11ff7bea657aeddb394e809ef" + }, + "src": "12843:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4431, + "nodeType": "ExpressionStatement", + "src": "12843:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4432, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12908:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4434, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3337", + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12922:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_37_by_1", + "typeString": "int_const 37" + }, + "value": "37" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12908:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783432653363356433653561393133343031643836663636646235643831633263", + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12928:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88911711531602529992461785625724984364_by_1", + "typeString": "int_const 8891...(30 digits omitted)...4364" + }, + "value": "0x42e3c5d3e5a913401d86f66db5d81c2c" + }, + "src": "12908:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4437, + "nodeType": "ExpressionStatement", + "src": "12908:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4438, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12973:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4440, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3338", + "id": 4439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12987:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_38_by_1", + "typeString": "int_const 38" + }, + "value": "38" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12973:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783432363464323339353330333037306561373236636265393864663632313734", + "id": 4441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12993:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88252541255370876457855407534749655412_by_1", + "typeString": "int_const 8825...(30 digits omitted)...5412" + }, + "value": "0x4264d2395303070ea726cbe98df62174" + }, + "src": "12973:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4443, + "nodeType": "ExpressionStatement", + "src": "12973:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4444, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13038:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4446, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 4445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13052:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13038:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783431653834613961353933626237313934633361363334396563616534656561", + "id": 4447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13058:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87605945724263666326070648659277401834_by_1", + "typeString": "int_const 8760...(30 digits omitted)...1834" + }, + "value": "0x41e84a9a593bb7194c3a6349ecae4eea" + }, + "src": "13038:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4449, + "nodeType": "ExpressionStatement", + "src": "13038:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4450, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13103:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4452, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3430", + "id": 4451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13117:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13103:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783431366531623738356431336562613037613038663366313838373661356162", + "id": 4453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13123:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86971529541703351305061613312515941803_by_1", + "typeString": "int_const 8697...(30 digits omitted)...1803" + }, + "value": "0x416e1b785d13eba07a08f3f18876a5ab" + }, + "src": "13103:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4455, + "nodeType": "ExpressionStatement", + "src": "13103:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4456, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13168:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4458, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3431", + "id": 4457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13182:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13168:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430663633323266663338396434323362613964643765376537623765383039", + "id": 4459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13188:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86348914677009486241058826509159491593_by_1", + "typeString": "int_const 8634...(30 digits omitted)...1593" + }, + "value": "0x40f6322ff389d423ba9dd7e7e7b7e809" + }, + "src": "13168:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4461, + "nodeType": "ExpressionStatement", + "src": "13168:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4462, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13233:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4464, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3432", + "id": 4463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13247:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42_by_1", + "typeString": "int_const 42" + }, + "value": "42" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13233:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430383037636563386134363638383065636634313834353435643234306134", + "id": 4465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13253:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85737739487558329642902199100859629732_by_1", + "typeString": "int_const 8573...(30 digits omitted)...9732" + }, + "value": "0x40807cec8a466880ecf4184545d240a4" + }, + "src": "13233:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4467, + "nodeType": "ExpressionStatement", + "src": "13233:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4468, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13298:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4470, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3433", + "id": 4469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13312:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_43_by_1", + "typeString": "int_const 43" + }, + "value": "43" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13298:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430306365613963653838613864336165363638653865613064396266303766", + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13318:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85137657807945661495348777847187304575_by_1", + "typeString": "int_const 8513...(30 digits omitted)...4575" + }, + "value": "0x400cea9ce88a8d3ae668e8ea0d9bf07f" + }, + "src": "13298:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4473, + "nodeType": "ExpressionStatement", + "src": "13298:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4474, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13363:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4476, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3434", + "id": 4475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13377:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_44_by_1", + "typeString": "int_const 44" + }, + "value": "44" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13363:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783366396236616538373732643463353530393165306564376466656130616331", + "id": 4477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13383:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84548338100757766960858976604962556609_by_1", + "typeString": "int_const 8454...(30 digits omitted)...6609" + }, + "value": "0x3f9b6ae8772d4c55091e0ed7dfea0ac1" + }, + "src": "13363:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4479, + "nodeType": "ExpressionStatement", + "src": "13363:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4480, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13428:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4482, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3435", + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13442:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_45_by_1", + "typeString": "int_const 45" + }, + "value": "45" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13428:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783366326265653235336664383435393466353462636161666163333833613133", + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13448:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83969462664053391893170430711084628499_by_1", + "typeString": "int_const 8396...(30 digits omitted)...8499" + }, + "value": "0x3f2bee253fd84594f54bcaafac383a13" + }, + "src": "13428:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4485, + "nodeType": "ExpressionStatement", + "src": "13428:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4486, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13493:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4488, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3436", + "id": 4487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13507:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_46_by_1", + "typeString": "int_const 46" + }, + "value": "46" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13493:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783365626536353465393532303862623932313063353735633038316335393538", + "id": 4489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13513:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83400726891105658214366213255032756568_by_1", + "typeString": "int_const 8340...(30 digits omitted)...6568" + }, + "value": "0x3ebe654e95208bb9210c575c081c5958" + }, + "src": "13493:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4491, + "nodeType": "ExpressionStatement", + "src": "13493:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4492, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13558:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4494, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3437", + "id": 4493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13572:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13558:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783365353263316663353636353633356237386365316630356164353363303836", + "id": 4495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13578:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82841838578353379906637631327369937030_by_1", + "typeString": "int_const 8284...(30 digits omitted)...7030" + }, + "value": "0x3e52c1fc5665635b78ce1f05ad53c086" + }, + "src": "13558:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4497, + "nodeType": "ExpressionStatement", + "src": "13558:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4498, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13623:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4500, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13637:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13623:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364653866363561633338383130316464663731386136663563316566663635", + "id": 4501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13643:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82292517277871139787215964642962505573_by_1", + "typeString": "int_const 8229...(30 digits omitted)...5573" + }, + "value": "0x3de8f65ac388101ddf718a6f5c1eff65" + }, + "src": "13623:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4503, + "nodeType": "ExpressionStatement", + "src": "13623:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4504, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13688:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4506, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3439", + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13702:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "49" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13688:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364383066353232643539626430623332386361303132646634636432643439", + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13708:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81752493690991422478947035708677500233_by_1", + "typeString": "int_const 8175...(30 digits omitted)...0233" + }, + "value": "0x3d80f522d59bd0b328ca012df4cd2d49" + }, + "src": "13688:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4509, + "nodeType": "ExpressionStatement", + "src": "13688:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4510, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13753:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4512, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13767:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13753:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364316162313933313239656137326232333634386131363131363361383561", + "id": 4513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13773:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81221509100004039595242960659394308186_by_1", + "typeString": "int_const 8122...(30 digits omitted)...8186" + }, + "value": "0x3d1ab193129ea72b23648a161163a85a" + }, + "src": "13753:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4515, + "nodeType": "ExpressionStatement", + "src": "13753:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4516, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13818:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4518, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3531", + "id": 4517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13832:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51_by_1", + "typeString": "int_const 51" + }, + "value": "51" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13818:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783363623631663638643332353736633133356239356366623533663736643735", + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13838:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80699314835121533818862589255787965813_by_1", + "typeString": "int_const 8069...(30 digits omitted)...5813" + }, + "value": "0x3cb61f68d32576c135b95cfb53f76d75" + }, + "src": "13818:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "13818:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4522, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13883:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4524, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3532", + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13897:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_52_by_1", + "typeString": "int_const 52" + }, + "value": "52" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13883:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783363353333326439663161616538353161333631396537376534636338343733", + "id": 4525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13903:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80185671774137293097540719362983101555_by_1", + "typeString": "int_const 8018...(30 digits omitted)...1555" + }, + "value": "0x3c5332d9f1aae851a3619e77e4cc8473" + }, + "src": "13883:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4527, + "nodeType": "ExpressionStatement", + "src": "13883:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4528, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13948:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4530, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3533", + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13962:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_53_by_1", + "typeString": "int_const 53" + }, + "value": "53" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13948:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362663165303865646265326161313039653135323566363537353965663733", + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13968:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79680349872418462454459890475122421619_by_1", + "typeString": "int_const 7968...(30 digits omitted)...1619" + }, + "value": "0x3bf1e08edbe2aa109e1525f65759ef73" + }, + "src": "13948:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4533, + "nodeType": "ExpressionStatement", + "src": "13948:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4534, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14013:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4536, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3534", + "id": 4535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14027:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_54_by_1", + "typeString": "int_const 54" + }, + "value": "54" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14013:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362393231643963666631336661326331393737343661336466633439313866", + "id": 4537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14033:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79183127721070807958897168260236874127_by_1", + "typeString": "int_const 7918...(30 digits omitted)...4127" + }, + "value": "0x3b921d9cff13fa2c197746a3dfc4918f" + }, + "src": "14013:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4539, + "nodeType": "ExpressionStatement", + "src": "14013:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4540, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14078:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4542, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3535", + "id": 4541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14092:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14078:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362333364663831383931306266633161356165666238663633616532616334", + "id": 4543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14098:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78693792131289586075780460739283528388_by_1", + "typeString": "int_const 7869...(30 digits omitted)...8388" + }, + "value": "0x3b33df818910bfc1a5aefb8f63ae2ac4" + }, + "src": "14078:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4545, + "nodeType": "ExpressionStatement", + "src": "14078:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4546, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14143:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4548, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3536", + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14157:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14143:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361643731633163373765333466613332613966313834393637656363626636", + "id": 4549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14163:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78212137743071079621363404241290185718_by_1", + "typeString": "int_const 7821...(30 digits omitted)...5718" + }, + "value": "0x3ad71c1c77e34fa32a9f184967eccbf6" + }, + "src": "14143:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4551, + "nodeType": "ExpressionStatement", + "src": "14143:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4552, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14208:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4554, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3537", + "id": 4553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14222:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57_by_1", + "typeString": "int_const 57" + }, + "value": "57" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14208:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361376263396162663263356262353365326637333834613861313635323161", + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14228:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77737966656605443744883248223254630938_by_1", + "typeString": "int_const 7773...(30 digits omitted)...0938" + }, + "value": "0x3a7bc9abf2c5bb53e2f7384a8a16521a" + }, + "src": "14208:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4557, + "nodeType": "ExpressionStatement", + "src": "14208:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4558, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14273:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4560, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3538", + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14287:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14273:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361323164656337653736333639373833613638613063363338356131633537", + "id": 4561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14293:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77271088084804339940770953226756955223_by_1", + "typeString": "int_const 7727...(30 digits omitted)...5223" + }, + "value": "0x3a21dec7e76369783a68a0c6385a1c57" + }, + "src": "14273:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4563, + "nodeType": "ExpressionStatement", + "src": "14273:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4564, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14338:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4566, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3539", + "id": 4565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14352:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59_by_1", + "typeString": "int_const 59" + }, + "value": "59" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14338:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339633935323564653663396364663763316331353763613461376136656533", + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14358:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76811318025537837376498009672859152099_by_1", + "typeString": "int_const 7681...(30 digits omitted)...2099" + }, + "value": "0x39c9525de6c9cdf7c1c157ca4a7a6ee3" + }, + "src": "14338:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4569, + "nodeType": "ExpressionStatement", + "src": "14338:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4570, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14403:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4572, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3630", + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14417:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "60" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14403:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339373231626164336463383564313234306666303139306530616461616333", + "id": 4573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14423:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76358478952265398947834068366573546179_by_1", + "typeString": "int_const 7635...(30 digits omitted)...6179" + }, + "value": "0x39721bad3dc85d1240ff0190e0adaac3" + }, + "src": "14403:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4575, + "nodeType": "ExpressionStatement", + "src": "14403:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4576, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14468:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4578, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3631", + "id": 4577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14482:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61_by_1", + "typeString": "int_const 61" + }, + "value": "61" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14468:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339316333323433343464333234386630343639656232386464336437376530", + "id": 4579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14488:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75912399521846487627533653549497808864_by_1", + "typeString": "int_const 7591...(30 digits omitted)...8864" + }, + "value": "0x391c324344d3248f0469eb28dd3d77e0" + }, + "src": "14468:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4581, + "nodeType": "ExpressionStatement", + "src": "14468:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4582, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14533:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4584, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3632", + "id": 4583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14547:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62_by_1", + "typeString": "int_const 62" + }, + "value": "62" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14533:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338633738646637653363373936323739666234666638343339346162336461", + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14553:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75472914298408358042964121331947975642_by_1", + "typeString": "int_const 7547...(30 digits omitted)...5642" + }, + "value": "0x38c78df7e3c796279fb4ff84394ab3da" + }, + "src": "14533:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4587, + "nodeType": "ExpressionStatement", + "src": "14533:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4588, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14598:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4590, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3633", + "id": 4589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14612:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63_by_1", + "typeString": "int_const 63" + }, + "value": "63" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14598:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338373432366561343633386165396161653038303439643335353463323061", + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14618:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75039863492232771067353298784442696202_by_1", + "typeString": "int_const 7503...(30 digits omitted)...6202" + }, + "value": "0x387426ea4638ae9aae08049d3554c20a" + }, + "src": "14598:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4593, + "nodeType": "ExpressionStatement", + "src": "14598:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4594, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14663:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4596, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 4595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14677:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14663:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338323166353764626432373633323536633161393962626432303531333738", + "id": 4597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14683:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74613092712700430304450998910501327736_by_1", + "typeString": "int_const 7461...(30 digits omitted)...7736" + }, + "value": "0x3821f57dbd2763256c1a99bbd2051378" + }, + "src": "14663:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4599, + "nodeType": "ExpressionStatement", + "src": "14663:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4600, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14728:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4602, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3635", + "id": 4601, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14742:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337643066323536636234366138633932666636326662626566323839363938", + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14748:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74192452734402555957346115989134677656_by_1", + "typeString": "int_const 7419...(30 digits omitted)...7656" + }, + "value": "0x37d0f256cb46a8c92ff62fbbef289698" + }, + "src": "14728:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4605, + "nodeType": "ExpressionStatement", + "src": "14728:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4606, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14793:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4608, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3636", + "id": 4607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14807:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66_by_1", + "typeString": "int_const 66" + }, + "value": "66" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14793:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337383131363538353931666663376162646431666561663363656639623733", + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14813:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73777799275593782240843075749260794739_by_1", + "typeString": "int_const 7377...(30 digits omitted)...4739" + }, + "value": "0x37811658591ffc7abdd1feaf3cef9b73" + }, + "src": "14793:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4611, + "nodeType": "ExpressionStatement", + "src": "14793:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4612, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14858:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4614, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3637", + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14872:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67_by_1", + "typeString": "int_const 67" + }, + "value": "67" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14858:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337333235616131306539653832663764663066333830663739393731353462", + "id": 4615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14878:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73368992788220026735092049811183441227_by_1", + "typeString": "int_const 7336...(30 digits omitted)...1227" + }, + "value": "0x37325aa10e9e82f7df0f380f7997154b" + }, + "src": "14858:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4617, + "nodeType": "ExpressionStatement", + "src": "14858:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4618, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14923:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4620, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3638", + "id": 4619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14937:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68_by_1", + "typeString": "int_const 68" + }, + "value": "68" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14923:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336653462383838636662343038643837336239613830643433393331316336", + "id": 4621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14943:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72965898258809617135734979750291247558_by_1", + "typeString": "int_const 7296...(30 digits omitted)...7558" + }, + "value": "0x36e4b888cfb408d873b9a80d439311c6" + }, + "src": "14923:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4623, + "nodeType": "ExpressionStatement", + "src": "14923:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4624, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14988:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4626, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3639", + "id": 4625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15002:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69_by_1", + "typeString": "int_const 69" + }, + "value": "69" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14988:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336393832393965353966346262396465363435666339623038633634636361", + "id": 4627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15008:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72568385019566207677944681290529131722_by_1", + "typeString": "int_const 7256...(30 digits omitted)...1722" + }, + "value": "0x3698299e59f4bb9de645fc9b08c64cca" + }, + "src": "14988:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4629, + "nodeType": "ExpressionStatement", + "src": "14988:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4630, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15053:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4632, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3730", + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15067:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70_by_1", + "typeString": "int_const 70" + }, + "value": "70" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15053:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336346361376135303132636236303330323362353764643365626664353064", + "id": 4633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15073:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72176326569048265991235723170299237645_by_1", + "typeString": "int_const 7217...(30 digits omitted)...7645" + }, + "value": "0x364ca7a5012cb603023b57dd3ebfd50d" + }, + "src": "15053:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4635, + "nodeType": "ExpressionStatement", + "src": "15053:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4636, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15118:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4638, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3731", + "id": 4637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15132:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15118:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336303232633932383931356237373861623162303661616565376536316434", + "id": 4639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15138:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71789600401862514754895875938526847444_by_1", + "typeString": "int_const 7178...(30 digits omitted)...7444" + }, + "value": "0x36022c928915b778ab1b06aaee7e61d4" + }, + "src": "15118:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4641, + "nodeType": "ExpressionStatement", + "src": "15118:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4642, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15183:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4644, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3732", + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15197:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15183:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335623862323864316137336463323735303066666533353535396363303238", + "id": 4645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15203:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71408087846837990426587462311123664936_by_1", + "typeString": "int_const 7140...(30 digits omitted)...4936" + }, + "value": "0x35b8b28d1a73dc27500ffe35559cc028" + }, + "src": "15183:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4647, + "nodeType": "ExpressionStatement", + "src": "15183:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4648, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15248:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4650, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3733", + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15262:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73_by_1", + "typeString": "int_const 73" + }, + "value": "73" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15248:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335373033336539353166653235306563356562346536303935353133326437", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15268:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71031673913183621970866398796903953111_by_1", + "typeString": "int_const 7103...(30 digits omitted)...3111" + }, + "value": "0x357033e951fe250ec5eb4e60955132d7" + }, + "src": "15248:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4653, + "nodeType": "ExpressionStatement", + "src": "15248:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4654, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15313:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4656, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3734", + "id": 4655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15327:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74_by_1", + "typeString": "int_const 74" + }, + "value": "74" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15313:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335323861623238363739333465336132316235343132653463346638383831", + "id": 4657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15333:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70660247144165696899266624685710739585_by_1", + "typeString": "int_const 7066...(30 digits omitted)...9585" + }, + "value": "0x3528ab2867934e3a21b5412e4c4f8881" + }, + "src": "15313:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4659, + "nodeType": "ExpressionStatement", + "src": "15313:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4660, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15378:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4662, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3735", + "id": 4661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15392:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75_by_1", + "typeString": "int_const 75" + }, + "value": "75" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15378:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334653231326636366335353035376639363736633830303934613631643539", + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15398:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70293699477872506394924034036542610777_by_1", + "typeString": "int_const 7029...(30 digits omitted)...0777" + }, + "value": "0x34e212f66c55057f9676c80094a61d59" + }, + "src": "15378:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4665, + "nodeType": "ExpressionStatement", + "src": "15378:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4666, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15443:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4668, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3736", + "id": 4667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15457:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76_by_1", + "typeString": "int_const 76" + }, + "value": "76" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15443:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334396336363238396535623363346235343063323466343266613462396262", + "id": 4669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15463:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69931926114662060074913956973764721083_by_1", + "typeString": "int_const 6993...(30 digits omitted)...1083" + }, + "value": "0x349c66289e5b3c4b540c24f42fa4b9bb" + }, + "src": "15443:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4671, + "nodeType": "ExpressionStatement", + "src": "15443:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4672, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15508:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4674, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3737", + "id": 4673, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15522:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77_by_1", + "typeString": "int_const 77" + }, + "value": "77" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15508:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334353739666262643063373333613963386436616636623066376430306637", + "id": 4675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15528:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69574825390915228431314065557192245495_by_1", + "typeString": "int_const 6957...(30 digits omitted)...5495" + }, + "value": "0x34579fbbd0c733a9c8d6af6b0f7d00f7" + }, + "src": "15508:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4677, + "nodeType": "ExpressionStatement", + "src": "15508:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4678, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15573:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4680, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3738", + "id": 4679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15587:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78_by_1", + "typeString": "int_const 78" + }, + "value": "78" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15573:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334313362616432653731323238386239323462353838326235623336396266", + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15593:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69222298658741183724931927301015431615_by_1", + "typeString": "int_const 6922...(30 digits omitted)...1615" + }, + "value": "0x3413bad2e712288b924b5882b5b369bf" + }, + "src": "15573:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4683, + "nodeType": "ExpressionStatement", + "src": "15573:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4684, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15638:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4686, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3739", + "id": 4685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15652:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79_by_1", + "typeString": "int_const 79" + }, + "value": "79" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15638:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333643062326235363238363531306566373330653231336637316631326539", + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15658:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68874250171304728554080761972223054569_by_1", + "typeString": "int_const 6887...(30 digits omitted)...4569" + }, + "value": "0x33d0b2b56286510ef730e213f71f12e9" + }, + "src": "15638:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4689, + "nodeType": "ExpressionStatement", + "src": "15638:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4690, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15703:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4692, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3830", + "id": 4691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15717:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15703:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333386538326365303065323439363236326336343435373533356261316131", + "id": 4693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15723:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68530586973466171479838674269845037473_by_1", + "typeString": "int_const 6853...(30 digits omitted)...7473" + }, + "value": "0x338e82ce00e2496262c64457535ba1a1" + }, + "src": "15703:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4695, + "nodeType": "ExpressionStatement", + "src": "15703:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4696, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15768:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4698, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3831", + "id": 4697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15782:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "81" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15768:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333346432366139366233373362623763326638656131383237663237613932", + "id": 4699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15788:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68191218797443963900028789779252542098_by_1", + "typeString": "int_const 6819...(30 digits omitted)...2098" + }, + "value": "0x334d26a96b373bb7c2f8ea1827f27a92" + }, + "src": "15768:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4701, + "nodeType": "ExpressionStatement", + "src": "15768:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4702, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15833:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4704, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3832", + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15847:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82_by_1", + "typeString": "int_const 82" + }, + "value": "82" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15833:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333306339396634663432313134363965303062336531386333313437356561", + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15853:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67856057963228472984547093013750642154_by_1", + "typeString": "int_const 6785...(30 digits omitted)...2154" + }, + "value": "0x330c99f4f4211469e00b3e18c31475ea" + }, + "src": "15833:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4707, + "nodeType": "ExpressionStatement", + "src": "15833:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4708, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15898:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4710, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3833", + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15912:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83_by_1", + "typeString": "int_const 83" + }, + "value": "83" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15898:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332636364383764363438363039343939396337643565366633333233376438", + "id": 4711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15918:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67525019283492142426218937050010367960_by_1", + "typeString": "int_const 6752...(30 digits omitted)...7960" + }, + "value": "0x32ccd87d6486094999c7d5e6f33237d8" + }, + "src": "15898:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4713, + "nodeType": "ExpressionStatement", + "src": "15898:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4714, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15963:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4716, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3834", + "id": 4715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15977:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84_by_1", + "typeString": "int_const 84" + }, + "value": "84" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15963:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332386464653264643631376236363635613265383535366632353063316166", + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15983:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67198019972756986907927497888446333359_by_1", + "typeString": "int_const 6719...(30 digits omitted)...3359" + }, + "value": "0x328dde2dd617b6665a2e8556f250c1af" + }, + "src": "15963:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4719, + "nodeType": "ExpressionStatement", + "src": "15963:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4720, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16028:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4722, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3835", + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16042:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85_by_1", + "typeString": "int_const 85" + }, + "value": "85" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16028:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332346661373065396164633237306638323632373535616635613939616639", + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16048:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66874979560594969707697340554641251065_by_1", + "typeString": "int_const 6687...(30 digits omitted)...1065" + }, + "value": "0x324fa70e9adc270f8262755af5a99af9" + }, + "src": "16028:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4725, + "nodeType": "ExpressionStatement", + "src": "16028:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4726, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16093:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4728, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3836", + "id": 4727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16107:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86_by_1", + "typeString": "int_const 86" + }, + "value": "86" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16093:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332313232663434333131303631316361353130343066343166613665316533", + "id": 4729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16113:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66555819808650410033300276716637708771_by_1", + "typeString": "int_const 6655...(30 digits omitted)...8771" + }, + "value": "0x32122f443110611ca51040f41fa6e1e3" + }, + "src": "16093:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4731, + "nodeType": "ExpressionStatement", + "src": "16093:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4732, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16158:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4734, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3837", + "id": 4733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16172:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16158:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331643537333065343263303833313438326630663134383563343236336438", + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16178:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66240464631286234612917249162896106456_by_1", + "typeString": "int_const 6624...(30 digits omitted)...6456" + }, + "value": "0x31d5730e42c0831482f0f1485c4263d8" + }, + "src": "16158:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4737, + "nodeType": "ExpressionStatement", + "src": "16158:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4738, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16223:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4740, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3838", + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16237:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16223:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331393936656336623037623461383334323162356562633461623465316631", + "id": 4741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16243:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65928840019667697388313232298873250289_by_1", + "typeString": "int_const 6592...(30 digits omitted)...0289" + }, + "value": "0x31996ec6b07b4a83421b5ebc4ab4e1f1" + }, + "src": "16223:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4743, + "nodeType": "ExpressionStatement", + "src": "16223:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4744, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16288:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4746, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3839", + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16302:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89_by_1", + "typeString": "int_const 89" + }, + "value": "89" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16288:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331356531656530613638666634366262343365633262383530333265383736", + "id": 4747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16308:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65620873969108206581452393912976205942_by_1", + "typeString": "int_const 6562...(30 digits omitted)...5942" + }, + "value": "0x315e1ee0a68ff46bb43ec2b85032e876" + }, + "src": "16288:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4749, + "nodeType": "ExpressionStatement", + "src": "16288:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4750, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16353:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4752, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3930", + "id": 4751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16367:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90_by_1", + "typeString": "int_const 90" + }, + "value": "90" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16353:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331323337666537626334646561636636373735623965666131613134356638", + "id": 4753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16373:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65316496409512179290702222053435590136_by_1", + "typeString": "int_const 6531...(30 digits omitted)...0136" + }, + "value": "0x31237fe7bc4deacf6775b9efa1a145f8" + }, + "src": "16353:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4755, + "nodeType": "ExpressionStatement", + "src": "16353:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4756, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16418:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4758, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3931", + "id": 4757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16432:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91_by_1", + "typeString": "int_const 91" + }, + "value": "91" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16418:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330653938653766316363356133353665343436323761363937326561326666", + "id": 4759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16438:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65015639138759444595668739676303172351_by_1", + "typeString": "int_const 6501...(30 digits omitted)...2351" + }, + "value": "0x30e98e7f1cc5a356e44627a6972ea2ff" + }, + "src": "16418:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4761, + "nodeType": "ExpressionStatement", + "src": "16418:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4762, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16483:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4764, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3932", + "id": 4763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16497:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "92" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16483:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330623034373630623839313765633734323035613330303236353065633035", + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16503:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64718235758884686944788529404074585093_by_1", + "typeString": "int_const 6471...(30 digits omitted)...5093" + }, + "value": "0x30b04760b8917ec74205a3002650ec05" + }, + "src": "16483:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4767, + "nodeType": "ExpressionStatement", + "src": "16483:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4768, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16548:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4770, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3933", + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16562:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93_by_1", + "typeString": "int_const 93" + }, + "value": "93" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16548:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330373761373563383033343638653931333263653063663332323432343164", + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16568:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64424221614913808353797169251126354973_by_1", + "typeString": "int_const 6442...(30 digits omitted)...4973" + }, + "value": "0x3077a75c803468e9132ce0cf3224241d" + }, + "src": "16548:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4773, + "nodeType": "ExpressionStatement", + "src": "16548:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4774, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16613:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4776, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3934", + "id": 4775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16627:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94_by_1", + "typeString": "int_const 94" + }, + "value": "94" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16613:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330336661623537613661323735633336663139636461396261636536363761", + "id": 4777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16633:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64133533736226932951740123178454640250_by_1", + "typeString": "int_const 6413...(30 digits omitted)...0250" + }, + "value": "0x303fab57a6a275c36f19cda9bace667a" + }, + "src": "16613:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4779, + "nodeType": "ExpressionStatement", + "src": "16613:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4780, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16678:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4782, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3935", + "id": 4781, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16692:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95_by_1", + "typeString": "int_const 95" + }, + "value": "95" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16678:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330303835303462656238646362643263663362633166366435613036346630", + "id": 4783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16698:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63846110780325119601596992296297981168_by_1", + "typeString": "int_const 6384...(30 digits omitted)...1168" + }, + "value": "0x3008504beb8dcbd2cf3bc1f6d5a064f0" + }, + "src": "16678:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4785, + "nodeType": "ExpressionStatement", + "src": "16678:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4786, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16743:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4788, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3936", + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16757:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16743:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266643139333436656431376461633631323139636530633263356163346230", + "id": 4789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16763:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63561892978884723546060567414717465776_by_1", + "typeString": "int_const 6356...(30 digits omitted)...5776" + }, + "value": "0x2fd19346ed17dac61219ce0c2c5ac4b0" + }, + "src": "16743:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4791, + "nodeType": "ExpressionStatement", + "src": "16743:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4792, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16808:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4794, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3937", + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16822:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97_by_1", + "typeString": "int_const 97" + }, + "value": "97" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16808:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266396237313639383038633332346235383532666433643534626139373134", + "id": 4795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16828:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63280822085989789325487105680707589908_by_1", + "typeString": "int_const 6328...(30 digits omitted)...9908" + }, + "value": "0x2f9b7169808c324b5852fd3d54ba9714" + }, + "src": "16808:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4797, + "nodeType": "ExpressionStatement", + "src": "16808:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4798, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16873:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4800, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3938", + "id": 4799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16887:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98_by_1", + "typeString": "int_const 98" + }, + "value": "98" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16873:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266363565376537313163663462303634656561396330386362646164353734", + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16893:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63002841328438895053366731000363275636_by_1", + "typeString": "int_const 6300...(30 digits omitted)...5636" + }, + "value": "0x2f65e7e711cf4b064eea9c08cbdad574" + }, + "src": "16873:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4803, + "nodeType": "ExpressionStatement", + "src": "16873:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4804, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16938:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4806, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3939", + "id": 4805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16952:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + }, + "value": "99" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16938:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266333066343035303933303432646466663861323531623662663664313033", + "id": 4807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16958:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62727895358028530630619015085479612675_by_1", + "typeString": "int_const 6272...(30 digits omitted)...2675" + }, + "value": "0x2f30f405093042ddff8a251b6bf6d103" + }, + "src": "16938:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4809, + "nodeType": "ExpressionStatement", + "src": "16938:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4810, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17003:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4812, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17016:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17003:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265666339333161333735306632653862666533323365646665303337353734", + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17023:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62455930205720405594293470980571624820_by_1", + "typeString": "int_const 6245...(30 digits omitted)...4820" + }, + "value": "0x2efc931a3750f2e8bfe323edfe037574" + }, + "src": "17003:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4815, + "nodeType": "ExpressionStatement", + "src": "17003:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4816, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17068:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4818, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313031", + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17081:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101_by_1", + "typeString": "int_const 101" + }, + "value": "101" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17068:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265633863323865343664626535366439383638353237383333393430306362", + "id": 4819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17088:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62186893237605070014470966239378538699_by_1", + "typeString": "int_const 6218...(30 digits omitted)...8699" + }, + "value": "0x2ec8c28e46dbe56d98685278339400cb" + }, + "src": "17068:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4821, + "nodeType": "ExpressionStatement", + "src": "17068:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4822, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17133:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4824, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313032", + "id": 4823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17146:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102_by_1", + "typeString": "int_const 102" + }, + "value": "102" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17133:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265393537666439333363333932366438613539396236303233373962383531", + "id": 4825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17153:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61920733112578916349615492109849704529_by_1", + "typeString": "int_const 6192...(30 digits omitted)...4529" + }, + "value": "0x2e957fd933c3926d8a599b602379b851" + }, + "src": "17133:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4827, + "nodeType": "ExpressionStatement", + "src": "17133:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4828, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17198:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4830, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313033", + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17211:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17198:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265363263383832633763396564343437333431323730326630386261306535", + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17218:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61657399741656031957349998364069699813_by_1", + "typeString": "int_const 6165...(30 digits omitted)...9813" + }, + "value": "0x2e62c882c7c9ed4473412702f08ba0e5" + }, + "src": "17198:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4833, + "nodeType": "ExpressionStatement", + "src": "17198:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4834, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17263:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4836, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313034", + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17276:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17263:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265333039613232316331326261333631653365643639353136376665656532", + "id": 4837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17283:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61396844248840510020197488843164741346_by_1", + "typeString": "int_const 6139...(30 digits omitted)...1346" + }, + "value": "0x2e309a221c12ba361e3ed695167feee2" + }, + "src": "17263:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4839, + "nodeType": "ExpressionStatement", + "src": "17263:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4840, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17328:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4842, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313035", + "id": 4841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17341:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105_by_1", + "typeString": "int_const 105" + }, + "value": "105" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17328:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264666566323564316638363561653138646430376366656134626365613130", + "id": 4843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17348:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61139018933488718567153792494864230928_by_1", + "typeString": "int_const 6113...(30 digits omitted)...0928" + }, + "value": "0x2dfef25d1f865ae18dd07cfea4bcea10" + }, + "src": "17328:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4845, + "nodeType": "ExpressionStatement", + "src": "17328:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4846, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17393:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4848, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313036", + "id": 4847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17406:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106_by_1", + "typeString": "int_const 106" + }, + "value": "106" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17393:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264636463656538323163646338306465636330326334343334346165623331", + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17413:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60883877234094689345243041491992636209_by_1", + "typeString": "int_const 6088...(30 digits omitted)...6209" + }, + "value": "0x2dcdcee821cdc80decc02c44344aeb31" + }, + "src": "17393:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4851, + "nodeType": "ExpressionStatement", + "src": "17393:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4852, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17458:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4854, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313037", + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17471:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107_by_1", + "typeString": "int_const 107" + }, + "value": "107" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17458:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264396432643835363262333439343464306232303162623837323630633833", + "id": 4855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17478:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60631373693435235627049349068288822403_by_1", + "typeString": "int_const 6063...(30 digits omitted)...2403" + }, + "value": "0x2d9d2d8562b34944d0b201bb87260c83" + }, + "src": "17458:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4857, + "nodeType": "ExpressionStatement", + "src": "17458:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4858, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17523:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4860, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313038", + "id": 4859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17536:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108_by_1", + "typeString": "int_const 108" + }, + "value": "108" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17523:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264366430633034613562363261326334323633363330383636396237323961", + "id": 4861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17543:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60381463925014654644808174288326324890_by_1", + "typeString": "int_const 6038...(30 digits omitted)...4890" + }, + "value": "0x2d6d0c04a5b62a2c42636308669b729a" + }, + "src": "17523:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4863, + "nodeType": "ExpressionStatement", + "src": "17523:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4864, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17588:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4866, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313039", + "id": 4865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17601:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109_by_1", + "typeString": "int_const 109" + }, + "value": "109" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17588:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264336436383432633961323335353137666335613033333236393135323866", + "id": 4867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17608:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60134104580751929226866781633165480591_by_1", + "typeString": "int_const 6013...(30 digits omitted)...0591" + }, + "value": "0x2d3d6842c9a235517fc5a0332691528f" + }, + "src": "17588:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4869, + "nodeType": "ExpressionStatement", + "src": "17588:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4870, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17653:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4872, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313130", + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17666:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_110_by_1", + "typeString": "int_const 110" + }, + "value": "110" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17653:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264306534303239363366653165613238333461626334303863343337633130", + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17673:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59889253319856226458538603217703631888_by_1", + "typeString": "int_const 5988...(30 digits omitted)...1888" + }, + "value": "0x2d0e402963fe1ea2834abc408c437c10" + }, + "src": "17653:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4875, + "nodeType": "ExpressionStatement", + "src": "17653:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4876, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17718:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4878, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313131", + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17731:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111_by_1", + "typeString": "int_const 111" + }, + "value": "111" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17718:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263646639316165363032363437393038616666393735653464366132613863", + "id": 4879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17738:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59646868778839210021497828354615290508_by_1", + "typeString": "int_const 5964...(30 digits omitted)...0508" + }, + "value": "0x2cdf91ae602647908aff975e4d6a2a8c" + }, + "src": "17718:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4881, + "nodeType": "ExpressionStatement", + "src": "17718:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4882, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4884, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313132", + "id": 4883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17796:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17783:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263623135616433613165623635663664373461373564613039613162366335", + "id": 4885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17803:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59406910542615247719403943326214371013_by_1", + "typeString": "int_const 5940...(30 digits omitted)...1013" + }, + "value": "0x2cb15ad3a1eb65f6d74a75da09a1b6c5" + }, + "src": "17783:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4887, + "nodeType": "ExpressionStatement", + "src": "17783:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4888, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17848:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4890, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313133", + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17861:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113_by_1", + "typeString": "int_const 113" + }, + "value": "113" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17848:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263383339396136616238653937373464366663666633373364323130373237", + "id": 4891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17868:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59169339116643016279047957521648125735_by_1", + "typeString": "int_const 5916...(30 digits omitted)...5735" + }, + "value": "0x2c8399a6ab8e9774d6fcff373d210727" + }, + "src": "17848:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4893, + "nodeType": "ExpressionStatement", + "src": "17848:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4894, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17913:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4896, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313134", + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17926:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114_by_1", + "typeString": "int_const 114" + }, + "value": "114" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17913:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263353634633430343666363465646261363838336361303662626334353335", + "id": 4897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17933:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58934115900064290859232836743818134837_by_1", + "typeString": "int_const 5893...(30 digits omitted)...4837" + }, + "value": "0x2c564c4046f64edba6883ca06bbc4535" + }, + "src": "17913:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4899, + "nodeType": "ExpressionStatement", + "src": "17913:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4900, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17978:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4902, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313135", + "id": 4901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17991:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115_by_1", + "typeString": "int_const 115" + }, + "value": "115" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17978:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263323937306334333166393532363431653035636234393365323365656433", + "id": 4903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17998:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58701203159797865214654223853927263955_by_1", + "typeString": "int_const 5870...(30 digits omitted)...3955" + }, + "value": "0x2c2970c431f952641e05cb493e23eed3" + }, + "src": "17978:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4905, + "nodeType": "ExpressionStatement", + "src": "17978:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4906, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18043:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4908, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313136", + "id": 4907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18056:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116_by_1", + "typeString": "int_const 116" + }, + "value": "116" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18043:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262666430353630636439656231343536336263376330373332383536633138", + "id": 4909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18063:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58470564005548587984364862866899430424_by_1", + "typeString": "int_const 5847...(30 digits omitted)...0424" + }, + "value": "0x2bfd0560cd9eb14563bc7c0732856c18" + }, + "src": "18043:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4911, + "nodeType": "ExpressionStatement", + "src": "18043:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4912, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18108:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4914, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313137", + "id": 4913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18121:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117_by_1", + "typeString": "int_const 117" + }, + "value": "117" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18108:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262643130383465643033333266376666343135306639643065663431613263", + "id": 4915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18128:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58242162365693428406397594903403305516_by_1", + "typeString": "int_const 5824...(30 digits omitted)...5516" + }, + "value": "0x2bd1084ed0332f7ff4150f9d0ef41a2c" + }, + "src": "18108:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4917, + "nodeType": "ExpressionStatement", + "src": "18108:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4918, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18173:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4920, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313138", + "id": 4919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18186:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_118_by_1", + "typeString": "int_const 118" + }, + "value": "118" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18173:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262613537376430666131363238623736643034306231326138323439326662", + "id": 4921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18193:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58015962964008307710970589788915405563_by_1", + "typeString": "int_const 5801...(30 digits omitted)...5563" + }, + "value": "0x2ba577d0fa1628b76d040b12a82492fb" + }, + "src": "18173:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4923, + "nodeType": "ExpressionStatement", + "src": "18173:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4924, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18238:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4926, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313139", + "id": 4925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18251:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119_by_1", + "typeString": "int_const 119" + }, + "value": "119" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18238:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262376135323333636432313538316538353565383964633266316538613932", + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18258:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57791931297201156866686511914608921234_by_1", + "typeString": "int_const 5779...(30 digits omitted)...1234" + }, + "value": "0x2b7a5233cd21581e855e89dc2f1e8a92" + }, + "src": "18238:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4929, + "nodeType": "ExpressionStatement", + "src": "18238:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4930, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18303:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4932, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313230", + "id": 4931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18316:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18303:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262346639356364343639303464303564373262646364653333376439636337", + "id": 4933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18323:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57570033613218293176076279351194000583_by_1", + "typeString": "int_const 5757...(30 digits omitted)...0583" + }, + "value": "0x2b4f95cd46904d05d72bdcde337d9cc7" + }, + "src": "18303:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "18303:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4936, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18368:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4938, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313231", + "id": 4937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18381:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_121_by_1", + "typeString": "int_const 121" + }, + "value": "121" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18368:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262323534306663396234643961626261336661636136363931393134363735", + "id": 4939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18388:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57350236890292752974853833075473860213_by_1", + "typeString": "int_const 5735...(30 digits omitted)...0213" + }, + "value": "0x2b2540fc9b4d9abba3faca6691914675" + }, + "src": "18368:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4941, + "nodeType": "ExpressionStatement", + "src": "18368:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4942, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18433:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4944, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313232", + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18446:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122_by_1", + "typeString": "int_const 122" + }, + "value": "122" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18433:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261666235323239663638643038333064386265386164623061306462373066", + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18453:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57132508816704680555143857466604631823_by_1", + "typeString": "int_const 5713...(30 digits omitted)...1823" + }, + "value": "0x2afb5229f68d0830d8be8adb0a0db70f" + }, + "src": "18433:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4947, + "nodeType": "ExpressionStatement", + "src": "18433:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4948, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18498:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4950, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313233", + "id": 4949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18511:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123_by_1", + "typeString": "int_const 123" + }, + "value": "123" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18498:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261643163376336336139623239346335626337336133626133616237613262", + "id": 4951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18518:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56916817771225259240345926660426267179_by_1", + "typeString": "int_const 5691...(30 digits omitted)...7179" + }, + "value": "0x2ad1c7c63a9b294c5bc73a3ba3ab7a2b" + }, + "src": "18498:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4953, + "nodeType": "ExpressionStatement", + "src": "18498:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4954, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18563:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4956, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313234", + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18576:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_124_by_1", + "typeString": "int_const 124" + }, + "value": "124" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18563:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261613861303461633363626531656531633963383633363134363564626238", + "id": 4957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18583:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56703132804216983807771297030642981816_by_1", + "typeString": "int_const 5670...(30 digits omitted)...1816" + }, + "value": "0x2aa8a04ac3cbe1ee1c9c86361465dbb8" + }, + "src": "18563:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4959, + "nodeType": "ExpressionStatement", + "src": "18563:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4960, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18628:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4962, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313235", + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18641:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125_by_1", + "typeString": "int_const 125" + }, + "value": "125" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18628:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261376664613339326437323561343461326338616562396162333534333064", + "id": 4963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18648:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56491423619364318412491401339172373261_by_1", + "typeString": "int_const 5649...(30 digits omitted)...3261" + }, + "value": "0x2a7fda392d725a44a2c8aeb9ab35430d" + }, + "src": "18628:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4965, + "nodeType": "ExpressionStatement", + "src": "18628:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4966, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18693:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4968, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313236", + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18706:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_126_by_1", + "typeString": "int_const 126" + }, + "value": "126" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18693:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261353737343162313863646536313837313737393262346661613231366462", + "id": 4969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18713:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56281660556009964768470705991401477851_by_1", + "typeString": "int_const 5628...(30 digits omitted)...7851" + }, + "value": "0x2a57741b18cde618717792b4faa216db" + }, + "src": "18693:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4971, + "nodeType": "ExpressionStatement", + "src": "18693:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4972, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18758:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4974, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313237", + "id": 4973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18771:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18758:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261326636633831663564383464643935306133353632366436643535303361", + "id": 4975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18778:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56073814572073085295245695095569469498_by_1", + "typeString": "int_const 5607...(30 digits omitted)...9498" + }, + "value": "0x2a2f6c81f5d84dd950a35626d6d5503a" + }, + "src": "18758:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4977, + "nodeType": "ExpressionStatement", + "src": "18758:54:7" + } + ] + }, + "documentation": null, + "id": 4979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "initLambertArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4208, + "nodeType": "ParameterList", + "parameters": [], + "src": "10481:2:7" + }, + "returnParameters": { + "id": 4209, + "nodeType": "ParameterList", + "parameters": [], + "src": "10492:0:7" + }, + "scope": 8977, + "src": "10456:8364:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 4989, + "nodeType": "Block", + "src": "18952:65:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4983, + "name": "initMaxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4203, + "src": "18963:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18963:17:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4985, + "nodeType": "ExpressionStatement", + "src": "18963:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4986, + "name": "initLambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4979, + "src": "18991:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18991:18:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4988, + "nodeType": "ExpressionStatement", + "src": "18991:18:7" + } + ] + }, + "documentation": { + "id": 4980, + "nodeType": "StructuredDocumentation", + "src": "18828:95:7", + "text": " @dev should be executed after construction (too large for the constructor)" + }, + "functionSelector": "e1c7392a", + "id": 4990, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4981, + "nodeType": "ParameterList", + "parameters": [], + "src": "18942:2:7" + }, + "returnParameters": { + "id": 4982, + "nodeType": "ParameterList", + "parameters": [], + "src": "18952:0:7" + }, + "scope": 8977, + "src": "18929:88:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13092 + ], + "body": { + "id": 5084, + "nodeType": "Block", + "src": "19968:795:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5006, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20024:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20014:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5009, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20027:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5005, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20006:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20006:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "20006:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5013, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20067:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20085:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20067:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20088:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5012, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20059:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5018, + "nodeType": "ExpressionStatement", + "src": "20059:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5020, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20137:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20154:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20137:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5023, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20159:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5024, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20177:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "20159:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20137:50:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20189:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5019, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20129:7:7", + "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": "20129:89:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5029, + "nodeType": "ExpressionStatement", + "src": "20129:89:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5030, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20281:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20292:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20281:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5035, + "nodeType": "IfStatement", + "src": "20277:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20315:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5004, + "id": 5034, + "nodeType": "Return", + "src": "20308:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5036, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20379:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5037, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20397:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "20379:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5046, + "nodeType": "IfStatement", + "src": "20375:92:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5041, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20441:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5039, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20429:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "20429:11:7", + "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": 5042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20429:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5043, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20452:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20429:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5004, + "id": 5045, + "nodeType": "Return", + "src": "20422:45:7" + } + }, + { + "assignments": [ + 5048 + ], + "declarations": [ + { + "constant": false, + "id": 5048, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20480:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5047, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5049, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20480:14:7" + }, + { + "assignments": [ + 5051 + ], + "declarations": [ + { + "constant": false, + "id": 5051, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20505:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5050, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "20505:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5052, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20505:15:7" + }, + { + "assignments": [ + 5054 + ], + "declarations": [ + { + "constant": false, + "id": 5054, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20531:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5053, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20531:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5059, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5057, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20559:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5055, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20547:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "20547:11:7", + "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": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20547:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20531:44:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5060, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "20587:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5061, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5051, + "src": "20595:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5062, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "20586:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5064, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5054, + "src": "20614:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5065, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20621:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5066, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20638:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5067, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20654:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5063, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "20608:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20608:57:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "20586:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5070, + "nodeType": "ExpressionStatement", + "src": "20586:79:7" + }, + { + "assignments": [ + 5072 + ], + "declarations": [ + { + "constant": false, + "id": 5072, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20676:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5079, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5075, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "20703:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5073, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20691:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "20691:11:7", + "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": 5076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20691:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5077, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5051, + "src": "20714:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20691:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20676:47:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5080, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5072, + "src": "20741:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5081, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20741:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5004, + "id": 5083, + "nodeType": "Return", + "src": "20734:21:7" + } + ] + }, + "documentation": { + "id": 4991, + "nodeType": "StructuredDocumentation", + "src": "19025:641:7", + "text": " @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token),\n calculates the target amount for a given conversion (in the main token)\n Formula:\n return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight, represented in ppm (1-1000000)\n @param _amount amount of reserve tokens to get the target amount for\n @return smart token amount" + }, + "functionSelector": "f3250fe2", + "id": 5085, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19936:8:7" + }, + "parameters": { + "id": 5000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4993, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19702:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4992, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19702:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4995, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19754:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4997, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19814:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 4996, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "19814:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4999, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19872:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19872:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19701:187:7" + }, + "returnParameters": { + "id": 5004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5003, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19954:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19954:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19953:9:7" + }, + "scope": 8977, + "src": "19672:1091:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13105 + ], + "body": { + "id": 5198, + "nodeType": "Block", + "src": "21691:1021:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5101, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "21737:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21747:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21737:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21750:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5100, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21729:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5106, + "nodeType": "ExpressionStatement", + "src": "21729:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5108, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "21790:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21808:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21790:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21811:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5107, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21782:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "21782:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5115, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "21860:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21877:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21860:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5118, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "21882:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5119, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "21900:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "21882:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "21860:50:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21912:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5114, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21852:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21852:89:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5124, + "nodeType": "ExpressionStatement", + "src": "21852:89:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5126, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "21960:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5127, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "21971:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21960:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21980:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 5125, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21952:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21952:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5131, + "nodeType": "ExpressionStatement", + "src": "21952:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5132, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22061:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22072:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22061:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5137, + "nodeType": "IfStatement", + "src": "22057:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22095:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5099, + "id": 5136, + "nodeType": "Return", + "src": "22088:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5138, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22168:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5139, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22179:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22168:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5143, + "nodeType": "IfStatement", + "src": "22164:59:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5141, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22208:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5142, + "nodeType": "Return", + "src": "22201:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5144, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "22286:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5145, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "22304:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "22286:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5154, + "nodeType": "IfStatement", + "src": "22282:92:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5149, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22356:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5147, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22336:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "22336:19:7", + "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": 5150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22336:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5151, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22367:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22336:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5153, + "nodeType": "Return", + "src": "22329:45:7" + } + }, + { + "assignments": [ + 5156 + ], + "declarations": [ + { + "constant": false, + "id": 5156, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22387:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22387:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "22387:14:7" + }, + { + "assignments": [ + 5159 + ], + "declarations": [ + { + "constant": false, + "id": 5159, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22412:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5158, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "22412:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5160, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "22412:15:7" + }, + { + "assignments": [ + 5162 + ], + "declarations": [ + { + "constant": false, + "id": 5162, + "mutability": "mutable", + "name": "baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22438:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22438:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5166, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5163, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5164, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22464:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22454:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22438:33:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5167, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22483:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5168, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5159, + "src": "22491:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5169, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "22482:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5171, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22510:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5172, + "name": "baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5162, + "src": "22519:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5173, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "22526:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5174, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "22538:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5170, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "22504:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22504:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "22482:71:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5177, + "nodeType": "ExpressionStatement", + "src": "22482:71:7" + }, + { + "assignments": [ + 5179 + ], + "declarations": [ + { + "constant": false, + "id": 5179, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22564:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22564:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5184, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5182, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22600:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5180, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22580:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "22580:19:7", + "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": 5183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22580:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22564:43:7" + }, + { + "assignments": [ + 5186 + ], + "declarations": [ + { + "constant": false, + "id": 5186, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22618:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22618:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5190, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5187, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22634:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5188, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5159, + "src": "22653:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22634:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22618:44:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5191, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5179, + "src": "22681:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5192, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5186, + "src": "22689:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22681:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5194, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22680:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5195, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22698:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22680:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5197, + "nodeType": "Return", + "src": "22673:31:7" + } + ] + }, + "documentation": { + "id": 5086, + "nodeType": "StructuredDocumentation", + "src": "20771:638:7", + "text": " @dev given a token supply, reserve balance, weight and a sell amount (in the main token),\n calculates the target amount for a given conversion (in the reserve token)\n Formula:\n return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight, represented in ppm (1-1000000)\n @param _amount amount of smart tokens to get the target amount for\n @return reserve token amount" + }, + "functionSelector": "76cf0b56", + "id": 5199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21659:8:7" + }, + "parameters": { + "id": 5095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5088, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21441:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21441:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5090, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21489:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5089, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21489:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5092, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21545:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5091, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "21545:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5094, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21599:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21599:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21440:175:7" + }, + "returnParameters": { + "id": 5099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5098, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21677:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5097, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21677:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21676:9:7" + }, + "scope": 8977, + "src": "21415:1297:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13120 + ], + "body": { + "id": 5304, + "nodeType": "Block", + "src": "23978:921:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5217, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24024:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24048:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24024:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5220, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24053:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24077:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24053:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24024:54:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24080:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5216, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24016:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24016:94:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5226, + "nodeType": "ExpressionStatement", + "src": "24016:94:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5228, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24129:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24152:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24129:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5231, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24157:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5232, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "24181:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24157:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:62:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5235, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24212:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24235:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24212:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:107:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5239, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24240:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5240, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "24264:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24240:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:145:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24276:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24121:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24121:184:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5245, + "nodeType": "ExpressionStatement", + "src": "24121:184:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5246, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24365:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5247, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24389:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24365:44:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5259, + "nodeType": "IfStatement", + "src": "24361:141:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5251, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5249, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24431:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "24431:25:7", + "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": 5252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24431:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5255, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5253, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "24468:25:7", + "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": 5256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24468:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24431:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5215, + "id": 5258, + "nodeType": "Return", + "src": "24424:78:7" + } + }, + { + "assignments": [ + 5261 + ], + "declarations": [ + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24515:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24515:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5262, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24515:14:7" + }, + { + "assignments": [ + 5264 + ], + "declarations": [ + { + "constant": false, + "id": 5264, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24540:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5263, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "24540:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5265, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24540:15:7" + }, + { + "assignments": [ + 5267 + ], + "declarations": [ + { + "constant": false, + "id": 5267, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24566:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24566:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5272, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5270, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24608:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5268, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24582:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "24582:25:7", + "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": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24582:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24566:50:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5273, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24628:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5274, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5264, + "src": "24636:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5275, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "24627:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5277, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "24655:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5278, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24662:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5279, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24685:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5280, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24707:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5276, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "24649:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24649:79:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "24627:101:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5283, + "nodeType": "ExpressionStatement", + "src": "24627:101:7" + }, + { + "assignments": [ + 5285 + ], + "declarations": [ + { + "constant": false, + "id": 5285, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5290, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5288, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24781:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5286, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24755:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "24755:25:7", + "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": 5289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24755:33:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24739:49:7" + }, + { + "assignments": [ + 5292 + ], + "declarations": [ + { + "constant": false, + "id": 5292, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24799:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5296, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5293, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24815:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5294, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5264, + "src": "24840:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24815:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24799:50:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5297, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5285, + "src": "24868:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5298, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5292, + "src": "24876:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24868:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5300, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "24867:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5301, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24867:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5215, + "id": 5303, + "nodeType": "Return", + "src": "24860:31:7" + } + ] + }, + "documentation": { + "id": 5200, + "nodeType": "StructuredDocumentation", + "src": "22720:842:7", + "text": " @dev given two reserve balances/weights and a sell amount (in the first reserve token),\n calculates the target amount for a conversion from the source reserve token to the target reserve token\n Formula:\n return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))\n @param _sourceReserveBalance source reserve balance\n @param _sourceReserveWeight source reserve weight, represented in ppm (1-1000000)\n @param _targetReserveBalance target reserve balance\n @param _targetReserveWeight target reserve weight, represented in ppm (1-1000000)\n @param _amount source reserve amount\n @return target reserve amount" + }, + "functionSelector": "94491fab", + "id": 5305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "crossReserveTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5212, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23946:8:7" + }, + "parameters": { + "id": 5211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5202, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23602:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23602:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5204, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23672:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5203, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "23672:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5206, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23740:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23740:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5208, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23810:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5207, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "23810:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5210, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23878:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23878:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23601:293:7" + }, + "returnParameters": { + "id": 5215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23964:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23964:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23963:9:7" + }, + "scope": 8977, + "src": "23568:1331:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13133 + ], + "body": { + "id": 5412, + "nodeType": "Block", + "src": "25813:815:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5321, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "25859:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25869:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25859:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25872:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5320, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25851:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5326, + "nodeType": "ExpressionStatement", + "src": "25851:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5328, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "25912:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25930:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25912:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25933:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5327, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25904:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25904:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5333, + "nodeType": "ExpressionStatement", + "src": "25904:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5335, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "25982:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25998:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25982:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5338, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26003:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5339, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26020:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26033:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "26020:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "26003:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "25982:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26036:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5334, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25974:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25974:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5346, + "nodeType": "ExpressionStatement", + "src": "25974:90:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5347, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26119:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26130:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26119:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5352, + "nodeType": "IfStatement", + "src": "26115:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26153:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5319, + "id": 5351, + "nodeType": "Return", + "src": "26146:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5353, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26224:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5354, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26241:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "26224:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5368, + "nodeType": "IfStatement", + "src": "26220:101:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5358, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26286:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5356, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26274:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "26274:11:7", + "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": 5359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26274:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26305:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26274:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5362, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26273:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5363, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26310:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26273:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26320:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26273:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5319, + "id": 5367, + "nodeType": "Return", + "src": "26266:55:7" + } + }, + { + "assignments": [ + 5370 + ], + "declarations": [ + { + "constant": false, + "id": 5370, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26334:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5369, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26334:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5371, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "26334:14:7" + }, + { + "assignments": [ + 5373 + ], + "declarations": [ + { + "constant": false, + "id": 5373, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26359:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5372, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26359:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5374, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "26359:15:7" + }, + { + "assignments": [ + 5376 + ], + "declarations": [ + { + "constant": false, + "id": 5376, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26385:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26385:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5379, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5377, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26401:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "26401:11:7", + "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": "26401:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26385:36:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5382, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5370, + "src": "26433:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5383, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5373, + "src": "26441:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5384, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "26432:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5386, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5376, + "src": "26460:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5387, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26467:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5388, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26476:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5389, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26488:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5385, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "26454:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26454:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "26432:70:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "26432:70:7" + }, + { + "assignments": [ + 5394 + ], + "declarations": [ + { + "constant": false, + "id": 5394, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26513:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5393, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5407, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5397, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5370, + "src": "26550:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5395, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26530:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "26530:19:7", + "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": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26530:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26560:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26530:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5401, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26529:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5402, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5373, + "src": "26566:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26529:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5404, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26528:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26579:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26528:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26513:67:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5408, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5394, + "src": "26598:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5409, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26605:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26598:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5319, + "id": 5411, + "nodeType": "Return", + "src": "26591:29:7" + } + ] + }, + "documentation": { + "id": 5306, + "nodeType": "StructuredDocumentation", + "src": "24907:665:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens,\n calculates the amount of reserve tokens required for purchasing the given amount of smart tokens\n Formula:\n return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount requested amount of smart tokens\n @return reserve token amount" + }, + "functionSelector": "ebbb2158", + "id": 5413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fundCost", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5316, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25781:8:7" + }, + "parameters": { + "id": 5315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5308, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25596:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25596:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5310, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25636:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25636:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5312, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25684:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5311, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "25684:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5314, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25729:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5313, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25595:150:7" + }, + "returnParameters": { + "id": 5319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5318, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25799:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25798:9:7" + }, + "scope": 8977, + "src": "25578:1050:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13146 + ], + "body": { + "id": 5509, + "nodeType": "Block", + "src": "27587:793:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5429, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "27633:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27643:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27633:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27646:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5428, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27625:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27625:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5434, + "nodeType": "ExpressionStatement", + "src": "27625:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5436, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "27686:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27704:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27686:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27707:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27678:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27678:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5441, + "nodeType": "ExpressionStatement", + "src": "27678:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5443, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27772:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27756:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5446, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27777:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5447, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "27794:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27807:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "27794:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "27777:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "27756:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27810:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5442, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27748:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5454, + "nodeType": "ExpressionStatement", + "src": "27748:90:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5455, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "27893:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27904:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27893:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5460, + "nodeType": "IfStatement", + "src": "27889:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27927:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5427, + "id": 5459, + "nodeType": "Return", + "src": "27920:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5461, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27998:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5462, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "28015:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "27998:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5471, + "nodeType": "IfStatement", + "src": "27994:91:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5466, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5464, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "28047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "28047:11:7", + "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": 5467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28047:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5468, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28070:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28047:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5427, + "id": 5470, + "nodeType": "Return", + "src": "28040:45:7" + } + }, + { + "assignments": [ + 5473 + ], + "declarations": [ + { + "constant": false, + "id": 5473, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28098:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28098:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5474, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28098:14:7" + }, + { + "assignments": [ + 5476 + ], + "declarations": [ + { + "constant": false, + "id": 5476, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28123:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5475, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "28123:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5477, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28123:15:7" + }, + { + "assignments": [ + 5479 + ], + "declarations": [ + { + "constant": false, + "id": 5479, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28149:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28149:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5484, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5482, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "28185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5480, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28165:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "28165:19:7", + "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": 5483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28165:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28149:44:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5485, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "28205:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5486, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5476, + "src": "28213:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5487, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "28204:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5489, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5479, + "src": "28232:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5490, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5491, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "28256:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5492, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "28271:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5488, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "28226:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28226:56:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "28204:78:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5495, + "nodeType": "ExpressionStatement", + "src": "28204:78:7" + }, + { + "assignments": [ + 5497 + ], + "declarations": [ + { + "constant": false, + "id": 5497, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28293:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5496, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28293:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5504, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5500, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "28320:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5498, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28308:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "28308:11:7", + "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": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28308:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5502, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5476, + "src": "28331:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28308:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28293:47:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5505, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5497, + "src": "28358:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5506, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28365:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28358:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5427, + "id": 5508, + "nodeType": "Return", + "src": "28351:21:7" + } + ] + }, + "documentation": { + "id": 5414, + "nodeType": "StructuredDocumentation", + "src": "26636:670:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with,\n calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens\n Formula:\n return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount amount of reserve tokens to fund with\n @return smart token amount" + }, + "functionSelector": "2f55bdb5", + "id": 5510, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fundSupplyAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5424, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "27555:8:7" + }, + "parameters": { + "id": 5423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5416, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27338:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27338:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5418, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27386:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27386:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27442:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5419, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "27442:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5422, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27495:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5421, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27337:174:7" + }, + "returnParameters": { + "id": 5427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27573:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27572:9:7" + }, + "scope": 8977, + "src": "27312:1068:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13159 + ], + "body": { + "id": 5625, + "nodeType": "Block", + "src": "29367:1026:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5526, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29423:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29413:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29426:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5525, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29405:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29405:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5531, + "nodeType": "ExpressionStatement", + "src": "29405:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5533, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "29466:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29484:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29466:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29487:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5532, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29458:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5538, + "nodeType": "ExpressionStatement", + "src": "29458:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5540, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29536:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29552:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "29536:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5543, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29557:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5544, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "29574:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29587:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "29574:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "29557:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29536:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29590:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5539, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29528:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29528:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5551, + "nodeType": "ExpressionStatement", + "src": "29528:90:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5553, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29637:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5554, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29648:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29637:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 5556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29657:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 5552, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29629:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29629:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5558, + "nodeType": "ExpressionStatement", + "src": "29629:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5559, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29733:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29744:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29733:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5564, + "nodeType": "IfStatement", + "src": "29729:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29767:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5524, + "id": 5563, + "nodeType": "Return", + "src": "29760:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5565, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29844:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5566, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29844:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5570, + "nodeType": "IfStatement", + "src": "29840:59:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5568, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "29884:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5569, + "nodeType": "Return", + "src": "29877:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5571, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29969:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5572, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "29986:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "29969:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5581, + "nodeType": "IfStatement", + "src": "29965:91:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5576, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30030:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5574, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "30018:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "30018:11:7", + "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": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30018:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5578, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30049:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30018:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5580, + "nodeType": "Return", + "src": "30011:45:7" + } + }, + { + "assignments": [ + 5583 + ], + "declarations": [ + { + "constant": false, + "id": 5583, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30069:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5584, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "30069:14:7" + }, + { + "assignments": [ + 5586 + ], + "declarations": [ + { + "constant": false, + "id": 5586, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30094:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5585, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "30094:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5587, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "30094:15:7" + }, + { + "assignments": [ + 5589 + ], + "declarations": [ + { + "constant": false, + "id": 5589, + "mutability": "mutable", + "name": "baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30120:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30120:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5593, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5590, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30136:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5591, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "30146:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30136:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30120:33:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5594, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30165:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5595, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5586, + "src": "30173:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5596, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "30164:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5598, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30192:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5599, + "name": "baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5589, + "src": "30201:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5600, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "30208:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5601, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "30220:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5597, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "30186:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30186:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "30164:70:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5604, + "nodeType": "ExpressionStatement", + "src": "30164:70:7" + }, + { + "assignments": [ + 5606 + ], + "declarations": [ + { + "constant": false, + "id": 5606, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30245:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30245:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5609, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30281:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5607, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30261:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "30261:19:7", + "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": 5610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30261:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30245:43:7" + }, + { + "assignments": [ + 5613 + ], + "declarations": [ + { + "constant": false, + "id": 5613, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30299:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30299:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5617, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5614, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30315:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5615, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5586, + "src": "30334:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30315:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30299:44:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5618, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5606, + "src": "30362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5619, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5613, + "src": "30370:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30362:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5621, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30361:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5622, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30379:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30361:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5624, + "nodeType": "Return", + "src": "30354:31:7" + } + ] + }, + "documentation": { + "id": 5511, + "nodeType": "StructuredDocumentation", + "src": "28388:668:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate,\n calculates the amount of reserve tokens received for selling the given amount of smart tokens\n Formula:\n return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount amount of smart tokens to liquidate\n @return reserve token amount" + }, + "functionSelector": "8074590a", + "id": 5626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidateReserveAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5521, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29335:8:7" + }, + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5513, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29094:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29094:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29148:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5514, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29148:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29210:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5516, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "29210:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29269:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29269:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29093:192:7" + }, + "returnParameters": { + "id": 5524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5523, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29353:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5522, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29353:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29352:9:7" + }, + "scope": 8977, + "src": "29062:1331:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13176 + ], + "body": { + "id": 5729, + "nodeType": "Block", + "src": "33118:1031:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5645, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33133:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5646, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33165:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33133:54:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5660, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33343:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33374:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33343:32:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5663, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33379:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33404:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33379:26:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33343:62:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5667, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33409:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33436:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33409:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33343:94:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33439:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5659, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33335:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33335:134:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5673, + "nodeType": "ExpressionStatement", + "src": "33335:134:7" + }, + "id": 5674, + "nodeType": "IfStatement", + "src": "33129:340:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5649, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33210:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33241:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33210:32:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5652, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33246:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33273:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33246:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33210:64:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33276:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33202:104:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5658, + "nodeType": "ExpressionStatement", + "src": "33202:104:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5676, + "name": "_reserveRateNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5635, + "src": "33488:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33512:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33488:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5679, + "name": "_reserveRateDenominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "33517:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33543:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33517:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33488:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f52415445", + "id": 5683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33546:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ef2ffbf1bb88550d8f6c1cbc448ef8c9b658c0125c3eaac6dd7d95fb505ee813", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATE\"" + }, + "value": "ERR_INVALID_RESERVE_RATE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ef2ffbf1bb88550d8f6c1cbc448ef8c9b658c0125c3eaac6dd7d95fb505ee813", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATE\"" + } + ], + "id": 5675, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33480:93:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "33480:93:7" + }, + { + "assignments": [ + 5687 + ], + "declarations": [ + { + "constant": false, + "id": 5687, + "mutability": "mutable", + "name": "tq", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5729, + "src": "33586:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33586:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5692, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5690, + "name": "_reserveRateNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5635, + "src": "33632:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5688, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33599:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "33599:32:7", + "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": 5691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33599:55:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33586:68:7" + }, + { + "assignments": [ + 5694 + ], + "declarations": [ + { + "constant": false, + "id": 5694, + "mutability": "mutable", + "name": "rp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5729, + "src": "33665:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5693, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33665:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5697, + "name": "_reserveRateDenominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "33707:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5695, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33678:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "33678:28:7", + "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": 5698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33678:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33665:66:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5700, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33748:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5701, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33779:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33748:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5711, + "nodeType": "IfStatement", + "src": "33744:169:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5704, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33846:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5705, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33870:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5706, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "33900:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5707, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "33904:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33908:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5703, + "name": "balancedWeightsByStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8547, + "src": "33823:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,bool) view returns (uint32,uint32)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33823:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5710, + "nodeType": "Return", + "src": "33816:97:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5712, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33930:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 5713, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33961:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33930:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5723, + "nodeType": "IfStatement", + "src": "33926:170:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5716, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "34028:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5717, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "34058:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5718, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "34082:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5719, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "34086:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34090:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5715, + "name": "balancedWeightsByStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8547, + "src": "34005:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,bool) view returns (uint32,uint32)" + } + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34005:91:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5722, + "nodeType": "Return", + "src": "33998:98:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5725, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "34134:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5726, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "34138:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5724, + "name": "normalizedWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8656, + "src": "34116:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 5727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34116:25:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5728, + "nodeType": "Return", + "src": "34109:32:7" + } + ] + }, + "documentation": { + "id": 5627, + "nodeType": "StructuredDocumentation", + "src": "30401:2317:7", + "text": " @dev The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price.\n We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance.\n In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance.\n Formula input:\n - let t denote the primary reserve token staked balance\n - let s denote the primary reserve token balance\n - let r denote the secondary reserve token balance\n - let q denote the numerator of the rate between the tokens\n - let p denote the denominator of the rate between the tokens\n Where p primary tokens are equal to q secondary tokens\n Formula output:\n - compute x = W(t / r * q / p * log(s / t)) / log(s / t)\n - return x / (1 + x) as the weight of the primary reserve token\n - return 1 / (1 + x) as the weight of the secondary reserve token\n Where W is the Lambert W Function\n If the rate-provider provides the rates for a common unit, for example:\n - P = 2 ==> 2 primary reserve tokens = 1 ether\n - Q = 3 ==> 3 secondary reserve tokens = 1 ether\n Then you can simply use p = P and q = Q\n If the rate-provider provides the rates for a single unit, for example:\n - P = 2 ==> 1 primary reserve token = 2 ethers\n - Q = 3 ==> 1 secondary reserve token = 3 ethers\n Then you can simply use p = Q and q = P\n @param _primaryReserveStakedBalance the primary reserve token staked balance\n @param _primaryReserveBalance the primary reserve token balance\n @param _secondaryReserveBalance the secondary reserve token balance\n @param _reserveRateNumerator the numerator of the rate between the tokens\n @param _reserveRateDenominator the denominator of the rate between the tokens\n Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token\n @return the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)" + }, + "functionSelector": "a11aa1b4", + "id": 5730, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balancedWeights", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5639, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33079:8:7" + }, + "parameters": { + "id": 5638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5629, + "mutability": "mutable", + "name": "_primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32749:36:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5628, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32749:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5631, + "mutability": "mutable", + "name": "_primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32817:30:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32817:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5633, + "mutability": "mutable", + "name": "_secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32879:32:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32879:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5635, + "mutability": "mutable", + "name": "_reserveRateNumerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32943:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32943:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5637, + "mutability": "mutable", + "name": "_reserveRateDenominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33004:31:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5636, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33004:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32748:288:7" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5641, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33097:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5640, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33097:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5643, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33105:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5642, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33105:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33096:16:7" + }, + "scope": 8977, + "src": "32724:1425:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5819, + "nodeType": "Block", + "src": "35853:677:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5747, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "35872:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5748, + "name": "MAX_NUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3592, + "src": "35881:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35872:16:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5746, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 5750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35864:25:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5751, + "nodeType": "ExpressionStatement", + "src": "35864:25:7" + }, + { + "assignments": [ + 5753 + ], + "declarations": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "baseLog", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "35902:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5752, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5754, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "35902:15:7" + }, + { + "assignments": [ + 5756 + ], + "declarations": [ + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "base", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "35928:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35928:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5762, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5757, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "35943:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5758, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35952:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35943:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5760, + "name": "_baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "35962:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35943:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35928:40:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5763, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "35983:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5764, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "35990:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35983:22:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5779, + "nodeType": "Block", + "src": "36075:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5773, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36090:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5775, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "36111:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5774, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "36100:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36100:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36090:26:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5778, + "nodeType": "ExpressionStatement", + "src": "36090:26:7" + } + ] + }, + "id": 5780, + "nodeType": "IfStatement", + "src": "35979:149:7", + "trueBody": { + "id": 5772, + "nodeType": "Block", + "src": "36007:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5766, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36022:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5768, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "36043:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5767, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "36032:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36032:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36022:26:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5771, + "nodeType": "ExpressionStatement", + "src": "36022:26:7" + } + ] + } + }, + { + "assignments": [ + 5782 + ], + "declarations": [ + { + "constant": false, + "id": 5782, + "mutability": "mutable", + "name": "baseLogTimesExp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "36140:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5781, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5783, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36166:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5784, + "name": "_expN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5737, + "src": "36176:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "36166:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5786, + "name": "_expD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "36184:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "36166:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36140:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5789, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36204:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5790, + "name": "OPT_EXP_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3604, + "src": "36222:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36204:33:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5817, + "nodeType": "Block", + "src": "36332:191:7", + "statements": [ + { + "assignments": [ + 5800 + ], + "declarations": [ + { + "constant": false, + "id": 5800, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5817, + "src": "36347:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5799, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "36347:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5804, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5802, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36391:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5801, + "name": "findPositionInMaxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6036, + "src": "36365:25:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 5803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36365:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36347:60:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5806, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36441:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5807, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "36461:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5808, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36477:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36461:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5810, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36460:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36441:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5812, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36489:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5805, + "name": "generalExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6546, + "src": "36430:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint8) pure returns (uint256)" + } + }, + "id": 5813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36430:69:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5814, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36501:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5815, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36429:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 5745, + "id": 5816, + "nodeType": "Return", + "src": "36422:89:7" + } + ] + }, + "id": 5818, + "nodeType": "IfStatement", + "src": "36200:323:7", + "trueBody": { + "id": 5798, + "nodeType": "Block", + "src": "36239:78:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5793, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36273:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5792, + "name": "optimalExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7276, + "src": "36262:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36262:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5795, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "36291:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5796, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36261:44:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 5745, + "id": 5797, + "nodeType": "Return", + "src": "36254:51:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 5731, + "nodeType": "StructuredDocumentation", + "src": "34157:1576:7", + "text": " @dev General Description:\n Determine a value of precision.\n Calculate an integer approximation of (_baseN / _baseD) ^ (_expN / _expD) * 2 ^ precision.\n Return the result along with the precision used.\n Detailed Description:\n Instead of calculating \"base ^ exp\", we calculate \"e ^ (log(base) * exp)\".\n The value of \"log(base)\" is represented with an integer slightly smaller than \"log(base) * 2 ^ precision\".\n The larger \"precision\" is, the more accurately this value represents the real value.\n However, the larger \"precision\" is, the more bits are required in order to store this value.\n And the exponentiation function, which takes \"x\" and calculates \"e ^ x\", is limited to a maximum exponent (maximum value of \"x\").\n This maximum exponent depends on the \"precision\" used, and it is given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\n Hence we need to determine the highest precision which can be used for the given input, before calling the exponentiation function.\n This allows us to compute \"base ^ exp\" with maximum accuracy and without exceeding 256 bits in any of the intermediate computations.\n This functions assumes that \"_expN < 2 ^ 256 / log(MAX_NUM - 1)\", otherwise the multiplication should be replaced with a \"safeMul\".\n Since we rely on unsigned-integer arithmetic and \"base < 1\" ==> \"log(base) < 0\", this function does not support \"_baseN < _baseD\"." + }, + "id": 5820, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "power", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5733, + "mutability": "mutable", + "name": "_baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35754:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5732, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "_baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35770:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5734, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35770:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5737, + "mutability": "mutable", + "name": "_expN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35786:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5736, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "35786:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5739, + "mutability": "mutable", + "name": "_expD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35800:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5738, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "35800:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35753:60:7" + }, + "returnParameters": { + "id": 5745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5742, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35837:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35837:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5744, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35846:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5743, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "35846:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35836:16:7" + }, + "scope": 8977, + "src": "35739:791:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5905, + "nodeType": "Block", + "src": "36770:760:7", + "statements": [ + { + "assignments": [ + 5829 + ], + "declarations": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5905, + "src": "36781:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5828, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36781:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5831, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 5830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36795:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "36781:15:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5832, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36905:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 5833, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "36910:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36905:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5854, + "nodeType": "IfStatement", + "src": "36901:156:7", + "trueBody": { + "id": 5853, + "nodeType": "Block", + "src": "36919:138:7", + "statements": [ + { + "assignments": [ + 5836 + ], + "declarations": [ + { + "constant": false, + "id": 5836, + "mutability": "mutable", + "name": "count", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5853, + "src": "36934:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5835, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "36934:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5842, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5838, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36958:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5839, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "36962:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36958:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5837, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5969, + "src": "36948:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 5841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36948:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36934:36:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5843, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36985:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "id": 5844, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5836, + "src": "36991:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36985:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5846, + "nodeType": "ExpressionStatement", + "src": "36985:11:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5847, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37024:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5848, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5836, + "src": "37030:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5849, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37038:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37030:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37024:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5852, + "nodeType": "ExpressionStatement", + "src": "37024:21:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5855, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37165:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 5856, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37169:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37165:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5898, + "nodeType": "IfStatement", + "src": "37161:305:7", + "trueBody": { + "id": 5897, + "nodeType": "Block", + "src": "37178:288:7", + "statements": [ + { + "body": { + "id": 5895, + "nodeType": "Block", + "src": "37235:220:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5868, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37254:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5869, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37259:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5870, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37263:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37259:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5872, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "37258:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5873, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37268:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37258:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37254:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5876, + "nodeType": "ExpressionStatement", + "src": "37254:21:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5877, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37315:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 5878, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "37320:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37315:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5894, + "nodeType": "IfStatement", + "src": "37311:129:7", + "trueBody": { + "id": 5893, + "nodeType": "Block", + "src": "37329:111:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5880, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37352:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37358:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37352:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5883, + "nodeType": "ExpressionStatement", + "src": "37352:7:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5884, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5885, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37406:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5886, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37414:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37418:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37414:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5889, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "37413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "37406:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37399:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5892, + "nodeType": "ExpressionStatement", + "src": "37399:21:7" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5862, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37223:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37227:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "37223:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5896, + "initializationExpression": { + "assignments": [ + 5859 + ], + "declarations": [ + { + "constant": false, + "id": 5859, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5896, + "src": "37198:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5858, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37198:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5861, + "initialValue": { + "argumentTypes": null, + "id": 5860, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "37208:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "37198:23:7" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 5866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "37230:3:7", + "subExpression": { + "argumentTypes": null, + "id": 5865, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37232:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5867, + "nodeType": "ExpressionStatement", + "src": "37230:3:7" + }, + "nodeType": "ForStatement", + "src": "37193:262:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5899, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37485:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5900, + "name": "LN2_NUMERATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "37491:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37485:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5902, + "name": "LN2_DENOMINATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3598, + "src": "37507:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37485:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5827, + "id": 5904, + "nodeType": "Return", + "src": "37478:44:7" + } + ] + }, + "documentation": { + "id": 5821, + "nodeType": "StructuredDocumentation", + "src": "36538:163:7", + "text": " @dev computes log(x / FIXED_1) * FIXED_1.\n This functions assumes that \"x >= FIXED_1\", because the output would be negative otherwise." + }, + "id": 5906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalLog", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5823, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5906, + "src": "36727:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36727:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36726:11:7" + }, + "returnParameters": { + "id": 5827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5826, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5906, + "src": "36761:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36761:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36760:9:7" + }, + "scope": 8977, + "src": "36707:823:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5968, + "nodeType": "Block", + "src": "37719:481:7", + "statements": [ + { + "assignments": [ + 5915 + ], + "declarations": [ + { + "constant": false, + "id": 5915, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5968, + "src": "37730:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5914, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37730:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5917, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 5916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37742:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "37730:13:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5918, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37760:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 5919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37765:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "src": "37760:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5964, + "nodeType": "Block", + "src": "37933:237:7", + "statements": [ + { + "body": { + "id": 5962, + "nodeType": "Block", + "src": "38021:138:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5946, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "38044:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5947, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "38051:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5948, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38058:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38051:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5950, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "38050:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38044:16:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5961, + "nodeType": "IfStatement", + "src": "38040:104:7", + "trueBody": { + "id": 5960, + "nodeType": "Block", + "src": "38062:82:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5952, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "38085:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "id": 5953, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38092:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38085:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5955, + "nodeType": "ExpressionStatement", + "src": "38085:8:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5956, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "38116:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "argumentTypes": null, + "id": 5957, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38123:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38116:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5959, + "nodeType": "ExpressionStatement", + "src": "38116:8:7" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5939, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38005:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38009:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38005:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5963, + "initializationExpression": { + "assignments": [ + 5936 + ], + "declarations": [ + { + "constant": false, + "id": 5936, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5963, + "src": "37990:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5935, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37990:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5938, + "initialValue": { + "argumentTypes": null, + "hexValue": "313238", + "id": 5937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38000:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "VariableDeclarationStatement", + "src": "37990:13:7" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 5944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5942, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38012:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38018:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "38012:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5945, + "nodeType": "ExpressionStatement", + "src": "38012:7:7" + }, + "nodeType": "ForStatement", + "src": "37985:174:7" + } + ] + }, + "id": 5965, + "nodeType": "IfStatement", + "src": "37756:414:7", + "trueBody": { + "id": 5934, + "nodeType": "Block", + "src": "37770:148:7", + "statements": [ + { + "body": { + "id": 5932, + "nodeType": "Block", + "src": "37837:70:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5924, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37856:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37863:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37856:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5927, + "nodeType": "ExpressionStatement", + "src": "37856:8:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5928, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "37883:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37890:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37883:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5931, + "nodeType": "ExpressionStatement", + "src": "37883:8:7" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5921, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37829:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37834:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37829:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5933, + "nodeType": "WhileStatement", + "src": "37822:85:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 5966, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "38189:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5913, + "id": 5967, + "nodeType": "Return", + "src": "38182:10:7" + } + ] + }, + "documentation": { + "id": 5907, + "nodeType": "StructuredDocumentation", + "src": "37538:114:7", + "text": " @dev computes the largest integer smaller than or equal to the binary logarithm of the input." + }, + "id": 5969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5909, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5969, + "src": "37677:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5908, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37677:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "37676:12:7" + }, + "returnParameters": { + "id": 5913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5912, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5969, + "src": "37712:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5911, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37712:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "37711:7:7" + }, + "scope": 8977, + "src": "37658:542:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6035, + "nodeType": "Block", + "src": "38650:424:7", + "statements": [ + { + "assignments": [ + 5978 + ], + "declarations": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "lo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6035, + "src": "38661:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5977, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38661:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5980, + "initialValue": { + "argumentTypes": null, + "id": 5979, + "name": "MIN_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3580, + "src": "38672:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38661:24:7" + }, + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "hi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6035, + "src": "38696:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5981, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38696:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5984, + "initialValue": { + "argumentTypes": null, + "id": 5983, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "38707:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38696:24:7" + }, + { + "body": { + "id": 6013, + "nodeType": "Block", + "src": "38753:165:7", + "statements": [ + { + "assignments": [ + 5991 + ], + "declarations": [ + { + "constant": false, + "id": 5991, + "mutability": "mutable", + "name": "mid", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6013, + "src": "38768:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5990, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38768:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5998, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5992, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38781:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 5993, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38786:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38781:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5995, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "38780:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38792:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "38780:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38768:25:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5999, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38812:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6001, + "indexExpression": { + "argumentTypes": null, + "id": 6000, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38824:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38812:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6002, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "38832:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38812:22:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 6010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6008, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38898:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6009, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38903:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38898:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6011, + "nodeType": "ExpressionStatement", + "src": "38898:8:7" + }, + "id": 6012, + "nodeType": "IfStatement", + "src": "38808:98:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6004, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38853:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6005, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38858:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38853:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6007, + "nodeType": "ExpressionStatement", + "src": "38853:8:7" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5985, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38740:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38745:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "38740:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5988, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38749:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38740:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6014, + "nodeType": "WhileStatement", + "src": "38733:185:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6015, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38934:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6017, + "indexExpression": { + "argumentTypes": null, + "id": 6016, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38946:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38934:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6018, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "38953:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38934:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6022, + "nodeType": "IfStatement", + "src": "38930:49:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6020, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38977:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5976, + "id": 6021, + "nodeType": "Return", + "src": "38970:9:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6023, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38994:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6025, + "indexExpression": { + "argumentTypes": null, + "id": 6024, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "39006:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38994:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6026, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "39013:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38994:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6030, + "nodeType": "IfStatement", + "src": "38990:49:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6028, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "39037:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5976, + "id": 6029, + "nodeType": "Return", + "src": "39030:9:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39060:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6031, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "39052:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39052:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6034, + "nodeType": "ExpressionStatement", + "src": "39052:14:7" + } + ] + }, + "documentation": { + "id": 5970, + "nodeType": "StructuredDocumentation", + "src": "38208:359:7", + "text": " @dev the global \"maxExpArray\" is sorted in descending order, and therefore the following statements are equivalent:\n - This function finds the position of [the smallest value in \"maxExpArray\" larger than or equal to \"x\"]\n - This function finds the highest position of [a value in \"maxExpArray\" larger than or equal to \"x\"]" + }, + "id": 6036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPositionInMaxExpArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5972, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6036, + "src": "38608:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38608:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38607:12:7" + }, + "returnParameters": { + "id": 5976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5975, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6036, + "src": "38643:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5974, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38643:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38642:7:7" + }, + "scope": 8977, + "src": "38573:501:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6545, + "nodeType": "Block", + "src": "39728:3782:7", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6545, + "src": "39739:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6046, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6049, + "initialValue": { + "argumentTypes": null, + "id": 6048, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39752:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39739:15:7" + }, + { + "assignments": [ + 6051 + ], + "declarations": [ + { + "constant": false, + "id": 6051, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6545, + "src": "39765:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6050, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39765:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6053, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39779:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "39765:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6054, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39793:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6055, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39799:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6056, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39804:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6058, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "39798:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6059, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "39811:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "39798:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39793:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6062, + "nodeType": "ExpressionStatement", + "src": "39793:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6063, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "39823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6064, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39830:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307833343432633465363037346138326631373937663732616330303030303030", + "id": 6065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39835:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4341658809405943247759097200640000000_by_1", + "typeString": "int_const 4341...(29 digits omitted)...0000" + }, + "value": "0x3442c4e6074a82f1797f72ac0000000" + }, + "src": "39830:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39823:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6068, + "nodeType": "ExpressionStatement", + "src": "39823:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6069, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39905:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6070, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39911:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6071, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39916:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39911:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6073, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "39910:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6074, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "39923:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "39910:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39905:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6077, + "nodeType": "ExpressionStatement", + "src": "39905:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6078, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "39935:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6079, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39942:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307831313662393666373537633338306662323837666430653430303030303030", + "id": 6080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39947:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1447219603135314415919699066880000000_by_1", + "typeString": "int_const 1447...(29 digits omitted)...0000" + }, + "value": "0x116b96f757c380fb287fd0e40000000" + }, + "src": "39942:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39935:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6083, + "nodeType": "ExpressionStatement", + "src": "39935:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6084, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40017:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6085, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40023:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6086, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40028:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40023:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6088, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6089, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40035:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40022:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40017:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6092, + "nodeType": "ExpressionStatement", + "src": "40017:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6093, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40047:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6094, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40054:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830343561653562646435663065303365636131666634333930303030303030", + "id": 6095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40059:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_361804900783828603979924766720000000_by_1", + "typeString": "int_const 3618...(28 digits omitted)...0000" + }, + "value": "0x045ae5bdd5f0e03eca1ff4390000000" + }, + "src": "40054:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40047:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6098, + "nodeType": "ExpressionStatement", + "src": "40047:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6099, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40129:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6100, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40135:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6101, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40140:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40135:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6103, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40134:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6104, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40147:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40134:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40129:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6107, + "nodeType": "ExpressionStatement", + "src": "40129:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6108, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40159:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6109, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40166:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830306465666162663931333032636439356239666664613530303030303030", + "id": 6110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40171:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72360980156765720795984953344000000_by_1", + "typeString": "int_const 7236...(27 digits omitted)...0000" + }, + "value": "0x00defabf91302cd95b9ffda50000000" + }, + "src": "40166:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40159:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6113, + "nodeType": "ExpressionStatement", + "src": "40159:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6114, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40241:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6115, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40247:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6116, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40252:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40247:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40246:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6119, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40259:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40246:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40241:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "40241:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6123, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40271:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6124, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40278:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303235323963613938333262323234333965666666396238303030303030", + "id": 6125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40283:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12060163359460953465997492224000000_by_1", + "typeString": "int_const 1206...(27 digits omitted)...0000" + }, + "value": "0x002529ca9832b22439efff9b8000000" + }, + "src": "40278:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40271:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6128, + "nodeType": "ExpressionStatement", + "src": "40271:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6129, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40353:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6130, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40359:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6131, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40364:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40359:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6133, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40358:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6134, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40371:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40358:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40353:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6137, + "nodeType": "ExpressionStatement", + "src": "40353:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6138, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6139, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40390:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303035346631636631326264303465353136623664613838303030303030", + "id": 6140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40395:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1722880479922993352285356032000000_by_1", + "typeString": "int_const 1722...(26 digits omitted)...0000" + }, + "value": "0x00054f1cf12bd04e516b6da88000000" + }, + "src": "40390:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40383:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6143, + "nodeType": "ExpressionStatement", + "src": "40383:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6144, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40465:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6145, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40471:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6146, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40476:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40471:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6148, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40470:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6149, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40483:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40470:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40465:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6152, + "nodeType": "ExpressionStatement", + "src": "40465:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6153, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40495:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6154, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40502:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030613965333965323537613039636132643664623531303030303030", + "id": 6155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40507:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_215360059990374169035669504000000_by_1", + "typeString": "int_const 2153...(25 digits omitted)...0000" + }, + "value": "0x0000a9e39e257a09ca2d6db51000000" + }, + "src": "40502:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40495:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6158, + "nodeType": "ExpressionStatement", + "src": "40495:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6159, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40577:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6160, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40583:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6161, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40588:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40583:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6163, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40582:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6164, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40595:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40582:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40577:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6167, + "nodeType": "ExpressionStatement", + "src": "40577:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6168, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40607:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6169, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40614:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030313265303636653762383339666130353063333039303030303030", + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40619:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23928895554486018781741056000000_by_1", + "typeString": "int_const 23928895554486018781741056000000" + }, + "value": "0x000012e066e7b839fa050c309000000" + }, + "src": "40614:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40607:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6173, + "nodeType": "ExpressionStatement", + "src": "40607:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6174, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40689:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6175, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40695:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6176, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40700:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40695:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6178, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40694:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6179, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40707:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40694:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40689:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6182, + "nodeType": "ExpressionStatement", + "src": "40689:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6183, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6184, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40726:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303165333364376439323663333239613161643161383030303030", + "id": 6185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40731:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2392889555448601878174105600000_by_1", + "typeString": "int_const 2392889555448601878174105600000" + }, + "value": "0x000001e33d7d926c329a1ad1a800000" + }, + "src": "40726:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40719:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6188, + "nodeType": "ExpressionStatement", + "src": "40719:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6189, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40801:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6190, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40807:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6191, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40812:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40807:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6193, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40806:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6194, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40819:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40806:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40801:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6197, + "nodeType": "ExpressionStatement", + "src": "40801:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6198, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40831:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6199, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40838:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303032626565353133626462346136623139623566383030303030", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40843:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_217535414131691079834009600000_by_1", + "typeString": "int_const 217535414131691079834009600000" + }, + "value": "0x0000002bee513bdb4a6b19b5f800000" + }, + "src": "40838:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40831:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "40831:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6204, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40913:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6205, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40919:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6206, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40924:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40919:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6208, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40918:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6209, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40931:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40918:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40913:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6212, + "nodeType": "ExpressionStatement", + "src": "40913:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6213, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40943:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6214, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40950:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030336139333136666137396238386563636632613030303030", + "id": 6215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40955:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18127951177640923319500800000_by_1", + "typeString": "int_const 18127951177640923319500800000" + }, + "value": "0x00000003a9316fa79b88eccf2a00000" + }, + "src": "40950:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40943:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6218, + "nodeType": "ExpressionStatement", + "src": "40943:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6219, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41025:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6220, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41031:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6221, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41036:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6223, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41030:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6224, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41043:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41030:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41025:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6227, + "nodeType": "ExpressionStatement", + "src": "41025:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6228, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41055:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6229, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41062:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303438313737656265316661383132333735323030303030", + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41067:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1394457782895455639961600000_by_1", + "typeString": "int_const 1394457782895455639961600000" + }, + "value": "0x0000000048177ebe1fa812375200000" + }, + "src": "41062:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41055:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6233, + "nodeType": "ExpressionStatement", + "src": "41055:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6234, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41137:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6235, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41143:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6236, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41148:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41143:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6238, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41142:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6239, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41155:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41142:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41137:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6242, + "nodeType": "ExpressionStatement", + "src": "41137:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6243, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6244, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41174:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303035323633666539303234326463626163663030303030", + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41179:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99604127349675402854400000_by_1", + "typeString": "int_const 99604127349675402854400000" + }, + "value": "0x0000000005263fe90242dcbacf00000" + }, + "src": "41174:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41167:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6248, + "nodeType": "ExpressionStatement", + "src": "41167:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6249, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41249:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6250, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41255:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6251, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41260:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41255:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41254:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6254, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41267:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41254:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41249:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6257, + "nodeType": "ExpressionStatement", + "src": "41249:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6258, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41279:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6259, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41286:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030353765323230393963303330643934313030303030", + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41291:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6640275156645026856960000_by_1", + "typeString": "int_const 6640275156645026856960000" + }, + "value": "0x000000000057e22099c030d94100000" + }, + "src": "41286:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41279:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6263, + "nodeType": "ExpressionStatement", + "src": "41279:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6264, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41361:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6265, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41367:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6266, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41372:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41367:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6268, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41366:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6269, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41379:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41366:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41361:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6272, + "nodeType": "ExpressionStatement", + "src": "41361:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6273, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41391:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6274, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41398:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303537653232303939633033306439343130303030", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41403:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_415017197290314178560000_by_1", + "typeString": "int_const 415017197290314178560000" + }, + "value": "0x0000000000057e22099c030d9410000" + }, + "src": "41398:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41391:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6278, + "nodeType": "ExpressionStatement", + "src": "41391:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6279, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41473:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6280, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41479:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6281, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41484:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41479:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6283, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41478:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6284, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41491:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41478:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41473:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6287, + "nodeType": "ExpressionStatement", + "src": "41473:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6288, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41503:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6289, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41510:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303035326236623534353639393736333130303030", + "id": 6290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41515:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24412776311194951680000_by_1", + "typeString": "int_const 24412776311194951680000" + }, + "value": "0x00000000000052b6b54569976310000" + }, + "src": "41510:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41503:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "41503:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6294, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41585:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6295, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41591:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6296, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41596:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6298, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41590:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6299, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41603:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41590:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41585:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6302, + "nodeType": "ExpressionStatement", + "src": "41585:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6303, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41615:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6304, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41622:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030343938356636373639366266373438303030", + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41627:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1356265350621941760000_by_1", + "typeString": "int_const 1356265350621941760000" + }, + "value": "0x00000000000004985f67696bf748000" + }, + "src": "41622:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41615:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6308, + "nodeType": "ExpressionStatement", + "src": "41615:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6309, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41697:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6310, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41703:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6311, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41708:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41703:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6313, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41702:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6314, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41715:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41702:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41697:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6317, + "nodeType": "ExpressionStatement", + "src": "41697:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6318, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41727:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6319, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41734:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303364656131326561393965343938303030", + "id": 6320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41739:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71382386874839040000_by_1", + "typeString": "int_const 71382386874839040000" + }, + "value": "0x000000000000003dea12ea99e498000" + }, + "src": "41734:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41727:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6323, + "nodeType": "ExpressionStatement", + "src": "41727:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6324, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41809:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6325, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41815:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6326, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41820:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41815:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6328, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41814:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6329, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41827:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41814:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41809:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6332, + "nodeType": "ExpressionStatement", + "src": "41809:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6333, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41839:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6334, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41846:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303033313838306632323134623665303030", + "id": 6335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41851:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3569119343741952000_by_1", + "typeString": "int_const 3569119343741952000" + }, + "value": "0x00000000000000031880f2214b6e000" + }, + "src": "41846:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41839:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6338, + "nodeType": "ExpressionStatement", + "src": "41839:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6339, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41921:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6340, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41927:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6341, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41932:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41927:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6343, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41926:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6344, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41939:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41926:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41921:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6347, + "nodeType": "ExpressionStatement", + "src": "41921:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6348, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41951:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6349, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41958:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030323562636666353665623336303030", + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41963:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_169958063987712000_by_1", + "typeString": "int_const 169958063987712000" + }, + "value": "0x000000000000000025bcff56eb36000" + }, + "src": "41958:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41951:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6353, + "nodeType": "ExpressionStatement", + "src": "41951:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6354, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42033:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6355, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42039:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6356, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42044:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42039:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6358, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42038:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6359, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42051:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42038:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42033:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6362, + "nodeType": "ExpressionStatement", + "src": "42033:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6363, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42063:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6364, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42070:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303162373232653130616231303030", + "id": 6365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42075:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7725366544896000_by_1", + "typeString": "int_const 7725366544896000" + }, + "value": "0x000000000000000001b722e10ab1000" + }, + "src": "42070:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42063:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6368, + "nodeType": "ExpressionStatement", + "src": "42063:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6369, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42145:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6370, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42151:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6371, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42156:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6373, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42150:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6374, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42163:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42150:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42145:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6377, + "nodeType": "ExpressionStatement", + "src": "42145:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6378, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42175:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6379, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42182:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303031333137633730303737303030", + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42187:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_335885501952000_by_1", + "typeString": "int_const 335885501952000" + }, + "value": "0x0000000000000000001317c70077000" + }, + "src": "42182:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42175:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6383, + "nodeType": "ExpressionStatement", + "src": "42175:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6384, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42257:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6385, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42263:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6386, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42268:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42263:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6388, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42262:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6389, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42275:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42262:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42257:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6392, + "nodeType": "ExpressionStatement", + "src": "42257:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6393, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42287:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6394, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030306362613834616166613030", + "id": 6395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42299:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13995229248000_by_1", + "typeString": "int_const 13995229248000" + }, + "value": "0x00000000000000000000cba84aafa00" + }, + "src": "42294:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42287:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6398, + "nodeType": "ExpressionStatement", + "src": "42287:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6399, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42369:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6400, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42375:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6401, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42380:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6403, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42374:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6404, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42387:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42374:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6407, + "nodeType": "ExpressionStatement", + "src": "42369:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6408, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6409, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42406:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303038323537336130613030", + "id": 6410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42411:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_559809169920_by_1", + "typeString": "int_const 559809169920" + }, + "value": "0x00000000000000000000082573a0a00" + }, + "src": "42406:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42399:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6413, + "nodeType": "ExpressionStatement", + "src": "42399:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6414, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42481:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6415, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42487:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6416, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42492:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42487:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6418, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42486:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6419, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42499:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42486:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42481:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6422, + "nodeType": "ExpressionStatement", + "src": "42481:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6423, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42511:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6424, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42518:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030353033356164393030", + "id": 6425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42523:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21531121920_by_1", + "typeString": "int_const 21531121920" + }, + "value": "0x00000000000000000000005035ad900" + }, + "src": "42518:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42511:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6428, + "nodeType": "ExpressionStatement", + "src": "42511:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6429, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42593:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6430, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42599:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6431, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42604:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42599:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6433, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42598:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6434, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42598:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42593:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "42593:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6438, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42623:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6439, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42630:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303266383831623030", + "id": 6440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42635:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_797448960_by_1", + "typeString": "int_const 797448960" + }, + "value": "0x000000000000000000000002f881b00" + }, + "src": "42630:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42623:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6443, + "nodeType": "ExpressionStatement", + "src": "42623:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6444, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42705:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6445, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42711:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6446, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42716:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6448, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42710:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6449, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42723:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42710:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42705:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6452, + "nodeType": "ExpressionStatement", + "src": "42705:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6453, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42735:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6454, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42742:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303031623239333430", + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42747:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_28480320_by_1", + "typeString": "int_const 28480320" + }, + "value": "0x0000000000000000000000001b29340" + }, + "src": "42742:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42735:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6458, + "nodeType": "ExpressionStatement", + "src": "42735:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6459, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42817:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6460, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42823:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6461, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42828:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42823:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6463, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42822:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6464, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42835:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42822:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42817:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6467, + "nodeType": "ExpressionStatement", + "src": "42817:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6468, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42847:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6469, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42854:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030306566633430", + "id": 6470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42859:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_982080_by_1", + "typeString": "int_const 982080" + }, + "value": "0x00000000000000000000000000efc40" + }, + "src": "42854:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42847:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6473, + "nodeType": "ExpressionStatement", + "src": "42847:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6474, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42929:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6475, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42935:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6476, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42940:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42935:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6478, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42934:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6479, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42947:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42934:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42929:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6482, + "nodeType": "ExpressionStatement", + "src": "42929:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6483, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42959:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6484, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42966:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303037666530", + "id": 6485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42971:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32736_by_1", + "typeString": "int_const 32736" + }, + "value": "0x0000000000000000000000000007fe0" + }, + "src": "42966:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42959:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6488, + "nodeType": "ExpressionStatement", + "src": "42959:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6489, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43041:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6490, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43047:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6491, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43052:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43046:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6494, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43059:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43046:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43041:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6497, + "nodeType": "ExpressionStatement", + "src": "43041:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6498, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43071:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6499, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43078:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030343230", + "id": 6500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43083:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1056_by_1", + "typeString": "int_const 1056" + }, + "value": "0x0000000000000000000000000000420" + }, + "src": "43078:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43071:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6503, + "nodeType": "ExpressionStatement", + "src": "43071:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6504, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43153:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6505, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6506, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43164:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6508, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43158:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6509, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43171:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43158:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43153:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6512, + "nodeType": "ExpressionStatement", + "src": "43153:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6513, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43183:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6514, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43190:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030303231", + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43195:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "0x0000000000000000000000000000021" + }, + "src": "43190:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43183:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "43183:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6519, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43265:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6520, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43271:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6521, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43276:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43271:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6523, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43270:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6524, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43283:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43270:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43265:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6527, + "nodeType": "ExpressionStatement", + "src": "43265:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6528, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43295:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6529, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43302:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030303031", + "id": 6530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43307:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x0000000000000000000000000000001" + }, + "src": "43302:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43295:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6533, + "nodeType": "ExpressionStatement", + "src": "43295:45:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6534, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43386:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307836383835383963633065393530356532663266656535353830303030303030", + "id": 6535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43392:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8683317618811886495518194401280000000_by_1", + "typeString": "int_const 8683...(29 digits omitted)...0000" + }, + "value": "0x688589cc0e9505e2f2fee5580000000" + }, + "src": "43386:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 6537, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43428:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43386:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6539, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "43434:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 6540, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43441:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43434:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6542, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43433:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43386:66:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6045, + "id": 6544, + "nodeType": "Return", + "src": "43379:73:7" + } + ] + }, + "documentation": { + "id": 6037, + "nodeType": "StructuredDocumentation", + "src": "39082:558:7", + "text": " @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'.\n it approximates \"e ^ x\" via maclaurin summation: \"(x^0)/0! + (x^1)/1! + ... + (x^n)/n!\".\n it returns \"e ^ (x / 2 ^ precision) * 2 ^ precision\", that is, the result is upshifted for accuracy.\n the global \"maxExpArray\" maps each \"precision\" to \"((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1\".\n the maximum permitted value for \"x\" is therefore given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\"." + }, + "id": 6546, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalExp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6039, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39666:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6041, + "mutability": "mutable", + "name": "_precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39678:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6040, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "39678:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39665:30:7" + }, + "returnParameters": { + "id": 6045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6044, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39719:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6043, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39719:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39718:9:7" + }, + "scope": 8977, + "src": "39646:3864:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6865, + "nodeType": "Block", + "src": "44315:2735:7", + "statements": [ + { + "assignments": [ + 6555 + ], + "declarations": [ + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44326:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44326:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6557, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44340:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "44326:15:7" + }, + { + "assignments": [ + 6559 + ], + "declarations": [ + { + "constant": false, + "id": 6559, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44354:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44354:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6560, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44354:9:7" + }, + { + "assignments": [ + 6562 + ], + "declarations": [ + { + "constant": false, + "id": 6562, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44374:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6561, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44374:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6563, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44374:9:7" + }, + { + "assignments": [ + 6565 + ], + "declarations": [ + { + "constant": false, + "id": 6565, + "mutability": "mutable", + "name": "w", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44394:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6564, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44394:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6566, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44394:9:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6567, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44420:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786433303934633730663033346465346239366666376435623666393966636438", + "id": 6568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44425:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_280515388193368458015406427511040113880_by_1", + "typeString": "int_const 2805...(31 digits omitted)...3880" + }, + "value": "0xd3094c70f034de4b96ff7d5b6f99fcd8" + }, + "src": "44420:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6583, + "nodeType": "IfStatement", + "src": "44416:143:7", + "trueBody": { + "id": 6582, + "nodeType": "Block", + "src": "44461:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6570, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44462:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430303030303030303030303030303030303030303030303030303030303030", + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44469:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85070591730234615865843651857942052864_by_1", + "typeString": "int_const 8507...(30 digits omitted)...2864" + }, + "value": "0x40000000000000000000000000000000" + }, + "src": "44462:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6573, + "nodeType": "ExpressionStatement", + "src": "44462:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6574, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44505:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6575, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44509:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6576, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44509:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786433303934633730663033346465346239366666376435623666393966636438", + "id": 6578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44523:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_280515388193368458015406427511040113880_by_1", + "typeString": "int_const 2805...(31 digits omitted)...3880" + }, + "value": "0xd3094c70f034de4b96ff7d5b6f99fcd8" + }, + "src": "44509:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44505:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6581, + "nodeType": "ExpressionStatement", + "src": "44505:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6584, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44588:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786134356166316531663430633333336233646531646234646435356632396137", + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44593:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218465603988574474844591417643679820199_by_1", + "typeString": "int_const 2184...(31 digits omitted)...0199" + }, + "value": "0xa45af1e1f40c333b3de1db4dd55f29a7" + }, + "src": "44588:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6600, + "nodeType": "IfStatement", + "src": "44584:143:7", + "trueBody": { + "id": 6599, + "nodeType": "Block", + "src": "44629:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6587, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44630:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783230303030303030303030303030303030303030303030303030303030303030", + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44637:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42535295865117307932921825928971026432_by_1", + "typeString": "int_const 4253...(30 digits omitted)...6432" + }, + "value": "0x20000000000000000000000000000000" + }, + "src": "44630:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6590, + "nodeType": "ExpressionStatement", + "src": "44630:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6591, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44673:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6592, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44677:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6593, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44677:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786134356166316531663430633333336233646531646234646435356632396137", + "id": 6595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44691:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218465603988574474844591417643679820199_by_1", + "typeString": "int_const 2184...(31 digits omitted)...0199" + }, + "value": "0xa45af1e1f40c333b3de1db4dd55f29a7" + }, + "src": "44677:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44673:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6598, + "nodeType": "ExpressionStatement", + "src": "44673:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6601, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44756:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783931306230323264623761653637636537366234343163323730333563366131", + "id": 6602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44761:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192795218841189805222451540510555621025_by_1", + "typeString": "int_const 1927...(31 digits omitted)...1025" + }, + "value": "0x910b022db7ae67ce76b441c27035c6a1" + }, + "src": "44756:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6617, + "nodeType": "IfStatement", + "src": "44752:143:7", + "trueBody": { + "id": 6616, + "nodeType": "Block", + "src": "44797:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6604, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44798:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030303030303030303030303030303030", + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44805:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x10000000000000000000000000000000" + }, + "src": "44798:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6607, + "nodeType": "ExpressionStatement", + "src": "44798:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6608, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44841:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6609, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44845:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6610, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44849:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44845:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783931306230323264623761653637636537366234343163323730333563366131", + "id": 6612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44859:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192795218841189805222451540510555621025_by_1", + "typeString": "int_const 1927...(31 digits omitted)...1025" + }, + "value": "0x910b022db7ae67ce76b441c27035c6a1" + }, + "src": "44845:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44841:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6615, + "nodeType": "ExpressionStatement", + "src": "44841:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6618, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44924:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783838343135616262653961373662656164386430306366313132653464346138", + "id": 6619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44929:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181114347027396448854165353426875372712_by_1", + "typeString": "int_const 1811...(31 digits omitted)...2712" + }, + "value": "0x88415abbe9a76bead8d00cf112e4d4a8" + }, + "src": "44924:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6634, + "nodeType": "IfStatement", + "src": "44920:143:7", + "trueBody": { + "id": 6633, + "nodeType": "Block", + "src": "44965:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6621, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44966:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783038303030303030303030303030303030303030303030303030303030303030", + "id": 6622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44973:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10633823966279326983230456482242756608_by_1", + "typeString": "int_const 1063...(30 digits omitted)...6608" + }, + "value": "0x08000000000000000000000000000000" + }, + "src": "44966:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6624, + "nodeType": "ExpressionStatement", + "src": "44966:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6625, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45009:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6626, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45013:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6627, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45017:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45013:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783838343135616262653961373662656164386430306366313132653464346138", + "id": 6629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45027:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181114347027396448854165353426875372712_by_1", + "typeString": "int_const 1811...(31 digits omitted)...2712" + }, + "value": "0x88415abbe9a76bead8d00cf112e4d4a8" + }, + "src": "45013:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45009:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6632, + "nodeType": "ExpressionStatement", + "src": "45009:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6635, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45092:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783834313032623030383933663634633730356538343164356434303634626433", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45097:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_175542044379434494067323265867529472979_by_1", + "typeString": "int_const 1755...(31 digits omitted)...2979" + }, + "value": "0x84102b00893f64c705e841d5d4064bd3" + }, + "src": "45092:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6651, + "nodeType": "IfStatement", + "src": "45088:143:7", + "trueBody": { + "id": 6650, + "nodeType": "Block", + "src": "45133:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6638, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45134:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783034303030303030303030303030303030303030303030303030303030303030", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45141:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5316911983139663491615228241121378304_by_1", + "typeString": "int_const 5316...(29 digits omitted)...8304" + }, + "value": "0x04000000000000000000000000000000" + }, + "src": "45134:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "45134:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6642, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45177:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6643, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45181:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6644, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45181:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783834313032623030383933663634633730356538343164356434303634626433", + "id": 6646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45195:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_175542044379434494067323265867529472979_by_1", + "typeString": "int_const 1755...(31 digits omitted)...2979" + }, + "value": "0x84102b00893f64c705e841d5d4064bd3" + }, + "src": "45181:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45177:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6649, + "nodeType": "ExpressionStatement", + "src": "45177:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6652, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45260:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783832303430353561616566316338626435633332353966343832323733356132", + "id": 6653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45265:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_172820517236198538127967385733353125282_by_1", + "typeString": "int_const 1728...(31 digits omitted)...5282" + }, + "value": "0x8204055aaef1c8bd5c3259f4822735a2" + }, + "src": "45260:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6668, + "nodeType": "IfStatement", + "src": "45256:143:7", + "trueBody": { + "id": 6667, + "nodeType": "Block", + "src": "45301:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6655, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45302:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783032303030303030303030303030303030303030303030303030303030303030", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45309:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2658455991569831745807614120560689152_by_1", + "typeString": "int_const 2658...(29 digits omitted)...9152" + }, + "value": "0x02000000000000000000000000000000" + }, + "src": "45302:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "45302:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6659, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45345:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6660, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45349:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6661, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45353:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45349:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783832303430353561616566316338626435633332353966343832323733356132", + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45363:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_172820517236198538127967385733353125282_by_1", + "typeString": "int_const 1728...(31 digits omitted)...5282" + }, + "value": "0x8204055aaef1c8bd5c3259f4822735a2" + }, + "src": "45349:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45345:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6666, + "nodeType": "ExpressionStatement", + "src": "45345:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6669, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45428:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783831303130306162303032323264383631393331633135653339623434653939", + "id": 6670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45433:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_171475617301169790829459146906809945753_by_1", + "typeString": "int_const 1714...(31 digits omitted)...5753" + }, + "value": "0x810100ab00222d861931c15e39b44e99" + }, + "src": "45428:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6685, + "nodeType": "IfStatement", + "src": "45424:143:7", + "trueBody": { + "id": 6684, + "nodeType": "Block", + "src": "45469:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6672, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45470:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783031303030303030303030303030303030303030303030303030303030303030", + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45477:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1329227995784915872903807060280344576_by_1", + "typeString": "int_const 1329...(29 digits omitted)...4576" + }, + "value": "0x01000000000000000000000000000000" + }, + "src": "45470:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6675, + "nodeType": "ExpressionStatement", + "src": "45470:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6676, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45513:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6677, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45517:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6678, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45521:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45517:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783831303130306162303032323264383631393331633135653339623434653939", + "id": 6680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45531:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_171475617301169790829459146906809945753_by_1", + "typeString": "int_const 1714...(31 digits omitted)...5753" + }, + "value": "0x810100ab00222d861931c15e39b44e99" + }, + "src": "45517:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45513:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6683, + "nodeType": "ExpressionStatement", + "src": "45513:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6686, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45596:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783830383034303135356161626262653934353135323136393335353466373333", + "id": 6687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45601:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170807097224429000759274174605493073715_by_1", + "typeString": "int_const 1708...(31 digits omitted)...3715" + }, + "value": "0x808040155aabbbe9451521693554f733" + }, + "src": "45596:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6702, + "nodeType": "IfStatement", + "src": "45592:143:7", + "trueBody": { + "id": 6701, + "nodeType": "Block", + "src": "45637:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6689, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45638:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783030383030303030303030303030303030303030303030303030303030303030", + "id": 6690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45645:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_664613997892457936451903530140172288_by_1", + "typeString": "int_const 6646...(28 digits omitted)...2288" + }, + "value": "0x00800000000000000000000000000000" + }, + "src": "45638:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6692, + "nodeType": "ExpressionStatement", + "src": "45638:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6693, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45681:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6694, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45685:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6695, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45689:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45685:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783830383034303135356161626262653934353135323136393335353466373333", + "id": 6697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45699:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170807097224429000759274174605493073715_by_1", + "typeString": "int_const 1708...(31 digits omitted)...3715" + }, + "value": "0x808040155aabbbe9451521693554f733" + }, + "src": "45685:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45681:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6700, + "nodeType": "ExpressionStatement", + "src": "45681:52:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 6709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6703, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45762:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6704, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45766:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6705, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45770:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6706, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45774:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45770:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45766:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45762:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6710, + "nodeType": "ExpressionStatement", + "src": "45762:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6711, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "45792:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6712, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45796:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6713, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45800:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45796:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6715, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45804:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45796:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45792:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6718, + "nodeType": "ExpressionStatement", + "src": "45792:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6719, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45822:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6720, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45829:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45834:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6722, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45872:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45834:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6724, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45833:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45829:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45877:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "src": "45829:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45822:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6729, + "nodeType": "ExpressionStatement", + "src": "45822:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6730, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45914:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6731, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45918:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6732, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "45922:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45918:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6734, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45926:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45918:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45914:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6737, + "nodeType": "ExpressionStatement", + "src": "45914:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6738, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45973:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6739, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45980:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078306161616161616161616161616161616161616161616161616161616161616161", + "id": 6740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45985:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_226854911280625642308916404954512140970_by_1", + "typeString": "int_const 2268...(31 digits omitted)...0970" + }, + "value": "0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6741, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46023:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45985:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6743, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45984:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45980:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 6745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46028:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "src": "45980:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45973:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6748, + "nodeType": "ExpressionStatement", + "src": "45973:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6749, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46065:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6750, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46069:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6751, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46073:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46069:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6753, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46077:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46069:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46065:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "46065:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6757, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46124:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6758, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46131:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303939393939393939393939393939393939393939393939393939393939393939", + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46136:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_204169420152563078078024764459060926873_by_1", + "typeString": "int_const 2041...(31 digits omitted)...6873" + }, + "value": "0x099999999999999999999999999999999" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6760, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46174:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46136:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6762, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46135:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46131:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078333030303030303030303030303030303030303030303030303030303030303030", + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46179:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1020847100762815390390123822295304634368_by_1", + "typeString": "int_const 1020...(32 digits omitted)...4368" + }, + "value": "0x300000000000000000000000000000000" + }, + "src": "46131:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46124:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6767, + "nodeType": "ExpressionStatement", + "src": "46124:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6768, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46216:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6769, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46220:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6770, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46224:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46220:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6772, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46228:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46220:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46216:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6775, + "nodeType": "ExpressionStatement", + "src": "46216:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6776, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46275:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6777, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46282:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303932343932343932343932343932343932343932343932343932343932343932", + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46287:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_194447066811964836264785489961010406546_by_1", + "typeString": "int_const 1944...(31 digits omitted)...6546" + }, + "value": "0x092492492492492492492492492492492" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6779, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46325:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46287:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6781, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46286:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46282:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078343030303030303030303030303030303030303030303030303030303030303030", + "id": 6783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46330:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1361129467683753853853498429727072845824_by_1", + "typeString": "int_const 1361...(32 digits omitted)...5824" + }, + "value": "0x400000000000000000000000000000000" + }, + "src": "46282:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46275:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6786, + "nodeType": "ExpressionStatement", + "src": "46275:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6787, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46367:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6788, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46371:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6789, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46375:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46371:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6791, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46379:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46371:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46367:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "46367:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6795, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46426:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6796, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46433:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303865333865333865333865333865333865333865333865333865333865333865", + "id": 6797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46438:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_189045759400521368590763670795426784142_by_1", + "typeString": "int_const 1890...(31 digits omitted)...4142" + }, + "value": "0x08e38e38e38e38e38e38e38e38e38e38e" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6798, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46476:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46438:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46437:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46433:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078353030303030303030303030303030303030303030303030303030303030303030", + "id": 6802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46481:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1701411834604692317316873037158841057280_by_1", + "typeString": "int_const 1701...(32 digits omitted)...7280" + }, + "value": "0x500000000000000000000000000000000" + }, + "src": "46433:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46426:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6805, + "nodeType": "ExpressionStatement", + "src": "46426:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6806, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46518:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6807, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46522:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6808, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46526:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46522:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6810, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46522:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46518:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6813, + "nodeType": "ExpressionStatement", + "src": "46518:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6814, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46577:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6815, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46584:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303862613265386261326538626132653862613265386261326538626132653862", + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46589:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_185608563775057343707295240417328115339_by_1", + "typeString": "int_const 1856...(31 digits omitted)...5339" + }, + "value": "0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6817, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46627:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46589:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6819, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46588:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46584:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078363030303030303030303030303030303030303030303030303030303030303030", + "id": 6821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46632:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2041694201525630780780247644590609268736_by_1", + "typeString": "int_const 2041...(32 digits omitted)...8736" + }, + "value": "0x600000000000000000000000000000000" + }, + "src": "46584:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46577:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6824, + "nodeType": "ExpressionStatement", + "src": "46577:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6825, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46669:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6826, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46673:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6827, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46677:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46673:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6829, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46673:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46669:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6832, + "nodeType": "ExpressionStatement", + "src": "46669:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6833, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6834, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46735:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303839643839643839643839643839643839643839643839643839643839643839", + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46740:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_183228966803582249557201711694029036937_by_1", + "typeString": "int_const 1832...(31 digits omitted)...6937" + }, + "value": "0x089d89d89d89d89d89d89d89d89d89d89" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6836, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46778:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46740:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6838, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46739:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46735:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078373030303030303030303030303030303030303030303030303030303030303030", + "id": 6840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46783:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2381976568446569244243622252022377480192_by_1", + "typeString": "int_const 2381...(32 digits omitted)...0192" + }, + "value": "0x700000000000000000000000000000000" + }, + "src": "46735:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46728:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6843, + "nodeType": "ExpressionStatement", + "src": "46728:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6844, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46820:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6845, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46824:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6846, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46828:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46824:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6848, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46832:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46824:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46820:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6851, + "nodeType": "ExpressionStatement", + "src": "46820:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6852, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46879:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6853, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46886:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303838383838383838383838383838383838383838383838383838383838383838", + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46891:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181483929024500513847133123963609712776_by_1", + "typeString": "int_const 1814...(31 digits omitted)...2776" + }, + "value": "0x088888888888888888888888888888888" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6855, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46929:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46891:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6857, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46890:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46886:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078383030303030303030303030303030303030303030303030303030303030303030", + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46934:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691648_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1648" + }, + "value": "0x800000000000000000000000000000000" + }, + "src": "46886:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46879:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6862, + "nodeType": "ExpressionStatement", + "src": "46879:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6863, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "47039:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6553, + "id": 6864, + "nodeType": "Return", + "src": "47032:10:7" + } + ] + }, + "documentation": { + "id": 6547, + "nodeType": "StructuredDocumentation", + "src": "43518:728:7", + "text": " @dev computes log(x / FIXED_1) * FIXED_1\n Input range: FIXED_1 <= x <= OPT_LOG_MAX_VAL - 1\n Auto-generated via 'PrintFunctionOptimalLog.py'\n Detailed description:\n - Rewrite the input as a product of natural exponents and a single residual r, such that 1 < r < 2\n - The natural logarithm of each (pre-calculated) exponent is the degree of the exponent\n - The natural logarithm of r is calculated via Taylor series for log(1 + x), where x = r - 1\n - The natural logarithm of the input is calculated by summing up the intermediate results above\n - For example: log(250) = log(e^4 * e^1 * e^0.5 * 1.021692859) = 4 + 1 + 0.5 + log(1 + 0.021692859)" + }, + "id": 6866, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalLog", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6549, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6866, + "src": "44272:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44272:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44271:11:7" + }, + "returnParameters": { + "id": 6553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6552, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6866, + "src": "44306:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44306:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44305:9:7" + }, + "scope": 8977, + "src": "44252:2798:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7275, + "nodeType": "Block", + "src": "47810:3153:7", + "statements": [ + { + "assignments": [ + 6875 + ], + "declarations": [ + { + "constant": false, + "id": 6875, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47821:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47821:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6877, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47835:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "47821:15:7" + }, + { + "assignments": [ + 6879 + ], + "declarations": [ + { + "constant": false, + "id": 6879, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47849:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6878, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47849:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6880, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "47849:9:7" + }, + { + "assignments": [ + 6882 + ], + "declarations": [ + { + "constant": false, + "id": 6882, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47869:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47869:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6883, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "47869:9:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6884, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47891:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6885, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "47895:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6886, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "47899:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030303030303030303030303030303030", + "id": 6887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47903:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x10000000000000000000000000000000" + }, + "src": "47899:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47895:42:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47891:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6891, + "nodeType": "ExpressionStatement", + "src": "47891:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6892, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47979:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6893, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47983:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6894, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "47987:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47983:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6896, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "47991:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47983:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47979:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6899, + "nodeType": "ExpressionStatement", + "src": "47979:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6900, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48000:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6901, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48007:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307831306531623362653431356130303030", + "id": 6902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48011:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1216451004088320000_by_1", + "typeString": "int_const 1216451004088320000" + }, + "value": "0x10e1b3be415a0000" + }, + "src": "48007:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48000:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6905, + "nodeType": "ExpressionStatement", + "src": "48000:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6906, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48066:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6907, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48070:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6908, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48074:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48070:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6910, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48078:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48070:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48066:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6913, + "nodeType": "ExpressionStatement", + "src": "48066:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6914, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48087:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6915, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48094:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830356130393133663662316530303030", + "id": 6916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48098:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_405483668029440000_by_1", + "typeString": "int_const 405483668029440000" + }, + "value": "0x05a0913f6b1e0000" + }, + "src": "48094:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48087:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6919, + "nodeType": "ExpressionStatement", + "src": "48087:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6920, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48153:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6921, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48157:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6922, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48161:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48157:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6924, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48165:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48157:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48153:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6927, + "nodeType": "ExpressionStatement", + "src": "48153:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6928, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48174:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6929, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48181:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830313638323434666461633738303030", + "id": 6930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48185:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101370917007360000_by_1", + "typeString": "int_const 101370917007360000" + }, + "value": "0x0168244fdac78000" + }, + "src": "48181:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48174:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6933, + "nodeType": "ExpressionStatement", + "src": "48174:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6934, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48240:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6935, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6936, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48248:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48244:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6938, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48252:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48244:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48240:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "48240:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6942, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48261:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6943, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48268:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303438303734333262633138303030", + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48272:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20274183401472000_by_1", + "typeString": "int_const 20274183401472000" + }, + "value": "0x004807432bc18000" + }, + "src": "48268:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48261:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6947, + "nodeType": "ExpressionStatement", + "src": "48261:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6948, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48327:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6949, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48331:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6950, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48335:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48331:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6952, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48339:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48331:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48327:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6955, + "nodeType": "ExpressionStatement", + "src": "48327:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6956, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48348:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6957, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48355:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303063303133356463613034303030", + "id": 6958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48359:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3379030566912000_by_1", + "typeString": "int_const 3379030566912000" + }, + "value": "0x000c0135dca04000" + }, + "src": "48355:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48348:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6961, + "nodeType": "ExpressionStatement", + "src": "48348:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6962, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48414:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6963, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48418:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6964, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48422:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48418:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6966, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48426:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48418:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48414:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6969, + "nodeType": "ExpressionStatement", + "src": "48414:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6970, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48435:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6971, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48442:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303031623730376231636463303030", + "id": 6972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48446:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_482718652416000_by_1", + "typeString": "int_const 482718652416000" + }, + "value": "0x0001b707b1cdc000" + }, + "src": "48442:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48435:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6975, + "nodeType": "ExpressionStatement", + "src": "48435:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6976, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48501:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6977, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48505:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6978, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48509:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48505:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6980, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48505:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48501:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6983, + "nodeType": "ExpressionStatement", + "src": "48501:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6984, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6985, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48529:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030333665306636333962383030", + "id": 6986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48533:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60339831552000_by_1", + "typeString": "int_const 60339831552000" + }, + "value": "0x000036e0f639b800" + }, + "src": "48529:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48522:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6989, + "nodeType": "ExpressionStatement", + "src": "48522:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6990, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48588:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6991, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48592:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6992, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48596:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48592:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6994, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48600:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48592:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48588:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6997, + "nodeType": "ExpressionStatement", + "src": "48588:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6998, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6999, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48616:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303631386665653966383030", + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48620:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6704425728000_by_1", + "typeString": "int_const 6704425728000" + }, + "value": "0x00000618fee9f800" + }, + "src": "48616:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48609:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7003, + "nodeType": "ExpressionStatement", + "src": "48609:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7004, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48675:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7005, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48679:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7006, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48683:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48679:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7008, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48687:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48679:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48675:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7011, + "nodeType": "ExpressionStatement", + "src": "48675:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7012, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48696:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7013, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48703:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303039633139376463633030", + "id": 7014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48707:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_670442572800_by_1", + "typeString": "int_const 670442572800" + }, + "value": "0x0000009c197dcc00" + }, + "src": "48703:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48696:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7017, + "nodeType": "ExpressionStatement", + "src": "48696:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7018, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48762:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7019, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48766:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7020, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48770:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48766:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7022, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48774:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48766:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48762:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7025, + "nodeType": "ExpressionStatement", + "src": "48762:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7026, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48783:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7027, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48790:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030653330646365343030", + "id": 7028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48794:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60949324800_by_1", + "typeString": "int_const 60949324800" + }, + "value": "0x0000000e30dce400" + }, + "src": "48790:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48783:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7031, + "nodeType": "ExpressionStatement", + "src": "48783:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7032, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48849:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7033, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48853:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7034, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48857:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48853:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7036, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48853:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48849:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7039, + "nodeType": "ExpressionStatement", + "src": "48849:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7040, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48870:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7041, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48877:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030313265626431333030", + "id": 7042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48881:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5079110400_by_1", + "typeString": "int_const 5079110400" + }, + "value": "0x000000012ebd1300" + }, + "src": "48877:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48870:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7045, + "nodeType": "ExpressionStatement", + "src": "48870:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7046, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48936:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7047, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48940:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7048, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48944:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48940:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7050, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48948:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48940:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48936:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7053, + "nodeType": "ExpressionStatement", + "src": "48936:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7054, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48957:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7055, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48964:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303137343939663030", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48968:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_390700800_by_1", + "typeString": "int_const 390700800" + }, + "value": "0x0000000017499f00" + }, + "src": "48964:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48957:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7059, + "nodeType": "ExpressionStatement", + "src": "48957:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7060, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49023:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7061, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49027:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7062, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49031:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49027:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7064, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49035:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49027:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49023:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7067, + "nodeType": "ExpressionStatement", + "src": "49023:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7068, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49044:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7069, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49051:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303031613964343830", + "id": 7070, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49055:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_27907200_by_1", + "typeString": "int_const 27907200" + }, + "value": "0x0000000001a9d480" + }, + "src": "49051:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49044:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7073, + "nodeType": "ExpressionStatement", + "src": "49044:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7074, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49110:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7075, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49114:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7076, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49118:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49114:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7078, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49114:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49110:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7081, + "nodeType": "ExpressionStatement", + "src": "49110:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7082, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49131:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7083, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49138:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030316336333830", + "id": 7084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49142:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1860480_by_1", + "typeString": "int_const 1860480" + }, + "value": "0x00000000001c6380" + }, + "src": "49138:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49131:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7087, + "nodeType": "ExpressionStatement", + "src": "49131:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7088, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49197:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7089, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49201:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7090, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49205:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49201:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7092, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49209:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49201:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49197:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7095, + "nodeType": "ExpressionStatement", + "src": "49197:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7096, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49218:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7097, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49225:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303163363338", + "id": 7098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49229:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116280_by_1", + "typeString": "int_const 116280" + }, + "value": "0x000000000001c638" + }, + "src": "49225:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49218:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7101, + "nodeType": "ExpressionStatement", + "src": "49218:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7102, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49284:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7103, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49288:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7104, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49292:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49288:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7106, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49296:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49288:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49284:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7109, + "nodeType": "ExpressionStatement", + "src": "49284:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7110, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49305:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7111, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49312:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303031616238", + "id": 7112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49316:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6840_by_1", + "typeString": "int_const 6840" + }, + "value": "0x0000000000001ab8" + }, + "src": "49312:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49305:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7115, + "nodeType": "ExpressionStatement", + "src": "49305:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7116, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49371:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7117, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49375:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7118, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49379:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49375:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7120, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49375:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49371:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7123, + "nodeType": "ExpressionStatement", + "src": "49371:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7124, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49392:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7125, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49399:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030313763", + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49403:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_380_by_1", + "typeString": "int_const 380" + }, + "value": "0x000000000000017c" + }, + "src": "49399:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49392:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "49392:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7130, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49458:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7131, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49462:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7132, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49466:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49462:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7134, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49470:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49462:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49458:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7137, + "nodeType": "ExpressionStatement", + "src": "49458:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7138, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7139, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49486:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303134", + "id": 7140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49490:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "0x0000000000000014" + }, + "src": "49486:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49479:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7143, + "nodeType": "ExpressionStatement", + "src": "49479:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7144, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49545:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7145, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49549:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7146, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49553:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49549:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7148, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49557:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49549:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49545:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7151, + "nodeType": "ExpressionStatement", + "src": "49545:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7152, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49566:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7153, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49573:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303031", + "id": 7154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49577:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x0000000000000001" + }, + "src": "49573:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49566:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7157, + "nodeType": "ExpressionStatement", + "src": "49566:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7158, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49632:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7159, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49638:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307832316333363737633832623430303030", + "id": 7160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49644:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2432902008176640000_by_1", + "typeString": "int_const 2432902008176640000" + }, + "value": "0x21c3677c82b40000" + }, + "src": "49638:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 7162, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49665:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49638:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 7164, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49669:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49638:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49632:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7167, + "nodeType": "ExpressionStatement", + "src": "49632:44:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7168, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "49744:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303130303030303030303030303030303030303030303030303030303030303030", + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49748:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x010000000000000000000000000000000" + }, + "src": "49744:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7171, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "49743:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49788:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "49743:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7182, + "nodeType": "IfStatement", + "src": "49739:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7174, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49791:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7175, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078316333643661323465643832323138373837643632346433653565626139356639", + "id": 7176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49803:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_600596269623765960634066700837880239609_by_1", + "typeString": "int_const 6005...(31 digits omitted)...9609" + }, + "value": "0x1c3d6a24ed82218787d624d3e5eba95f9" + }, + "src": "49797:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313865626566396561633832306165383638326239373933616336643165373736", + "id": 7178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49841:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_530024347646835984032474664511850276726_by_1", + "typeString": "int_const 5300...(31 digits omitted)...6726" + }, + "value": "0x18ebef9eac820ae8682b9793ac6d1e776" + }, + "src": "49797:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49791:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7181, + "nodeType": "ExpressionStatement", + "src": "49791:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7183, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "49916:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230303030303030303030303030303030303030303030303030303030303030", + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49920:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42535295865117307932921825928971026432_by_1", + "typeString": "int_const 4253...(30 digits omitted)...6432" + }, + "value": "0x020000000000000000000000000000000" + }, + "src": "49916:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7186, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "49915:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49960:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "49915:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7197, + "nodeType": "IfStatement", + "src": "49911:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7189, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49963:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7190, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49969:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313865626566396561633832306165383638326239373933616336643165373738", + "id": 7191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49975:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_530024347646835984032474664511850276728_by_1", + "typeString": "int_const 5300...(31 digits omitted)...6728" + }, + "value": "0x18ebef9eac820ae8682b9793ac6d1e778" + }, + "src": "49969:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313336386232666336663936303966653761636562343661613631396261656434", + "id": 7193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50013:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_412783376994266390547521411024565284564_by_1", + "typeString": "int_const 4127...(31 digits omitted)...4564" + }, + "value": "0x1368b2fc6f9609fe7aceb46aa619baed4" + }, + "src": "49969:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49963:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7196, + "nodeType": "ExpressionStatement", + "src": "49963:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7198, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50088:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303430303030303030303030303030303030303030303030303030303030303030", + "id": 7199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50092:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85070591730234615865843651857942052864_by_1", + "typeString": "int_const 8507...(30 digits omitted)...2864" + }, + "value": "0x040000000000000000000000000000000" + }, + "src": "50088:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7201, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50087:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50132:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50087:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7212, + "nodeType": "IfStatement", + "src": "50083:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7204, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7205, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50141:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313336386232666336663936303966653761636562343661613631396261656435", + "id": 7206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50147:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_412783376994266390547521411024565284565_by_1", + "typeString": "int_const 4127...(31 digits omitted)...4565" + }, + "value": "0x1368b2fc6f9609fe7aceb46aa619baed5" + }, + "src": "50141:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306263356162316231363737396265333537356264386630353230613966323166", + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50185:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250365773966741064234501452596301656607_by_1", + "typeString": "int_const 2503...(31 digits omitted)...6607" + }, + "value": "0x0bc5ab1b16779be3575bd8f0520a9f21f" + }, + "src": "50141:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50135:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7211, + "nodeType": "ExpressionStatement", + "src": "50135:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7213, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50260:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303830303030303030303030303030303030303030303030303030303030303030", + "id": 7214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50264:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170141183460469231731687303715884105728_by_1", + "typeString": "int_const 1701...(31 digits omitted)...5728" + }, + "value": "0x080000000000000000000000000000000" + }, + "src": "50260:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7216, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50259:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50304:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50259:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7227, + "nodeType": "IfStatement", + "src": "50255:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7219, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50307:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7220, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50313:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306263356162316231363737396265333537356264386630353230613966323165", + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50319:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250365773966741064234501452596301656606_by_1", + "typeString": "int_const 2503...(31 digits omitted)...6606" + }, + "value": "0x0bc5ab1b16779be3575bd8f0520a9f21e" + }, + "src": "50313:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303435346161613865666530373265376636646462616238346234306135356339", + "id": 7223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50357:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92104421015340344839251721785254237641_by_1", + "typeString": "int_const 9210...(30 digits omitted)...7641" + }, + "value": "0x0454aaa8efe072e7f6ddbab84b40a55c9" + }, + "src": "50313:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50307:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7226, + "nodeType": "ExpressionStatement", + "src": "50307:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7228, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50432:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50436:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "src": "50432:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7231, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50431:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50431:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7242, + "nodeType": "IfStatement", + "src": "50427:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7234, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7235, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50485:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303435346161613865666530373265376636646462616238346234306135356335", + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50491:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92104421015340344839251721785254237637_by_1", + "typeString": "int_const 9210...(30 digits omitted)...7637" + }, + "value": "0x0454aaa8efe072e7f6ddbab84b40a55c5" + }, + "src": "50485:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303039363061616463313039653761336266343537383039393631353731316561", + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50529:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12464977905455307901915658421775307242_by_1", + "typeString": "int_const 1246...(30 digits omitted)...7242" + }, + "value": "0x00960aadc109e7a3bf4578099615711ea" + }, + "src": "50485:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50479:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7241, + "nodeType": "ExpressionStatement", + "src": "50479:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7243, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50604:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 7244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50608:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "src": "50604:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7246, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50603:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50648:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50603:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7257, + "nodeType": "IfStatement", + "src": "50599:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7249, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50651:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7250, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50657:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303039363061616463313039653761336266343537383039393631353731316437", + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50663:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12464977905455307901915658421775307223_by_1", + "typeString": "int_const 1246...(30 digits omitted)...7223" + }, + "value": "0x00960aadc109e7a3bf4578099615711d7" + }, + "src": "50657:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030326266383432303832303466353937376639613863663031666463653364", + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50701:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228304034072369565894155946646425149_by_1", + "typeString": "int_const 2283...(28 digits omitted)...5149" + }, + "value": "0x0002bf84208204f5977f9a8cf01fdce3d" + }, + "src": "50657:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50651:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7256, + "nodeType": "ExpressionStatement", + "src": "50651:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7258, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50776:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078343030303030303030303030303030303030303030303030303030303030303030", + "id": 7259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50780:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1361129467683753853853498429727072845824_by_1", + "typeString": "int_const 1361...(32 digits omitted)...5824" + }, + "value": "0x400000000000000000000000000000000" + }, + "src": "50776:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7261, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50775:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50820:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50775:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7272, + "nodeType": "IfStatement", + "src": "50771:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7264, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7265, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50829:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030326266383432303832303466353937376639613863663031666463333037", + "id": 7266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50835:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228304034072369565894155946646422279_by_1", + "typeString": "int_const 2283...(28 digits omitted)...2279" + }, + "value": "0x0002bf84208204f5977f9a8cf01fdc307" + }, + "src": "50829:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030336336616237373564643062393562346362656537653635643131", + "id": 7268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50873:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76587471230661696290698490699025_by_1", + "typeString": "int_const 76587471230661696290698490699025" + }, + "value": "0x0000003c6ab775dd0b95b4cbee7e65d11" + }, + "src": "50829:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50823:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7271, + "nodeType": "ExpressionStatement", + "src": "50823:85:7" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 7273, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50952:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6873, + "id": 7274, + "nodeType": "Return", + "src": "50945:10:7" + } + ] + }, + "documentation": { + "id": 6867, + "nodeType": "StructuredDocumentation", + "src": "47058:683:7", + "text": " @dev computes e ^ (x / FIXED_1) * FIXED_1\n input range: 0 <= x <= OPT_EXP_MAX_VAL - 1\n auto-generated via 'PrintFunctionOptimalExp.py'\n Detailed description:\n - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\n - The exponentiation of each binary exponent is given (pre-calculated)\n - The exponentiation of r is calculated via Taylor series for e^x, where x = r\n - The exponentiation of the input is calculated by multiplying the intermediate results above\n - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859" + }, + "id": 7276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalExp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6870, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6869, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7276, + "src": "47767:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6868, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47767:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47766:11:7" + }, + "returnParameters": { + "id": 6873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6872, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7276, + "src": "47801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6871, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47800:9:7" + }, + "scope": 8977, + "src": "47747:3216:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7312, + "nodeType": "Block", + "src": "51116:264:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7284, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51131:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7285, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "51137:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51131:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7291, + "nodeType": "IfStatement", + "src": "51127:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7288, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51190:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7287, + "name": "lambertPos1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7842, + "src": "51178:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51178:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7290, + "nodeType": "Return", + "src": "51171:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7292, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51208:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7293, + "name": "LAMBERT_POS2_MAXVAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3613, + "src": "51214:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51208:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7299, + "nodeType": "IfStatement", + "src": "51204:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7296, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51267:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7295, + "name": "lambertPos2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7911, + "src": "51255:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 7297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51255:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7298, + "nodeType": "Return", + "src": "51248:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7300, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51285:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7301, + "name": "LAMBERT_POS3_MAXVAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3616, + "src": "51291:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51285:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7307, + "nodeType": "IfStatement", + "src": "51281:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7304, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51344:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7303, + "name": "lambertPos3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7961, + "src": "51332:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51332:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7306, + "nodeType": "Return", + "src": "51325:22:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 7309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51366:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 7308, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "51358:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 7310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51358:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7311, + "nodeType": "ExpressionStatement", + "src": "51358:14:7" + } + ] + }, + "documentation": { + "id": 7277, + "nodeType": "StructuredDocumentation", + "src": "50971:75:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1" + }, + "id": 7313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lowerStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7279, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7313, + "src": "51072:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7278, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51072:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51071:12:7" + }, + "returnParameters": { + "id": 7283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7313, + "src": "51107:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7281, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51107:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51106:9:7" + }, + "scope": 8977, + "src": "51052:328:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7335, + "nodeType": "Block", + "src": "51536:125:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7321, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51551:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7322, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "51557:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51551:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7328, + "nodeType": "IfStatement", + "src": "51547:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7325, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51610:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7324, + "name": "lambertNeg1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8466, + "src": "51598:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51598:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7320, + "id": 7327, + "nodeType": "Return", + "src": "51591:22:7" + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7329, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51631:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7330, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51641:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51631:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7332, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51651:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51631:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7320, + "id": 7334, + "nodeType": "Return", + "src": "51624:29:7" + } + ] + }, + "documentation": { + "id": 7314, + "nodeType": "StructuredDocumentation", + "src": "51388:77:7", + "text": " @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1" + }, + "id": 7336, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "higherStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7316, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7336, + "src": "51492:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51492:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51491:12:7" + }, + "returnParameters": { + "id": 7320, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7319, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7336, + "src": "51527:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51526:9:7" + }, + "scope": 8977, + "src": "51471:190:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7841, + "nodeType": "Block", + "src": "51921:4576:7", + "statements": [ + { + "assignments": [ + 7345 + ], + "declarations": [ + { + "constant": false, + "id": 7345, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7841, + "src": "51932:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51932:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7347, + "initialValue": { + "argumentTypes": null, + "id": 7346, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "51945:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51932:15:7" + }, + { + "assignments": [ + 7349 + ], + "declarations": [ + { + "constant": false, + "id": 7349, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7841, + "src": "51958:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51958:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7356, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7350, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51973:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7351, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "51983:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51973:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7353, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "51972:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51989:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "51972:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51958:65:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7357, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52103:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7358, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52109:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7359, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52114:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52109:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52108:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7362, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52120:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52108:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52103:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7365, + "nodeType": "ExpressionStatement", + "src": "52103:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7366, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52129:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7367, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52136:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030313464323961373361366537623032633336363863376230383830303030303030", + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52141:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_442849198559406211271427914465280000000_by_1", + "typeString": "int_const 4428...(31 digits omitted)...0000" + }, + "value": "0x00000000014d29a73a6e7b02c3668c7b0880000000" + }, + "src": "52136:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52129:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "52129:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7372, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52238:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7373, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52244:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7374, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52249:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52244:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7376, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52243:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7377, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52255:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52243:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52238:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "52238:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7381, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52264:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7382, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52271:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030323530346130636439613766373231356236306639626534383030303030303030", + "id": 7383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52276:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_787287464105611042260316292382720000000_by_1", + "typeString": "int_const 7872...(31 digits omitted)...0000" + }, + "value": "0x0000000002504a0cd9a7f7215b60f9be4800000000" + }, + "src": "52271:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52264:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7386, + "nodeType": "ExpressionStatement", + "src": "52264:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7387, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52373:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7388, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52379:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7389, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52384:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52379:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7391, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52378:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7392, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52390:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52378:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52373:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7395, + "nodeType": "ExpressionStatement", + "src": "52373:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7396, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7397, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52406:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030343834643061313139316330656164323637393637633761346130303030303030", + "id": 7398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52411:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1537670828331271566914680258560000000000_by_1", + "typeString": "int_const 1537...(32 digits omitted)...0000" + }, + "value": "0x000000000484d0a1191c0ead267967c7a4a0000000" + }, + "src": "52406:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52399:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7401, + "nodeType": "ExpressionStatement", + "src": "52399:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7402, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52508:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7403, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52514:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7404, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52519:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52514:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7406, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52513:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7407, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52525:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52513:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52508:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7410, + "nodeType": "ExpressionStatement", + "src": "52508:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7411, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52534:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7412, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52541:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030393565633538306437653834323761346261663236613930613030303030303030", + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52546:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3188514229627724721154280984150016000000_by_1", + "typeString": "int_const 3188...(32 digits omitted)...0000" + }, + "value": "0x00000000095ec580d7e8427a4baf26a90a00000000" + }, + "src": "52541:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52534:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7416, + "nodeType": "ExpressionStatement", + "src": "52534:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7417, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52643:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7418, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52649:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7419, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52654:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52649:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7421, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52648:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7422, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52660:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52648:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52643:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "52643:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7426, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52669:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7427, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52676:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303031343430623062653136313561343764626136653562336231663130303030303030", + "id": 7428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52681:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6891635629803648326702674961498112000000_by_1", + "typeString": "int_const 6891...(32 digits omitted)...0000" + }, + "value": "0x000000001440b0be1615a47dba6e5b3b1f10000000" + }, + "src": "52676:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52669:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7431, + "nodeType": "ExpressionStatement", + "src": "52669:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7432, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52778:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7433, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52784:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7434, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52789:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52784:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7436, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52783:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7437, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52795:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52783:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52778:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7440, + "nodeType": "ExpressionStatement", + "src": "52778:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7441, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52804:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7442, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52811:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303032643230373630316634366139396234313132343138343030303030303030303030", + "id": 7443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52816:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15355854537983727757610740636188672000000_by_1", + "typeString": "int_const 1535...(33 digits omitted)...0000" + }, + "value": "0x000000002d207601f46a99b4112418400000000000" + }, + "src": "52811:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52804:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7446, + "nodeType": "ExpressionStatement", + "src": "52804:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7447, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52913:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7448, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52919:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7449, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52924:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52919:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7451, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52918:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7452, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52930:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52918:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52913:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7455, + "nodeType": "ExpressionStatement", + "src": "52913:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7456, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52939:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7457, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52946:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303036366562616163346333376336323264643832383861376562316232303030303030", + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52951:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35022056686251398262544482483830784000000_by_1", + "typeString": "int_const 3502...(33 digits omitted)...0000" + }, + "value": "0x0000000066ebaac4c37c622dd8288a7eb1b2000000" + }, + "src": "52946:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52939:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7461, + "nodeType": "ExpressionStatement", + "src": "52939:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7462, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53048:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7463, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53054:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7464, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53059:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53054:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7466, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53053:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7467, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53065:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53053:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53048:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7470, + "nodeType": "ExpressionStatement", + "src": "53048:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7471, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53074:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7472, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53081:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303065663137323430313335663764626434336131626131306366323030303030303030", + "id": 7473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53086:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81358244885252463857919590400000000000000_by_1", + "typeString": "int_const 8135...(33 digits omitted)...0000" + }, + "value": "0x00000000ef17240135f7dbd43a1ba10cf200000000" + }, + "src": "53081:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53074:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7476, + "nodeType": "ExpressionStatement", + "src": "53074:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7477, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53183:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7478, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53189:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7479, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53194:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53189:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7481, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53188:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7482, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53188:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53183:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7485, + "nodeType": "ExpressionStatement", + "src": "53183:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7486, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53209:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7487, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53216:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303233336333336336373661356562323431363039346138376233363537303030303030", + "id": 7488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53221:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_191838485670993607105842450247345766400000_by_1", + "typeString": "int_const 1918...(34 digits omitted)...0000" + }, + "value": "0x0000000233c33c676a5eb2416094a87b3657000000" + }, + "src": "53216:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53209:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7491, + "nodeType": "ExpressionStatement", + "src": "53209:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7492, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53318:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7493, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53324:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7494, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53329:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53324:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7496, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53323:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7497, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53335:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53323:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53318:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7500, + "nodeType": "ExpressionStatement", + "src": "53318:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7501, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53344:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7502, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53351:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303534316364653438626330323534626564343961396638373030303030303030303030", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53356:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_457953461925960171898563951427426713600000_by_1", + "typeString": "int_const 4579...(34 digits omitted)...0000" + }, + "value": "0x0000000541cde48bc0254bed49a9f8700000000000" + }, + "src": "53351:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53344:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7506, + "nodeType": "ExpressionStatement", + "src": "53344:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7507, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53453:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7508, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53459:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7509, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53464:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53459:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7511, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53458:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7512, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53470:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53458:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53453:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7515, + "nodeType": "ExpressionStatement", + "src": "53453:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7516, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7517, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53486:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030306361653166616432636464346434636238643733616263613064313961343030303030", + "id": 7518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53491:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1104598668270551480892683896320648806400000_by_1", + "typeString": "int_const 1104...(35 digits omitted)...0000" + }, + "value": "0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000" + }, + "src": "53486:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53479:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7521, + "nodeType": "ExpressionStatement", + "src": "53479:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7522, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53588:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7523, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53594:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7524, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53599:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53594:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7526, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53593:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7527, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53605:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53593:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53588:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7530, + "nodeType": "ExpressionStatement", + "src": "53588:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7531, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53614:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7532, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53621:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030316564623261613266373630643135633431636565646261393536343030303030303030", + "id": 7533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53626:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2687947090053832841608264823563773542400000_by_1", + "typeString": "int_const 2687...(35 digits omitted)...0000" + }, + "value": "0x0000001edb2aa2f760d15c41ceedba956400000000" + }, + "src": "53621:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53614:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7536, + "nodeType": "ExpressionStatement", + "src": "53614:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7537, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53723:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7538, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53729:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7539, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53734:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7541, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53728:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7542, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53740:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53728:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53723:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7545, + "nodeType": "ExpressionStatement", + "src": "53723:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7546, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53749:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7547, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53756:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030346261386432306432646162643338366339353239363539383431613265323030303030", + "id": 7548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53761:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6590868088830032065882824000000000000000000_by_1", + "typeString": "int_const 6590...(35 digits omitted)...0000" + }, + "value": "0x0000004ba8d20d2dabd386c9529659841a2e200000" + }, + "src": "53756:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53749:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7551, + "nodeType": "ExpressionStatement", + "src": "53749:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7552, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53858:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7553, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53864:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7554, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53869:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7556, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53863:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7557, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53875:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53863:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53858:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7560, + "nodeType": "ExpressionStatement", + "src": "53858:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7561, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53884:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7562, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53891:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030626163303835343662383637636461613230303030303030303030303030303030303030", + "id": 7563, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53896:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16268396552280633070412438458028041175040000_by_1", + "typeString": "int_const 1626...(36 digits omitted)...0000" + }, + "value": "0x000000bac08546b867cdaa20000000000000000000" + }, + "src": "53891:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53884:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7566, + "nodeType": "ExpressionStatement", + "src": "53884:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7567, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53993:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7568, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53999:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7569, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54004:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53999:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7571, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53998:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7572, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54010:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53998:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53993:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "53993:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7576, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54019:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7577, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54026:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303031636661386537306330333632356239646237366338656266356262663234383230303030", + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54031:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40390462938090940419774080664538139934720000_by_1", + "typeString": "int_const 4039...(36 digits omitted)...0000" + }, + "value": "0x000001cfa8e70c03625b9db76c8ebf5bbf24820000" + }, + "src": "54026:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54019:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7581, + "nodeType": "ExpressionStatement", + "src": "54019:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7582, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54128:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7583, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54134:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7584, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54139:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54134:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7586, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54133:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7587, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54145:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54133:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54128:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7590, + "nodeType": "ExpressionStatement", + "src": "54128:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7591, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54154:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7592, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54161:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303034383531643939663832303630646632363566333330396232366638323030303030303030", + "id": 7593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54166:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100798987671917000666814256179934522245120000_by_1", + "typeString": "int_const 1007...(37 digits omitted)...0000" + }, + "value": "0x000004851d99f82060df265f3309b26f8200000000" + }, + "src": "54161:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54154:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7596, + "nodeType": "ExpressionStatement", + "src": "54154:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7597, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54263:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7598, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54269:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7599, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54274:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54269:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7601, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54268:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7602, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54280:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54268:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54263:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7605, + "nodeType": "ExpressionStatement", + "src": "54263:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7606, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54289:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7607, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54296:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303062353530643139623132396432373063343466366635356630323737323363626230303030", + "id": 7608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54301:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_252717199309391137912965664538441463029760000_by_1", + "typeString": "int_const 2527...(37 digits omitted)...0000" + }, + "value": "0x00000b550d19b129d270c44f6f55f027723cbb0000" + }, + "src": "54296:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54289:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7611, + "nodeType": "ExpressionStatement", + "src": "54289:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7612, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54398:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7613, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54404:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7614, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54409:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54404:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7616, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54403:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7617, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54415:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54403:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54398:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7620, + "nodeType": "ExpressionStatement", + "src": "54398:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7621, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54424:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7622, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54431:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303163383737646164633736316463323732646562363564346230303030303030303030303030", + "id": 7623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54436:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_636223790447205380259840000000000000000000000_by_1", + "typeString": "int_const 6362...(37 digits omitted)...0000" + }, + "value": "0x00001c877dadc761dc272deb65d4b0000000000000" + }, + "src": "54431:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54424:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7626, + "nodeType": "ExpressionStatement", + "src": "54424:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7627, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54533:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7628, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54539:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7629, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54544:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54539:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7631, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54538:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7632, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54550:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54538:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54533:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7635, + "nodeType": "ExpressionStatement", + "src": "54533:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7636, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54559:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7637, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54566:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303438313738656365393734373966333361373766326164323261383162363434303663303030", + "id": 7638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54571:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1607705831573194746802610334450509017233408000_by_1", + "typeString": "int_const 1607...(38 digits omitted)...8000" + }, + "value": "0x000048178ece97479f33a77f2ad22a81b64406c000" + }, + "src": "54566:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54559:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7641, + "nodeType": "ExpressionStatement", + "src": "54559:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7642, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54668:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7643, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54674:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7644, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54679:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54674:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7646, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54673:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7647, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54685:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54673:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54668:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7650, + "nodeType": "ExpressionStatement", + "src": "54668:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7651, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54694:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7652, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54701:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030306236636138323638623964383130666564663636393565663266386136633030303030303030", + "id": 7653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54706:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4076376683803157531046819273912505658769408000_by_1", + "typeString": "int_const 4076...(38 digits omitted)...8000" + }, + "value": "0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000" + }, + "src": "54701:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54694:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7656, + "nodeType": "ExpressionStatement", + "src": "54694:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7657, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54803:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7658, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54809:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7659, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54814:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54809:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54808:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7662, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54820:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54808:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54803:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7665, + "nodeType": "ExpressionStatement", + "src": "54803:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7666, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54829:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7667, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54836:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030316430653736363331613562303564303037623863623732613763376631316563333665303030", + "id": 7668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54841:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10367703484962349537949059901011799777283072000_by_1", + "typeString": "int_const 1036...(39 digits omitted)...2000" + }, + "value": "0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000" + }, + "src": "54836:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54829:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7671, + "nodeType": "ExpressionStatement", + "src": "54829:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7672, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54938:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7673, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54944:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7674, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54949:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54943:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7677, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54955:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54943:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54938:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7680, + "nodeType": "ExpressionStatement", + "src": "54938:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7681, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54964:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7682, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54971:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030346131633337626439663835666439633663373830303030303030303030303030303030303030", + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54976:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26443412100478721735433130630260686447443968000_by_1", + "typeString": "int_const 2644...(39 digits omitted)...8000" + }, + "value": "0x0004a1c37bd9f85fd9c6c780000000000000000000" + }, + "src": "54971:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54964:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7686, + "nodeType": "ExpressionStatement", + "src": "54964:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7687, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55073:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7688, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55079:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7689, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55084:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55079:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7691, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55078:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7692, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55090:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55078:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55073:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7695, + "nodeType": "ExpressionStatement", + "src": "55073:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7696, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55099:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7697, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55106:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030626438333639663162373032626634393165326562666365653038323530333133623635343030", + "id": 7698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55111:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67620617646753089502453804016113281250000000000_by_1", + "typeString": "int_const 6762...(39 digits omitted)...0000" + }, + "value": "0x000bd8369f1b702bf491e2ebfcee08250313b65400" + }, + "src": "55106:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55099:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7701, + "nodeType": "ExpressionStatement", + "src": "55099:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7702, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55208:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7703, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55214:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7704, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55219:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55214:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7706, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55213:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7707, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55225:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55213:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55208:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7710, + "nodeType": "ExpressionStatement", + "src": "55208:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7711, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55234:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7712, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55241:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303031653563376333326139663663373061623263623539643932323537363464343030303030303030", + "id": 7713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55246:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_173332210846474760735500226875327576716638945280_by_1", + "typeString": "int_const 1733...(40 digits omitted)...5280" + }, + "value": "0x001e5c7c32a9f6c70ab2cb59d9225764d400000000" + }, + "src": "55241:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55234:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7716, + "nodeType": "ExpressionStatement", + "src": "55234:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7717, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55343:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7718, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55349:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7719, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55354:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55349:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7721, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55348:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7722, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55348:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55343:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7725, + "nodeType": "ExpressionStatement", + "src": "55343:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7726, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7727, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55376:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303034646666353832306531363565393130663935313230613730386537343234393632323165363030", + "id": 7728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55381:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_445286656448864136819345605176268818347976680960_by_1", + "typeString": "int_const 4452...(40 digits omitted)...0960" + }, + "value": "0x004dff5820e165e910f95120a708e742496221e600" + }, + "src": "55376:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55369:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7731, + "nodeType": "ExpressionStatement", + "src": "55369:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7732, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55478:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7733, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55484:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7734, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55489:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55484:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7736, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55483:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7737, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55483:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55478:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7740, + "nodeType": "ExpressionStatement", + "src": "55478:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7741, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55504:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7742, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55511:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303063386338663636646231666365643337386565353065353336303030303030303030303030303030", + "id": 7743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55516:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1146279770154177862273033179056478989553563074560_by_1", + "typeString": "int_const 1146...(41 digits omitted)...4560" + }, + "value": "0x00c8c8f66db1fced378ee50e536000000000000000" + }, + "src": "55511:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55504:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7746, + "nodeType": "ExpressionStatement", + "src": "55504:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7747, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55613:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7748, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55619:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7749, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55624:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55619:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7751, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55618:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7752, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55630:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55618:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55613:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7755, + "nodeType": "ExpressionStatement", + "src": "55613:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7756, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55639:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7757, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55646:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230356462386466666666343562666132393338663132386635393964626631366562313164383830", + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55651:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2956444461658038477759873400213214992927382689920_by_1", + "typeString": "int_const 2956...(41 digits omitted)...9920" + }, + "value": "0x0205db8dffff45bfa2938f128f599dbf16eb11d880" + }, + "src": "55646:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55639:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7761, + "nodeType": "ExpressionStatement", + "src": "55639:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7762, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55748:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7763, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55754:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7764, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55759:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7766, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55753:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7767, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55765:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55753:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55748:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7770, + "nodeType": "ExpressionStatement", + "src": "55748:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7771, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55774:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7772, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55781:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303533613034346562643938343335313439336531373836616633386433396130383030303030303030", + "id": 7773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55786:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7638725713617153619200000000000000000000000000000_by_1", + "typeString": "int_const 7638...(41 digits omitted)...0000" + }, + "value": "0x053a044ebd984351493e1786af38d39a0800000000" + }, + "src": "55781:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55774:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7776, + "nodeType": "ExpressionStatement", + "src": "55774:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7777, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55883:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7778, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55889:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7779, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55894:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55889:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7781, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55888:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7782, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55900:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55888:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55883:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7785, + "nodeType": "ExpressionStatement", + "src": "55883:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7786, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55909:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7787, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55916:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306438366461653261346363306634373633336135343434373937333538363962343837623539633430", + "id": 7788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55921:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19769407354499582705095371848882117322613875645504_by_1", + "typeString": "int_const 1976...(42 digits omitted)...5504" + }, + "value": "0x0d86dae2a4cc0f47633a544479735869b487b59c40" + }, + "src": "55916:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55909:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7791, + "nodeType": "ExpressionStatement", + "src": "55909:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7792, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56018:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7793, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56024:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7794, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56029:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56024:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7796, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56023:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7797, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56035:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56023:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56018:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7800, + "nodeType": "ExpressionStatement", + "src": "56018:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7801, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56044:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7802, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56051:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323331303030303030303030303030303030303030303030303030303030303030303030303030303030", + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56056:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51243901158914783569516699447114673376686134788096_by_1", + "typeString": "int_const 5124...(42 digits omitted)...8096" + }, + "value": "0x231000000000000000000000000000000000000000" + }, + "src": "56051:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56044:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7806, + "nodeType": "ExpressionStatement", + "src": "56044:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7807, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56153:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7808, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7809, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56164:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7811, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56158:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7812, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56170:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56158:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56153:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7815, + "nodeType": "ExpressionStatement", + "src": "56153:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7816, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56179:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7817, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56186:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078356230343835613736663636343663323033396462313530376364643531623038363439363830383232", + "id": 7818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56191:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_133022465544965907471119545993290733585983764695074_by_1", + "typeString": "int_const 1330...(43 digits omitted)...5074" + }, + "value": "0x5b0485a76f6646c2039db1507cdd51b08649680822" + }, + "src": "56186:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56179:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7821, + "nodeType": "ExpressionStatement", + "src": "56179:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7822, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56288:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7823, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7824, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56299:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56294:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7826, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56293:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7827, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56305:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56293:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56288:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7830, + "nodeType": "ExpressionStatement", + "src": "56288:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7831, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56314:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7832, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56321:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078656339383363343663343935343562633137656661366235623030353565323432323030303030303030", + "id": 7833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56326:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_345783497216724000335707367685598692782880644399104_by_1", + "typeString": "int_const 3457...(43 digits omitted)...9104" + }, + "value": "0xec983c46c49545bc17efa6b5b0055e242200000000" + }, + "src": "56321:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56314:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7836, + "nodeType": "ExpressionStatement", + "src": "56314:56:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7837, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56432:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 7838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56438:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "56432:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7343, + "id": 7840, + "nodeType": "Return", + "src": "56425:47:7" + } + ] + }, + "documentation": { + "id": 7337, + "nodeType": "StructuredDocumentation", + "src": "51669:181:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: 1 <= x <= 1 / e * FIXED_1\n auto-generated via 'PrintFunctionLambertPos1.py'" + }, + "id": 7842, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos1", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7339, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7842, + "src": "51877:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51877:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51876:12:7" + }, + "returnParameters": { + "id": 7343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7842, + "src": "51912:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51911:9:7" + }, + "scope": 8977, + "src": "51856:4641:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7910, + "nodeType": "Block", + "src": "56725:350:7", + "statements": [ + { + "assignments": [ + 7851 + ], + "declarations": [ + { + "constant": false, + "id": 7851, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56736:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56736:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7857, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7852, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7845, + "src": "56748:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7853, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "56753:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56748:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56775:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56748:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56736:40:7" + }, + { + "assignments": [ + 7859 + ], + "declarations": [ + { + "constant": false, + "id": 7859, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56787:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7858, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56787:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7863, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7860, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "56799:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7861, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56803:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56799:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56787:35:7" + }, + { + "assignments": [ + 7865 + ], + "declarations": [ + { + "constant": false, + "id": 7865, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56833:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56833:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7869, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7866, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56845:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7867, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56867:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56845:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56833:35:7" + }, + { + "assignments": [ + 7871 + ], + "declarations": [ + { + "constant": false, + "id": 7871, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56879:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56879:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7878, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7872, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56891:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7873, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56914:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7874, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56918:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56914:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7876, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56913:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56891:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56879:41:7" + }, + { + "assignments": [ + 7880 + ], + "declarations": [ + { + "constant": false, + "id": 7880, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56931:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56931:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7884, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 7881, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "56943:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 7883, + "indexExpression": { + "argumentTypes": null, + "id": 7882, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56956:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "56943:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56931:27:7" + }, + { + "assignments": [ + 7886 + ], + "declarations": [ + { + "constant": false, + "id": 7886, + "mutability": "mutable", + "name": "d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56969:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7885, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56969:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7892, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 7887, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "56981:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 7891, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7888, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56994:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56998:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56994:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "56981:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56969:31:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7893, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7880, + "src": "57019:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7894, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7871, + "src": "57024:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7895, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "57028:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57024:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7897, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57023:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57019:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7899, + "name": "d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7886, + "src": "57033:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7900, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "57038:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7901, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7865, + "src": "57042:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57038:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7903, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57033:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57019:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7906, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57018:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7907, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "57048:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57018:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7849, + "id": 7909, + "nodeType": "Return", + "src": "57011:56:7" + } + ] + }, + "documentation": { + "id": 7843, + "nodeType": "StructuredDocumentation", + "src": "56505:149:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: LAMBERT_CONV_RADIUS + 1 <= x <= LAMBERT_POS2_MAXVAL" + }, + "id": 7911, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7846, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7845, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7911, + "src": "56681:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7844, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56680:12:7" + }, + "returnParameters": { + "id": 7849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7848, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7911, + "src": "56716:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56715:9:7" + }, + "scope": 8977, + "src": "56660:415:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7960, + "nodeType": "Block", + "src": "57303:226:7", + "statements": [ + { + "assignments": [ + 7920 + ], + "declarations": [ + { + "constant": false, + "id": 7920, + "mutability": "mutable", + "name": "l1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7960, + "src": "57314:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7919, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57314:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7931, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7921, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57327:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 7922, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "57332:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57327:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7928, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57378:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7927, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "57367:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57367:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "57327:54:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7925, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57361:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7924, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "57350:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57350:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57314:67:7" + }, + { + "assignments": [ + 7933 + ], + "declarations": [ + { + "constant": false, + "id": 7933, + "mutability": "mutable", + "name": "l2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7960, + "src": "57392:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7944, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7934, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57405:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 7935, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "57410:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57405:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7941, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57456:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7940, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "57445:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57445:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "57405:54:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7938, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57439:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7937, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "57428:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57428:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57392:67:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7945, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57478:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7946, + "name": "l2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7933, + "src": "57483:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57478:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7948, + "name": "l2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7933, + "src": "57488:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7949, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57493:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57488:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7951, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57503:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57488:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57478:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7954, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57477:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7955, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57509:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57477:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7957, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57519:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57477:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7918, + "id": 7959, + "nodeType": "Return", + "src": "57470:51:7" + } + ] + }, + "documentation": { + "id": 7912, + "nodeType": "StructuredDocumentation", + "src": "57083:149:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: LAMBERT_POS2_MAXVAL + 1 <= x <= LAMBERT_POS3_MAXVAL" + }, + "id": 7961, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos3", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7915, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7914, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7961, + "src": "57259:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57258:12:7" + }, + "returnParameters": { + "id": 7918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7917, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7961, + "src": "57294:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57294:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57293:9:7" + }, + "scope": 8977, + "src": "57238:291:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8465, + "nodeType": "Block", + "src": "57791:4551:7", + "statements": [ + { + "assignments": [ + 7970 + ], + "declarations": [ + { + "constant": false, + "id": 7970, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8465, + "src": "57802:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7969, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7972, + "initialValue": { + "argumentTypes": null, + "id": 7971, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "57815:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57802:15:7" + }, + { + "assignments": [ + 7974 + ], + "declarations": [ + { + "constant": false, + "id": 7974, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8465, + "src": "57828:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57828:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7976, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 7975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57842:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "57828:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7977, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57856:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7978, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57862:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7979, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "57867:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57862:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7981, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57861:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7982, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57873:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57861:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57856:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7985, + "nodeType": "ExpressionStatement", + "src": "57856:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7986, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "57882:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7987, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57889:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030313464323961373361366537623032633336363863376230383830303030303030", + "id": 7988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57894:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_442849198559406211271427914465280000000_by_1", + "typeString": "int_const 4428...(31 digits omitted)...0000" + }, + "value": "0x00000000014d29a73a6e7b02c3668c7b0880000000" + }, + "src": "57889:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57882:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7991, + "nodeType": "ExpressionStatement", + "src": "57882:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7992, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57991:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7993, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57997:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7994, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58002:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57997:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7996, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57996:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7997, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58008:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57996:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57991:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8000, + "nodeType": "ExpressionStatement", + "src": "57991:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8001, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58017:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8002, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58024:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030323530346130636439613766373231356236306639626534383030303030303030", + "id": 8003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58029:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_787287464105611042260316292382720000000_by_1", + "typeString": "int_const 7872...(31 digits omitted)...0000" + }, + "value": "0x0000000002504a0cd9a7f7215b60f9be4800000000" + }, + "src": "58024:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58017:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8006, + "nodeType": "ExpressionStatement", + "src": "58017:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8007, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58126:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8008, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58132:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8009, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58137:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58132:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8011, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58131:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8012, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58143:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58131:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58126:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8015, + "nodeType": "ExpressionStatement", + "src": "58126:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8016, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58152:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8017, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030343834643061313139316330656164323637393637633761346130303030303030", + "id": 8018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58164:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1537670828331271566914680258560000000000_by_1", + "typeString": "int_const 1537...(32 digits omitted)...0000" + }, + "value": "0x000000000484d0a1191c0ead267967c7a4a0000000" + }, + "src": "58159:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58152:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8021, + "nodeType": "ExpressionStatement", + "src": "58152:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8022, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58261:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8023, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58267:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8024, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58272:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58267:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8026, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58266:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8027, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58278:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58266:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58261:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8030, + "nodeType": "ExpressionStatement", + "src": "58261:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8031, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58287:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8032, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030393565633538306437653834323761346261663236613930613030303030303030", + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58299:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3188514229627724721154280984150016000000_by_1", + "typeString": "int_const 3188...(32 digits omitted)...0000" + }, + "value": "0x00000000095ec580d7e8427a4baf26a90a00000000" + }, + "src": "58294:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58287:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8036, + "nodeType": "ExpressionStatement", + "src": "58287:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8037, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58396:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8038, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58402:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8039, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58407:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58402:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8041, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58401:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8042, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58401:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58396:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8045, + "nodeType": "ExpressionStatement", + "src": "58396:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8046, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58422:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8047, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58429:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303031343430623062653136313561343764626136653562336231663130303030303030", + "id": 8048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58434:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6891635629803648326702674961498112000000_by_1", + "typeString": "int_const 6891...(32 digits omitted)...0000" + }, + "value": "0x000000001440b0be1615a47dba6e5b3b1f10000000" + }, + "src": "58429:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58422:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8051, + "nodeType": "ExpressionStatement", + "src": "58422:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8052, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58531:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8053, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58537:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8054, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58542:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8056, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58536:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8057, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58548:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58536:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58531:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8060, + "nodeType": "ExpressionStatement", + "src": "58531:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8061, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58557:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8062, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58564:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303032643230373630316634366139396234313132343138343030303030303030303030", + "id": 8063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58569:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15355854537983727757610740636188672000000_by_1", + "typeString": "int_const 1535...(33 digits omitted)...0000" + }, + "value": "0x000000002d207601f46a99b4112418400000000000" + }, + "src": "58564:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58557:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8066, + "nodeType": "ExpressionStatement", + "src": "58557:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8067, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58666:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8068, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58672:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8069, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58677:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58672:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8071, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58671:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8072, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58683:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58671:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58666:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8075, + "nodeType": "ExpressionStatement", + "src": "58666:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8076, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58692:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8077, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58699:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303036366562616163346333376336323264643832383861376562316232303030303030", + "id": 8078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58704:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35022056686251398262544482483830784000000_by_1", + "typeString": "int_const 3502...(33 digits omitted)...0000" + }, + "value": "0x0000000066ebaac4c37c622dd8288a7eb1b2000000" + }, + "src": "58699:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58692:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8081, + "nodeType": "ExpressionStatement", + "src": "58692:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8082, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58801:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8083, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58807:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8084, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58812:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58807:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8086, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58806:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8087, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58818:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58806:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58801:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8090, + "nodeType": "ExpressionStatement", + "src": "58801:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8091, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58827:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8092, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58834:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303065663137323430313335663764626434336131626131306366323030303030303030", + "id": 8093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58839:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81358244885252463857919590400000000000000_by_1", + "typeString": "int_const 8135...(33 digits omitted)...0000" + }, + "value": "0x00000000ef17240135f7dbd43a1ba10cf200000000" + }, + "src": "58834:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58827:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8096, + "nodeType": "ExpressionStatement", + "src": "58827:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8097, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58936:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8098, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58942:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8099, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58947:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58942:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8101, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58941:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8102, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58953:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58941:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58936:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8105, + "nodeType": "ExpressionStatement", + "src": "58936:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8106, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58962:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8107, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58969:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303233336333336336373661356562323431363039346138376233363537303030303030", + "id": 8108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58974:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_191838485670993607105842450247345766400000_by_1", + "typeString": "int_const 1918...(34 digits omitted)...0000" + }, + "value": "0x0000000233c33c676a5eb2416094a87b3657000000" + }, + "src": "58969:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58962:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8111, + "nodeType": "ExpressionStatement", + "src": "58962:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8112, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59071:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8113, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59077:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8114, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59082:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59077:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8116, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59076:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8117, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59088:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59076:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59071:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8120, + "nodeType": "ExpressionStatement", + "src": "59071:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8121, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59097:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8122, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59104:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303534316364653438626330323534626564343961396638373030303030303030303030", + "id": 8123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59109:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_457953461925960171898563951427426713600000_by_1", + "typeString": "int_const 4579...(34 digits omitted)...0000" + }, + "value": "0x0000000541cde48bc0254bed49a9f8700000000000" + }, + "src": "59104:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59097:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8126, + "nodeType": "ExpressionStatement", + "src": "59097:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8127, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59206:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8128, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59212:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8129, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59217:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59212:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8131, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59211:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8132, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59223:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59211:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59206:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8135, + "nodeType": "ExpressionStatement", + "src": "59206:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8136, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59232:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8137, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59239:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030306361653166616432636464346434636238643733616263613064313961343030303030", + "id": 8138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59244:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1104598668270551480892683896320648806400000_by_1", + "typeString": "int_const 1104...(35 digits omitted)...0000" + }, + "value": "0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000" + }, + "src": "59239:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59232:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8141, + "nodeType": "ExpressionStatement", + "src": "59232:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8142, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59341:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8143, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59347:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8144, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59352:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59347:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8146, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59346:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8147, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59358:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59346:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59341:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8150, + "nodeType": "ExpressionStatement", + "src": "59341:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8151, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59367:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8152, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59374:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030316564623261613266373630643135633431636565646261393536343030303030303030", + "id": 8153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59379:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2687947090053832841608264823563773542400000_by_1", + "typeString": "int_const 2687...(35 digits omitted)...0000" + }, + "value": "0x0000001edb2aa2f760d15c41ceedba956400000000" + }, + "src": "59374:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59367:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8156, + "nodeType": "ExpressionStatement", + "src": "59367:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8157, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59476:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8158, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59482:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8159, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59487:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59482:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8161, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59481:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8162, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59493:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59481:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59476:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8165, + "nodeType": "ExpressionStatement", + "src": "59476:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8166, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59502:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8167, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59509:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030346261386432306432646162643338366339353239363539383431613265323030303030", + "id": 8168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59514:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6590868088830032065882824000000000000000000_by_1", + "typeString": "int_const 6590...(35 digits omitted)...0000" + }, + "value": "0x0000004ba8d20d2dabd386c9529659841a2e200000" + }, + "src": "59509:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59502:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8171, + "nodeType": "ExpressionStatement", + "src": "59502:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8172, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59611:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8173, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59617:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8174, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59622:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59617:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8176, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59616:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8177, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59616:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59611:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8180, + "nodeType": "ExpressionStatement", + "src": "59611:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8181, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59637:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8182, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59644:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030626163303835343662383637636461613230303030303030303030303030303030303030", + "id": 8183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59649:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16268396552280633070412438458028041175040000_by_1", + "typeString": "int_const 1626...(36 digits omitted)...0000" + }, + "value": "0x000000bac08546b867cdaa20000000000000000000" + }, + "src": "59644:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59637:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8186, + "nodeType": "ExpressionStatement", + "src": "59637:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8187, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59746:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8188, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59752:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8189, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59757:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59751:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8192, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59763:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59751:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59746:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8195, + "nodeType": "ExpressionStatement", + "src": "59746:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8196, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59772:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8197, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59779:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303031636661386537306330333632356239646237366338656266356262663234383230303030", + "id": 8198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59784:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40390462938090940419774080664538139934720000_by_1", + "typeString": "int_const 4039...(36 digits omitted)...0000" + }, + "value": "0x000001cfa8e70c03625b9db76c8ebf5bbf24820000" + }, + "src": "59779:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59772:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8201, + "nodeType": "ExpressionStatement", + "src": "59772:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8202, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59881:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8203, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59887:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8204, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59892:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59887:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8206, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59886:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8207, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59898:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59886:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59881:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8210, + "nodeType": "ExpressionStatement", + "src": "59881:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8211, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59907:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8212, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59914:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303034383531643939663832303630646632363566333330396232366638323030303030303030", + "id": 8213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59919:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100798987671917000666814256179934522245120000_by_1", + "typeString": "int_const 1007...(37 digits omitted)...0000" + }, + "value": "0x000004851d99f82060df265f3309b26f8200000000" + }, + "src": "59914:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59907:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8216, + "nodeType": "ExpressionStatement", + "src": "59907:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8217, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60016:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8218, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60022:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8219, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60027:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60022:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8221, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60021:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8222, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60033:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60021:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60016:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8225, + "nodeType": "ExpressionStatement", + "src": "60016:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8226, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60042:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8227, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60049:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303062353530643139623132396432373063343466366635356630323737323363626230303030", + "id": 8228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60054:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_252717199309391137912965664538441463029760000_by_1", + "typeString": "int_const 2527...(37 digits omitted)...0000" + }, + "value": "0x00000b550d19b129d270c44f6f55f027723cbb0000" + }, + "src": "60049:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60042:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8231, + "nodeType": "ExpressionStatement", + "src": "60042:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8232, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60151:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8233, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60157:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8234, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60162:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8236, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60156:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8237, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60168:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60156:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60151:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8240, + "nodeType": "ExpressionStatement", + "src": "60151:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8241, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60177:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8242, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60184:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303163383737646164633736316463323732646562363564346230303030303030303030303030", + "id": 8243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60189:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_636223790447205380259840000000000000000000000_by_1", + "typeString": "int_const 6362...(37 digits omitted)...0000" + }, + "value": "0x00001c877dadc761dc272deb65d4b0000000000000" + }, + "src": "60184:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60177:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8246, + "nodeType": "ExpressionStatement", + "src": "60177:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8247, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60286:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8248, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60292:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8249, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60297:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60292:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8251, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60291:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8252, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60303:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60291:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60286:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8255, + "nodeType": "ExpressionStatement", + "src": "60286:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8256, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60312:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8257, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60319:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303438313738656365393734373966333361373766326164323261383162363434303663303030", + "id": 8258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60324:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1607705831573194746802610334450509017233408000_by_1", + "typeString": "int_const 1607...(38 digits omitted)...8000" + }, + "value": "0x000048178ece97479f33a77f2ad22a81b64406c000" + }, + "src": "60319:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60312:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8261, + "nodeType": "ExpressionStatement", + "src": "60312:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8262, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60421:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8263, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60427:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8264, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60432:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60427:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8266, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60426:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8267, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60438:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60426:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60421:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8270, + "nodeType": "ExpressionStatement", + "src": "60421:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8271, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60447:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8272, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60454:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030306236636138323638623964383130666564663636393565663266386136633030303030303030", + "id": 8273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60459:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4076376683803157531046819273912505658769408000_by_1", + "typeString": "int_const 4076...(38 digits omitted)...8000" + }, + "value": "0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000" + }, + "src": "60454:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60447:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8276, + "nodeType": "ExpressionStatement", + "src": "60447:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8277, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60556:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8278, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60562:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8279, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60567:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60562:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8281, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60561:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8282, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60561:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60556:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8285, + "nodeType": "ExpressionStatement", + "src": "60556:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8286, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8287, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60589:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030316430653736363331613562303564303037623863623732613763376631316563333665303030", + "id": 8288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60594:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10367703484962349537949059901011799777283072000_by_1", + "typeString": "int_const 1036...(39 digits omitted)...2000" + }, + "value": "0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000" + }, + "src": "60589:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8291, + "nodeType": "ExpressionStatement", + "src": "60582:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8292, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60691:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8293, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60697:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8294, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60702:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60697:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8296, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60696:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8297, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60708:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60696:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60691:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8300, + "nodeType": "ExpressionStatement", + "src": "60691:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8301, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60717:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8302, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60724:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030346131633337626439663835666439633663373830303030303030303030303030303030303030", + "id": 8303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60729:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26443412100478721735433130630260686447443968000_by_1", + "typeString": "int_const 2644...(39 digits omitted)...8000" + }, + "value": "0x0004a1c37bd9f85fd9c6c780000000000000000000" + }, + "src": "60724:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60717:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8306, + "nodeType": "ExpressionStatement", + "src": "60717:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8307, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60826:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8308, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60832:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8309, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60837:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60832:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8311, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60831:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8312, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60843:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60831:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60826:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8315, + "nodeType": "ExpressionStatement", + "src": "60826:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8316, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60852:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8317, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60859:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030626438333639663162373032626634393165326562666365653038323530333133623635343030", + "id": 8318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60864:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67620617646753089502453804016113281250000000000_by_1", + "typeString": "int_const 6762...(39 digits omitted)...0000" + }, + "value": "0x000bd8369f1b702bf491e2ebfcee08250313b65400" + }, + "src": "60859:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60852:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8321, + "nodeType": "ExpressionStatement", + "src": "60852:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8322, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60961:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8323, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60967:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8324, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60972:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60967:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8326, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60966:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8327, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60978:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60966:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60961:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "60961:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8331, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60987:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8332, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60994:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303031653563376333326139663663373061623263623539643932323537363464343030303030303030", + "id": 8333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60999:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_173332210846474760735500226875327576716638945280_by_1", + "typeString": "int_const 1733...(40 digits omitted)...5280" + }, + "value": "0x001e5c7c32a9f6c70ab2cb59d9225764d400000000" + }, + "src": "60994:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60987:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8336, + "nodeType": "ExpressionStatement", + "src": "60987:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8337, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61096:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8338, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61102:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8339, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61107:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61102:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8341, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61101:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8342, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61113:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61101:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61096:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8345, + "nodeType": "ExpressionStatement", + "src": "61096:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8346, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61122:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8347, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61129:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303034646666353832306531363565393130663935313230613730386537343234393632323165363030", + "id": 8348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61134:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_445286656448864136819345605176268818347976680960_by_1", + "typeString": "int_const 4452...(40 digits omitted)...0960" + }, + "value": "0x004dff5820e165e910f95120a708e742496221e600" + }, + "src": "61129:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61122:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8351, + "nodeType": "ExpressionStatement", + "src": "61122:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8352, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61231:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8353, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61237:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8354, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61242:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61237:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8356, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61236:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8357, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61248:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61236:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61231:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8360, + "nodeType": "ExpressionStatement", + "src": "61231:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8361, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61257:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8362, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61264:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303063386338663636646231666365643337386565353065353336303030303030303030303030303030", + "id": 8363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61269:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1146279770154177862273033179056478989553563074560_by_1", + "typeString": "int_const 1146...(41 digits omitted)...4560" + }, + "value": "0x00c8c8f66db1fced378ee50e536000000000000000" + }, + "src": "61264:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61257:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8366, + "nodeType": "ExpressionStatement", + "src": "61257:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8367, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61366:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8368, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61372:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8369, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61377:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8371, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61371:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8372, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61371:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61366:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8375, + "nodeType": "ExpressionStatement", + "src": "61366:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8376, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61392:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8377, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61399:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230356462386466666666343562666132393338663132386635393964626631366562313164383830", + "id": 8378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61404:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2956444461658038477759873400213214992927382689920_by_1", + "typeString": "int_const 2956...(41 digits omitted)...9920" + }, + "value": "0x0205db8dffff45bfa2938f128f599dbf16eb11d880" + }, + "src": "61399:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61392:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8381, + "nodeType": "ExpressionStatement", + "src": "61392:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8382, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61501:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8383, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61507:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8384, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61512:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61507:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8386, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61506:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8387, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61518:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61506:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61501:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8390, + "nodeType": "ExpressionStatement", + "src": "61501:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8391, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61527:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8392, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61534:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303533613034346562643938343335313439336531373836616633386433396130383030303030303030", + "id": 8393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61539:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7638725713617153619200000000000000000000000000000_by_1", + "typeString": "int_const 7638...(41 digits omitted)...0000" + }, + "value": "0x053a044ebd984351493e1786af38d39a0800000000" + }, + "src": "61534:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61527:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8396, + "nodeType": "ExpressionStatement", + "src": "61527:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8397, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61636:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8398, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61642:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8399, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61647:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61642:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8401, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61641:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8402, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61653:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61641:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61636:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8405, + "nodeType": "ExpressionStatement", + "src": "61636:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8406, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61662:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8407, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61669:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306438366461653261346363306634373633336135343434373937333538363962343837623539633430", + "id": 8408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61674:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19769407354499582705095371848882117322613875645504_by_1", + "typeString": "int_const 1976...(42 digits omitted)...5504" + }, + "value": "0x0d86dae2a4cc0f47633a544479735869b487b59c40" + }, + "src": "61669:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61662:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8411, + "nodeType": "ExpressionStatement", + "src": "61662:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8412, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8413, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61777:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8414, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61782:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61777:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8416, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61776:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8417, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61788:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61776:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61771:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8420, + "nodeType": "ExpressionStatement", + "src": "61771:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8421, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8422, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61804:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323331303030303030303030303030303030303030303030303030303030303030303030303030303030", + "id": 8423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61809:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51243901158914783569516699447114673376686134788096_by_1", + "typeString": "int_const 5124...(42 digits omitted)...8096" + }, + "value": "0x231000000000000000000000000000000000000000" + }, + "src": "61804:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61797:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8426, + "nodeType": "ExpressionStatement", + "src": "61797:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8427, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61906:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8428, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61912:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8429, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61917:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8431, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61911:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8432, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61911:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61906:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8435, + "nodeType": "ExpressionStatement", + "src": "61906:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8436, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61932:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8437, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61939:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078356230343835613736663636343663323033396462313530376364643531623038363439363830383232", + "id": 8438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61944:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_133022465544965907471119545993290733585983764695074_by_1", + "typeString": "int_const 1330...(43 digits omitted)...5074" + }, + "value": "0x5b0485a76f6646c2039db1507cdd51b08649680822" + }, + "src": "61939:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61932:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8441, + "nodeType": "ExpressionStatement", + "src": "61932:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8442, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62041:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8443, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62047:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8444, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "62052:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8446, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "62046:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8447, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62058:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62046:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62041:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8450, + "nodeType": "ExpressionStatement", + "src": "62041:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8451, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "62067:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8452, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62074:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078656339383363343663343935343562633137656661366235623030353565323432323030303030303030", + "id": 8453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62079:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_345783497216724000335707367685598692782880644399104_by_1", + "typeString": "int_const 3457...(43 digits omitted)...9104" + }, + "value": "0xec983c46c49545bc17efa6b5b0055e242200000000" + }, + "src": "62074:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62067:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8456, + "nodeType": "ExpressionStatement", + "src": "62067:56:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8457, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "62185:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 8458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62191:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "62185:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 8460, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "62228:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62185:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 8462, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62233:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62185:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7968, + "id": 8464, + "nodeType": "Return", + "src": "62178:62:7" + } + ] + }, + "documentation": { + "id": 7962, + "nodeType": "StructuredDocumentation", + "src": "57537:183:7", + "text": " @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1\n input range: 1 <= x <= 1 / e * FIXED_1\n auto-generated via 'PrintFunctionLambertNeg1.py'" + }, + "id": 8466, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertNeg1", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7964, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8466, + "src": "57747:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7963, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57747:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57746:12:7" + }, + "returnParameters": { + "id": 7968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7967, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8466, + "src": "57782:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57781:9:7" + }, + "scope": 8977, + "src": "57726:4616:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8546, + "nodeType": "Block", + "src": "62643:343:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 8491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8484, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62655:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8485, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62660:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8486, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "62654:10:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8488, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62679:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8489, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62684:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8487, + "name": "safeFactors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8621, + "src": "62667:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 8490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62667:21:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "62654:34:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8492, + "nodeType": "ExpressionStatement", + "src": "62654:34:7" + }, + { + "assignments": [ + 8494 + ], + "declarations": [ + { + "constant": false, + "id": 8494, + "mutability": "mutable", + "name": "f", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62699:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8493, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62699:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8501, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8497, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62719:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8495, + "name": "_hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8469, + "src": "62711:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62711:7:7", + "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": 8498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62711:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8499, + "name": "_lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8471, + "src": "62730:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62711:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62699:34:7" + }, + { + "assignments": [ + 8503 + ], + "declarations": [ + { + "constant": false, + "id": 8503, + "mutability": "mutable", + "name": "g", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62744:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62744:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8514, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8504, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62756:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8505, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "62760:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62756:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8511, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62805:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8510, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "62794:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62794:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "62756:51:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8508, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62789:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8507, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "62778:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62778:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62744:63:7" + }, + { + "assignments": [ + 8516 + ], + "declarations": [ + { + "constant": false, + "id": 8516, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62818:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8515, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62818:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8523, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8519, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8517, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8503, + "src": "62830:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62830:5:7", + "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": 8520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62830:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8521, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62843:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62830:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62818:28:7" + }, + { + "assignments": [ + 8525 + ], + "declarations": [ + { + "constant": false, + "id": 8525, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62857:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62857:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8534, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 8526, + "name": "_lowerStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8477, + "src": "62869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8531, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8516, + "src": "62911:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8530, + "name": "higherStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "62899:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62899:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "62869:44:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8528, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8516, + "src": "62894:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8527, + "name": "lowerStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7313, + "src": "62883:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 8529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62883:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62857:56:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8538, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62955:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8536, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8525, + "src": "62949:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62949:5:7", + "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": 8539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62949:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8542, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62969:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8540, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62961:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62961:7:7", + "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": 8543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62961:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8535, + "name": "normalizedWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8656, + "src": "62931:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62931:47:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8483, + "id": 8545, + "nodeType": "Return", + "src": "62924:54:7" + } + ] + }, + "documentation": { + "id": 8467, + "nodeType": "StructuredDocumentation", + "src": "62350:146:7", + "text": " @dev computes the weights based on \"W(log(hi / lo) * tq / rp) * tq / rp\", where \"W\" is a variation of the Lambert W function." + }, + "id": 8547, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balancedWeightsByStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8469, + "mutability": "mutable", + "name": "_hi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62534:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62534:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8471, + "mutability": "mutable", + "name": "_lo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62547:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62547:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8473, + "mutability": "mutable", + "name": "_tq", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62560:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62560:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8475, + "mutability": "mutable", + "name": "_rp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62573:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8477, + "mutability": "mutable", + "name": "_lowerStake", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62586:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8476, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "62586:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62533:70:7" + }, + "returnParameters": { + "id": 8483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62627:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8479, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "62627:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62635:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8481, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "62635:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62626:16:7" + }, + "scope": 8977, + "src": "62502:484:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8620, + "nodeType": "Block", + "src": "63162:358:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8559, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63177:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8560, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63183:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63177:13:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8562, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63194:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8563, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63194:13:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "63177:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8570, + "nodeType": "IfStatement", + "src": "63173:64:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8566, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63230:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8567, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63234:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8568, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63229:8:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8569, + "nodeType": "Return", + "src": "63222:15:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8571, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63252:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8572, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63257:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63252:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8582, + "nodeType": "IfStatement", + "src": "63248:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8574, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63287:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8575, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63292:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63287:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8577, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63302:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63287:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8579, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63306:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8580, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63286:28:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8581, + "nodeType": "Return", + "src": "63279:35:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8583, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63329:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8584, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63334:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63329:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8594, + "nodeType": "IfStatement", + "src": "63325:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8586, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63364:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8587, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63373:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8588, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63378:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63373:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8590, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63388:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63373:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8592, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63363:28:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8593, + "nodeType": "Return", + "src": "63356:35:7" + } + }, + { + "assignments": [ + 8596 + ], + "declarations": [ + { + "constant": false, + "id": 8596, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8620, + "src": "63402:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63402:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8603, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8597, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63414:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 8598, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63419:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 8601, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63429:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "63414:17:7", + "trueExpression": { + "argumentTypes": null, + "id": 8600, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63424:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63402:29:7" + }, + { + "assignments": [ + 8605 + ], + "declarations": [ + { + "constant": false, + "id": 8605, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8620, + "src": "63442:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63442:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8607, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8596, + "src": "63464:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8608, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "63468:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63464:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8606, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5969, + "src": "63454:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 8610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63454:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63442:34:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8612, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63495:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 8613, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8605, + "src": "63501:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8615, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63504:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 8616, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8605, + "src": "63510:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63504:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8618, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63494:18:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8619, + "nodeType": "Return", + "src": "63487:25:7" + } + ] + }, + "documentation": { + "id": 8548, + "nodeType": "StructuredDocumentation", + "src": "62994:76:7", + "text": " @dev reduces \"a\" and \"b\" while maintaining their ratio." + }, + "id": 8621, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeFactors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8550, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63097:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8549, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63097:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8552, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63109:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63109:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63096:24:7" + }, + "returnParameters": { + "id": 8558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8555, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63144:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63144:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8557, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63153:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8556, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63153:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63143:18:7" + }, + "scope": 8977, + "src": "63076:444:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8655, + "nodeType": "Block", + "src": "63717:157:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8633, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63732:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8634, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63738:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63732:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8641, + "nodeType": "IfStatement", + "src": "63728:57:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8637, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63778:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8638, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63782:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8636, + "name": "accurateWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8721, + "src": "63762:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63762:23:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8632, + "id": 8640, + "nodeType": "Return", + "src": "63755:30:7" + } + }, + { + "assignments": [ + 8643, + 8645 + ], + "declarations": [ + { + "constant": false, + "id": 8643, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8655, + "src": "63797:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8642, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63797:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8645, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8655, + "src": "63807:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8644, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63807:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8650, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8647, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63835:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8648, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63839:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8646, + "name": "accurateWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8721, + "src": "63819:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63819:23:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63796:46:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8651, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8645, + "src": "63861:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8652, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8643, + "src": "63864:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 8653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63860:6:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8632, + "id": 8654, + "nodeType": "Return", + "src": "63853:13:7" + } + ] + }, + "documentation": { + "id": 8622, + "nodeType": "StructuredDocumentation", + "src": "63528:93:7", + "text": " @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\"." + }, + "id": 8656, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8624, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63654:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63654:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8626, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63666:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63653:24:7" + }, + "returnParameters": { + "id": 8632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8629, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63701:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8628, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63701:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8631, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63709:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8630, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63709:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63700:16:7" + }, + "scope": 8977, + "src": "63627:247:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8720, + "nodeType": "Block", + "src": "64093:292:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8668, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64108:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 8669, + "name": "MAX_UNF_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3619, + "src": "64113:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64108:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8691, + "nodeType": "IfStatement", + "src": "64104:137:7", + "trueBody": { + "id": 8690, + "nodeType": "Block", + "src": "64129:112:7", + "statements": [ + { + "assignments": [ + 8672 + ], + "declarations": [ + { + "constant": false, + "id": 8672, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8690, + "src": "64144:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64144:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8681, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8673, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64156:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8674, + "name": "MAX_UNF_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3619, + "src": "64162:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 8675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64179:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "64162:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8677, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64161:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64156:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 8679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64184:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "64156:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64144:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8682, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64200:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 8683, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8672, + "src": "64206:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8685, + "nodeType": "ExpressionStatement", + "src": "64200:7:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8686, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8661, + "src": "64222:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 8687, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8672, + "src": "64228:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64222:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8689, + "nodeType": "ExpressionStatement", + "src": "64222:7:7" + } + ] + } + }, + { + "assignments": [ + 8693 + ], + "declarations": [ + { + "constant": false, + "id": 8693, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8720, + "src": "64251:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64251:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8703, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8695, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64272:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8696, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "64277:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "64272:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8700, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8661, + "src": "64296:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8698, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64289:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "64289:6:7", + "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": 8701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64289:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8694, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8747, + "src": "64263:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 8702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64263:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64251:49:7" + }, + { + "assignments": [ + 8705 + ], + "declarations": [ + { + "constant": false, + "id": 8705, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8720, + "src": "64311:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8704, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8709, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8706, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "64323:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 8707, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8693, + "src": "64336:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64323:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64311:26:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8712, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8693, + "src": "64363:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "64356:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 8710, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64356:6:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 8713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64356:9:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8716, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8705, + "src": "64374:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "64367:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 8714, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64367:6:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 8717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64367:9:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 8718, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64355:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8667, + "id": 8719, + "nodeType": "Return", + "src": "64348:29:7" + } + ] + }, + "documentation": { + "id": 8657, + "nodeType": "StructuredDocumentation", + "src": "63882:117:7", + "text": " @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\", assuming that \"a <= b\"." + }, + "id": 8721, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8659, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64030:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64030:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8661, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64042:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8660, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64042:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64029:24:7" + }, + "returnParameters": { + "id": 8667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8664, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64077:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8663, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64077:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8666, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64085:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8665, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64085:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64076:16:7" + }, + "scope": 8977, + "src": "64005:380:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8746, + "nodeType": "Block", + "src": "64584:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8731, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8724, + "src": "64602:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8732, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64607:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64602:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8734, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8724, + "src": "64612:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 8735, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64617:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64612:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8737, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64623:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8738, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64628:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 8739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64633:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "64628:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64623:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8742, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64622:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64612:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64602:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8730, + "id": 8745, + "nodeType": "Return", + "src": "64595:40:7" + } + ] + }, + "documentation": { + "id": 8722, + "nodeType": "StructuredDocumentation", + "src": "64393:111:7", + "text": " @dev computes the nearest integer to a given quotient without overflowing or underflowing." + }, + "id": 8747, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8724, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64528:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64528:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8726, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64540:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8725, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64540:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64527:24:7" + }, + "returnParameters": { + "id": 8730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8729, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64575:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8728, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64575:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64574:9:7" + }, + "scope": 8977, + "src": "64510:133:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8768, + "nodeType": "Block", + "src": "65019:97:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8762, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8750, + "src": "65058:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8763, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8752, + "src": "65067:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8764, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8754, + "src": "65084:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8765, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8756, + "src": "65100:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8761, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "65037:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "65037:71:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8760, + "id": 8767, + "nodeType": "Return", + "src": "65030:78:7" + } + ] + }, + "documentation": { + "id": 8748, + "nodeType": "StructuredDocumentation", + "src": "64651:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "29a00e7c", + "id": 8769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculatePurchaseReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8757, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8750, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8749, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8752, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64805:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8751, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8754, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64868:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8753, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64868:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8756, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64929:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64929:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64749:196:7" + }, + "returnParameters": { + "id": 8760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8759, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "65005:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8758, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65005:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65004:9:7" + }, + "scope": 8977, + "src": "64717:399:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8790, + "nodeType": "Block", + "src": "65472:93:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8784, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8772, + "src": "65507:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8785, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8774, + "src": "65516:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8786, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8776, + "src": "65533:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8787, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8778, + "src": "65549:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8783, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5199, + "src": "65490:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "65490:67:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8782, + "id": 8789, + "nodeType": "Return", + "src": "65483:74:7" + } + ] + }, + "documentation": { + "id": 8770, + "nodeType": "StructuredDocumentation", + "src": "65124:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "49f9b0f7", + "id": 8791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateSaleReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8772, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65219:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8771, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65219:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8774, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65270:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65270:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8776, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65329:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8775, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65329:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8778, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65386:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8777, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65386:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65218:184:7" + }, + "returnParameters": { + "id": 8782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8781, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65458:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65457:9:7" + }, + "scope": 8977, + "src": "65190:375:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8815, + "nodeType": "Block", + "src": "66058:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8808, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8794, + "src": "66101:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8809, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8796, + "src": "66124:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8810, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8798, + "src": "66146:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8811, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "66169:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8812, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8802, + "src": "66191:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8807, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "66076:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "66076:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8806, + "id": 8814, + "nodeType": "Return", + "src": "66069:130:7" + } + ] + }, + "documentation": { + "id": 8792, + "nodeType": "StructuredDocumentation", + "src": "65573:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "79c1b450", + "id": 8816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCrossReserveReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8794, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65676:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8793, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8796, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65749:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8795, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65749:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8798, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65820:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8797, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65820:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8800, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65893:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8799, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65893:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8802, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65964:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65964:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65675:305:7" + }, + "returnParameters": { + "id": 8806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8805, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "66044:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66044:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66043:9:7" + }, + "scope": 8977, + "src": "65639:568:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8840, + "nodeType": "Block", + "src": "66712:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8833, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8819, + "src": "66755:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8834, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8821, + "src": "66778:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8835, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8823, + "src": "66800:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8836, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8825, + "src": "66823:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8837, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8827, + "src": "66845:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8832, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "66730:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "66730:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8831, + "id": 8839, + "nodeType": "Return", + "src": "66723:130:7" + } + ] + }, + "documentation": { + "id": 8817, + "nodeType": "StructuredDocumentation", + "src": "66215:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "65098bb3", + "id": 8841, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCrossConnectorReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8819, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66320:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66320:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8821, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66395:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8820, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "66395:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8823, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66468:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66468:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8825, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66543:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8824, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "66543:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8827, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66616:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8826, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66616:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66319:313:7" + }, + "returnParameters": { + "id": 8831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8830, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66698:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8829, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66698:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66697:9:7" + }, + "scope": 8977, + "src": "66281:580:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8862, + "nodeType": "Block", + "src": "67206:84:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8856, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8844, + "src": "67233:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8857, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8846, + "src": "67242:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8858, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8848, + "src": "67259:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8859, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8850, + "src": "67274:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8855, + "name": "fundCost", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5413, + "src": "67224:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "67224:58:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8854, + "id": 8861, + "nodeType": "Return", + "src": "67217:65:7" + } + ] + }, + "documentation": { + "id": 8842, + "nodeType": "StructuredDocumentation", + "src": "66869:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "1da6bbfb", + "id": 8863, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateFundCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8844, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "66962:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66962:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8846, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67011:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67011:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8848, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67068:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8847, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67068:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8850, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67122:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8849, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66961:177:7" + }, + "returnParameters": { + "id": 8854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8853, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67192:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8852, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67192:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67191:9:7" + }, + "scope": 8977, + "src": "66935:355:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8884, + "nodeType": "Block", + "src": "67670:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8878, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8866, + "src": "67711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8879, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8868, + "src": "67720:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8880, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8870, + "src": "67737:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8881, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8872, + "src": "67752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8877, + "name": "liquidateReserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5626, + "src": "67688:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "67688:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8876, + "id": 8883, + "nodeType": "Return", + "src": "67681:79:7" + } + ] + }, + "documentation": { + "id": 8864, + "nodeType": "StructuredDocumentation", + "src": "67298:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "abfd231d", + "id": 8885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateLiquidateReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8866, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67398:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67398:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8868, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67454:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8867, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8870, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67518:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8869, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67518:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8872, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67579:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8871, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67579:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67397:198:7" + }, + "returnParameters": { + "id": 8876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8875, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67656:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67656:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67655:9:7" + }, + "scope": 8977, + "src": "67364:404:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8906, + "nodeType": "Block", + "src": "68089:97:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8900, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8888, + "src": "68128:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8901, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8890, + "src": "68137:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8902, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8892, + "src": "68154:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8903, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "68170:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8899, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "68107:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "68107:71:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8898, + "id": 8905, + "nodeType": "Return", + "src": "68100:78:7" + } + ] + }, + "documentation": { + "id": 8886, + "nodeType": "StructuredDocumentation", + "src": "67776:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "48d73fed", + "id": 8907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "purchaseRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8888, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67864:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8890, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67908:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67908:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8892, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67960:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8891, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67960:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "68010:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68010:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67863:163:7" + }, + "returnParameters": { + "id": 8898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8897, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "68075:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68075:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68074:9:7" + }, + "scope": 8977, + "src": "67842:344:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8928, + "nodeType": "Block", + "src": "68487:93:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8922, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8910, + "src": "68522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8923, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8912, + "src": "68531:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8924, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8914, + "src": "68548:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8925, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8916, + "src": "68564:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8921, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5199, + "src": "68505:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "68505:67:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8920, + "id": 8927, + "nodeType": "Return", + "src": "68498:74:7" + } + ] + }, + "documentation": { + "id": 8908, + "nodeType": "StructuredDocumentation", + "src": "68194:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f732f1c9", + "id": 8929, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saleRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8910, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68278:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68278:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8912, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68318:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68318:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8914, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68366:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8913, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68366:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8916, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68412:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8915, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68412:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68277:151:7" + }, + "returnParameters": { + "id": 8920, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8919, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68473:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68473:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68472:9:7" + }, + "scope": 8977, + "src": "68260:320:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8953, + "nodeType": "Block", + "src": "69007:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8946, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8932, + "src": "69050:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8947, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8934, + "src": "69073:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8948, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8936, + "src": "69095:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8949, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8938, + "src": "69118:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8950, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8940, + "src": "69140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8945, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "69025:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "69025:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8944, + "id": 8952, + "nodeType": "Return", + "src": "69018:130:7" + } + ] + }, + "documentation": { + "id": 8930, + "nodeType": "StructuredDocumentation", + "src": "68588:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "9d114108", + "id": 8954, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "crossReserveRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8932, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68680:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8931, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68680:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8934, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68742:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8933, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68742:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8936, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68802:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8938, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68864:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8937, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68864:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8940, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68924:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8939, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68924:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68679:261:7" + }, + "returnParameters": { + "id": 8944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8943, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68993:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68993:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68992:9:7" + }, + "scope": 8977, + "src": "68654:502:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8975, + "nodeType": "Block", + "src": "69481:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8969, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8957, + "src": "69522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8970, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8959, + "src": "69531:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8971, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8961, + "src": "69548:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8972, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8963, + "src": "69563:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8968, + "name": "liquidateReserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5626, + "src": "69499:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "69499:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8967, + "id": 8974, + "nodeType": "Return", + "src": "69492:79:7" + } + ] + }, + "documentation": { + "id": 8955, + "nodeType": "StructuredDocumentation", + "src": "69164:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "35b49af4", + "id": 8976, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidateRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8957, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69253:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8956, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8959, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69298:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8958, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69298:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8961, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69351:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8960, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "69351:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8963, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69401:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69401:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "69252:165:7" + }, + "returnParameters": { + "id": 8967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8966, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69467:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69467:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "69466:9:7" + }, + "scope": 8977, + "src": "69230:349:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 8978, + "src": "157:69425:7" + } + ], + "src": "52:69532:7" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol", + "exportedSymbols": { + "BancorFormula": [ + 8977 + ] + }, + "id": 8978, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3564, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:7" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./interfaces/IBancorFormula.sol", + "id": 3565, + "nodeType": "ImportDirective", + "scope": 8978, + "sourceUnit": 13178, + "src": "77:41:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 3566, + "nodeType": "ImportDirective", + "scope": 8978, + "sourceUnit": 22355, + "src": "120:33:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3567, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "183:14:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 3568, + "nodeType": "InheritanceSpecifier", + "src": "183:14:7" + } + ], + "contractDependencies": [ + 13177 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 8977, + "linearizedBaseContracts": [ + 8977, + 13177 + ], + "name": "BancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3571, + "libraryName": { + "contractScope": null, + "id": 3569, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "211:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "205:27:7", + "typeName": { + "id": 3570, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 3574, + "mutability": "constant", + "name": "ONE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "240:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 3573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "271:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3577, + "mutability": "constant", + "name": "MAX_WEIGHT", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "279:44:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 3575, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "279:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "316:7:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3580, + "mutability": "constant", + "name": "MIN_PRECISION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "330:41:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3578, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "330:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3332", + "id": 3579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "369:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3583, + "mutability": "constant", + "name": "MAX_PRECISION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "378:42:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3581, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "378:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "313237", + "id": 3582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "417:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3586, + "mutability": "constant", + "name": "FIXED_1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "484:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078303830303030303030303030303030303030303030303030303030303030303030", + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "519:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170141183460469231731687303715884105728_by_1", + "typeString": "int_const 1701...(31 digits omitted)...5728" + }, + "value": "0x080000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3589, + "mutability": "constant", + "name": "FIXED_2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "561:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3587, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "561:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 3588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "596:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3592, + "mutability": "constant", + "name": "MAX_NUM", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "638:70:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "638:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 3591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "673:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3595, + "mutability": "constant", + "name": "LN2_NUMERATOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "772:76:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "772:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307833663830666530336638306665303366383066653033663830666530336638", + "id": 3594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "815:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5275695611177340518812009417546793976_by_1", + "typeString": "int_const 5275...(29 digits omitted)...3976" + }, + "value": "0x3f80fe03f80fe03f80fe03f80fe03f8" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3598, + "mutability": "constant", + "name": "LN2_DENOMINATOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "855:76:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307835623964653164313062663431303364363437623039353538393762613830", + "id": 3597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "898:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7611219895485218073587121647846406784_by_1", + "typeString": "int_const 7611...(29 digits omitted)...6784" + }, + "value": "0x5b9de1d10bf4103d647b0955897ba80" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3601, + "mutability": "constant", + "name": "OPT_LOG_MAX_VAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1029:78:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1029:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313562663061386231343537363935333535666238616334303465376137396533", + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1072:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_462491687273110168575455517921668397539_by_1", + "typeString": "int_const 4624...(31 digits omitted)...7539" + }, + "value": "0x15bf0a8b1457695355fb8ac404e7a79e3" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3604, + "mutability": "constant", + "name": "OPT_EXP_MAX_VAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1114:78:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3602, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1114:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078383030303030303030303030303030303030303030303030303030303030303030", + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1157:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691648_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1648" + }, + "value": "0x800000000000000000000000000000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3607, + "mutability": "constant", + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1253:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830303266313661633663353964653666386435643666363363313438326137633836", + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1300:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62591443491685266058625363149075414150_by_1", + "typeString": "int_const 6259...(30 digits omitted)...4150" + }, + "value": "0x002f16ac6c59de6f8d5d6f63c1482a7c86" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3610, + "mutability": "constant", + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1343:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1343:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830303033303630633138333036306331383330363063313833303630633138333036", + "id": 3609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1390:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4019083073869351930669778827934270214_by_1", + "typeString": "int_const 4019...(29 digits omitted)...0214" + }, + "value": "0x0003060c183060c183060c183060c18306" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3613, + "mutability": "constant", + "name": "LAMBERT_POS2_MAXVAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1433:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1433:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307830316166313661633663353964653666386435643666363363313438326137633830", + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1480:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_573014993873092961253687274296727731328_by_1", + "typeString": "int_const 5730...(31 digits omitted)...1328" + }, + "value": "0x01af16ac6c59de6f8d5d6f63c1482a7c80" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3616, + "mutability": "constant", + "name": "LAMBERT_POS3_MAXVAL", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1523:83:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1523:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "307836623232643433653732633332363533396363656565663862623438663235356666", + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1570:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36456509045932913977692090597752865707519_by_1", + "typeString": "int_const 3645...(33 digits omitted)...7519" + }, + "value": "0x6b22d43e72c326539cceeef8bb48f255ff" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 3619, + "mutability": "constant", + "name": "MAX_UNF_WEIGHT", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1666:104:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3617, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3078313063366637613062356564386433366234633766333439333835383336323166616663386230303739613238333464323666613366636339656139", + "id": 3618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1708:62:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115792089237316195423570985008687907853269984665640564039457584007913129_by_1", + "typeString": "int_const 1157...(64 digits omitted)...3129" + }, + "value": "0x10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea9" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 3623, + "mutability": "mutable", + "name": "maxExpArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "1828:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128]" + }, + "typeName": { + "baseType": { + "id": 3620, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1828:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3622, + "length": { + "argumentTypes": null, + "hexValue": "313238", + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1836:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "ArrayTypeName", + "src": "1828:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage_ptr", + "typeString": "uint256[128]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4202, + "nodeType": "Block", + "src": "1902:8456:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3626, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4025:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3628, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4038:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4025:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831633335666564643134666666666666666666666666666666666666666666666666", + "id": 3629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4044:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9599678685041259184274752310158947254271_by_1", + "typeString": "int_const 9599...(32 digits omitted)...4271" + }, + "value": "0x1c35fedd14ffffffffffffffffffffffff" + }, + "src": "4025:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3631, + "nodeType": "ExpressionStatement", + "src": "4025:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3632, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4091:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3634, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3333", + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4104:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "33" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4091:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831623063653433623332336666666666666666666666666666666666666666666666", + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4110:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9204759687141885226475603015507577405439_by_1", + "typeString": "int_const 9204...(32 digits omitted)...5439" + }, + "value": "0x1b0ce43b323fffffffffffffffffffffff" + }, + "src": "4091:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3637, + "nodeType": "ExpressionStatement", + "src": "4091:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3638, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4157:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3640, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3334", + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4170:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "34" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4157:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831396630303238656331666666666666666666666666666666666666666666666666", + "id": 3641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4176:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8826087172077985712041017634911355404287_by_1", + "typeString": "int_const 8826...(32 digits omitted)...4287" + }, + "value": "0x19f0028ec1ffffffffffffffffffffffff" + }, + "src": "4157:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3643, + "nodeType": "ExpressionStatement", + "src": "4157:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3644, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4223:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3646, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3335", + "id": 3645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4236:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35_by_1", + "typeString": "int_const 35" + }, + "value": "35" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4223:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831386465643931663065376666666666666666666666666666666666666666666666", + "id": 3647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4242:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8462992779488582574159642900919291478015_by_1", + "typeString": "int_const 8462...(32 digits omitted)...8015" + }, + "value": "0x18ded91f0e7fffffffffffffffffffffff" + }, + "src": "4223:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3649, + "nodeType": "ExpressionStatement", + "src": "4223:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3650, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4289:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3652, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3336", + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4302:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36_by_1", + "typeString": "int_const 36" + }, + "value": "36" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4289:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831376438656337663034313766666666666666666666666666666666666666666666", + "id": 3653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4308:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8114835644520100661580084966409403105279_by_1", + "typeString": "int_const 8114...(32 digits omitted)...5279" + }, + "value": "0x17d8ec7f0417ffffffffffffffffffffff" + }, + "src": "4289:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "4289:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3656, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4355:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3658, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3337", + "id": 3657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4368:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_37_by_1", + "typeString": "int_const 37" + }, + "value": "37" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4355:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831366464633635353663646266666666666666666666666666666666666666666666", + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4374:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7781001266736647064069662172832600162303_by_1", + "typeString": "int_const 7781...(32 digits omitted)...2303" + }, + "value": "0x16ddc6556cdbffffffffffffffffffffff" + }, + "src": "4355:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3661, + "nodeType": "ExpressionStatement", + "src": "4355:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3662, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4421:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3664, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3338", + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4434:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_38_by_1", + "typeString": "int_const 38" + }, + "value": "38" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4421:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831356563663532373736613166666666666666666666666666666666666666666666", + "id": 3665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4440:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7460900425488323202194551465008353509375_by_1", + "typeString": "int_const 7460...(32 digits omitted)...9375" + }, + "value": "0x15ecf52776a1ffffffffffffffffffffff" + }, + "src": "4421:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3667, + "nodeType": "ExpressionStatement", + "src": "4421:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3668, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4487:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3670, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 3669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4500:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4487:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831353036306332353663623266666666666666666666666666666666666666666666", + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4506:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7153968139937914349310206877837545177087_by_1", + "typeString": "int_const 7153...(32 digits omitted)...7087" + }, + "value": "0x15060c256cb2ffffffffffffffffffffff" + }, + "src": "4487:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3673, + "nodeType": "ExpressionStatement", + "src": "4487:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3674, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4553:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3676, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3430", + "id": 3675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4566:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4553:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831343238613266393864373266666666666666666666666666666666666666666666", + "id": 3677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4572:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6859662671868001546166128217910528704511_by_1", + "typeString": "int_const 6859...(32 digits omitted)...4511" + }, + "value": "0x1428a2f98d72ffffffffffffffffffffff" + }, + "src": "4553:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3679, + "nodeType": "ExpressionStatement", + "src": "4553:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3680, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4619:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3682, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3431", + "id": 3681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4632:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4619:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831333534353539386535633233666666666666666666666666666666666666666666", + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4638:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6577464569506365633454696454958677491711_by_1", + "typeString": "int_const 6577...(32 digits omitted)...1711" + }, + "value": "0x13545598e5c23fffffffffffffffffffff" + }, + "src": "4619:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3685, + "nodeType": "ExpressionStatement", + "src": "4619:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3686, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4685:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3688, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3432", + "id": 3687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4698:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42_by_1", + "typeString": "int_const 42" + }, + "value": "42" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4685:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831323838633431363163653164666666666666666666666666666666666666666666", + "id": 3689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4704:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6306875750689218484600399768107450630143_by_1", + "typeString": "int_const 6306...(32 digits omitted)...0143" + }, + "value": "0x1288c4161ce1dfffffffffffffffffffff" + }, + "src": "4685:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3691, + "nodeType": "ExpressionStatement", + "src": "4685:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3692, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4751:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3694, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3433", + "id": 3693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4764:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_43_by_1", + "typeString": "int_const 43" + }, + "value": "43" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4751:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831316335393237363163363636666666666666666666666666666666666666666666", + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4770:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6047418623741353042663269283551730728959_by_1", + "typeString": "int_const 6047...(32 digits omitted)...8959" + }, + "value": "0x11c592761c666fffffffffffffffffffff" + }, + "src": "4751:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3697, + "nodeType": "ExpressionStatement", + "src": "4751:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3698, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4817:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3700, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3434", + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4830:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_44_by_1", + "typeString": "int_const 44" + }, + "value": "44" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4817:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831313061363838363830613735376666666666666666666666666666666666666666", + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4836:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5798635244522972732941736303310812479487_by_1", + "typeString": "int_const 5798...(32 digits omitted)...9487" + }, + "value": "0x110a688680a757ffffffffffffffffffff" + }, + "src": "4817:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3703, + "nodeType": "ExpressionStatement", + "src": "4817:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3704, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4883:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3706, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3435", + "id": 3705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4896:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_45_by_1", + "typeString": "int_const 45" + }, + "value": "45" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4883:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307831303536663162356265646637376666666666666666666666666666666666666666", + "id": 3707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4902:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5560086508154074440893281558760167309311_by_1", + "typeString": "int_const 5560...(32 digits omitted)...9311" + }, + "value": "0x1056f1b5bedf77ffffffffffffffffffff" + }, + "src": "4883:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3709, + "nodeType": "ExpressionStatement", + "src": "4883:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3710, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "4949:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3712, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3436", + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4962:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_46_by_1", + "typeString": "int_const 46" + }, + "value": "46" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4949:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830666161646365636565666638626666666666666666666666666666666666666666", + "id": 3713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4968:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5331351373990447379730864460340651884543_by_1", + "typeString": "int_const 5331...(32 digits omitted)...4543" + }, + "value": "0x0faadceceeff8bffffffffffffffffffff" + }, + "src": "4949:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3715, + "nodeType": "ExpressionStatement", + "src": "4949:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3716, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5015:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3718, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3437", + "id": 3717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5028:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5015:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830663035646336623237656461646666666666666666666666666666666666666666", + "id": 3719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5034:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5112026122483163422598731111238626967551_by_1", + "typeString": "int_const 5112...(32 digits omitted)...7551" + }, + "value": "0x0f05dc6b27edadffffffffffffffffffff" + }, + "src": "5015:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3721, + "nodeType": "ExpressionStatement", + "src": "5015:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3722, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5081:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3724, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 3723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5094:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5081:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830653637613561323564613431303766666666666666666666666666666666666666", + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5100:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4901723642609993464238960471454494228479_by_1", + "typeString": "int_const 4901...(32 digits omitted)...8479" + }, + "value": "0x0e67a5a25da4107fffffffffffffffffff" + }, + "src": "5081:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3727, + "nodeType": "ExpressionStatement", + "src": "5081:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3728, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5147:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3730, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3439", + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5160:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "49" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5147:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830646366663131356231346565646666666666666666666666666666666666666666", + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5166:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4700072748620998500994433661760029327359_by_1", + "typeString": "int_const 4700...(32 digits omitted)...7359" + }, + "value": "0x0dcff115b14eedffffffffffffffffffff" + }, + "src": "5147:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3733, + "nodeType": "ExpressionStatement", + "src": "5147:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3734, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5213:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3736, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 3735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5226:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5213:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830643365376133393234333132333966666666666666666666666666666666666666", + "id": 3737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5232:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4506717524892375150236886652795301658623_by_1", + "typeString": "int_const 4506...(32 digits omitted)...8623" + }, + "value": "0x0d3e7a392431239fffffffffffffffffff" + }, + "src": "5213:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3739, + "nodeType": "ExpressionStatement", + "src": "5213:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3740, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5279:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3742, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3531", + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5292:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51_by_1", + "typeString": "int_const 51" + }, + "value": "51" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5279:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830636232666635323965623731653466666666666666666666666666666666666666", + "id": 3743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5298:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4321316697732212547034601541953113817087_by_1", + "typeString": "int_const 4321...(32 digits omitted)...7087" + }, + "value": "0x0cb2ff529eb71e4fffffffffffffffffff" + }, + "src": "5279:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3745, + "nodeType": "ExpressionStatement", + "src": "5279:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3746, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5345:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3748, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3532", + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5358:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_52_by_1", + "typeString": "int_const 52" + }, + "value": "52" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5345:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830633264343135633364623937346166666666666666666666666666666666666666", + "id": 3749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5364:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4143543033029384782309349805264440655871_by_1", + "typeString": "int_const 4143...(32 digits omitted)...5871" + }, + "value": "0x0c2d415c3db974afffffffffffffffffff" + }, + "src": "5345:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3751, + "nodeType": "ExpressionStatement", + "src": "5345:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3752, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5411:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3754, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3533", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5424:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_53_by_1", + "typeString": "int_const 53" + }, + "value": "53" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5411:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830626164303365376438383366363962666666666666666666666666666666666666", + "id": 3755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5430:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3973082758682431363936722477132055314431_by_1", + "typeString": "int_const 3973...(32 digits omitted)...4431" + }, + "value": "0x0bad03e7d883f69bffffffffffffffffff" + }, + "src": "5411:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3757, + "nodeType": "ExpressionStatement", + "src": "5411:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3758, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5477:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3760, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3534", + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5490:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_54_by_1", + "typeString": "int_const 54" + }, + "value": "54" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5477:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830623332306430336232633334336435666666666666666666666666666666666666", + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5496:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3809635010789003168527049097368437784575_by_1", + "typeString": "int_const 3809...(32 digits omitted)...4575" + }, + "value": "0x0b320d03b2c343d5ffffffffffffffffff" + }, + "src": "5477:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3763, + "nodeType": "ExpressionStatement", + "src": "5477:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3764, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5543:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3766, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3535", + "id": 3765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5556:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5543:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830616263323532303465303238323864666666666666666666666666666666666666", + "id": 3767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5562:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3652911302618395401280222488042819026943_by_1", + "typeString": "int_const 3652...(32 digits omitted)...6943" + }, + "value": "0x0abc25204e02828dffffffffffffffffff" + }, + "src": "5543:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3769, + "nodeType": "ExpressionStatement", + "src": "5543:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3770, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5609:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3772, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3536", + "id": 3771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5622:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5609:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830613462313666373465653462623230376666666666666666666666666666666666", + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5628:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3502635015429898674229017626613836152831_by_1", + "typeString": "int_const 3502...(32 digits omitted)...2831" + }, + "value": "0x0a4b16f74ee4bb207fffffffffffffffff" + }, + "src": "5609:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3775, + "nodeType": "ExpressionStatement", + "src": "5609:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3776, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5675:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3778, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3537", + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5688:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57_by_1", + "typeString": "int_const 57" + }, + "value": "57" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5675:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830396465616637333661633166353639666666666666666666666666666666666666", + "id": 3779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5694:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3358540910238258030536300376569398951935_by_1", + "typeString": "int_const 3358...(32 digits omitted)...1935" + }, + "value": "0x09deaf736ac1f569ffffffffffffffffff" + }, + "src": "5675:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3781, + "nodeType": "ExpressionStatement", + "src": "5675:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3782, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5741:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3784, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3538", + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5754:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5741:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830393736626439393532633761613935376666666666666666666666666666666666", + "id": 3785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5760:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3220374659664501751807634855053158776831_by_1", + "typeString": "int_const 3220...(32 digits omitted)...6831" + }, + "value": "0x0976bd9952c7aa957fffffffffffffffff" + }, + "src": "5741:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3787, + "nodeType": "ExpressionStatement", + "src": "5741:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3788, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5807:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3790, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3539", + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5820:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59_by_1", + "typeString": "int_const 59" + }, + "value": "59" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5807:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830393133313237313932326561613630366666666666666666666666666666666666", + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5826:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3087892399045852422628542596524428754943_by_1", + "typeString": "int_const 3087...(32 digits omitted)...4943" + }, + "value": "0x09131271922eaa606fffffffffffffffff" + }, + "src": "5807:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3793, + "nodeType": "ExpressionStatement", + "src": "5807:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3794, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5873:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3796, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3630", + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5886:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "60" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5873:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830386233383066333535383636386334366666666666666666666666666666666666", + "id": 3797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5892:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2960860296012425255212778080756987592703_by_1", + "typeString": "int_const 2960...(32 digits omitted)...2703" + }, + "value": "0x08b380f3558668c46fffffffffffffffff" + }, + "src": "5873:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3799, + "nodeType": "ExpressionStatement", + "src": "5873:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3800, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "5939:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3802, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3631", + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5952:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61_by_1", + "typeString": "int_const 61" + }, + "value": "61" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5939:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830383537646466303131376566613231356266666666666666666666666666666666", + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5958:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2839054137771012724926516325250418868223_by_1", + "typeString": "int_const 2839...(32 digits omitted)...8223" + }, + "value": "0x0857ddf0117efa215bffffffffffffffff" + }, + "src": "5939:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3805, + "nodeType": "ExpressionStatement", + "src": "5939:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3806, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6005:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3808, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3632", + "id": 3807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6018:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62_by_1", + "typeString": "int_const 62" + }, + "value": "62" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6005:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830376666666666666666666666666666666666666666666666666666666666666666", + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6024:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691647_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1647" + }, + "value": "0x07ffffffffffffffffffffffffffffffff" + }, + "src": "6005:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3811, + "nodeType": "ExpressionStatement", + "src": "6005:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3812, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6071:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3814, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3633", + "id": 3813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6084:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63_by_1", + "typeString": "int_const 63" + }, + "value": "63" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6071:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830376162626636663661626239643038376666666666666666666666666666666666", + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6090:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2610268544229484780765045556213696167935_by_1", + "typeString": "int_const 2610...(32 digits omitted)...7935" + }, + "value": "0x07abbf6f6abb9d087fffffffffffffffff" + }, + "src": "6071:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3817, + "nodeType": "ExpressionStatement", + "src": "6071:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3818, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6137:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3820, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6150:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6137:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830373561663632636261633935663764666137666666666666666666666666666666", + "id": 3821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6156:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2502885300319193958571922333378000453631_by_1", + "typeString": "int_const 2502...(32 digits omitted)...3631" + }, + "value": "0x075af62cbac95f7dfa7fffffffffffffff" + }, + "src": "6137:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3823, + "nodeType": "ExpressionStatement", + "src": "6137:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3824, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6203:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3826, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3635", + "id": 3825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6216:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830373064376662373435326531383761633133666666666666666666666666666666", + "id": 3827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6222:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2399919671254773659805118819743970623487_by_1", + "typeString": "int_const 2399...(32 digits omitted)...3487" + }, + "value": "0x070d7fb7452e187ac13fffffffffffffff" + }, + "src": "6203:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3829, + "nodeType": "ExpressionStatement", + "src": "6203:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3830, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6269:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3832, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3636", + "id": 3831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6282:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66_by_1", + "typeString": "int_const 66" + }, + "value": "66" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6269:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830366333333930656363386166333739323935666666666666666666666666666666", + "id": 3833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6288:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2301189921783908737703717501630802821119_by_1", + "typeString": "int_const 2301...(32 digits omitted)...1119" + }, + "value": "0x06c3390ecc8af379295fffffffffffffff" + }, + "src": "6269:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3835, + "nodeType": "ExpressionStatement", + "src": "6269:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3836, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6335:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3838, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3637", + "id": 3837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6348:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67_by_1", + "typeString": "int_const 67" + }, + "value": "67" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6335:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830363763303061336230376666633031666436666666666666666666666666666666", + "id": 3839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6354:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2206521793019491601704439134261549727743_by_1", + "typeString": "int_const 2206...(32 digits omitted)...7743" + }, + "value": "0x067c00a3b07ffc01fd6fffffffffffffff" + }, + "src": "6335:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3841, + "nodeType": "ExpressionStatement", + "src": "6335:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3842, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6401:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3844, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3638", + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6414:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68_by_1", + "typeString": "int_const 68" + }, + "value": "68" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6401:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830363337623634376333396362623964336432376666666666666666666666666666", + "id": 3845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6420:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2115748194871134515168564783402692116479_by_1", + "typeString": "int_const 2115...(32 digits omitted)...6479" + }, + "value": "0x0637b647c39cbb9d3d27ffffffffffffff" + }, + "src": "6401:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3847, + "nodeType": "ExpressionStatement", + "src": "6401:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3848, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6467:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3850, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3639", + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6480:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69_by_1", + "typeString": "int_const 69" + }, + "value": "69" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6467:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830356636336231666331303464626433393538376666666666666666666666666666", + "id": 3851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6486:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2028708911129671949307566740521183346687_by_1", + "typeString": "int_const 2028...(32 digits omitted)...6687" + }, + "value": "0x05f63b1fc104dbd39587ffffffffffffff" + }, + "src": "6467:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3853, + "nodeType": "ExpressionStatement", + "src": "6467:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3854, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6533:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3856, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3730", + "id": 3855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6546:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70_by_1", + "typeString": "int_const 70" + }, + "value": "70" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6533:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830356237373139353562333665313266373233356666666666666666666666666666", + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6552:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1945250316684124513375052119057996185599_by_1", + "typeString": "int_const 1945...(32 digits omitted)...5599" + }, + "value": "0x05b771955b36e12f7235ffffffffffffff" + }, + "src": "6533:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3859, + "nodeType": "ExpressionStatement", + "src": "6533:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3860, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6599:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3862, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3731", + "id": 3861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6612:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6599:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353762336434396464613834353536643666366666666666666666666666666666", + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6618:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1865225106372009884014199587421481336831_by_1", + "typeString": "int_const 1865...(32 digits omitted)...6831" + }, + "value": "0x057b3d49dda84556d6f6ffffffffffffff" + }, + "src": "6599:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3865, + "nodeType": "ExpressionStatement", + "src": "6599:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3866, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6665:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3868, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3732", + "id": 3867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6678:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6665:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353431383330393562326338656365636633306666666666666666666666666666", + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6684:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1788492034984419117666073304513300660223_by_1", + "typeString": "int_const 1788...(32 digits omitted)...0223" + }, + "value": "0x054183095b2c8ececf30ffffffffffffff" + }, + "src": "6665:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3871, + "nodeType": "ExpressionStatement", + "src": "6665:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3872, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6731:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3874, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3733", + "id": 3873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6744:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73_by_1", + "typeString": "int_const 73" + }, + "value": "73" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6731:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830353061323862653633356361326238383866373766666666666666666666666666", + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6750:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1714915667966964990208967912165996494847_by_1", + "typeString": "int_const 1714...(32 digits omitted)...4847" + }, + "value": "0x050a28be635ca2b888f77fffffffffffff" + }, + "src": "6731:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3877, + "nodeType": "ExpressionStatement", + "src": "6731:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3878, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6797:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3880, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3734", + "id": 3879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6810:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74_by_1", + "typeString": "int_const 74" + }, + "value": "74" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6797:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830346435313536363339373038633964623333633366666666666666666666666666", + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6816:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1644366142376587317378242124992063995903_by_1", + "typeString": "int_const 1644...(32 digits omitted)...5903" + }, + "value": "0x04d5156639708c9db33c3fffffffffffff" + }, + "src": "6797:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3883, + "nodeType": "ExpressionStatement", + "src": "6797:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3884, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6863:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3886, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3735", + "id": 3885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6876:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75_by_1", + "typeString": "int_const 75" + }, + "value": "75" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6863:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830346132333130353837333837356264353264666466666666666666666666666666", + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6882:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1576718937672301888428671268411708276735_by_1", + "typeString": "int_const 1576...(32 digits omitted)...6735" + }, + "value": "0x04a23105873875bd52dfdfffffffffffff" + }, + "src": "6863:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3889, + "nodeType": "ExpressionStatement", + "src": "6863:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3890, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6929:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3892, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3736", + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6942:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76_by_1", + "typeString": "int_const 76" + }, + "value": "76" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6929:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343731363439643837313939616139393037353666666666666666666666666666", + "id": 3893, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6948:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1511854655935336643558907106913628979199_by_1", + "typeString": "int_const 1511...(32 digits omitted)...9199" + }, + "value": "0x0471649d87199aa990756fffffffffffff" + }, + "src": "6929:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3895, + "nodeType": "ExpressionStatement", + "src": "6929:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3896, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "6995:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3898, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3737", + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7008:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77_by_1", + "typeString": "int_const 77" + }, + "value": "77" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6995:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343432396132316130323964346331343537636662666666666666666666666666", + "id": 3899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7014:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1449658811130741678082357454851673161727_by_1", + "typeString": "int_const 1449...(32 digits omitted)...1727" + }, + "value": "0x04429a21a029d4c1457cfbffffffffffff" + }, + "src": "6995:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3901, + "nodeType": "ExpressionStatement", + "src": "6995:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3902, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7061:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3904, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3738", + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7074:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78_by_1", + "typeString": "int_const 78" + }, + "value": "78" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7061:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830343135626336643666623764643731616632636233666666666666666666666666", + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7080:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1390021627038517938156314751863424548863_by_1", + "typeString": "int_const 1390...(32 digits omitted)...8863" + }, + "value": "0x0415bc6d6fb7dd71af2cb3ffffffffffff" + }, + "src": "7061:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3907, + "nodeType": "ExpressionStatement", + "src": "7061:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3908, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7127:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3910, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3739", + "id": 3909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79_by_1", + "typeString": "int_const 79" + }, + "value": "79" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7127:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830336561623733623362626665323832323433636531666666666666666666666666", + "id": 3911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7146:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1332837843497611250583009129150422188031_by_1", + "typeString": "int_const 1332...(32 digits omitted)...8031" + }, + "value": "0x03eab73b3bbfe282243ce1ffffffffffff" + }, + "src": "7127:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3913, + "nodeType": "ExpressionStatement", + "src": "7127:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3914, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7193:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3916, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3830", + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7206:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7193:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830336331373731616339666236623463313865323239666666666666666666666666", + "id": 3917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7212:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1278006530620790610545644364558728429567_by_1", + "typeString": "int_const 1278...(32 digits omitted)...9567" + }, + "value": "0x03c1771ac9fb6b4c18e229ffffffffffff" + }, + "src": "7193:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3919, + "nodeType": "ExpressionStatement", + "src": "7193:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3920, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7259:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3922, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3831", + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7272:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "81" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7259:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333939653936383937363930343138663738353235376666666666666666666666", + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7278:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1225430910652498332846748256431392161791_by_1", + "typeString": "int_const 1225...(32 digits omitted)...1791" + }, + "value": "0x0399e96897690418f785257fffffffffff" + }, + "src": "7259:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3925, + "nodeType": "ExpressionStatement", + "src": "7259:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3926, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7325:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3928, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3832", + "id": 3927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7338:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82_by_1", + "typeString": "int_const 82" + }, + "value": "82" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7325:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333733666334353663353362623737396266306561396666666666666666666666", + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7344:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1175018187155249585623915264673694351359_by_1", + "typeString": "int_const 1175...(32 digits omitted)...1359" + }, + "value": "0x0373fc456c53bb779bf0ea9fffffffffff" + }, + "src": "7325:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3931, + "nodeType": "ExpressionStatement", + "src": "7325:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3932, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7391:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3934, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3833", + "id": 3933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7404:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83_by_1", + "typeString": "int_const 83" + }, + "value": "83" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7391:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333466396538653439306334386536376536616238626666666666666666666666", + "id": 3935, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7410:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1126679381223093780446468558216906145791_by_1", + "typeString": "int_const 1126...(32 digits omitted)...5791" + }, + "value": "0x034f9e8e490c48e67e6ab8bfffffffffff" + }, + "src": "7391:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3937, + "nodeType": "ExpressionStatement", + "src": "7391:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3938, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7457:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3940, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3834", + "id": 3939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7470:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84_by_1", + "typeString": "int_const 84" + }, + "value": "84" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7457:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333263626664346137616463373930353630623333333766666666666666666666", + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7476:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1080329174433053119456411494679599644671_by_1", + "typeString": "int_const 1080...(32 digits omitted)...4671" + }, + "value": "0x032cbfd4a7adc790560b3337ffffffffff" + }, + "src": "7457:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3943, + "nodeType": "ExpressionStatement", + "src": "7457:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3944, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7523:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3946, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3835", + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7536:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85_by_1", + "typeString": "int_const 85" + }, + "value": "85" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7523:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830333062353035373066366535643261636361393436313366666666666666666666", + "id": 3947, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7542:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1035885758257346189907937735244580388863_by_1", + "typeString": "int_const 1035...(32 digits omitted)...8863" + }, + "value": "0x030b50570f6e5d2acca94613ffffffffff" + }, + "src": "7523:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3949, + "nodeType": "ExpressionStatement", + "src": "7523:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3950, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7589:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3952, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3836", + "id": 3951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7602:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86_by_1", + "typeString": "int_const 86" + }, + "value": "86" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7589:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326562343066396636323066646136623536633238363166666666666666666666", + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7608:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_993270689670607839608468400662101622783_by_1", + "typeString": "int_const 9932...(31 digits omitted)...2783" + }, + "value": "0x02eb40f9f620fda6b56c2861ffffffffff" + }, + "src": "7589:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3955, + "nodeType": "ExpressionStatement", + "src": "7589:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3956, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7655:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3958, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3837", + "id": 3957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7668:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7655:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326363383334306563623064306635323061366166353866666666666666666666", + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7674:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_952408752697250790372885759853747765247_by_1", + "typeString": "int_const 9524...(31 digits omitted)...5247" + }, + "value": "0x02cc8340ecb0d0f520a6af58ffffffffff" + }, + "src": "7655:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3961, + "nodeType": "ExpressionStatement", + "src": "7655:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3962, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7721:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3964, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3838", + "id": 3963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7734:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7721:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830326166303934383133383061306133356366316261303266666666666666666666", + "id": 3965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7740:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_913227825654598849673391073164504596479_by_1", + "typeString": "int_const 9132...(31 digits omitted)...6479" + }, + "value": "0x02af09481380a0a35cf1ba02ffffffffff" + }, + "src": "7721:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3967, + "nodeType": "ExpressionStatement", + "src": "7721:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3968, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7787:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3970, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3839", + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7800:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89_by_1", + "typeString": "int_const 89" + }, + "value": "89" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7787:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323932633562646433623932656338313032383762316233666666666666666666", + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7806:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_875658753857474668265023456619450597375_by_1", + "typeString": "int_const 8756...(31 digits omitted)...7375" + }, + "value": "0x0292c5bdd3b92ec810287b1b3fffffffff" + }, + "src": "7787:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3973, + "nodeType": "ExpressionStatement", + "src": "7787:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3974, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7853:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3976, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3930", + "id": 3975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7866:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90_by_1", + "typeString": "int_const 90" + }, + "value": "90" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7853:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323737616264636461623037643561373761633664366239666666666666666666", + "id": 3977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7872:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_839635227559564507480479102760887779327_by_1", + "typeString": "int_const 8396...(31 digits omitted)...9327" + }, + "value": "0x0277abdcdab07d5a77ac6d6b9fffffffff" + }, + "src": "7853:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3979, + "nodeType": "ExpressionStatement", + "src": "7853:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3980, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7919:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3982, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3931", + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7932:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91_by_1", + "typeString": "int_const 91" + }, + "value": "91" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7919:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323564616636363534623165616135356664363464663565666666666666666666", + "id": 3983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7938:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_805093664916125437948904238798044397567_by_1", + "typeString": "int_const 8050...(31 digits omitted)...7567" + }, + "value": "0x025daf6654b1eaa55fd64df5efffffffff" + }, + "src": "7919:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3985, + "nodeType": "ExpressionStatement", + "src": "7919:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3986, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "7985:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3988, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3932", + "id": 3987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7998:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "92" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7985:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323434633439633634386261613938313932646365383862376666666666666666", + "id": 3989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8004:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_771973099761463105605096142810743046143_by_1", + "typeString": "int_const 7719...(31 digits omitted)...6143" + }, + "value": "0x0244c49c648baa98192dce88b7ffffffff" + }, + "src": "7985:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3991, + "nodeType": "ExpressionStatement", + "src": "7985:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3992, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8051:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 3994, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3933", + "id": 3993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8064:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93_by_1", + "typeString": "int_const 93" + }, + "value": "93" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8051:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323263653033636435363139613331316232343731323638626666666666666666", + "id": 3995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8070:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_740215074003106313787373698556008333311_by_1", + "typeString": "int_const 7402...(31 digits omitted)...3311" + }, + "value": "0x022ce03cd5619a311b2471268bffffffff" + }, + "src": "8051:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3997, + "nodeType": "ExpressionStatement", + "src": "8051:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3998, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8117:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4000, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3934", + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8130:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94_by_1", + "typeString": "int_const 94" + }, + "value": "94" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8117:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830323135663737633034356662653838353635346134346130666666666666666666", + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8136:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_709763534442753181219281418466841591807_by_1", + "typeString": "int_const 7097...(31 digits omitted)...1807" + }, + "value": "0x0215f77c045fbe885654a44a0fffffffff" + }, + "src": "8117:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4003, + "nodeType": "ExpressionStatement", + "src": "8117:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4004, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8183:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4006, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3935", + "id": 4005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8196:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95_by_1", + "typeString": "int_const 95" + }, + "value": "95" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8183:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316666666666666666666666666666666666666666666666666666666666666666", + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8202:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422911_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2911" + }, + "value": "0x01ffffffffffffffffffffffffffffffff" + }, + "src": "8183:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4009, + "nodeType": "ExpressionStatement", + "src": "8183:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4010, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8249:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4012, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3936", + "id": 4011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8262:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8249:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316561656664626461616565373432316663346433656465356666666666666666", + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8268:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_652567136057371195186997586203332575231_by_1", + "typeString": "int_const 6525...(31 digits omitted)...5231" + }, + "value": "0x01eaefdbdaaee7421fc4d3ede5ffffffff" + }, + "src": "8249:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4015, + "nodeType": "ExpressionStatement", + "src": "8249:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4016, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8315:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4018, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3937", + "id": 4017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8328:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97_by_1", + "typeString": "int_const 97" + }, + "value": "97" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8315:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316436626438623265623235376466376538636135376230396266666666666666", + "id": 4019, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8334:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_625721325079798489641586010116704960511_by_1", + "typeString": "int_const 6257...(31 digits omitted)...0511" + }, + "value": "0x01d6bd8b2eb257df7e8ca57b09bfffffff" + }, + "src": "8315:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4021, + "nodeType": "ExpressionStatement", + "src": "8315:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4022, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8381:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4024, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3938", + "id": 4023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8394:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98_by_1", + "typeString": "int_const 98" + }, + "value": "98" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8381:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316333356665646431346238363165623034343366376631333366666666666666", + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8400:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_599979917813693414950432886451725139967_by_1", + "typeString": "int_const 5999...(31 digits omitted)...9967" + }, + "value": "0x01c35fedd14b861eb0443f7f133fffffff" + }, + "src": "8381:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4027, + "nodeType": "ExpressionStatement", + "src": "8381:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4028, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8447:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4030, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3939", + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8460:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + }, + "value": "99" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8447:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830316230636534336233323262636465346135366538616461356166666666666666", + "id": 4031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8466:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_575297480445977184425850753341355720703_by_1", + "typeString": "int_const 5752...(31 digits omitted)...0703" + }, + "value": "0x01b0ce43b322bcde4a56e8ada5afffffff" + }, + "src": "8447:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4033, + "nodeType": "ExpressionStatement", + "src": "8447:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4034, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8513:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4036, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 4035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8525:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8513:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313966303032386563316666663030376635613139356133396466666666666666", + "id": 4037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8532:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_551630448254872900425972804456347074559_by_1", + "typeString": "int_const 5516...(31 digits omitted)...4559" + }, + "value": "0x019f0028ec1fff007f5a195a39dfffffff" + }, + "src": "8513:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4039, + "nodeType": "ExpressionStatement", + "src": "8513:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4040, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8579:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4042, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313031", + "id": 4041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8591:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101_by_1", + "typeString": "int_const 101" + }, + "value": "101" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8579:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313864656439316630653732656537346634396231356261353237666666666666", + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8598:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_528937048717783628792119060092411707391_by_1", + "typeString": "int_const 5289...(31 digits omitted)...7391" + }, + "value": "0x018ded91f0e72ee74f49b15ba527ffffff" + }, + "src": "8579:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4045, + "nodeType": "ExpressionStatement", + "src": "8579:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4046, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8645:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4048, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313032", + "id": 4047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8657:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102_by_1", + "typeString": "int_const 102" + }, + "value": "102" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8645:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313764386563376630343133366634653536313566643431613633666666666666", + "id": 4049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8664:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_507177227782417987326846600868857380863_by_1", + "typeString": "int_const 5071...(31 digits omitted)...0863" + }, + "value": "0x017d8ec7f04136f4e5615fd41a63ffffff" + }, + "src": "8645:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4051, + "nodeType": "ExpressionStatement", + "src": "8645:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4052, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8711:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4054, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313033", + "id": 4053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8723:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8711:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313664646336353536636462383462646338643132643232653666666666666666", + "id": 4055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8730:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_486312579171031128343732298613950251007_by_1", + "typeString": "int_const 4863...(31 digits omitted)...1007" + }, + "value": "0x016ddc6556cdb84bdc8d12d22e6fffffff" + }, + "src": "8711:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4057, + "nodeType": "ExpressionStatement", + "src": "8711:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4058, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8777:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4060, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313034", + "id": 4059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8777:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313565636635323737366131313535623562643833393538313466376666666666", + "id": 4061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8796:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_466306276593002471003532891264408092671_by_1", + "typeString": "int_const 4663...(31 digits omitted)...2671" + }, + "value": "0x015ecf52776a1155b5bd8395814f7fffff" + }, + "src": "8777:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4063, + "nodeType": "ExpressionStatement", + "src": "8777:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4064, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8843:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4066, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313035", + "id": 4065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8855:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105_by_1", + "typeString": "int_const 105" + }, + "value": "105" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8843:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313530363063323536636232336233623363633337353463663430666666666666", + "id": 4067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8862:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_447123008746104779416515886102660251647_by_1", + "typeString": "int_const 4471...(31 digits omitted)...1647" + }, + "value": "0x015060c256cb23b3b3cc3754cf40ffffff" + }, + "src": "8843:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4069, + "nodeType": "ExpressionStatement", + "src": "8843:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4070, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8909:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4072, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313036", + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8921:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106_by_1", + "typeString": "int_const 106" + }, + "value": "106" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8909:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313432386132663938643732386165323233646461623731356265336666666666", + "id": 4073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8928:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_428728916991741247552240490495652921343_by_1", + "typeString": "int_const 4287...(31 digits omitted)...1343" + }, + "value": "0x01428a2f98d728ae223ddab715be3fffff" + }, + "src": "8909:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4075, + "nodeType": "ExpressionStatement", + "src": "8909:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4076, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "8975:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4078, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313037", + "id": 4077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8987:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107_by_1", + "typeString": "int_const 107" + }, + "value": "107" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8975:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313335343535393865356332333237366363663065646536383033346666666666", + "id": 4079, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8994:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_411091535594146829344560212836376117247_by_1", + "typeString": "int_const 4110...(31 digits omitted)...7247" + }, + "value": "0x013545598e5c23276ccf0ede68034fffff" + }, + "src": "8975:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4081, + "nodeType": "ExpressionStatement", + "src": "8975:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4082, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9041:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4084, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313038", + "id": 4083, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9053:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108_by_1", + "typeString": "int_const 108" + }, + "value": "108" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9041:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313238386334313631636531643666353462376636313038313139346666666666", + "id": 4085, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9060:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_394179734418075472107167272299635146751_by_1", + "typeString": "int_const 3941...(31 digits omitted)...6751" + }, + "value": "0x01288c4161ce1d6f54b7f61081194fffff" + }, + "src": "9041:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4087, + "nodeType": "ExpressionStatement", + "src": "9041:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4088, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9107:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4090, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313039", + "id": 4089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9119:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109_by_1", + "typeString": "int_const 109" + }, + "value": "109" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9107:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313163353932373631633636366161363431643561303161343066313766666666", + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9126:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_377963663983834160889726215582593318911_by_1", + "typeString": "int_const 3779...(31 digits omitted)...8911" + }, + "value": "0x011c592761c666aa641d5a01a40f17ffff" + }, + "src": "9107:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4093, + "nodeType": "ExpressionStatement", + "src": "9107:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4094, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9173:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4096, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313130", + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9185:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_110_by_1", + "typeString": "int_const 110" + }, + "value": "110" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9173:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313130613638383638306137353330353135663365366536636664636466666666", + "id": 4097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9192:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_362414702782685419520589203652335239167_by_1", + "typeString": "int_const 3624...(31 digits omitted)...9167" + }, + "value": "0x0110a688680a7530515f3e6e6cfdcdffff" + }, + "src": "9173:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4099, + "nodeType": "ExpressionStatement", + "src": "9173:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4100, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9239:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4102, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313131", + "id": 4101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9251:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111_by_1", + "typeString": "int_const 111" + }, + "value": "111" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9239:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830313035366631623562656466373563366263623263653861656434323866666666", + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9258:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_347505406759629484539078662328460836863_by_1", + "typeString": "int_const 3475...(31 digits omitted)...6863" + }, + "value": "0x01056f1b5bedf75c6bcb2ce8aed428ffff" + }, + "src": "9239:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4105, + "nodeType": "ExpressionStatement", + "src": "9239:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4106, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9305:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4108, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313132", + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9317:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9305:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306661616463656365656666386130383930663338373566303038323737666666", + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9324:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_333209460874402812645752271223906598911_by_1", + "typeString": "int_const 3332...(31 digits omitted)...8911" + }, + "value": "0x00faadceceeff8a0890f3875f008277fff" + }, + "src": "9305:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4111, + "nodeType": "ExpressionStatement", + "src": "9305:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4112, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9371:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4114, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313133", + "id": 4113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9383:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113_by_1", + "typeString": "int_const 113" + }, + "value": "113" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9371:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306630356463366232376564616433303633383861363030663662613062666666", + "id": 4115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9390:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_319501632655197652636411056021540225023_by_1", + "typeString": "int_const 3195...(31 digits omitted)...5023" + }, + "value": "0x00f05dc6b27edad306388a600f6ba0bfff" + }, + "src": "9371:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4117, + "nodeType": "ExpressionStatement", + "src": "9371:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4118, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9437:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4120, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313134", + "id": 4119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9449:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114_by_1", + "typeString": "int_const 114" + }, + "value": "114" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9437:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306536376135613235646134313036336465313439356435623138636462666666", + "id": 4121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9456:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_306357727663124583211687061200571318271_by_1", + "typeString": "int_const 3063...(31 digits omitted)...8271" + }, + "value": "0x00e67a5a25da41063de1495d5b18cdbfff" + }, + "src": "9437:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4123, + "nodeType": "ExpressionStatement", + "src": "9437:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4124, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9503:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4126, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313135", + "id": 4125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9515:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115_by_1", + "typeString": "int_const 115" + }, + "value": "115" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9503:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306463666631313562313465656464653666633361613533353366326534666666", + "id": 4127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9522:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_293754546788812396405978813098581970943_by_1", + "typeString": "int_const 2937...(31 digits omitted)...0943" + }, + "value": "0x00dcff115b14eedde6fc3aa5353f2e4fff" + }, + "src": "9503:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4129, + "nodeType": "ExpressionStatement", + "src": "9503:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4130, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9569:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4132, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313136", + "id": 4131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9581:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116_by_1", + "typeString": "int_const 116" + }, + "value": "116" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9569:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306433653761333932343331323339396639616165326530663836386638666666", + "id": 4133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9588:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_281669845305773445111617137421885345791_by_1", + "typeString": "int_const 2816...(31 digits omitted)...5791" + }, + "value": "0x00d3e7a3924312399f9aae2e0f868f8fff" + }, + "src": "9569:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4135, + "nodeType": "ExpressionStatement", + "src": "9569:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4136, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9635:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4138, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313137", + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9647:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117_by_1", + "typeString": "int_const 117" + }, + "value": "117" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9635:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306362326666353239656237316534313538326363636435613165653236666666", + "id": 4139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9654:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_270082293608263279864102872957453496319_by_1", + "typeString": "int_const 2700...(31 digits omitted)...6319" + }, + "value": "0x00cb2ff529eb71e41582cccd5a1ee26fff" + }, + "src": "9635:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4141, + "nodeType": "ExpressionStatement", + "src": "9635:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4142, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9701:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4144, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313138", + "id": 4143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9713:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_118_by_1", + "typeString": "int_const 118" + }, + "value": "118" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9701:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306332643431356333646239373461623332613531383430633062363765646666", + "id": 4145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9720:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_258971439564336547476984432763364437503_by_1", + "typeString": "int_const 2589...(31 digits omitted)...7503" + }, + "value": "0x00c2d415c3db974ab32a51840c0b67edff" + }, + "src": "9701:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4147, + "nodeType": "ExpressionStatement", + "src": "9701:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4148, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9767:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4150, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313139", + "id": 4149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9779:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119_by_1", + "typeString": "int_const 119" + }, + "value": "119" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9767:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306261643033653764383833663639616435623061313836313834653036626666", + "id": 4151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9786:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_248317672417651959902117100034610719743_by_1", + "typeString": "int_const 2483...(31 digits omitted)...9743" + }, + "value": "0x00bad03e7d883f69ad5b0a186184e06bff" + }, + "src": "9767:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4153, + "nodeType": "ExpressionStatement", + "src": "9767:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4154, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9833:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4156, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313230", + "id": 4155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9845:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9833:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306233323064303362326333343364343832396162643630373566306363356666", + "id": 4157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9852:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_238102188174312697593221439720218478079_by_1", + "typeString": "int_const 2381...(31 digits omitted)...8079" + }, + "value": "0x00b320d03b2c343d4829abd6075f0cc5ff" + }, + "src": "9833:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4159, + "nodeType": "ExpressionStatement", + "src": "9833:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4160, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9899:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4162, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313231", + "id": 4161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9911:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_121_by_1", + "typeString": "int_const 121" + }, + "value": "121" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9899:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306162633235323034653032383238643733633665383062636462316139356266", + "id": 4163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9918:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228306956413649712418347768277622232511_by_1", + "typeString": "int_const 2283...(31 digits omitted)...2511" + }, + "value": "0x00abc25204e02828d73c6e80bcdb1a95bf" + }, + "src": "9899:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4165, + "nodeType": "ExpressionStatement", + "src": "9899:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4166, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "9965:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4168, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313232", + "id": 4167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9977:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122_by_1", + "typeString": "int_const 122" + }, + "value": "122" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9965:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830306134623136663734656534626232303430613165633663313566626266326466", + "id": 4169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9984:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218914688464368667066255864092044292831_by_1", + "typeString": "int_const 2189...(31 digits omitted)...2831" + }, + "value": "0x00a4b16f74ee4bb2040a1ec6c15fbbf2df" + }, + "src": "9965:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4171, + "nodeType": "ExpressionStatement", + "src": "9965:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4172, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10031:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4174, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313233", + "id": 4173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10043:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123_by_1", + "typeString": "int_const 123" + }, + "value": "123" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10031:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303964656166373336616331663536396465623162356165336633366331333066", + "id": 4175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10050:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_209908806889891126870119775672831054607_by_1", + "typeString": "int_const 2099...(31 digits omitted)...4607" + }, + "value": "0x009deaf736ac1f569deb1b5ae3f36c130f" + }, + "src": "10031:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4177, + "nodeType": "ExpressionStatement", + "src": "10031:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4178, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10097:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4180, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313234", + "id": 4179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10109:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_124_by_1", + "typeString": "int_const 124" + }, + "value": "124" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10097:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303937366264393935326337616139353766353933376437393065663635303337", + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_201273416229031359487226059686877220919_by_1", + "typeString": "int_const 2012...(31 digits omitted)...0919" + }, + "value": "0x00976bd9952c7aa957f5937d790ef65037" + }, + "src": "10097:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4183, + "nodeType": "ExpressionStatement", + "src": "10097:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4184, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10163:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4186, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313235", + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10175:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125_by_1", + "typeString": "int_const 125" + }, + "value": "125" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10163:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303931333132373139323265616136303634623733613232643062643466326266", + "id": 4187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10182:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192993274940365776401274035698589299391_by_1", + "typeString": "int_const 1929...(31 digits omitted)...9391" + }, + "value": "0x009131271922eaa6064b73a22d0bd4f2bf" + }, + "src": "10163:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4189, + "nodeType": "ExpressionStatement", + "src": "10163:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4190, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10229:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4192, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313236", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10241:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_126_by_1", + "typeString": "int_const 126" + }, + "value": "126" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10229:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303862333830663335353836363863343663393163343961326638653936376239", + "id": 4193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10248:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_185053768500776578446843424638883162041_by_1", + "typeString": "int_const 1850...(31 digits omitted)...2041" + }, + "value": "0x008b380f3558668c46c91c49a2f8e967b9" + }, + "src": "10229:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4195, + "nodeType": "ExpressionStatement", + "src": "10229:55:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4196, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "10295:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4198, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313237", + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10307:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10295:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "307830303835376464663031313765666132313539353239313238333966363437336536", + "id": 4199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10314:36:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_177440883610688295304820354615089591270_by_1", + "typeString": "int_const 1774...(31 digits omitted)...1270" + }, + "value": "0x00857ddf0117efa215952912839f6473e6" + }, + "src": "10295:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4201, + "nodeType": "ExpressionStatement", + "src": "10295:55:7" + } + ] + }, + "documentation": null, + "id": 4203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "initMaxExpArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3624, + "nodeType": "ParameterList", + "parameters": [], + "src": "1891:2:7" + }, + "returnParameters": { + "id": 3625, + "nodeType": "ParameterList", + "parameters": [], + "src": "1902:0:7" + }, + "scope": 8977, + "src": "1867:8491:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "constant": false, + "id": 4207, + "mutability": "mutable", + "name": "lambertArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8977, + "src": "10416:33:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128]" + }, + "typeName": { + "baseType": { + "id": 4204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10416:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4206, + "length": { + "argumentTypes": null, + "hexValue": "313238", + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10424:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "ArrayTypeName", + "src": "10416:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage_ptr", + "typeString": "uint256[128]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4978, + "nodeType": "Block", + "src": "10492:8328:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4210, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10503:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4212, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10518:1:7", + "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": "10503:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783630653339336336386432306231626430396465616162633033373362396335", + "id": 4213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10523:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128787536227304155647383678419039664581_by_1", + "typeString": "int_const 1287...(31 digits omitted)...4581" + }, + "value": "0x60e393c68d20b1bd09deaabc0373b9c5" + }, + "src": "10503:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "10503:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4216, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10568:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4218, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 4217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10583:1:7", + "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": "10568:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783566386634366534383534313230393839656439343731396662346332303131", + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10588:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127020595924271037561532833511427022865_by_1", + "typeString": "int_const 1270...(31 digits omitted)...2865" + }, + "value": "0x5f8f46e4854120989ed94719fb4c2011" + }, + "src": "10568:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4221, + "nodeType": "ExpressionStatement", + "src": "10568:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4222, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10633:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4224, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10648:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10633:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783565343739656262393132396662316237653732613634386639393262363036", + "id": 4225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10653:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125319304162047910149801695424990590470_by_1", + "typeString": "int_const 1253...(31 digits omitted)...0470" + }, + "value": "0x5e479ebb9129fb1b7e72a648f992b606" + }, + "src": "10633:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4227, + "nodeType": "ExpressionStatement", + "src": "10633:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4228, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10698:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4230, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 4229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10713:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10698:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783564306264323366653432646665646465326539353836626531326238356665", + "id": 4231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10718:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123679583241450252008727309686047213054_by_1", + "typeString": "int_const 1236...(31 digits omitted)...3054" + }, + "value": "0x5d0bd23fe42dfedde2e9586be12b85fe" + }, + "src": "10698:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4233, + "nodeType": "ExpressionStatement", + "src": "10698:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4234, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10763:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4236, + "indexExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 4235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10778:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10763:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783562646232396464656539373933303864646663613831616565623830393561", + "id": 4237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10783:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122097709790504811543485325791668472154_by_1", + "typeString": "int_const 1220...(31 digits omitted)...2154" + }, + "value": "0x5bdb29ddee979308ddfca81aeeb8095a" + }, + "src": "10763:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4239, + "nodeType": "ExpressionStatement", + "src": "10763:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4240, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10828:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4242, + "indexExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10843:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10828:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783561623466643861323630643263376532633064326166636630303039646164", + "id": 4243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10848:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120570275450071204896029314248949669293_by_1", + "typeString": "int_const 1205...(31 digits omitted)...9293" + }, + "value": "0x5ab4fd8a260d2c7e2c0d2afcf0009dad" + }, + "src": "10828:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4245, + "nodeType": "ExpressionStatement", + "src": "10828:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4246, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10893:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4248, + "indexExpression": { + "argumentTypes": null, + "hexValue": "36", + "id": 4247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10908:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6_by_1", + "typeString": "int_const 6" + }, + "value": "6" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10893:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783539393862333133353961353564343837323463363563663039303031323231", + "id": 4249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10913:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119094152831753027058824439515169428001_by_1", + "typeString": "int_const 1190...(31 digits omitted)...8001" + }, + "value": "0x5998b31359a55d48724c65cf09001221" + }, + "src": "10893:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4251, + "nodeType": "ExpressionStatement", + "src": "10893:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4252, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "10958:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4254, + "indexExpression": { + "argumentTypes": null, + "hexValue": "37", + "id": 4253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10973:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10958:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783538383562636164326233323264666334336538383630663963303138636635", + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10978:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117666465924103849245162796602282314997_by_1", + "typeString": "int_const 1176...(31 digits omitted)...4997" + }, + "value": "0x5885bcad2b322dfc43e8860f9c018cf5" + }, + "src": "10958:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4257, + "nodeType": "ExpressionStatement", + "src": "10958:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4258, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11023:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4260, + "indexExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 4259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11038:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11023:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783537376239376161316665323232626234353266646631313162316630626532", + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11043:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116284564269392660122793483482959907810_by_1", + "typeString": "int_const 1162...(31 digits omitted)...7810" + }, + "value": "0x577b97aa1fe222bb452fdf111b1f0be2" + }, + "src": "11023:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4263, + "nodeType": "ExpressionStatement", + "src": "11023:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4264, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11088:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4266, + "indexExpression": { + "argumentTypes": null, + "hexValue": "39", + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11103:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_9_by_1", + "typeString": "int_const 9" + }, + "value": "9" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11088:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783536373963623565333537353633326535626161323765326239343966373034", + "id": 4267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11108:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114946000350526915053586759724674184964_by_1", + "typeString": "int_const 1149...(31 digits omitted)...4964" + }, + "value": "0x5679cb5e3575632e5baa27e2b949f704" + }, + "src": "11088:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4269, + "nodeType": "ExpressionStatement", + "src": "11088:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4270, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11153:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4272, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 4271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11153:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783535376665383234316233613331633833633733326631636466663461316335", + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11173:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113648509722420118059077800055408992709_by_1", + "typeString": "int_const 1136...(31 digits omitted)...2709" + }, + "value": "0x557fe8241b3a31c83c732f1cdff4a1c5" + }, + "src": "11153:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4275, + "nodeType": "ExpressionStatement", + "src": "11153:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4276, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11218:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4278, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3131", + "id": 4277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11232:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_11_by_1", + "typeString": "int_const 11" + }, + "value": "11" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11218:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783534386438363830323635303438373564366535396262653935666332613662", + "id": 4279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11238:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112389993498935521792135674271903787627_by_1", + "typeString": "int_const 1123...(31 digits omitted)...7627" + }, + "value": "0x548d868026504875d6e59bbe95fc2a6b" + }, + "src": "11218:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4281, + "nodeType": "ExpressionStatement", + "src": "11218:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4282, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11283:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4284, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3132", + "id": 4283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11297:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12_by_1", + "typeString": "int_const 12" + }, + "value": "12" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11283:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783533613234363563653334376366333464303561383637633137646433303838", + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11303:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111168502869233775922830736618948472968_by_1", + "typeString": "int_const 1111...(31 digits omitted)...2968" + }, + "value": "0x53a2465ce347cf34d05a867c17dd3088" + }, + "src": "11283:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4287, + "nodeType": "ExpressionStatement", + "src": "11283:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4288, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11348:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4290, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3133", + "id": 4289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11362:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13_by_1", + "typeString": "int_const 13" + }, + "value": "13" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11348:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783532626463653564636434666165643539633766353531316366386638616363", + "id": 4291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11368:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109982225368764407855921799421290842828_by_1", + "typeString": "int_const 1099...(31 digits omitted)...2828" + }, + "value": "0x52bdce5dcd4faed59c7f5511cf8f8acc" + }, + "src": "11348:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4293, + "nodeType": "ExpressionStatement", + "src": "11348:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4294, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11413:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4296, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3134", + "id": 4295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11427:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_14_by_1", + "typeString": "int_const 14" + }, + "value": "14" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11413:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783531646663623435336330376638646138313736303665373838356637633365", + "id": 4297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11433:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108829472672502945287330645348712414270_by_1", + "typeString": "int_const 1088...(31 digits omitted)...4270" + }, + "value": "0x51dfcb453c07f8da817606e7885f7c3e" + }, + "src": "11413:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4299, + "nodeType": "ExpressionStatement", + "src": "11413:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4300, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11478:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4302, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3135", + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11492:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "15" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11478:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783531303765663662306135613262653866386666313535393064616133636365", + "id": 4303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11498:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107708669713100452055447769980296903886_by_1", + "typeString": "int_const 1077...(31 digits omitted)...3886" + }, + "value": "0x5107ef6b0a5a2be8f8ff15590daa3cce" + }, + "src": "11478:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4305, + "nodeType": "ExpressionStatement", + "src": "11478:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4306, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11543:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4308, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3136", + "id": 4307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11557:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16_by_1", + "typeString": "int_const 16" + }, + "value": "16" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11543:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783530333566323431643665616530636437626163626131313939393364653762", + "id": 4309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11563:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106618344955764005172185288135427743355_by_1", + "typeString": "int_const 1066...(31 digits omitted)...3355" + }, + "value": "0x5035f241d6eae0cd7bacba119993de7b" + }, + "src": "11543:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4311, + "nodeType": "ExpressionStatement", + "src": "11543:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4312, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11608:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4314, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3137", + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11622:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_17_by_1", + "typeString": "int_const 17" + }, + "value": "17" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11608:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783466363938666539306435623533643533323137316531323130313634633636", + "id": 4315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11628:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105557121686023412139304113347686190182_by_1", + "typeString": "int_const 1055...(31 digits omitted)...0182" + }, + "value": "0x4f698fe90d5b53d532171e1210164c66" + }, + "src": "11608:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4317, + "nodeType": "ExpressionStatement", + "src": "11608:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4318, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11673:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4320, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3138", + "id": 4319, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11687:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11673:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783465613238386361323937613065366130396130656565323430653136633835", + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11693:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104523710186937447092740323392662629509_by_1", + "typeString": "int_const 1045...(31 digits omitted)...9509" + }, + "value": "0x4ea288ca297a0e6a09a0eee240e16c85" + }, + "src": "11673:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4323, + "nodeType": "ExpressionStatement", + "src": "11673:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4324, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11738:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4326, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3139", + "id": 4325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11752:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19_by_1", + "typeString": "int_const 19" + }, + "value": "19" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11738:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783464653061313366646366356434323133666333393862613665336265636465", + "id": 4327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11758:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103516900699454640661508604755841903838_by_1", + "typeString": "int_const 1035...(31 digits omitted)...3838" + }, + "value": "0x4de0a13fdcf5d4213fc398ba6e3becde" + }, + "src": "11738:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4329, + "nodeType": "ExpressionStatement", + "src": "11738:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4330, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11803:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4332, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3230", + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11817:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11803:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783464323361313435656566393166656330366230363134303830346334383038", + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11823:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102535557074135248197607991940341319688_by_1", + "typeString": "int_const 1025...(31 digits omitted)...9688" + }, + "value": "0x4d23a145eef91fec06b06140804c4808" + }, + "src": "11803:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4335, + "nodeType": "ExpressionStatement", + "src": "11803:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4336, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11868:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4338, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 4337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11868:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783463366235343330643463316565353532363437336462346165306631316465", + "id": 4339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11888:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101578611034720610581211104132006351326_by_1", + "typeString": "int_const 1015...(31 digits omitted)...1326" + }, + "value": "0x4c6b5430d4c1ee5526473db4ae0f11de" + }, + "src": "11868:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4341, + "nodeType": "ExpressionStatement", + "src": "11868:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4342, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11933:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4344, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3232", + "id": 4343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11947:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_22_by_1", + "typeString": "int_const 22" + }, + "value": "22" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11933:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783462623738383663323430353632656261313166343936336135336234323430", + "id": 4345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11953:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100645056984476184212709480501843018304_by_1", + "typeString": "int_const 1006...(31 digits omitted)...8304" + }, + "value": "0x4bb7886c240562eba11f4963a53b4240" + }, + "src": "11933:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4347, + "nodeType": "ExpressionStatement", + "src": "11933:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4348, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "11998:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4350, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3233", + "id": 4349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12012:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23_by_1", + "typeString": "int_const 23" + }, + "value": "23" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11998:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783462303830663366316362343931643264353231653065613435383335323165", + "id": 4351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12018:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99733947295139137817365771348103877150_by_1", + "typeString": "int_const 9973...(30 digits omitted)...7150" + }, + "value": "0x4b080f3f1cb491d2d521e0ea4583521e" + }, + "src": "11998:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4353, + "nodeType": "ExpressionStatement", + "src": "11998:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4354, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12063:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4356, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3234", + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12077:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24_by_1", + "typeString": "int_const 24" + }, + "value": "24" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12063:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783461356362633936613035353839636234643836626531646233313638333634", + "id": 4357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12083:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98844388025919853370962885240683922276_by_1", + "typeString": "int_const 9884...(30 digits omitted)...2276" + }, + "value": "0x4a5cbc96a05589cb4d86be1db3168364" + }, + "src": "12063:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4359, + "nodeType": "ExpressionStatement", + "src": "12063:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4360, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12128:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4362, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3235", + "id": 4361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12142:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_25_by_1", + "typeString": "int_const 25" + }, + "value": "25" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12128:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783439623536366434303234333531373635386437386333333136326436656365", + "id": 4363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12148:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97975535026544040761524270664520658638_by_1", + "typeString": "int_const 9797...(30 digits omitted)...8638" + }, + "value": "0x49b566d40243517658d78c33162d6ece" + }, + "src": "12128:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4365, + "nodeType": "ExpressionStatement", + "src": "12128:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4366, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12193:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4368, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3236", + "id": 4367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12207:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26_by_1", + "typeString": "int_const 26" + }, + "value": "26" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12193:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783439313165366130326535353037613330663934373338336664396133323736", + "id": 4369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12213:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97126590383947898169110886634107843190_by_1", + "typeString": "int_const 9712...(30 digits omitted)...3190" + }, + "value": "0x4911e6a02e5507a30f947383fd9a3276" + }, + "src": "12193:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4371, + "nodeType": "ExpressionStatement", + "src": "12193:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4372, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12258:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4374, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3237", + "id": 4373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12272:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_27_by_1", + "typeString": "int_const 27" + }, + "value": "27" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12258:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783438373231366332623331626534616463343164623861386435636330633838", + "id": 4375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12278:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96296799177093258962884240470124006536_by_1", + "typeString": "int_const 9629...(30 digits omitted)...6536" + }, + "value": "0x487216c2b31be4adc41db8a8d5cc0c88" + }, + "src": "12258:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4377, + "nodeType": "ExpressionStatement", + "src": "12258:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4378, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12323:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4380, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3238", + "id": 4379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12337:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_28_by_1", + "typeString": "int_const 28" + }, + "value": "28" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12323:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783437643564336663346137613162313838636433643738386235633565396663", + "id": 4381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12343:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95485446508569776991656929903084169724_by_1", + "typeString": "int_const 9548...(30 digits omitted)...9724" + }, + "value": "0x47d5d3fc4a7a1b188cd3d788b5c5e9fc" + }, + "src": "12323:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4383, + "nodeType": "ExpressionStatement", + "src": "12323:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4384, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12388:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4386, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3239", + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12402:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_29_by_1", + "typeString": "int_const 29" + }, + "value": "29" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12388:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783437336366636534383731613263343062633466396531633332623935356430", + "id": 4387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12408:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94691854785294407482575606759428806096_by_1", + "typeString": "int_const 9469...(30 digits omitted)...6096" + }, + "value": "0x473cfce4871a2c40bc4f9e1c32b955d0" + }, + "src": "12388:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4389, + "nodeType": "ExpressionStatement", + "src": "12388:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4390, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12453:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4392, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3330", + "id": 4391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12467:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30_by_1", + "typeString": "int_const 30" + }, + "value": "30" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12453:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783436613737316361353738616238373834383538313065323835653331633637", + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12473:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93915381223786366589204098840684338279_by_1", + "typeString": "int_const 9391...(30 digits omitted)...8279" + }, + "value": "0x46a771ca578ab878485810e285e31c67" + }, + "src": "12453:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4395, + "nodeType": "ExpressionStatement", + "src": "12453:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4396, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12518:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4398, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3331", + "id": 4397, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12532:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_31_by_1", + "typeString": "int_const 31" + }, + "value": "31" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12518:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783436313531343937313861656434633235386333373364633637366161373264", + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12538:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93155415558256953225873119289193178925_by_1", + "typeString": "int_const 9315...(30 digits omitted)...8925" + }, + "value": "0x4615149718aed4c258c373dc676aa72d" + }, + "src": "12518:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4401, + "nodeType": "ExpressionStatement", + "src": "12518:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4402, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12583:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4404, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12597:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12583:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783435383563386233663866653438396336653138333363613437383731333834", + "id": 4405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12603:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92411377932165840182246144520510444420_by_1", + "typeString": "int_const 9241...(30 digits omitted)...4420" + }, + "value": "0x4585c8b3f8fe489c6e1833ca47871384" + }, + "src": "12583:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4407, + "nodeType": "ExpressionStatement", + "src": "12583:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4408, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12648:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4410, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3333", + "id": 4409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "33" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12648:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783434663937326631373465343165356566623765396436336332396365373335", + "id": 4411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12668:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91682716956007473314355351160117585717_by_1", + "typeString": "int_const 9168...(30 digits omitted)...5717" + }, + "value": "0x44f972f174e41e5efb7e9d63c29ce735" + }, + "src": "12648:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4413, + "nodeType": "ExpressionStatement", + "src": "12648:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4414, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12713:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4416, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3334", + "id": 4415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12727:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_34_by_1", + "typeString": "int_const 34" + }, + "value": "34" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12713:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783434366666393730626138366438623030626562303565636562663363346463", + "id": 4417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12733:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90968907915944387253011725111639917788_by_1", + "typeString": "int_const 9096...(30 digits omitted)...7788" + }, + "value": "0x446ff970ba86d8b00beb05ecebf3c4dc" + }, + "src": "12713:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4419, + "nodeType": "ExpressionStatement", + "src": "12713:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4420, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12778:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4422, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3335", + "id": 4421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12792:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35_by_1", + "typeString": "int_const 35" + }, + "value": "35" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12778:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783433653934333865633838393731383132643666313938623563636161643936", + "id": 4423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12798:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90269451119533660821329652693370318230_by_1", + "typeString": "int_const 9026...(30 digits omitted)...8230" + }, + "value": "0x43e9438ec88971812d6f198b5ccaad96" + }, + "src": "12778:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4425, + "nodeType": "ExpressionStatement", + "src": "12778:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4426, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12843:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4428, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3336", + "id": 4427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12857:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_36_by_1", + "typeString": "int_const 36" + }, + "value": "36" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12843:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783433363533396431316666376265613635376165646462333934653830396566", + "id": 4429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12863:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89583870366228295001513378307654552047_by_1", + "typeString": "int_const 8958...(30 digits omitted)...2047" + }, + "value": "0x436539d11ff7bea657aeddb394e809ef" + }, + "src": "12843:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4431, + "nodeType": "ExpressionStatement", + "src": "12843:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4432, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12908:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4434, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3337", + "id": 4433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12922:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_37_by_1", + "typeString": "int_const 37" + }, + "value": "37" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12908:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783432653363356433653561393133343031643836663636646235643831633263", + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12928:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88911711531602529992461785625724984364_by_1", + "typeString": "int_const 8891...(30 digits omitted)...4364" + }, + "value": "0x42e3c5d3e5a913401d86f66db5d81c2c" + }, + "src": "12908:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4437, + "nodeType": "ExpressionStatement", + "src": "12908:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4438, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "12973:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4440, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3338", + "id": 4439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12987:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_38_by_1", + "typeString": "int_const 38" + }, + "value": "38" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12973:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783432363464323339353330333037306561373236636265393864663632313734", + "id": 4441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12993:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88252541255370876457855407534749655412_by_1", + "typeString": "int_const 8825...(30 digits omitted)...5412" + }, + "value": "0x4264d2395303070ea726cbe98df62174" + }, + "src": "12973:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4443, + "nodeType": "ExpressionStatement", + "src": "12973:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4444, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13038:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4446, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 4445, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13052:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13038:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783431653834613961353933626237313934633361363334396563616534656561", + "id": 4447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13058:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87605945724263666326070648659277401834_by_1", + "typeString": "int_const 8760...(30 digits omitted)...1834" + }, + "value": "0x41e84a9a593bb7194c3a6349ecae4eea" + }, + "src": "13038:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4449, + "nodeType": "ExpressionStatement", + "src": "13038:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4450, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13103:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4452, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3430", + "id": 4451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13117:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13103:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783431366531623738356431336562613037613038663366313838373661356162", + "id": 4453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13123:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86971529541703351305061613312515941803_by_1", + "typeString": "int_const 8697...(30 digits omitted)...1803" + }, + "value": "0x416e1b785d13eba07a08f3f18876a5ab" + }, + "src": "13103:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4455, + "nodeType": "ExpressionStatement", + "src": "13103:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4456, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13168:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4458, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3431", + "id": 4457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13182:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_41_by_1", + "typeString": "int_const 41" + }, + "value": "41" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13168:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430663633323266663338396434323362613964643765376537623765383039", + "id": 4459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13188:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86348914677009486241058826509159491593_by_1", + "typeString": "int_const 8634...(30 digits omitted)...1593" + }, + "value": "0x40f6322ff389d423ba9dd7e7e7b7e809" + }, + "src": "13168:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4461, + "nodeType": "ExpressionStatement", + "src": "13168:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4462, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13233:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4464, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3432", + "id": 4463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13247:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42_by_1", + "typeString": "int_const 42" + }, + "value": "42" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13233:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430383037636563386134363638383065636634313834353435643234306134", + "id": 4465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13253:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85737739487558329642902199100859629732_by_1", + "typeString": "int_const 8573...(30 digits omitted)...9732" + }, + "value": "0x40807cec8a466880ecf4184545d240a4" + }, + "src": "13233:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4467, + "nodeType": "ExpressionStatement", + "src": "13233:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4468, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13298:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4470, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3433", + "id": 4469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13312:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_43_by_1", + "typeString": "int_const 43" + }, + "value": "43" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13298:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430306365613963653838613864336165363638653865613064396266303766", + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13318:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85137657807945661495348777847187304575_by_1", + "typeString": "int_const 8513...(30 digits omitted)...4575" + }, + "value": "0x400cea9ce88a8d3ae668e8ea0d9bf07f" + }, + "src": "13298:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4473, + "nodeType": "ExpressionStatement", + "src": "13298:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4474, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13363:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4476, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3434", + "id": 4475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13377:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_44_by_1", + "typeString": "int_const 44" + }, + "value": "44" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13363:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783366396236616538373732643463353530393165306564376466656130616331", + "id": 4477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13383:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84548338100757766960858976604962556609_by_1", + "typeString": "int_const 8454...(30 digits omitted)...6609" + }, + "value": "0x3f9b6ae8772d4c55091e0ed7dfea0ac1" + }, + "src": "13363:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4479, + "nodeType": "ExpressionStatement", + "src": "13363:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4480, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13428:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4482, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3435", + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13442:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_45_by_1", + "typeString": "int_const 45" + }, + "value": "45" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13428:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783366326265653235336664383435393466353462636161666163333833613133", + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13448:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83969462664053391893170430711084628499_by_1", + "typeString": "int_const 8396...(30 digits omitted)...8499" + }, + "value": "0x3f2bee253fd84594f54bcaafac383a13" + }, + "src": "13428:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4485, + "nodeType": "ExpressionStatement", + "src": "13428:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4486, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13493:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4488, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3436", + "id": 4487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13507:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_46_by_1", + "typeString": "int_const 46" + }, + "value": "46" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13493:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783365626536353465393532303862623932313063353735633038316335393538", + "id": 4489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13513:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83400726891105658214366213255032756568_by_1", + "typeString": "int_const 8340...(30 digits omitted)...6568" + }, + "value": "0x3ebe654e95208bb9210c575c081c5958" + }, + "src": "13493:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4491, + "nodeType": "ExpressionStatement", + "src": "13493:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4492, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13558:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4494, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3437", + "id": 4493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13572:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_47_by_1", + "typeString": "int_const 47" + }, + "value": "47" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13558:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783365353263316663353636353633356237386365316630356164353363303836", + "id": 4495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13578:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82841838578353379906637631327369937030_by_1", + "typeString": "int_const 8284...(30 digits omitted)...7030" + }, + "value": "0x3e52c1fc5665635b78ce1f05ad53c086" + }, + "src": "13558:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4497, + "nodeType": "ExpressionStatement", + "src": "13558:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4498, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13623:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4500, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13637:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13623:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364653866363561633338383130316464663731386136663563316566663635", + "id": 4501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13643:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82292517277871139787215964642962505573_by_1", + "typeString": "int_const 8229...(30 digits omitted)...5573" + }, + "value": "0x3de8f65ac388101ddf718a6f5c1eff65" + }, + "src": "13623:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4503, + "nodeType": "ExpressionStatement", + "src": "13623:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4504, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13688:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4506, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3439", + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13702:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_49_by_1", + "typeString": "int_const 49" + }, + "value": "49" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13688:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364383066353232643539626430623332386361303132646634636432643439", + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13708:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81752493690991422478947035708677500233_by_1", + "typeString": "int_const 8175...(30 digits omitted)...0233" + }, + "value": "0x3d80f522d59bd0b328ca012df4cd2d49" + }, + "src": "13688:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4509, + "nodeType": "ExpressionStatement", + "src": "13688:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4510, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13753:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4512, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3530", + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13767:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13753:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783364316162313933313239656137326232333634386131363131363361383561", + "id": 4513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13773:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81221509100004039595242960659394308186_by_1", + "typeString": "int_const 8122...(30 digits omitted)...8186" + }, + "value": "0x3d1ab193129ea72b23648a161163a85a" + }, + "src": "13753:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4515, + "nodeType": "ExpressionStatement", + "src": "13753:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4516, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13818:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4518, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3531", + "id": 4517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13832:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51_by_1", + "typeString": "int_const 51" + }, + "value": "51" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13818:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783363623631663638643332353736633133356239356366623533663736643735", + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13838:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80699314835121533818862589255787965813_by_1", + "typeString": "int_const 8069...(30 digits omitted)...5813" + }, + "value": "0x3cb61f68d32576c135b95cfb53f76d75" + }, + "src": "13818:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "13818:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4522, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13883:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4524, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3532", + "id": 4523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13897:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_52_by_1", + "typeString": "int_const 52" + }, + "value": "52" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13883:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783363353333326439663161616538353161333631396537376534636338343733", + "id": 4525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13903:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80185671774137293097540719362983101555_by_1", + "typeString": "int_const 8018...(30 digits omitted)...1555" + }, + "value": "0x3c5332d9f1aae851a3619e77e4cc8473" + }, + "src": "13883:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4527, + "nodeType": "ExpressionStatement", + "src": "13883:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4528, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "13948:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4530, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3533", + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13962:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_53_by_1", + "typeString": "int_const 53" + }, + "value": "53" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13948:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362663165303865646265326161313039653135323566363537353965663733", + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13968:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79680349872418462454459890475122421619_by_1", + "typeString": "int_const 7968...(30 digits omitted)...1619" + }, + "value": "0x3bf1e08edbe2aa109e1525f65759ef73" + }, + "src": "13948:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4533, + "nodeType": "ExpressionStatement", + "src": "13948:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4534, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14013:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4536, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3534", + "id": 4535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14027:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_54_by_1", + "typeString": "int_const 54" + }, + "value": "54" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14013:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362393231643963666631336661326331393737343661336466633439313866", + "id": 4537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14033:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79183127721070807958897168260236874127_by_1", + "typeString": "int_const 7918...(30 digits omitted)...4127" + }, + "value": "0x3b921d9cff13fa2c197746a3dfc4918f" + }, + "src": "14013:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4539, + "nodeType": "ExpressionStatement", + "src": "14013:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4540, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14078:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4542, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3535", + "id": 4541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14092:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_55_by_1", + "typeString": "int_const 55" + }, + "value": "55" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14078:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783362333364663831383931306266633161356165666238663633616532616334", + "id": 4543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14098:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78693792131289586075780460739283528388_by_1", + "typeString": "int_const 7869...(30 digits omitted)...8388" + }, + "value": "0x3b33df818910bfc1a5aefb8f63ae2ac4" + }, + "src": "14078:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4545, + "nodeType": "ExpressionStatement", + "src": "14078:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4546, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14143:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4548, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3536", + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14157:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56_by_1", + "typeString": "int_const 56" + }, + "value": "56" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14143:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361643731633163373765333466613332613966313834393637656363626636", + "id": 4549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14163:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78212137743071079621363404241290185718_by_1", + "typeString": "int_const 7821...(30 digits omitted)...5718" + }, + "value": "0x3ad71c1c77e34fa32a9f184967eccbf6" + }, + "src": "14143:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4551, + "nodeType": "ExpressionStatement", + "src": "14143:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4552, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14208:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4554, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3537", + "id": 4553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14222:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57_by_1", + "typeString": "int_const 57" + }, + "value": "57" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14208:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361376263396162663263356262353365326637333834613861313635323161", + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14228:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77737966656605443744883248223254630938_by_1", + "typeString": "int_const 7773...(30 digits omitted)...0938" + }, + "value": "0x3a7bc9abf2c5bb53e2f7384a8a16521a" + }, + "src": "14208:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4557, + "nodeType": "ExpressionStatement", + "src": "14208:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4558, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14273:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4560, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3538", + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14287:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58_by_1", + "typeString": "int_const 58" + }, + "value": "58" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14273:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783361323164656337653736333639373833613638613063363338356131633537", + "id": 4561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14293:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77271088084804339940770953226756955223_by_1", + "typeString": "int_const 7727...(30 digits omitted)...5223" + }, + "value": "0x3a21dec7e76369783a68a0c6385a1c57" + }, + "src": "14273:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4563, + "nodeType": "ExpressionStatement", + "src": "14273:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4564, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14338:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4566, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3539", + "id": 4565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14352:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59_by_1", + "typeString": "int_const 59" + }, + "value": "59" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14338:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339633935323564653663396364663763316331353763613461376136656533", + "id": 4567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14358:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76811318025537837376498009672859152099_by_1", + "typeString": "int_const 7681...(30 digits omitted)...2099" + }, + "value": "0x39c9525de6c9cdf7c1c157ca4a7a6ee3" + }, + "src": "14338:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4569, + "nodeType": "ExpressionStatement", + "src": "14338:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4570, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14403:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4572, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3630", + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14417:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "60" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14403:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339373231626164336463383564313234306666303139306530616461616333", + "id": 4573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14423:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76358478952265398947834068366573546179_by_1", + "typeString": "int_const 7635...(30 digits omitted)...6179" + }, + "value": "0x39721bad3dc85d1240ff0190e0adaac3" + }, + "src": "14403:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4575, + "nodeType": "ExpressionStatement", + "src": "14403:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4576, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14468:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4578, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3631", + "id": 4577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14482:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61_by_1", + "typeString": "int_const 61" + }, + "value": "61" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14468:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783339316333323433343464333234386630343639656232386464336437376530", + "id": 4579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14488:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75912399521846487627533653549497808864_by_1", + "typeString": "int_const 7591...(30 digits omitted)...8864" + }, + "value": "0x391c324344d3248f0469eb28dd3d77e0" + }, + "src": "14468:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4581, + "nodeType": "ExpressionStatement", + "src": "14468:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4582, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14533:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4584, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3632", + "id": 4583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14547:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62_by_1", + "typeString": "int_const 62" + }, + "value": "62" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14533:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338633738646637653363373936323739666234666638343339346162336461", + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14553:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75472914298408358042964121331947975642_by_1", + "typeString": "int_const 7547...(30 digits omitted)...5642" + }, + "value": "0x38c78df7e3c796279fb4ff84394ab3da" + }, + "src": "14533:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4587, + "nodeType": "ExpressionStatement", + "src": "14533:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4588, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14598:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4590, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3633", + "id": 4589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14612:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63_by_1", + "typeString": "int_const 63" + }, + "value": "63" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14598:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338373432366561343633386165396161653038303439643335353463323061", + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14618:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75039863492232771067353298784442696202_by_1", + "typeString": "int_const 7503...(30 digits omitted)...6202" + }, + "value": "0x387426ea4638ae9aae08049d3554c20a" + }, + "src": "14598:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4593, + "nodeType": "ExpressionStatement", + "src": "14598:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4594, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14663:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4596, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 4595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14677:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14663:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783338323166353764626432373633323536633161393962626432303531333738", + "id": 4597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14683:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74613092712700430304450998910501327736_by_1", + "typeString": "int_const 7461...(30 digits omitted)...7736" + }, + "value": "0x3821f57dbd2763256c1a99bbd2051378" + }, + "src": "14663:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4599, + "nodeType": "ExpressionStatement", + "src": "14663:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4600, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14728:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4602, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3635", + "id": 4601, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14742:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65_by_1", + "typeString": "int_const 65" + }, + "value": "65" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14728:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337643066323536636234366138633932666636326662626566323839363938", + "id": 4603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14748:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74192452734402555957346115989134677656_by_1", + "typeString": "int_const 7419...(30 digits omitted)...7656" + }, + "value": "0x37d0f256cb46a8c92ff62fbbef289698" + }, + "src": "14728:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4605, + "nodeType": "ExpressionStatement", + "src": "14728:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4606, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14793:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4608, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3636", + "id": 4607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14807:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66_by_1", + "typeString": "int_const 66" + }, + "value": "66" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14793:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337383131363538353931666663376162646431666561663363656639623733", + "id": 4609, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14813:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73777799275593782240843075749260794739_by_1", + "typeString": "int_const 7377...(30 digits omitted)...4739" + }, + "value": "0x37811658591ffc7abdd1feaf3cef9b73" + }, + "src": "14793:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4611, + "nodeType": "ExpressionStatement", + "src": "14793:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4612, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14858:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4614, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3637", + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14872:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67_by_1", + "typeString": "int_const 67" + }, + "value": "67" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14858:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783337333235616131306539653832663764663066333830663739393731353462", + "id": 4615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14878:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73368992788220026735092049811183441227_by_1", + "typeString": "int_const 7336...(30 digits omitted)...1227" + }, + "value": "0x37325aa10e9e82f7df0f380f7997154b" + }, + "src": "14858:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4617, + "nodeType": "ExpressionStatement", + "src": "14858:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4618, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14923:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4620, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3638", + "id": 4619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14937:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68_by_1", + "typeString": "int_const 68" + }, + "value": "68" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14923:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336653462383838636662343038643837336239613830643433393331316336", + "id": 4621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14943:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72965898258809617135734979750291247558_by_1", + "typeString": "int_const 7296...(30 digits omitted)...7558" + }, + "value": "0x36e4b888cfb408d873b9a80d439311c6" + }, + "src": "14923:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4623, + "nodeType": "ExpressionStatement", + "src": "14923:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4624, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "14988:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4626, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3639", + "id": 4625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15002:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69_by_1", + "typeString": "int_const 69" + }, + "value": "69" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14988:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336393832393965353966346262396465363435666339623038633634636361", + "id": 4627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15008:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72568385019566207677944681290529131722_by_1", + "typeString": "int_const 7256...(30 digits omitted)...1722" + }, + "value": "0x3698299e59f4bb9de645fc9b08c64cca" + }, + "src": "14988:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4629, + "nodeType": "ExpressionStatement", + "src": "14988:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4630, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15053:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4632, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3730", + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15067:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70_by_1", + "typeString": "int_const 70" + }, + "value": "70" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15053:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336346361376135303132636236303330323362353764643365626664353064", + "id": 4633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15073:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72176326569048265991235723170299237645_by_1", + "typeString": "int_const 7217...(30 digits omitted)...7645" + }, + "value": "0x364ca7a5012cb603023b57dd3ebfd50d" + }, + "src": "15053:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4635, + "nodeType": "ExpressionStatement", + "src": "15053:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4636, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15118:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4638, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3731", + "id": 4637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15132:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71_by_1", + "typeString": "int_const 71" + }, + "value": "71" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15118:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783336303232633932383931356237373861623162303661616565376536316434", + "id": 4639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15138:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71789600401862514754895875938526847444_by_1", + "typeString": "int_const 7178...(30 digits omitted)...7444" + }, + "value": "0x36022c928915b778ab1b06aaee7e61d4" + }, + "src": "15118:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4641, + "nodeType": "ExpressionStatement", + "src": "15118:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4642, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15183:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4644, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3732", + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15197:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72_by_1", + "typeString": "int_const 72" + }, + "value": "72" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15183:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335623862323864316137336463323735303066666533353535396363303238", + "id": 4645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15203:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71408087846837990426587462311123664936_by_1", + "typeString": "int_const 7140...(30 digits omitted)...4936" + }, + "value": "0x35b8b28d1a73dc27500ffe35559cc028" + }, + "src": "15183:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4647, + "nodeType": "ExpressionStatement", + "src": "15183:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4648, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15248:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4650, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3733", + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15262:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_73_by_1", + "typeString": "int_const 73" + }, + "value": "73" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15248:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335373033336539353166653235306563356562346536303935353133326437", + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15268:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71031673913183621970866398796903953111_by_1", + "typeString": "int_const 7103...(30 digits omitted)...3111" + }, + "value": "0x357033e951fe250ec5eb4e60955132d7" + }, + "src": "15248:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4653, + "nodeType": "ExpressionStatement", + "src": "15248:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4654, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15313:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4656, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3734", + "id": 4655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15327:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_74_by_1", + "typeString": "int_const 74" + }, + "value": "74" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15313:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783335323861623238363739333465336132316235343132653463346638383831", + "id": 4657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15333:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70660247144165696899266624685710739585_by_1", + "typeString": "int_const 7066...(30 digits omitted)...9585" + }, + "value": "0x3528ab2867934e3a21b5412e4c4f8881" + }, + "src": "15313:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4659, + "nodeType": "ExpressionStatement", + "src": "15313:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4660, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15378:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4662, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3735", + "id": 4661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15392:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75_by_1", + "typeString": "int_const 75" + }, + "value": "75" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15378:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334653231326636366335353035376639363736633830303934613631643539", + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15398:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_70293699477872506394924034036542610777_by_1", + "typeString": "int_const 7029...(30 digits omitted)...0777" + }, + "value": "0x34e212f66c55057f9676c80094a61d59" + }, + "src": "15378:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4665, + "nodeType": "ExpressionStatement", + "src": "15378:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4666, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15443:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4668, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3736", + "id": 4667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15457:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76_by_1", + "typeString": "int_const 76" + }, + "value": "76" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15443:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334396336363238396535623363346235343063323466343266613462396262", + "id": 4669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15463:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69931926114662060074913956973764721083_by_1", + "typeString": "int_const 6993...(30 digits omitted)...1083" + }, + "value": "0x349c66289e5b3c4b540c24f42fa4b9bb" + }, + "src": "15443:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4671, + "nodeType": "ExpressionStatement", + "src": "15443:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4672, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15508:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4674, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3737", + "id": 4673, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15522:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_77_by_1", + "typeString": "int_const 77" + }, + "value": "77" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15508:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334353739666262643063373333613963386436616636623066376430306637", + "id": 4675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15528:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69574825390915228431314065557192245495_by_1", + "typeString": "int_const 6957...(30 digits omitted)...5495" + }, + "value": "0x34579fbbd0c733a9c8d6af6b0f7d00f7" + }, + "src": "15508:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4677, + "nodeType": "ExpressionStatement", + "src": "15508:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4678, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15573:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4680, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3738", + "id": 4679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15587:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_78_by_1", + "typeString": "int_const 78" + }, + "value": "78" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15573:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783334313362616432653731323238386239323462353838326235623336396266", + "id": 4681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15593:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_69222298658741183724931927301015431615_by_1", + "typeString": "int_const 6922...(30 digits omitted)...1615" + }, + "value": "0x3413bad2e712288b924b5882b5b369bf" + }, + "src": "15573:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4683, + "nodeType": "ExpressionStatement", + "src": "15573:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4684, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15638:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4686, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3739", + "id": 4685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15652:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_79_by_1", + "typeString": "int_const 79" + }, + "value": "79" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15638:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333643062326235363238363531306566373330653231336637316631326539", + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15658:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68874250171304728554080761972223054569_by_1", + "typeString": "int_const 6887...(30 digits omitted)...4569" + }, + "value": "0x33d0b2b56286510ef730e213f71f12e9" + }, + "src": "15638:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4689, + "nodeType": "ExpressionStatement", + "src": "15638:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4690, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15703:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4692, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3830", + "id": 4691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15717:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_80_by_1", + "typeString": "int_const 80" + }, + "value": "80" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15703:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333386538326365303065323439363236326336343435373533356261316131", + "id": 4693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15723:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68530586973466171479838674269845037473_by_1", + "typeString": "int_const 6853...(30 digits omitted)...7473" + }, + "value": "0x338e82ce00e2496262c64457535ba1a1" + }, + "src": "15703:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4695, + "nodeType": "ExpressionStatement", + "src": "15703:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4696, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15768:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4698, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3831", + "id": 4697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15782:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81_by_1", + "typeString": "int_const 81" + }, + "value": "81" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15768:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333346432366139366233373362623763326638656131383237663237613932", + "id": 4699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15788:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_68191218797443963900028789779252542098_by_1", + "typeString": "int_const 6819...(30 digits omitted)...2098" + }, + "value": "0x334d26a96b373bb7c2f8ea1827f27a92" + }, + "src": "15768:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4701, + "nodeType": "ExpressionStatement", + "src": "15768:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4702, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15833:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4704, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3832", + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15847:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_82_by_1", + "typeString": "int_const 82" + }, + "value": "82" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15833:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783333306339396634663432313134363965303062336531386333313437356561", + "id": 4705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15853:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67856057963228472984547093013750642154_by_1", + "typeString": "int_const 6785...(30 digits omitted)...2154" + }, + "value": "0x330c99f4f4211469e00b3e18c31475ea" + }, + "src": "15833:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4707, + "nodeType": "ExpressionStatement", + "src": "15833:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4708, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15898:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4710, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3833", + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15912:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_83_by_1", + "typeString": "int_const 83" + }, + "value": "83" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15898:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332636364383764363438363039343939396337643565366633333233376438", + "id": 4711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15918:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67525019283492142426218937050010367960_by_1", + "typeString": "int_const 6752...(30 digits omitted)...7960" + }, + "value": "0x32ccd87d6486094999c7d5e6f33237d8" + }, + "src": "15898:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4713, + "nodeType": "ExpressionStatement", + "src": "15898:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4714, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "15963:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4716, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3834", + "id": 4715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15977:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_84_by_1", + "typeString": "int_const 84" + }, + "value": "84" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "15963:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332386464653264643631376236363635613265383535366632353063316166", + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15983:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67198019972756986907927497888446333359_by_1", + "typeString": "int_const 6719...(30 digits omitted)...3359" + }, + "value": "0x328dde2dd617b6665a2e8556f250c1af" + }, + "src": "15963:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4719, + "nodeType": "ExpressionStatement", + "src": "15963:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4720, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16028:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4722, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3835", + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16042:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85_by_1", + "typeString": "int_const 85" + }, + "value": "85" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16028:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332346661373065396164633237306638323632373535616635613939616639", + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16048:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66874979560594969707697340554641251065_by_1", + "typeString": "int_const 6687...(30 digits omitted)...1065" + }, + "value": "0x324fa70e9adc270f8262755af5a99af9" + }, + "src": "16028:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4725, + "nodeType": "ExpressionStatement", + "src": "16028:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4726, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16093:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4728, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3836", + "id": 4727, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16107:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_86_by_1", + "typeString": "int_const 86" + }, + "value": "86" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16093:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783332313232663434333131303631316361353130343066343166613665316533", + "id": 4729, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16113:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66555819808650410033300276716637708771_by_1", + "typeString": "int_const 6655...(30 digits omitted)...8771" + }, + "value": "0x32122f443110611ca51040f41fa6e1e3" + }, + "src": "16093:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4731, + "nodeType": "ExpressionStatement", + "src": "16093:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4732, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16158:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4734, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3837", + "id": 4733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16172:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_87_by_1", + "typeString": "int_const 87" + }, + "value": "87" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16158:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331643537333065343263303833313438326630663134383563343236336438", + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16178:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_66240464631286234612917249162896106456_by_1", + "typeString": "int_const 6624...(30 digits omitted)...6456" + }, + "value": "0x31d5730e42c0831482f0f1485c4263d8" + }, + "src": "16158:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4737, + "nodeType": "ExpressionStatement", + "src": "16158:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4738, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16223:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4740, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3838", + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16237:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_88_by_1", + "typeString": "int_const 88" + }, + "value": "88" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16223:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331393936656336623037623461383334323162356562633461623465316631", + "id": 4741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16243:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65928840019667697388313232298873250289_by_1", + "typeString": "int_const 6592...(30 digits omitted)...0289" + }, + "value": "0x31996ec6b07b4a83421b5ebc4ab4e1f1" + }, + "src": "16223:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4743, + "nodeType": "ExpressionStatement", + "src": "16223:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4744, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16288:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4746, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3839", + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16302:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89_by_1", + "typeString": "int_const 89" + }, + "value": "89" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16288:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331356531656530613638666634366262343365633262383530333265383736", + "id": 4747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16308:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65620873969108206581452393912976205942_by_1", + "typeString": "int_const 6562...(30 digits omitted)...5942" + }, + "value": "0x315e1ee0a68ff46bb43ec2b85032e876" + }, + "src": "16288:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4749, + "nodeType": "ExpressionStatement", + "src": "16288:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4750, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16353:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4752, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3930", + "id": 4751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16367:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_90_by_1", + "typeString": "int_const 90" + }, + "value": "90" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16353:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783331323337666537626334646561636636373735623965666131613134356638", + "id": 4753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16373:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65316496409512179290702222053435590136_by_1", + "typeString": "int_const 6531...(30 digits omitted)...0136" + }, + "value": "0x31237fe7bc4deacf6775b9efa1a145f8" + }, + "src": "16353:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4755, + "nodeType": "ExpressionStatement", + "src": "16353:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4756, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16418:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4758, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3931", + "id": 4757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16432:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_91_by_1", + "typeString": "int_const 91" + }, + "value": "91" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16418:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330653938653766316363356133353665343436323761363937326561326666", + "id": 4759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16438:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_65015639138759444595668739676303172351_by_1", + "typeString": "int_const 6501...(30 digits omitted)...2351" + }, + "value": "0x30e98e7f1cc5a356e44627a6972ea2ff" + }, + "src": "16418:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4761, + "nodeType": "ExpressionStatement", + "src": "16418:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4762, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16483:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4764, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3932", + "id": 4763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16497:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92_by_1", + "typeString": "int_const 92" + }, + "value": "92" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16483:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330623034373630623839313765633734323035613330303236353065633035", + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16503:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64718235758884686944788529404074585093_by_1", + "typeString": "int_const 6471...(30 digits omitted)...5093" + }, + "value": "0x30b04760b8917ec74205a3002650ec05" + }, + "src": "16483:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4767, + "nodeType": "ExpressionStatement", + "src": "16483:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4768, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16548:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4770, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3933", + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16562:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_93_by_1", + "typeString": "int_const 93" + }, + "value": "93" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16548:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330373761373563383033343638653931333263653063663332323432343164", + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16568:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64424221614913808353797169251126354973_by_1", + "typeString": "int_const 6442...(30 digits omitted)...4973" + }, + "value": "0x3077a75c803468e9132ce0cf3224241d" + }, + "src": "16548:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4773, + "nodeType": "ExpressionStatement", + "src": "16548:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4774, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16613:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4776, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3934", + "id": 4775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16627:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_94_by_1", + "typeString": "int_const 94" + }, + "value": "94" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16613:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330336661623537613661323735633336663139636461396261636536363761", + "id": 4777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16633:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64133533736226932951740123178454640250_by_1", + "typeString": "int_const 6413...(30 digits omitted)...0250" + }, + "value": "0x303fab57a6a275c36f19cda9bace667a" + }, + "src": "16613:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4779, + "nodeType": "ExpressionStatement", + "src": "16613:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4780, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16678:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4782, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3935", + "id": 4781, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16692:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_95_by_1", + "typeString": "int_const 95" + }, + "value": "95" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16678:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783330303835303462656238646362643263663362633166366435613036346630", + "id": 4783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16698:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63846110780325119601596992296297981168_by_1", + "typeString": "int_const 6384...(30 digits omitted)...1168" + }, + "value": "0x3008504beb8dcbd2cf3bc1f6d5a064f0" + }, + "src": "16678:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4785, + "nodeType": "ExpressionStatement", + "src": "16678:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4786, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16743:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4788, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3936", + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16757:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16743:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266643139333436656431376461633631323139636530633263356163346230", + "id": 4789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16763:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63561892978884723546060567414717465776_by_1", + "typeString": "int_const 6356...(30 digits omitted)...5776" + }, + "value": "0x2fd19346ed17dac61219ce0c2c5ac4b0" + }, + "src": "16743:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4791, + "nodeType": "ExpressionStatement", + "src": "16743:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4792, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16808:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4794, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3937", + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16822:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_97_by_1", + "typeString": "int_const 97" + }, + "value": "97" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16808:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266396237313639383038633332346235383532666433643534626139373134", + "id": 4795, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16828:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63280822085989789325487105680707589908_by_1", + "typeString": "int_const 6328...(30 digits omitted)...9908" + }, + "value": "0x2f9b7169808c324b5852fd3d54ba9714" + }, + "src": "16808:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4797, + "nodeType": "ExpressionStatement", + "src": "16808:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4798, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16873:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4800, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3938", + "id": 4799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16887:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_98_by_1", + "typeString": "int_const 98" + }, + "value": "98" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16873:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266363565376537313163663462303634656561396330386362646164353734", + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16893:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_63002841328438895053366731000363275636_by_1", + "typeString": "int_const 6300...(30 digits omitted)...5636" + }, + "value": "0x2f65e7e711cf4b064eea9c08cbdad574" + }, + "src": "16873:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4803, + "nodeType": "ExpressionStatement", + "src": "16873:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4804, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "16938:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4806, + "indexExpression": { + "argumentTypes": null, + "hexValue": "3939", + "id": 4805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16952:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + }, + "value": "99" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16938:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783266333066343035303933303432646466663861323531623662663664313033", + "id": 4807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16958:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62727895358028530630619015085479612675_by_1", + "typeString": "int_const 6272...(30 digits omitted)...2675" + }, + "value": "0x2f30f405093042ddff8a251b6bf6d103" + }, + "src": "16938:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4809, + "nodeType": "ExpressionStatement", + "src": "16938:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4810, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17003:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4812, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17016:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17003:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265666339333161333735306632653862666533323365646665303337353734", + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17023:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62455930205720405594293470980571624820_by_1", + "typeString": "int_const 6245...(30 digits omitted)...4820" + }, + "value": "0x2efc931a3750f2e8bfe323edfe037574" + }, + "src": "17003:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4815, + "nodeType": "ExpressionStatement", + "src": "17003:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4816, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17068:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4818, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313031", + "id": 4817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17081:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101_by_1", + "typeString": "int_const 101" + }, + "value": "101" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17068:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265633863323865343664626535366439383638353237383333393430306362", + "id": 4819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17088:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_62186893237605070014470966239378538699_by_1", + "typeString": "int_const 6218...(30 digits omitted)...8699" + }, + "value": "0x2ec8c28e46dbe56d98685278339400cb" + }, + "src": "17068:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4821, + "nodeType": "ExpressionStatement", + "src": "17068:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4822, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17133:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4824, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313032", + "id": 4823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17146:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_102_by_1", + "typeString": "int_const 102" + }, + "value": "102" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17133:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265393537666439333363333932366438613539396236303233373962383531", + "id": 4825, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17153:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61920733112578916349615492109849704529_by_1", + "typeString": "int_const 6192...(30 digits omitted)...4529" + }, + "value": "0x2e957fd933c3926d8a599b602379b851" + }, + "src": "17133:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4827, + "nodeType": "ExpressionStatement", + "src": "17133:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4828, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17198:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4830, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313033", + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17211:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_103_by_1", + "typeString": "int_const 103" + }, + "value": "103" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17198:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265363263383832633763396564343437333431323730326630386261306535", + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17218:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61657399741656031957349998364069699813_by_1", + "typeString": "int_const 6165...(30 digits omitted)...9813" + }, + "value": "0x2e62c882c7c9ed4473412702f08ba0e5" + }, + "src": "17198:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4833, + "nodeType": "ExpressionStatement", + "src": "17198:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4834, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17263:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4836, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313034", + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17276:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17263:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783265333039613232316331326261333631653365643639353136376665656532", + "id": 4837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17283:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61396844248840510020197488843164741346_by_1", + "typeString": "int_const 6139...(30 digits omitted)...1346" + }, + "value": "0x2e309a221c12ba361e3ed695167feee2" + }, + "src": "17263:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4839, + "nodeType": "ExpressionStatement", + "src": "17263:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4840, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17328:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4842, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313035", + "id": 4841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17341:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_105_by_1", + "typeString": "int_const 105" + }, + "value": "105" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17328:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264666566323564316638363561653138646430376366656134626365613130", + "id": 4843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17348:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_61139018933488718567153792494864230928_by_1", + "typeString": "int_const 6113...(30 digits omitted)...0928" + }, + "value": "0x2dfef25d1f865ae18dd07cfea4bcea10" + }, + "src": "17328:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4845, + "nodeType": "ExpressionStatement", + "src": "17328:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4846, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17393:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4848, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313036", + "id": 4847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17406:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_106_by_1", + "typeString": "int_const 106" + }, + "value": "106" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17393:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264636463656538323163646338306465636330326334343334346165623331", + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17413:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60883877234094689345243041491992636209_by_1", + "typeString": "int_const 6088...(30 digits omitted)...6209" + }, + "value": "0x2dcdcee821cdc80decc02c44344aeb31" + }, + "src": "17393:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4851, + "nodeType": "ExpressionStatement", + "src": "17393:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4852, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17458:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4854, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313037", + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17471:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_107_by_1", + "typeString": "int_const 107" + }, + "value": "107" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17458:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264396432643835363262333439343464306232303162623837323630633833", + "id": 4855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17478:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60631373693435235627049349068288822403_by_1", + "typeString": "int_const 6063...(30 digits omitted)...2403" + }, + "value": "0x2d9d2d8562b34944d0b201bb87260c83" + }, + "src": "17458:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4857, + "nodeType": "ExpressionStatement", + "src": "17458:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4858, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17523:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4860, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313038", + "id": 4859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17536:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_108_by_1", + "typeString": "int_const 108" + }, + "value": "108" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17523:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264366430633034613562363261326334323633363330383636396237323961", + "id": 4861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17543:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60381463925014654644808174288326324890_by_1", + "typeString": "int_const 6038...(30 digits omitted)...4890" + }, + "value": "0x2d6d0c04a5b62a2c42636308669b729a" + }, + "src": "17523:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4863, + "nodeType": "ExpressionStatement", + "src": "17523:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4864, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17588:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4866, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313039", + "id": 4865, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17601:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_109_by_1", + "typeString": "int_const 109" + }, + "value": "109" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17588:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264336436383432633961323335353137666335613033333236393135323866", + "id": 4867, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17608:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60134104580751929226866781633165480591_by_1", + "typeString": "int_const 6013...(30 digits omitted)...0591" + }, + "value": "0x2d3d6842c9a235517fc5a0332691528f" + }, + "src": "17588:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4869, + "nodeType": "ExpressionStatement", + "src": "17588:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4870, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17653:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4872, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313130", + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17666:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_110_by_1", + "typeString": "int_const 110" + }, + "value": "110" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17653:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783264306534303239363366653165613238333461626334303863343337633130", + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17673:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59889253319856226458538603217703631888_by_1", + "typeString": "int_const 5988...(30 digits omitted)...1888" + }, + "value": "0x2d0e402963fe1ea2834abc408c437c10" + }, + "src": "17653:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4875, + "nodeType": "ExpressionStatement", + "src": "17653:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4876, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17718:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4878, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313131", + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17731:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_111_by_1", + "typeString": "int_const 111" + }, + "value": "111" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17718:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263646639316165363032363437393038616666393735653464366132613863", + "id": 4879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17738:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59646868778839210021497828354615290508_by_1", + "typeString": "int_const 5964...(30 digits omitted)...0508" + }, + "value": "0x2cdf91ae602647908aff975e4d6a2a8c" + }, + "src": "17718:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4881, + "nodeType": "ExpressionStatement", + "src": "17718:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4882, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17783:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4884, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313132", + "id": 4883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17796:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_112_by_1", + "typeString": "int_const 112" + }, + "value": "112" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17783:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263623135616433613165623635663664373461373564613039613162366335", + "id": 4885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17803:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59406910542615247719403943326214371013_by_1", + "typeString": "int_const 5940...(30 digits omitted)...1013" + }, + "value": "0x2cb15ad3a1eb65f6d74a75da09a1b6c5" + }, + "src": "17783:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4887, + "nodeType": "ExpressionStatement", + "src": "17783:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4888, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17848:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4890, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313133", + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17861:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_113_by_1", + "typeString": "int_const 113" + }, + "value": "113" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17848:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263383339396136616238653937373464366663666633373364323130373237", + "id": 4891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17868:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_59169339116643016279047957521648125735_by_1", + "typeString": "int_const 5916...(30 digits omitted)...5735" + }, + "value": "0x2c8399a6ab8e9774d6fcff373d210727" + }, + "src": "17848:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4893, + "nodeType": "ExpressionStatement", + "src": "17848:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4894, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17913:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4896, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313134", + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17926:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_114_by_1", + "typeString": "int_const 114" + }, + "value": "114" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17913:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263353634633430343666363465646261363838336361303662626334353335", + "id": 4897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17933:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58934115900064290859232836743818134837_by_1", + "typeString": "int_const 5893...(30 digits omitted)...4837" + }, + "value": "0x2c564c4046f64edba6883ca06bbc4535" + }, + "src": "17913:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4899, + "nodeType": "ExpressionStatement", + "src": "17913:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4900, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "17978:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4902, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313135", + "id": 4901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17991:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_115_by_1", + "typeString": "int_const 115" + }, + "value": "115" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17978:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783263323937306334333166393532363431653035636234393365323365656433", + "id": 4903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17998:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58701203159797865214654223853927263955_by_1", + "typeString": "int_const 5870...(30 digits omitted)...3955" + }, + "value": "0x2c2970c431f952641e05cb493e23eed3" + }, + "src": "17978:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4905, + "nodeType": "ExpressionStatement", + "src": "17978:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4906, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18043:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4908, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313136", + "id": 4907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18056:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116_by_1", + "typeString": "int_const 116" + }, + "value": "116" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18043:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262666430353630636439656231343536336263376330373332383536633138", + "id": 4909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18063:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58470564005548587984364862866899430424_by_1", + "typeString": "int_const 5847...(30 digits omitted)...0424" + }, + "value": "0x2bfd0560cd9eb14563bc7c0732856c18" + }, + "src": "18043:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4911, + "nodeType": "ExpressionStatement", + "src": "18043:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4912, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18108:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4914, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313137", + "id": 4913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18121:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_117_by_1", + "typeString": "int_const 117" + }, + "value": "117" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18108:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262643130383465643033333266376666343135306639643065663431613263", + "id": 4915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18128:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58242162365693428406397594903403305516_by_1", + "typeString": "int_const 5824...(30 digits omitted)...5516" + }, + "value": "0x2bd1084ed0332f7ff4150f9d0ef41a2c" + }, + "src": "18108:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4917, + "nodeType": "ExpressionStatement", + "src": "18108:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4918, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18173:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4920, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313138", + "id": 4919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18186:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_118_by_1", + "typeString": "int_const 118" + }, + "value": "118" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18173:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262613537376430666131363238623736643034306231326138323439326662", + "id": 4921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18193:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_58015962964008307710970589788915405563_by_1", + "typeString": "int_const 5801...(30 digits omitted)...5563" + }, + "value": "0x2ba577d0fa1628b76d040b12a82492fb" + }, + "src": "18173:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4923, + "nodeType": "ExpressionStatement", + "src": "18173:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4924, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18238:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4926, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313139", + "id": 4925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18251:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_119_by_1", + "typeString": "int_const 119" + }, + "value": "119" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18238:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262376135323333636432313538316538353565383964633266316538613932", + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18258:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57791931297201156866686511914608921234_by_1", + "typeString": "int_const 5779...(30 digits omitted)...1234" + }, + "value": "0x2b7a5233cd21581e855e89dc2f1e8a92" + }, + "src": "18238:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4929, + "nodeType": "ExpressionStatement", + "src": "18238:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4930, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18303:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4932, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313230", + "id": 4931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18316:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_120_by_1", + "typeString": "int_const 120" + }, + "value": "120" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18303:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262346639356364343639303464303564373262646364653333376439636337", + "id": 4933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18323:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57570033613218293176076279351194000583_by_1", + "typeString": "int_const 5757...(30 digits omitted)...0583" + }, + "value": "0x2b4f95cd46904d05d72bdcde337d9cc7" + }, + "src": "18303:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "18303:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4936, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18368:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4938, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313231", + "id": 4937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18381:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_121_by_1", + "typeString": "int_const 121" + }, + "value": "121" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18368:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783262323534306663396234643961626261336661636136363931393134363735", + "id": 4939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18388:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57350236890292752974853833075473860213_by_1", + "typeString": "int_const 5735...(30 digits omitted)...0213" + }, + "value": "0x2b2540fc9b4d9abba3faca6691914675" + }, + "src": "18368:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4941, + "nodeType": "ExpressionStatement", + "src": "18368:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4942, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18433:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4944, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313232", + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18446:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_122_by_1", + "typeString": "int_const 122" + }, + "value": "122" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18433:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261666235323239663638643038333064386265386164623061306462373066", + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18453:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_57132508816704680555143857466604631823_by_1", + "typeString": "int_const 5713...(30 digits omitted)...1823" + }, + "value": "0x2afb5229f68d0830d8be8adb0a0db70f" + }, + "src": "18433:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4947, + "nodeType": "ExpressionStatement", + "src": "18433:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4948, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18498:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4950, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313233", + "id": 4949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18511:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_123_by_1", + "typeString": "int_const 123" + }, + "value": "123" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18498:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261643163376336336139623239346335626337336133626133616237613262", + "id": 4951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18518:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56916817771225259240345926660426267179_by_1", + "typeString": "int_const 5691...(30 digits omitted)...7179" + }, + "value": "0x2ad1c7c63a9b294c5bc73a3ba3ab7a2b" + }, + "src": "18498:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4953, + "nodeType": "ExpressionStatement", + "src": "18498:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4954, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18563:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4956, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313234", + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18576:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_124_by_1", + "typeString": "int_const 124" + }, + "value": "124" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18563:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261613861303461633363626531656531633963383633363134363564626238", + "id": 4957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18583:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56703132804216983807771297030642981816_by_1", + "typeString": "int_const 5670...(30 digits omitted)...1816" + }, + "value": "0x2aa8a04ac3cbe1ee1c9c86361465dbb8" + }, + "src": "18563:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4959, + "nodeType": "ExpressionStatement", + "src": "18563:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4960, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18628:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4962, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313235", + "id": 4961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18641:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_125_by_1", + "typeString": "int_const 125" + }, + "value": "125" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18628:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261376664613339326437323561343461326338616562396162333534333064", + "id": 4963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18648:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56491423619364318412491401339172373261_by_1", + "typeString": "int_const 5649...(30 digits omitted)...3261" + }, + "value": "0x2a7fda392d725a44a2c8aeb9ab35430d" + }, + "src": "18628:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4965, + "nodeType": "ExpressionStatement", + "src": "18628:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4966, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18693:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4968, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313236", + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18706:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_126_by_1", + "typeString": "int_const 126" + }, + "value": "126" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18693:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261353737343162313863646536313837313737393262346661613231366462", + "id": 4969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18713:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56281660556009964768470705991401477851_by_1", + "typeString": "int_const 5628...(30 digits omitted)...7851" + }, + "value": "0x2a57741b18cde618717792b4faa216db" + }, + "src": "18693:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4971, + "nodeType": "ExpressionStatement", + "src": "18693:54:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 4976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 4972, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "18758:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 4974, + "indexExpression": { + "argumentTypes": null, + "hexValue": "313237", + "id": 4973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18771:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_127_by_1", + "typeString": "int_const 127" + }, + "value": "127" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18758:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783261326636633831663564383464643935306133353632366436643535303361", + "id": 4975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18778:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_56073814572073085295245695095569469498_by_1", + "typeString": "int_const 5607...(30 digits omitted)...9498" + }, + "value": "0x2a2f6c81f5d84dd950a35626d6d5503a" + }, + "src": "18758:54:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4977, + "nodeType": "ExpressionStatement", + "src": "18758:54:7" + } + ] + }, + "documentation": null, + "id": 4979, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "initLambertArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4208, + "nodeType": "ParameterList", + "parameters": [], + "src": "10481:2:7" + }, + "returnParameters": { + "id": 4209, + "nodeType": "ParameterList", + "parameters": [], + "src": "10492:0:7" + }, + "scope": 8977, + "src": "10456:8364:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 4989, + "nodeType": "Block", + "src": "18952:65:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4983, + "name": "initMaxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4203, + "src": "18963:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18963:17:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4985, + "nodeType": "ExpressionStatement", + "src": "18963:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4986, + "name": "initLambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4979, + "src": "18991:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18991:18:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4988, + "nodeType": "ExpressionStatement", + "src": "18991:18:7" + } + ] + }, + "documentation": { + "id": 4980, + "nodeType": "StructuredDocumentation", + "src": "18828:95:7", + "text": " @dev should be executed after construction (too large for the constructor)" + }, + "functionSelector": "e1c7392a", + "id": 4990, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4981, + "nodeType": "ParameterList", + "parameters": [], + "src": "18942:2:7" + }, + "returnParameters": { + "id": 4982, + "nodeType": "ParameterList", + "parameters": [], + "src": "18952:0:7" + }, + "scope": 8977, + "src": "18929:88:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13092 + ], + "body": { + "id": 5084, + "nodeType": "Block", + "src": "19968:795:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5006, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20014:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20024:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20014:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5009, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20027:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5005, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20006:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20006:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "20006:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5013, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20067:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20085:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20067:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5016, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20088:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5012, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20059:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5018, + "nodeType": "ExpressionStatement", + "src": "20059:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5020, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20137:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20154:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20137:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5023, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20159:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5024, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20177:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "20159:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20137:50:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20189:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5019, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20129:7:7", + "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": "20129:89:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5029, + "nodeType": "ExpressionStatement", + "src": "20129:89:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5030, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20281:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20292:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20281:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5035, + "nodeType": "IfStatement", + "src": "20277:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20315:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5004, + "id": 5034, + "nodeType": "Return", + "src": "20308:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5036, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20379:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5037, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20397:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "20379:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5046, + "nodeType": "IfStatement", + "src": "20375:92:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5041, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20441:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5039, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20429:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "20429:11:7", + "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": 5042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20429:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5043, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20452:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20429:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5004, + "id": 5045, + "nodeType": "Return", + "src": "20422:45:7" + } + }, + { + "assignments": [ + 5048 + ], + "declarations": [ + { + "constant": false, + "id": 5048, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20480:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5047, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5049, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20480:14:7" + }, + { + "assignments": [ + 5051 + ], + "declarations": [ + { + "constant": false, + "id": 5051, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20505:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5050, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "20505:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5052, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "20505:15:7" + }, + { + "assignments": [ + 5054 + ], + "declarations": [ + { + "constant": false, + "id": 5054, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20531:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5053, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20531:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5059, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5057, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20559:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5055, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4999, + "src": "20547:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "20547:11:7", + "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": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20547:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20531:44:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5060, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "20587:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5061, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5051, + "src": "20595:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5062, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "20586:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5064, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5054, + "src": "20614:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5065, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4995, + "src": "20621:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5066, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4997, + "src": "20638:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5067, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "20654:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5063, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "20608:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20608:57:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "20586:79:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5070, + "nodeType": "ExpressionStatement", + "src": "20586:79:7" + }, + { + "assignments": [ + 5072 + ], + "declarations": [ + { + "constant": false, + "id": 5072, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5084, + "src": "20676:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5079, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5075, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5048, + "src": "20703:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5073, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20691:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "20691:11:7", + "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": 5076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20691:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5077, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5051, + "src": "20714:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20691:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20676:47:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5080, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5072, + "src": "20741:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5081, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4993, + "src": "20748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20741:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5004, + "id": 5083, + "nodeType": "Return", + "src": "20734:21:7" + } + ] + }, + "documentation": { + "id": 4991, + "nodeType": "StructuredDocumentation", + "src": "19025:641:7", + "text": " @dev given a token supply, reserve balance, weight and a deposit amount (in the reserve token),\n calculates the target amount for a given conversion (in the main token)\n Formula:\n return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight, represented in ppm (1-1000000)\n @param _amount amount of reserve tokens to get the target amount for\n @return smart token amount" + }, + "functionSelector": "f3250fe2", + "id": 5085, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19936:8:7" + }, + "parameters": { + "id": 5000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4993, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19702:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4992, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19702:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4995, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19754:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4997, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19814:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 4996, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "19814:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4999, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19872:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19872:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19701:187:7" + }, + "returnParameters": { + "id": 5004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5003, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5085, + "src": "19954:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19954:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19953:9:7" + }, + "scope": 8977, + "src": "19672:1091:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13105 + ], + "body": { + "id": 5198, + "nodeType": "Block", + "src": "21691:1021:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5101, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "21737:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21747:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21737:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21750:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5100, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21729:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5106, + "nodeType": "ExpressionStatement", + "src": "21729:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5108, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "21790:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21808:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21790:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21811:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5107, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21782:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "21782:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5115, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "21860:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21877:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21860:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5118, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "21882:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5119, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "21900:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "21882:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "21860:50:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21912:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5114, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21852:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21852:89:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5124, + "nodeType": "ExpressionStatement", + "src": "21852:89:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5126, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "21960:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5127, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "21971:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21960:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21980:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 5125, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21952:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21952:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5131, + "nodeType": "ExpressionStatement", + "src": "21952:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5132, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22061:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22072:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22061:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5137, + "nodeType": "IfStatement", + "src": "22057:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22095:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5099, + "id": 5136, + "nodeType": "Return", + "src": "22088:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5138, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22168:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5139, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22179:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22168:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5143, + "nodeType": "IfStatement", + "src": "22164:59:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5141, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22208:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5142, + "nodeType": "Return", + "src": "22201:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5144, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "22286:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5145, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "22304:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "22286:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5154, + "nodeType": "IfStatement", + "src": "22282:92:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5149, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22356:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5147, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22336:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "22336:19:7", + "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": 5150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22336:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5151, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22367:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22336:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5153, + "nodeType": "Return", + "src": "22329:45:7" + } + }, + { + "assignments": [ + 5156 + ], + "declarations": [ + { + "constant": false, + "id": 5156, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22387:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22387:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "22387:14:7" + }, + { + "assignments": [ + 5159 + ], + "declarations": [ + { + "constant": false, + "id": 5159, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22412:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5158, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "22412:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5160, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "22412:15:7" + }, + { + "assignments": [ + 5162 + ], + "declarations": [ + { + "constant": false, + "id": 5162, + "mutability": "mutable", + "name": "baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22438:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22438:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5166, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5163, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5164, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5094, + "src": "22464:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22454:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22438:33:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5167, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22483:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5168, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5159, + "src": "22491:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5169, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "22482:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5171, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5088, + "src": "22510:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5172, + "name": "baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5162, + "src": "22519:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5173, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "22526:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5174, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5092, + "src": "22538:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5170, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "22504:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22504:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "22482:71:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5177, + "nodeType": "ExpressionStatement", + "src": "22482:71:7" + }, + { + "assignments": [ + 5179 + ], + "declarations": [ + { + "constant": false, + "id": 5179, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22564:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22564:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5184, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5182, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22600:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5180, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22580:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "22580:19:7", + "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": 5183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22580:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22564:43:7" + }, + { + "assignments": [ + 5186 + ], + "declarations": [ + { + "constant": false, + "id": 5186, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5198, + "src": "22618:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22618:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5190, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5187, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5090, + "src": "22634:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5188, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5159, + "src": "22653:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22634:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22618:44:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5191, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5179, + "src": "22681:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5192, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5186, + "src": "22689:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22681:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5194, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22680:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5195, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5156, + "src": "22698:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22680:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5099, + "id": 5197, + "nodeType": "Return", + "src": "22673:31:7" + } + ] + }, + "documentation": { + "id": 5086, + "nodeType": "StructuredDocumentation", + "src": "20771:638:7", + "text": " @dev given a token supply, reserve balance, weight and a sell amount (in the main token),\n calculates the target amount for a given conversion (in the reserve token)\n Formula:\n return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight, represented in ppm (1-1000000)\n @param _amount amount of smart tokens to get the target amount for\n @return reserve token amount" + }, + "functionSelector": "76cf0b56", + "id": 5199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21659:8:7" + }, + "parameters": { + "id": 5095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5088, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21441:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21441:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5090, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21489:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5089, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21489:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5092, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21545:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5091, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "21545:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5094, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21599:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21599:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21440:175:7" + }, + "returnParameters": { + "id": 5099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5098, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5199, + "src": "21677:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5097, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21677:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21676:9:7" + }, + "scope": 8977, + "src": "21415:1297:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13120 + ], + "body": { + "id": 5304, + "nodeType": "Block", + "src": "23978:921:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5217, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24024:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24048:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24024:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5220, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24053:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24077:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24053:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24024:54:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24080:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5216, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24016:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24016:94:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5226, + "nodeType": "ExpressionStatement", + "src": "24016:94:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5228, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24129:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24152:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24129:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5231, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24157:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5232, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "24181:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24157:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:62:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5235, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24212:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24235:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24212:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:107:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5239, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24240:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5240, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "24264:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24240:34:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24129:145:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 5243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24276:28:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 5227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24121:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24121:184:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5245, + "nodeType": "ExpressionStatement", + "src": "24121:184:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5246, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24365:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5247, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24389:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "24365:44:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5259, + "nodeType": "IfStatement", + "src": "24361:141:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5251, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24457:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5249, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24431:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "24431:25:7", + "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": 5252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24431:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5255, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24494:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5253, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24468:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "24468:25:7", + "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": 5256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24468:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24431:71:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5215, + "id": 5258, + "nodeType": "Return", + "src": "24424:78:7" + } + }, + { + "assignments": [ + 5261 + ], + "declarations": [ + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24515:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24515:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5262, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24515:14:7" + }, + { + "assignments": [ + 5264 + ], + "declarations": [ + { + "constant": false, + "id": 5264, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24540:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5263, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "24540:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5265, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24540:15:7" + }, + { + "assignments": [ + 5267 + ], + "declarations": [ + { + "constant": false, + "id": 5267, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24566:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24566:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5272, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5270, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5210, + "src": "24608:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5268, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24582:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "24582:25:7", + "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": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24582:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24566:50:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5273, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24628:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5274, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5264, + "src": "24636:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5275, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "24627:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5277, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5267, + "src": "24655:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5278, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5202, + "src": "24662:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5279, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5204, + "src": "24685:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5280, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5208, + "src": "24707:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5276, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "24649:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24649:79:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "24627:101:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5283, + "nodeType": "ExpressionStatement", + "src": "24627:101:7" + }, + { + "assignments": [ + 5285 + ], + "declarations": [ + { + "constant": false, + "id": 5285, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5290, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5288, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24781:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5286, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24755:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "24755:25:7", + "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": 5289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24755:33:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24739:49:7" + }, + { + "assignments": [ + 5292 + ], + "declarations": [ + { + "constant": false, + "id": 5292, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5304, + "src": "24799:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5296, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5293, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5206, + "src": "24815:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5294, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5264, + "src": "24840:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24815:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24799:50:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5297, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5285, + "src": "24868:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5298, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5292, + "src": "24876:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24868:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5300, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "24867:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5301, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "24885:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24867:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5215, + "id": 5303, + "nodeType": "Return", + "src": "24860:31:7" + } + ] + }, + "documentation": { + "id": 5200, + "nodeType": "StructuredDocumentation", + "src": "22720:842:7", + "text": " @dev given two reserve balances/weights and a sell amount (in the first reserve token),\n calculates the target amount for a conversion from the source reserve token to the target reserve token\n Formula:\n return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))\n @param _sourceReserveBalance source reserve balance\n @param _sourceReserveWeight source reserve weight, represented in ppm (1-1000000)\n @param _targetReserveBalance target reserve balance\n @param _targetReserveWeight target reserve weight, represented in ppm (1-1000000)\n @param _amount source reserve amount\n @return target reserve amount" + }, + "functionSelector": "94491fab", + "id": 5305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "crossReserveTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5212, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23946:8:7" + }, + "parameters": { + "id": 5211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5202, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23602:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23602:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5204, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23672:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5203, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "23672:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5206, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23740:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23740:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5208, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23810:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5207, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "23810:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5210, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23878:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23878:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23601:293:7" + }, + "returnParameters": { + "id": 5215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5305, + "src": "23964:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23964:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23963:9:7" + }, + "scope": 8977, + "src": "23568:1331:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13133 + ], + "body": { + "id": 5412, + "nodeType": "Block", + "src": "25813:815:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5321, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "25859:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25869:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25859:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25872:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5320, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25851:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25851:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5326, + "nodeType": "ExpressionStatement", + "src": "25851:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5328, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "25912:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25930:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25912:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25933:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5327, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25904:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25904:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5333, + "nodeType": "ExpressionStatement", + "src": "25904:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5335, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "25982:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25998:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25982:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5338, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26003:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5339, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26020:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26033:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "26020:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "26003:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "25982:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26036:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5334, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25974:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25974:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5346, + "nodeType": "ExpressionStatement", + "src": "25974:90:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5347, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26119:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26130:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26119:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5352, + "nodeType": "IfStatement", + "src": "26115:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26153:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5319, + "id": 5351, + "nodeType": "Return", + "src": "26146:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5353, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26224:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5354, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26241:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "26224:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5368, + "nodeType": "IfStatement", + "src": "26220:101:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5358, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26286:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5356, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26274:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "26274:11:7", + "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": 5359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26274:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26305:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26274:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5362, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26273:34:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5363, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26310:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26273:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26320:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26273:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5319, + "id": 5367, + "nodeType": "Return", + "src": "26266:55:7" + } + }, + { + "assignments": [ + 5370 + ], + "declarations": [ + { + "constant": false, + "id": 5370, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26334:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5369, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26334:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5371, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "26334:14:7" + }, + { + "assignments": [ + 5373 + ], + "declarations": [ + { + "constant": false, + "id": 5373, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26359:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5372, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26359:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5374, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "26359:15:7" + }, + { + "assignments": [ + 5376 + ], + "declarations": [ + { + "constant": false, + "id": 5376, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26385:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26385:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5379, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5314, + "src": "26413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5377, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26401:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "26401:11:7", + "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": "26401:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26385:36:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5382, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5370, + "src": "26433:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5383, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5373, + "src": "26441:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5384, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "26432:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5386, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5376, + "src": "26460:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5387, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5308, + "src": "26467:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5388, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "26476:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5389, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5312, + "src": "26488:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5385, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "26454:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26454:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "26432:70:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "26432:70:7" + }, + { + "assignments": [ + 5394 + ], + "declarations": [ + { + "constant": false, + "id": 5394, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5412, + "src": "26513:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5393, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5407, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5397, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5370, + "src": "26550:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5395, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26530:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "26530:19:7", + "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": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26530:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26560:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26530:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5401, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26529:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5402, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5373, + "src": "26566:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26529:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5404, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "26528:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26579:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "26528:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26513:67:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5408, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5394, + "src": "26598:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5409, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5310, + "src": "26605:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26598:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5319, + "id": 5411, + "nodeType": "Return", + "src": "26591:29:7" + } + ] + }, + "documentation": { + "id": 5306, + "nodeType": "StructuredDocumentation", + "src": "24907:665:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens,\n calculates the amount of reserve tokens required for purchasing the given amount of smart tokens\n Formula:\n return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount requested amount of smart tokens\n @return reserve token amount" + }, + "functionSelector": "ebbb2158", + "id": 5413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fundCost", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5316, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25781:8:7" + }, + "parameters": { + "id": 5315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5308, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25596:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25596:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5310, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25636:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25636:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5312, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25684:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5311, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "25684:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5314, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25729:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5313, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25595:150:7" + }, + "returnParameters": { + "id": 5319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5318, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5413, + "src": "25799:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5317, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25798:9:7" + }, + "scope": 8977, + "src": "25578:1050:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13146 + ], + "body": { + "id": 5509, + "nodeType": "Block", + "src": "27587:793:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5429, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "27633:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27643:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27633:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27646:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5428, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27625:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27625:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5434, + "nodeType": "ExpressionStatement", + "src": "27625:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5436, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "27686:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27704:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27686:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27707:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27678:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27678:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5441, + "nodeType": "ExpressionStatement", + "src": "27678:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5443, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27756:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27772:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27756:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5446, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27777:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5447, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "27794:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27807:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "27794:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "27777:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "27756:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27810:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5442, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27748:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27748:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5454, + "nodeType": "ExpressionStatement", + "src": "27748:90:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5455, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "27893:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27904:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27893:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5460, + "nodeType": "IfStatement", + "src": "27889:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27927:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5427, + "id": 5459, + "nodeType": "Return", + "src": "27920:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5461, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "27998:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5462, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "28015:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "27998:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5471, + "nodeType": "IfStatement", + "src": "27994:91:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5466, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28059:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5464, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "28047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "28047:11:7", + "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": 5467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28047:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5468, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28070:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28047:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5427, + "id": 5470, + "nodeType": "Return", + "src": "28040:45:7" + } + }, + { + "assignments": [ + 5473 + ], + "declarations": [ + { + "constant": false, + "id": 5473, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28098:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28098:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5474, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28098:14:7" + }, + { + "assignments": [ + 5476 + ], + "declarations": [ + { + "constant": false, + "id": 5476, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28123:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5475, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "28123:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5477, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28123:15:7" + }, + { + "assignments": [ + 5479 + ], + "declarations": [ + { + "constant": false, + "id": 5479, + "mutability": "mutable", + "name": "baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28149:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28149:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5484, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5482, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5422, + "src": "28185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5480, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28165:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "28165:19:7", + "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": 5483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28165:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28149:44:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5485, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "28205:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5486, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5476, + "src": "28213:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5487, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "28204:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5489, + "name": "baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5479, + "src": "28232:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5490, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "28239:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5491, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "28256:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5492, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "28271:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5488, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "28226:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28226:56:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "28204:78:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5495, + "nodeType": "ExpressionStatement", + "src": "28204:78:7" + }, + { + "assignments": [ + 5497 + ], + "declarations": [ + { + "constant": false, + "id": 5497, + "mutability": "mutable", + "name": "temp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5509, + "src": "28293:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5496, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28293:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5504, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5500, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5473, + "src": "28320:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5498, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28308:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "28308:11:7", + "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": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28308:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 5502, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5476, + "src": "28331:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28308:32:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28293:47:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5505, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5497, + "src": "28358:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5506, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5416, + "src": "28365:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28358:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5427, + "id": 5508, + "nodeType": "Return", + "src": "28351:21:7" + } + ] + }, + "documentation": { + "id": 5414, + "nodeType": "StructuredDocumentation", + "src": "26636:670:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with,\n calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens\n Formula:\n return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount amount of reserve tokens to fund with\n @return smart token amount" + }, + "functionSelector": "2f55bdb5", + "id": 5510, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fundSupplyAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5424, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "27555:8:7" + }, + "parameters": { + "id": 5423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5416, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27338:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27338:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5418, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27386:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27386:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27442:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5419, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "27442:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5422, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27495:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5421, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27337:174:7" + }, + "returnParameters": { + "id": 5427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5510, + "src": "27573:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27572:9:7" + }, + "scope": 8977, + "src": "27312:1068:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13159 + ], + "body": { + "id": 5625, + "nodeType": "Block", + "src": "29367:1026:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5526, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5527, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29423:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29413:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f535550504c59", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29426:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + }, + "value": "ERR_INVALID_SUPPLY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_663f10355ba071616cc91891330bbbd56c18b20e7bda020baff58fa08722ec60", + "typeString": "literal_string \"ERR_INVALID_SUPPLY\"" + } + ], + "id": 5525, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29405:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29405:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5531, + "nodeType": "ExpressionStatement", + "src": "29405:42:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5533, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "29466:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29484:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29466:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29487:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5532, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29458:59:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5538, + "nodeType": "ExpressionStatement", + "src": "29458:59:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5540, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29536:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29552:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "29536:17:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5543, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29557:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5544, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "29574:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29587:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "29574:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "29557:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29536:52:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f524154494f", + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29590:27:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + }, + "value": "ERR_INVALID_RESERVE_RATIO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8a8172d57fd89f78d9ce572e7618cbce6e9962212a6741dcc1911f87bc706d73", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATIO\"" + } + ], + "id": 5539, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29528:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29528:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5551, + "nodeType": "ExpressionStatement", + "src": "29528:90:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5553, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29637:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 5554, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29648:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29637:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 5556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29657:20:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 5552, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29629:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29629:49:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5558, + "nodeType": "ExpressionStatement", + "src": "29629:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5559, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29733:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29744:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29733:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5564, + "nodeType": "IfStatement", + "src": "29729:39:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29767:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 5524, + "id": 5563, + "nodeType": "Return", + "src": "29760:8:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5565, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "29844:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5566, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "29855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29844:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5570, + "nodeType": "IfStatement", + "src": "29840:59:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 5568, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "29884:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5569, + "nodeType": "Return", + "src": "29877:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 5573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5571, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "29969:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5572, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "29986:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "29969:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5581, + "nodeType": "IfStatement", + "src": "29965:91:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5576, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30030:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5574, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "30018:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "30018:11:7", + "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": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30018:28:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5578, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30049:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30018:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5580, + "nodeType": "Return", + "src": "30011:45:7" + } + }, + { + "assignments": [ + 5583 + ], + "declarations": [ + { + "constant": false, + "id": 5583, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30069:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30069:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5584, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "30069:14:7" + }, + { + "assignments": [ + 5586 + ], + "declarations": [ + { + "constant": false, + "id": 5586, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30094:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5585, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "30094:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5587, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "30094:15:7" + }, + { + "assignments": [ + 5589 + ], + "declarations": [ + { + "constant": false, + "id": 5589, + "mutability": "mutable", + "name": "baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30120:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30120:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5593, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5590, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30136:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5591, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "30146:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30136:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30120:33:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5594, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30165:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5595, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5586, + "src": "30173:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5596, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "30164:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5598, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5513, + "src": "30192:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5599, + "name": "baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5589, + "src": "30201:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5600, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "30208:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 5601, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "30220:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 5597, + "name": "power", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5820, + "src": "30186:5:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30186:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "src": "30164:70:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5604, + "nodeType": "ExpressionStatement", + "src": "30164:70:7" + }, + { + "assignments": [ + 5606 + ], + "declarations": [ + { + "constant": false, + "id": 5606, + "mutability": "mutable", + "name": "temp1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30245:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30245:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5609, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30281:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5607, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30261:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "30261:19:7", + "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": 5610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30261:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30245:43:7" + }, + { + "assignments": [ + 5613 + ], + "declarations": [ + { + "constant": false, + "id": 5613, + "mutability": "mutable", + "name": "temp2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5625, + "src": "30299:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30299:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5617, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5614, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "30315:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5615, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5586, + "src": "30334:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30315:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30299:44:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5618, + "name": "temp1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5606, + "src": "30362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5619, + "name": "temp2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5613, + "src": "30370:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30362:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5621, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30361:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5622, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5583, + "src": "30379:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30361:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5524, + "id": 5624, + "nodeType": "Return", + "src": "30354:31:7" + } + ] + }, + "documentation": { + "id": 5511, + "nodeType": "StructuredDocumentation", + "src": "28388:668:7", + "text": " @dev given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate,\n calculates the amount of reserve tokens received for selling the given amount of smart tokens\n Formula:\n return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))\n @param _supply smart token supply\n @param _reserveBalance reserve balance\n @param _reserveRatio reserve ratio, represented in ppm (2-2000000)\n @param _amount amount of smart tokens to liquidate\n @return reserve token amount" + }, + "functionSelector": "8074590a", + "id": 5626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidateReserveAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5521, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29335:8:7" + }, + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5513, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29094:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29094:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29148:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5514, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29148:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29210:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5516, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "29210:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29269:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29269:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29093:192:7" + }, + "returnParameters": { + "id": 5524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5523, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5626, + "src": "29353:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5522, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29353:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29352:9:7" + }, + "scope": 8977, + "src": "29062:1331:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13176 + ], + "body": { + "id": 5729, + "nodeType": "Block", + "src": "33118:1031:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5645, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33133:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 5646, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33165:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33133:54:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5660, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33343:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33374:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33343:32:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5663, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33379:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33404:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33379:26:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33343:62:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5667, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33409:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33436:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33409:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33343:94:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33439:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5659, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33335:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33335:134:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5673, + "nodeType": "ExpressionStatement", + "src": "33335:134:7" + }, + "id": 5674, + "nodeType": "IfStatement", + "src": "33129:340:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5649, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33210:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33241:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33210:32:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5652, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33246:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33273:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33246:28:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33210:64:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f42414c414e4345", + "id": 5656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33276:29:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + }, + "value": "ERR_INVALID_RESERVE_BALANCE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_50b448733a1d57cdd008d269297c4a2f50984605cb59e986bc2d98cee971e78d", + "typeString": "literal_string \"ERR_INVALID_RESERVE_BALANCE\"" + } + ], + "id": 5648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33202:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33202:104:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5658, + "nodeType": "ExpressionStatement", + "src": "33202:104:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5676, + "name": "_reserveRateNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5635, + "src": "33488:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33512:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33488:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5679, + "name": "_reserveRateDenominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "33517:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33543:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "33517:27:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33488:56:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f52415445", + "id": 5683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33546:26:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ef2ffbf1bb88550d8f6c1cbc448ef8c9b658c0125c3eaac6dd7d95fb505ee813", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATE\"" + }, + "value": "ERR_INVALID_RESERVE_RATE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ef2ffbf1bb88550d8f6c1cbc448ef8c9b658c0125c3eaac6dd7d95fb505ee813", + "typeString": "literal_string \"ERR_INVALID_RESERVE_RATE\"" + } + ], + "id": 5675, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "33480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33480:93:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "33480:93:7" + }, + { + "assignments": [ + 5687 + ], + "declarations": [ + { + "constant": false, + "id": 5687, + "mutability": "mutable", + "name": "tq", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5729, + "src": "33586:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33586:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5692, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5690, + "name": "_reserveRateNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5635, + "src": "33632:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5688, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33599:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "33599:32:7", + "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": 5691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33599:55:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33586:68:7" + }, + { + "assignments": [ + 5694 + ], + "declarations": [ + { + "constant": false, + "id": 5694, + "mutability": "mutable", + "name": "rp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5729, + "src": "33665:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5693, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33665:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5697, + "name": "_reserveRateDenominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "33707:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5695, + "name": "_secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5633, + "src": "33678:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "33678:28:7", + "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": 5698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33678:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33665:66:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5700, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33748:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5701, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33779:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33748:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5711, + "nodeType": "IfStatement", + "src": "33744:169:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5704, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33846:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5705, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33870:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5706, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "33900:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5707, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "33904:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33908:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5703, + "name": "balancedWeightsByStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8547, + "src": "33823:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,bool) view returns (uint32,uint32)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33823:90:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5710, + "nodeType": "Return", + "src": "33816:97:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5712, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "33930:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 5713, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "33961:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33930:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5723, + "nodeType": "IfStatement", + "src": "33926:170:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5716, + "name": "_primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "34028:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5717, + "name": "_primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5631, + "src": "34058:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5718, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "34082:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5719, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "34086:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34090:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5715, + "name": "balancedWeightsByStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8547, + "src": "34005:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,bool) view returns (uint32,uint32)" + } + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34005:91:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5722, + "nodeType": "Return", + "src": "33998:98:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5725, + "name": "tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5687, + "src": "34134:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5726, + "name": "rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5694, + "src": "34138:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5724, + "name": "normalizedWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8656, + "src": "34116:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 5727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34116:25:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 5644, + "id": 5728, + "nodeType": "Return", + "src": "34109:32:7" + } + ] + }, + "documentation": { + "id": 5627, + "nodeType": "StructuredDocumentation", + "src": "30401:2317:7", + "text": " @dev The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price.\n We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance.\n In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance.\n Formula input:\n - let t denote the primary reserve token staked balance\n - let s denote the primary reserve token balance\n - let r denote the secondary reserve token balance\n - let q denote the numerator of the rate between the tokens\n - let p denote the denominator of the rate between the tokens\n Where p primary tokens are equal to q secondary tokens\n Formula output:\n - compute x = W(t / r * q / p * log(s / t)) / log(s / t)\n - return x / (1 + x) as the weight of the primary reserve token\n - return 1 / (1 + x) as the weight of the secondary reserve token\n Where W is the Lambert W Function\n If the rate-provider provides the rates for a common unit, for example:\n - P = 2 ==> 2 primary reserve tokens = 1 ether\n - Q = 3 ==> 3 secondary reserve tokens = 1 ether\n Then you can simply use p = P and q = Q\n If the rate-provider provides the rates for a single unit, for example:\n - P = 2 ==> 1 primary reserve token = 2 ethers\n - Q = 3 ==> 1 secondary reserve token = 3 ethers\n Then you can simply use p = Q and q = P\n @param _primaryReserveStakedBalance the primary reserve token staked balance\n @param _primaryReserveBalance the primary reserve token balance\n @param _secondaryReserveBalance the secondary reserve token balance\n @param _reserveRateNumerator the numerator of the rate between the tokens\n @param _reserveRateDenominator the denominator of the rate between the tokens\n Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token\n @return the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)" + }, + "functionSelector": "a11aa1b4", + "id": 5730, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balancedWeights", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5639, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33079:8:7" + }, + "parameters": { + "id": 5638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5629, + "mutability": "mutable", + "name": "_primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32749:36:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5628, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32749:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5631, + "mutability": "mutable", + "name": "_primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32817:30:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32817:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5633, + "mutability": "mutable", + "name": "_secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32879:32:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32879:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5635, + "mutability": "mutable", + "name": "_reserveRateNumerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "32943:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32943:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5637, + "mutability": "mutable", + "name": "_reserveRateDenominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33004:31:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5636, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33004:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32748:288:7" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5641, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33097:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5640, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33097:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5643, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5730, + "src": "33105:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5642, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33105:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33096:16:7" + }, + "scope": 8977, + "src": "32724:1425:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5819, + "nodeType": "Block", + "src": "35853:677:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5747, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "35872:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5748, + "name": "MAX_NUM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3592, + "src": "35881:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35872:16:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5746, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 5750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35864:25:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5751, + "nodeType": "ExpressionStatement", + "src": "35864:25:7" + }, + { + "assignments": [ + 5753 + ], + "declarations": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "baseLog", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "35902:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5752, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35902:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5754, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "35902:15:7" + }, + { + "assignments": [ + 5756 + ], + "declarations": [ + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "base", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "35928:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35928:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5762, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5757, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5733, + "src": "35943:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5758, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35952:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35943:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5760, + "name": "_baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "35962:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35943:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35928:40:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5763, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "35983:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5764, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "35990:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35983:22:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5779, + "nodeType": "Block", + "src": "36075:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5773, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36090:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5775, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "36111:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5774, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "36100:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36100:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36090:26:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5778, + "nodeType": "ExpressionStatement", + "src": "36090:26:7" + } + ] + }, + "id": 5780, + "nodeType": "IfStatement", + "src": "35979:149:7", + "trueBody": { + "id": 5772, + "nodeType": "Block", + "src": "36007:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5766, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36022:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5768, + "name": "base", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "36043:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5767, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "36032:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36032:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36022:26:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5771, + "nodeType": "ExpressionStatement", + "src": "36022:26:7" + } + ] + } + }, + { + "assignments": [ + 5782 + ], + "declarations": [ + { + "constant": false, + "id": 5782, + "mutability": "mutable", + "name": "baseLogTimesExp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5819, + "src": "36140:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5781, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5783, + "name": "baseLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "36166:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5784, + "name": "_expN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5737, + "src": "36176:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "36166:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5786, + "name": "_expD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5739, + "src": "36184:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "36166:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36140:49:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5789, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36204:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5790, + "name": "OPT_EXP_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3604, + "src": "36222:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36204:33:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5817, + "nodeType": "Block", + "src": "36332:191:7", + "statements": [ + { + "assignments": [ + 5800 + ], + "declarations": [ + { + "constant": false, + "id": 5800, + "mutability": "mutable", + "name": "precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5817, + "src": "36347:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5799, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "36347:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5804, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5802, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36391:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5801, + "name": "findPositionInMaxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6036, + "src": "36365:25:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 5803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36365:42:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36347:60:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5806, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36441:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5807, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "36461:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 5808, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36477:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36461:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5810, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36460:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36441:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5812, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36489:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5805, + "name": "generalExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6546, + "src": "36430:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint8) pure returns (uint256)" + } + }, + "id": 5813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36430:69:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5814, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5800, + "src": "36501:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5815, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36429:82:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 5745, + "id": 5816, + "nodeType": "Return", + "src": "36422:89:7" + } + ] + }, + "id": 5818, + "nodeType": "IfStatement", + "src": "36200:323:7", + "trueBody": { + "id": 5798, + "nodeType": "Block", + "src": "36239:78:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5793, + "name": "baseLogTimesExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5782, + "src": "36273:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5792, + "name": "optimalExp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7276, + "src": "36262:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 5794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36262:27:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 5795, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "36291:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5796, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "36261:44:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 5745, + "id": 5797, + "nodeType": "Return", + "src": "36254:51:7" + } + ] + } + } + ] + }, + "documentation": { + "id": 5731, + "nodeType": "StructuredDocumentation", + "src": "34157:1576:7", + "text": " @dev General Description:\n Determine a value of precision.\n Calculate an integer approximation of (_baseN / _baseD) ^ (_expN / _expD) * 2 ^ precision.\n Return the result along with the precision used.\n Detailed Description:\n Instead of calculating \"base ^ exp\", we calculate \"e ^ (log(base) * exp)\".\n The value of \"log(base)\" is represented with an integer slightly smaller than \"log(base) * 2 ^ precision\".\n The larger \"precision\" is, the more accurately this value represents the real value.\n However, the larger \"precision\" is, the more bits are required in order to store this value.\n And the exponentiation function, which takes \"x\" and calculates \"e ^ x\", is limited to a maximum exponent (maximum value of \"x\").\n This maximum exponent depends on the \"precision\" used, and it is given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\".\n Hence we need to determine the highest precision which can be used for the given input, before calling the exponentiation function.\n This allows us to compute \"base ^ exp\" with maximum accuracy and without exceeding 256 bits in any of the intermediate computations.\n This functions assumes that \"_expN < 2 ^ 256 / log(MAX_NUM - 1)\", otherwise the multiplication should be replaced with a \"safeMul\".\n Since we rely on unsigned-integer arithmetic and \"base < 1\" ==> \"log(base) < 0\", this function does not support \"_baseN < _baseD\"." + }, + "id": 5820, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "power", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5733, + "mutability": "mutable", + "name": "_baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35754:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5732, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "_baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35770:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5734, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35770:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5737, + "mutability": "mutable", + "name": "_expN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35786:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5736, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "35786:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5739, + "mutability": "mutable", + "name": "_expD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35800:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 5738, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "35800:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35753:60:7" + }, + "returnParameters": { + "id": 5745, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5742, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35837:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35837:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5744, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5820, + "src": "35846:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5743, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "35846:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35836:16:7" + }, + "scope": 8977, + "src": "35739:791:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5905, + "nodeType": "Block", + "src": "36770:760:7", + "statements": [ + { + "assignments": [ + 5829 + ], + "declarations": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5905, + "src": "36781:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5828, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36781:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5831, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 5830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36795:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "36781:15:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5832, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36905:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 5833, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "36910:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36905:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5854, + "nodeType": "IfStatement", + "src": "36901:156:7", + "trueBody": { + "id": 5853, + "nodeType": "Block", + "src": "36919:138:7", + "statements": [ + { + "assignments": [ + 5836 + ], + "declarations": [ + { + "constant": false, + "id": 5836, + "mutability": "mutable", + "name": "count", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5853, + "src": "36934:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5835, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "36934:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5842, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5838, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36958:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5839, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "36962:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36958:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5837, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5969, + "src": "36948:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 5841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36948:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "36934:36:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5843, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "36985:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "id": 5844, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5836, + "src": "36991:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36985:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5846, + "nodeType": "ExpressionStatement", + "src": "36985:11:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5847, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37024:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5848, + "name": "count", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5836, + "src": "37030:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5849, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37038:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37030:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37024:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5852, + "nodeType": "ExpressionStatement", + "src": "37024:21:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5855, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37165:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 5856, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37169:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37165:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5898, + "nodeType": "IfStatement", + "src": "37161:305:7", + "trueBody": { + "id": 5897, + "nodeType": "Block", + "src": "37178:288:7", + "statements": [ + { + "body": { + "id": 5895, + "nodeType": "Block", + "src": "37235:220:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5868, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37254:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5869, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37259:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5870, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37263:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37259:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5872, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "37258:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5873, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "37268:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37258:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37254:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5876, + "nodeType": "ExpressionStatement", + "src": "37254:21:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5877, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37315:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 5878, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "37320:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37315:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5894, + "nodeType": "IfStatement", + "src": "37311:129:7", + "trueBody": { + "id": 5893, + "nodeType": "Block", + "src": "37329:111:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5880, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5823, + "src": "37352:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37358:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37352:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5883, + "nodeType": "ExpressionStatement", + "src": "37352:7:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5884, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5885, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37406:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5886, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37414:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37418:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37414:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5889, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "37413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "37406:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37399:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5892, + "nodeType": "ExpressionStatement", + "src": "37399:21:7" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5862, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37223:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37227:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "37223:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5896, + "initializationExpression": { + "assignments": [ + 5859 + ], + "declarations": [ + { + "constant": false, + "id": 5859, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5896, + "src": "37198:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5858, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37198:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5861, + "initialValue": { + "argumentTypes": null, + "id": 5860, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "37208:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "37198:23:7" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 5866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": true, + "src": "37230:3:7", + "subExpression": { + "argumentTypes": null, + "id": 5865, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5859, + "src": "37232:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5867, + "nodeType": "ExpressionStatement", + "src": "37230:3:7" + }, + "nodeType": "ForStatement", + "src": "37193:262:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5899, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "37485:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 5900, + "name": "LN2_NUMERATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "37491:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37485:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 5902, + "name": "LN2_DENOMINATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3598, + "src": "37507:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37485:37:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5827, + "id": 5904, + "nodeType": "Return", + "src": "37478:44:7" + } + ] + }, + "documentation": { + "id": 5821, + "nodeType": "StructuredDocumentation", + "src": "36538:163:7", + "text": " @dev computes log(x / FIXED_1) * FIXED_1.\n This functions assumes that \"x >= FIXED_1\", because the output would be negative otherwise." + }, + "id": 5906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalLog", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5823, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5906, + "src": "36727:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36727:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36726:11:7" + }, + "returnParameters": { + "id": 5827, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5826, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5906, + "src": "36761:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36761:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "36760:9:7" + }, + "scope": 8977, + "src": "36707:823:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5968, + "nodeType": "Block", + "src": "37719:481:7", + "statements": [ + { + "assignments": [ + 5915 + ], + "declarations": [ + { + "constant": false, + "id": 5915, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5968, + "src": "37730:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5914, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37730:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5917, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 5916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37742:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "37730:13:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5918, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37760:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 5919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37765:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "src": "37760:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 5964, + "nodeType": "Block", + "src": "37933:237:7", + "statements": [ + { + "body": { + "id": 5962, + "nodeType": "Block", + "src": "38021:138:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5946, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "38044:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5947, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "38051:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 5948, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38058:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38051:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5950, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "38050:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38044:16:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5961, + "nodeType": "IfStatement", + "src": "38040:104:7", + "trueBody": { + "id": 5960, + "nodeType": "Block", + "src": "38062:82:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5952, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "38085:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "id": 5953, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38092:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38085:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5955, + "nodeType": "ExpressionStatement", + "src": "38085:8:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5956, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "38116:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "|=", + "rightHandSide": { + "argumentTypes": null, + "id": 5957, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38123:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38116:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5959, + "nodeType": "ExpressionStatement", + "src": "38116:8:7" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5939, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38005:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38009:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38005:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5963, + "initializationExpression": { + "assignments": [ + 5936 + ], + "declarations": [ + { + "constant": false, + "id": 5936, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5963, + "src": "37990:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5935, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37990:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5938, + "initialValue": { + "argumentTypes": null, + "hexValue": "313238", + "id": 5937, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38000:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "nodeType": "VariableDeclarationStatement", + "src": "37990:13:7" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 5944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5942, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5936, + "src": "38012:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38018:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "38012:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5945, + "nodeType": "ExpressionStatement", + "src": "38012:7:7" + }, + "nodeType": "ForStatement", + "src": "37985:174:7" + } + ] + }, + "id": 5965, + "nodeType": "IfStatement", + "src": "37756:414:7", + "trueBody": { + "id": 5934, + "nodeType": "Block", + "src": "37770:148:7", + "statements": [ + { + "body": { + "id": 5932, + "nodeType": "Block", + "src": "37837:70:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 5926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5924, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37856:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": ">>=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37863:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37856:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5927, + "nodeType": "ExpressionStatement", + "src": "37856:8:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 5930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 5928, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "37883:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 5929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37890:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37883:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5931, + "nodeType": "ExpressionStatement", + "src": "37883:8:7" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5921, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5909, + "src": "37829:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "37834:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "37829:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5933, + "nodeType": "WhileStatement", + "src": "37822:85:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 5966, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5915, + "src": "38189:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5913, + "id": 5967, + "nodeType": "Return", + "src": "38182:10:7" + } + ] + }, + "documentation": { + "id": 5907, + "nodeType": "StructuredDocumentation", + "src": "37538:114:7", + "text": " @dev computes the largest integer smaller than or equal to the binary logarithm of the input." + }, + "id": 5969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5910, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5909, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5969, + "src": "37677:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5908, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37677:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "37676:12:7" + }, + "returnParameters": { + "id": 5913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5912, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5969, + "src": "37712:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5911, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "37712:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "37711:7:7" + }, + "scope": 8977, + "src": "37658:542:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6035, + "nodeType": "Block", + "src": "38650:424:7", + "statements": [ + { + "assignments": [ + 5978 + ], + "declarations": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "lo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6035, + "src": "38661:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5977, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38661:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5980, + "initialValue": { + "argumentTypes": null, + "id": 5979, + "name": "MIN_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3580, + "src": "38672:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38661:24:7" + }, + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "hi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6035, + "src": "38696:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5981, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38696:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5984, + "initialValue": { + "argumentTypes": null, + "id": 5983, + "name": "MAX_PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3583, + "src": "38707:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38696:24:7" + }, + { + "body": { + "id": 6013, + "nodeType": "Block", + "src": "38753:165:7", + "statements": [ + { + "assignments": [ + 5991 + ], + "declarations": [ + { + "constant": false, + "id": 5991, + "mutability": "mutable", + "name": "mid", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6013, + "src": "38768:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5990, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38768:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5998, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5992, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38781:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 5993, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38786:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38781:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 5995, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "38780:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38792:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "38780:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38768:25:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 5999, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38812:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6001, + "indexExpression": { + "argumentTypes": null, + "id": 6000, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38824:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38812:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6002, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "38832:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38812:22:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 6010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6008, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38898:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6009, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38903:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38898:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6011, + "nodeType": "ExpressionStatement", + "src": "38898:8:7" + }, + "id": 6012, + "nodeType": "IfStatement", + "src": "38808:98:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6004, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38853:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6005, + "name": "mid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5991, + "src": "38858:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38853:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6007, + "nodeType": "ExpressionStatement", + "src": "38853:8:7" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5985, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "38740:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38745:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "38740:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 5988, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38749:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38740:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6014, + "nodeType": "WhileStatement", + "src": "38733:185:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6015, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38934:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6017, + "indexExpression": { + "argumentTypes": null, + "id": 6016, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38946:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38934:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6018, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "38953:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38934:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6022, + "nodeType": "IfStatement", + "src": "38930:49:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6020, + "name": "hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "38977:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5976, + "id": 6021, + "nodeType": "Return", + "src": "38970:9:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 6023, + "name": "maxExpArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3623, + "src": "38994:11:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 6025, + "indexExpression": { + "argumentTypes": null, + "id": 6024, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "39006:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38994:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 6026, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5972, + "src": "39013:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38994:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6030, + "nodeType": "IfStatement", + "src": "38990:49:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 6028, + "name": "lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "39037:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 5976, + "id": 6029, + "nodeType": "Return", + "src": "39030:9:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39060:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6031, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "39052:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39052:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6034, + "nodeType": "ExpressionStatement", + "src": "39052:14:7" + } + ] + }, + "documentation": { + "id": 5970, + "nodeType": "StructuredDocumentation", + "src": "38208:359:7", + "text": " @dev the global \"maxExpArray\" is sorted in descending order, and therefore the following statements are equivalent:\n - This function finds the position of [the smallest value in \"maxExpArray\" larger than or equal to \"x\"]\n - This function finds the highest position of [a value in \"maxExpArray\" larger than or equal to \"x\"]" + }, + "id": 6036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPositionInMaxExpArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5972, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6036, + "src": "38608:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38608:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38607:12:7" + }, + "returnParameters": { + "id": 5976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5975, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6036, + "src": "38643:5:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5974, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38643:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "38642:7:7" + }, + "scope": 8977, + "src": "38573:501:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6545, + "nodeType": "Block", + "src": "39728:3782:7", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6545, + "src": "39739:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6046, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39739:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6049, + "initialValue": { + "argumentTypes": null, + "id": 6048, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39752:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39739:15:7" + }, + { + "assignments": [ + 6051 + ], + "declarations": [ + { + "constant": false, + "id": 6051, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6545, + "src": "39765:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6050, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39765:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6053, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6052, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39779:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "39765:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6054, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39793:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6055, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39799:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6056, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39804:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39799:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6058, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "39798:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6059, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "39811:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "39798:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39793:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6062, + "nodeType": "ExpressionStatement", + "src": "39793:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6063, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "39823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6064, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39830:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307833343432633465363037346138326631373937663732616330303030303030", + "id": 6065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39835:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4341658809405943247759097200640000000_by_1", + "typeString": "int_const 4341...(29 digits omitted)...0000" + }, + "value": "0x3442c4e6074a82f1797f72ac0000000" + }, + "src": "39830:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39823:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6068, + "nodeType": "ExpressionStatement", + "src": "39823:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6069, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39905:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6070, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39911:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6071, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "39916:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39911:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6073, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "39910:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6074, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "39923:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "39910:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39905:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6077, + "nodeType": "ExpressionStatement", + "src": "39905:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6078, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "39935:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6079, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "39942:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307831313662393666373537633338306662323837666430653430303030303030", + "id": 6080, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39947:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1447219603135314415919699066880000000_by_1", + "typeString": "int_const 1447...(29 digits omitted)...0000" + }, + "value": "0x116b96f757c380fb287fd0e40000000" + }, + "src": "39942:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39935:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6083, + "nodeType": "ExpressionStatement", + "src": "39935:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6084, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40017:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6085, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40023:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6086, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40028:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40023:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6088, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40022:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6089, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40035:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40022:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40017:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6092, + "nodeType": "ExpressionStatement", + "src": "40017:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6093, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40047:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6094, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40054:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830343561653562646435663065303365636131666634333930303030303030", + "id": 6095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40059:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_361804900783828603979924766720000000_by_1", + "typeString": "int_const 3618...(28 digits omitted)...0000" + }, + "value": "0x045ae5bdd5f0e03eca1ff4390000000" + }, + "src": "40054:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40047:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6098, + "nodeType": "ExpressionStatement", + "src": "40047:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6099, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40129:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6100, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40135:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6101, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40140:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40135:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6103, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40134:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6104, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40147:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40134:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40129:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6107, + "nodeType": "ExpressionStatement", + "src": "40129:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6108, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40159:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6109, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40166:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830306465666162663931333032636439356239666664613530303030303030", + "id": 6110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40171:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_72360980156765720795984953344000000_by_1", + "typeString": "int_const 7236...(27 digits omitted)...0000" + }, + "value": "0x00defabf91302cd95b9ffda50000000" + }, + "src": "40166:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40159:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6113, + "nodeType": "ExpressionStatement", + "src": "40159:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6114, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40241:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6115, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40247:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6116, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40252:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40247:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6118, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40246:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6119, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40259:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40246:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40241:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "40241:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6123, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40271:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6124, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40278:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303235323963613938333262323234333965666666396238303030303030", + "id": 6125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40283:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12060163359460953465997492224000000_by_1", + "typeString": "int_const 1206...(27 digits omitted)...0000" + }, + "value": "0x002529ca9832b22439efff9b8000000" + }, + "src": "40278:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40271:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6128, + "nodeType": "ExpressionStatement", + "src": "40271:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6129, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40353:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6130, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40359:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6131, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40364:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40359:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6133, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40358:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6134, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40371:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40358:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40353:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6137, + "nodeType": "ExpressionStatement", + "src": "40353:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6138, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40383:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6139, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40390:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303035346631636631326264303465353136623664613838303030303030", + "id": 6140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40395:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1722880479922993352285356032000000_by_1", + "typeString": "int_const 1722...(26 digits omitted)...0000" + }, + "value": "0x00054f1cf12bd04e516b6da88000000" + }, + "src": "40390:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40383:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6143, + "nodeType": "ExpressionStatement", + "src": "40383:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6144, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40465:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6145, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40471:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6146, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40476:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40471:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6148, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40470:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6149, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40483:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40470:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40465:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6152, + "nodeType": "ExpressionStatement", + "src": "40465:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6153, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40495:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6154, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40502:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030613965333965323537613039636132643664623531303030303030", + "id": 6155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40507:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_215360059990374169035669504000000_by_1", + "typeString": "int_const 2153...(25 digits omitted)...0000" + }, + "value": "0x0000a9e39e257a09ca2d6db51000000" + }, + "src": "40502:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40495:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6158, + "nodeType": "ExpressionStatement", + "src": "40495:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6159, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40577:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6160, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40583:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6161, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40588:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40583:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6163, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40582:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6164, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40595:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40582:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40577:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6167, + "nodeType": "ExpressionStatement", + "src": "40577:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6168, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40607:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6169, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40614:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030313265303636653762383339666130353063333039303030303030", + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40619:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_23928895554486018781741056000000_by_1", + "typeString": "int_const 23928895554486018781741056000000" + }, + "value": "0x000012e066e7b839fa050c309000000" + }, + "src": "40614:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40607:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6173, + "nodeType": "ExpressionStatement", + "src": "40607:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6174, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40689:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6175, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40695:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6176, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40700:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40695:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6178, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40694:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6179, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40707:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40694:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40689:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6182, + "nodeType": "ExpressionStatement", + "src": "40689:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6183, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40719:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6184, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40726:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303165333364376439323663333239613161643161383030303030", + "id": 6185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40731:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2392889555448601878174105600000_by_1", + "typeString": "int_const 2392889555448601878174105600000" + }, + "value": "0x000001e33d7d926c329a1ad1a800000" + }, + "src": "40726:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40719:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6188, + "nodeType": "ExpressionStatement", + "src": "40719:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6189, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40801:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6190, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40807:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6191, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40812:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40807:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6193, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40806:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6194, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40819:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40806:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40801:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6197, + "nodeType": "ExpressionStatement", + "src": "40801:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6198, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40831:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6199, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40838:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303032626565353133626462346136623139623566383030303030", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40843:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_217535414131691079834009600000_by_1", + "typeString": "int_const 217535414131691079834009600000" + }, + "value": "0x0000002bee513bdb4a6b19b5f800000" + }, + "src": "40838:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40831:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "40831:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6204, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40913:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6205, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40919:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6206, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "40924:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40919:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6208, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40918:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6209, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "40931:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "40918:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40913:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6212, + "nodeType": "ExpressionStatement", + "src": "40913:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6213, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "40943:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6214, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "40950:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030336139333136666137396238386563636632613030303030", + "id": 6215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "40955:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18127951177640923319500800000_by_1", + "typeString": "int_const 18127951177640923319500800000" + }, + "value": "0x00000003a9316fa79b88eccf2a00000" + }, + "src": "40950:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "40943:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6218, + "nodeType": "ExpressionStatement", + "src": "40943:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6219, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41025:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6220, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41031:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6221, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41036:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41031:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6223, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41030:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6224, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41043:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41030:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41025:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6227, + "nodeType": "ExpressionStatement", + "src": "41025:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6228, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41055:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6229, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41062:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303438313737656265316661383132333735323030303030", + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41067:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1394457782895455639961600000_by_1", + "typeString": "int_const 1394457782895455639961600000" + }, + "value": "0x0000000048177ebe1fa812375200000" + }, + "src": "41062:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41055:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6233, + "nodeType": "ExpressionStatement", + "src": "41055:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6234, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41137:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6235, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41143:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6236, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41148:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41143:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6238, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41142:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6239, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41155:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41142:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41137:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6242, + "nodeType": "ExpressionStatement", + "src": "41137:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6243, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41167:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6244, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41174:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303035323633666539303234326463626163663030303030", + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41179:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99604127349675402854400000_by_1", + "typeString": "int_const 99604127349675402854400000" + }, + "value": "0x0000000005263fe90242dcbacf00000" + }, + "src": "41174:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41167:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6248, + "nodeType": "ExpressionStatement", + "src": "41167:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6249, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41249:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6250, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41255:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6251, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41260:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41255:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6253, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41254:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6254, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41267:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41254:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41249:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6257, + "nodeType": "ExpressionStatement", + "src": "41249:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6258, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41279:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6259, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41286:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030353765323230393963303330643934313030303030", + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41291:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6640275156645026856960000_by_1", + "typeString": "int_const 6640275156645026856960000" + }, + "value": "0x000000000057e22099c030d94100000" + }, + "src": "41286:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41279:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6263, + "nodeType": "ExpressionStatement", + "src": "41279:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6264, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41361:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6265, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41367:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6266, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41372:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41367:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6268, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41366:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6269, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41379:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41366:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41361:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6272, + "nodeType": "ExpressionStatement", + "src": "41361:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6273, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41391:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6274, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41398:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303537653232303939633033306439343130303030", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41403:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_415017197290314178560000_by_1", + "typeString": "int_const 415017197290314178560000" + }, + "value": "0x0000000000057e22099c030d9410000" + }, + "src": "41398:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41391:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6278, + "nodeType": "ExpressionStatement", + "src": "41391:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6279, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41473:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6280, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41479:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6281, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41484:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41479:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6283, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41478:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6284, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41491:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41478:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41473:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6287, + "nodeType": "ExpressionStatement", + "src": "41473:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6288, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41503:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6289, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41510:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303035326236623534353639393736333130303030", + "id": 6290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41515:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_24412776311194951680000_by_1", + "typeString": "int_const 24412776311194951680000" + }, + "value": "0x00000000000052b6b54569976310000" + }, + "src": "41510:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41503:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "41503:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6294, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41585:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6295, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41591:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6296, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41596:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41591:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6298, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41590:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6299, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41603:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41590:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41585:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6302, + "nodeType": "ExpressionStatement", + "src": "41585:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6303, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41615:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6304, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41622:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030343938356636373639366266373438303030", + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41627:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1356265350621941760000_by_1", + "typeString": "int_const 1356265350621941760000" + }, + "value": "0x00000000000004985f67696bf748000" + }, + "src": "41622:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41615:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6308, + "nodeType": "ExpressionStatement", + "src": "41615:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6309, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41697:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6310, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41703:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6311, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41708:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41703:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6313, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41702:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6314, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41715:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41702:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41697:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6317, + "nodeType": "ExpressionStatement", + "src": "41697:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6318, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41727:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6319, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41734:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303364656131326561393965343938303030", + "id": 6320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41739:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_71382386874839040000_by_1", + "typeString": "int_const 71382386874839040000" + }, + "value": "0x000000000000003dea12ea99e498000" + }, + "src": "41734:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41727:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6323, + "nodeType": "ExpressionStatement", + "src": "41727:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6324, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41809:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6325, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41815:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6326, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41820:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41815:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6328, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41814:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6329, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41827:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41814:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41809:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6332, + "nodeType": "ExpressionStatement", + "src": "41809:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6333, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41839:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6334, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41846:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303033313838306632323134623665303030", + "id": 6335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41851:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3569119343741952000_by_1", + "typeString": "int_const 3569119343741952000" + }, + "value": "0x00000000000000031880f2214b6e000" + }, + "src": "41846:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41839:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6338, + "nodeType": "ExpressionStatement", + "src": "41839:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6339, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41921:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6340, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41927:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6341, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "41932:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41927:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6343, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "41926:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6344, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "41939:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "41926:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41921:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6347, + "nodeType": "ExpressionStatement", + "src": "41921:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6348, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "41951:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6349, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "41958:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030323562636666353665623336303030", + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "41963:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_169958063987712000_by_1", + "typeString": "int_const 169958063987712000" + }, + "value": "0x000000000000000025bcff56eb36000" + }, + "src": "41958:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "41951:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6353, + "nodeType": "ExpressionStatement", + "src": "41951:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6354, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42033:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6355, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42039:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6356, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42044:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42039:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6358, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42038:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6359, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42051:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42038:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42033:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6362, + "nodeType": "ExpressionStatement", + "src": "42033:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6363, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42063:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6364, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42070:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303162373232653130616231303030", + "id": 6365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42075:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7725366544896000_by_1", + "typeString": "int_const 7725366544896000" + }, + "value": "0x000000000000000001b722e10ab1000" + }, + "src": "42070:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42063:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6368, + "nodeType": "ExpressionStatement", + "src": "42063:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6369, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42145:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6370, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42151:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6371, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42156:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6373, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42150:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6374, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42163:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42150:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42145:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6377, + "nodeType": "ExpressionStatement", + "src": "42145:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6378, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42175:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6379, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42182:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303031333137633730303737303030", + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42187:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_335885501952000_by_1", + "typeString": "int_const 335885501952000" + }, + "value": "0x0000000000000000001317c70077000" + }, + "src": "42182:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42175:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6383, + "nodeType": "ExpressionStatement", + "src": "42175:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6384, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42257:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6385, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42263:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6386, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42268:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42263:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6388, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42262:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6389, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42275:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42262:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42257:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6392, + "nodeType": "ExpressionStatement", + "src": "42257:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6393, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42287:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6394, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030306362613834616166613030", + "id": 6395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42299:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_13995229248000_by_1", + "typeString": "int_const 13995229248000" + }, + "value": "0x00000000000000000000cba84aafa00" + }, + "src": "42294:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42287:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6398, + "nodeType": "ExpressionStatement", + "src": "42287:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6399, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42369:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6400, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42375:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6401, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42380:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42375:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6403, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42374:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6404, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42387:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42374:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42369:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6407, + "nodeType": "ExpressionStatement", + "src": "42369:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6408, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6409, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42406:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303038323537336130613030", + "id": 6410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42411:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_559809169920_by_1", + "typeString": "int_const 559809169920" + }, + "value": "0x00000000000000000000082573a0a00" + }, + "src": "42406:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42399:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6413, + "nodeType": "ExpressionStatement", + "src": "42399:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6414, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42481:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6415, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42487:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6416, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42492:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42487:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6418, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42486:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6419, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42499:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42486:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42481:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6422, + "nodeType": "ExpressionStatement", + "src": "42481:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6423, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42511:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6424, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42518:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030353033356164393030", + "id": 6425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42523:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21531121920_by_1", + "typeString": "int_const 21531121920" + }, + "value": "0x00000000000000000000005035ad900" + }, + "src": "42518:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42511:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6428, + "nodeType": "ExpressionStatement", + "src": "42511:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6429, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42593:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6430, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42599:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6431, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42604:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42599:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6433, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42598:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6434, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42611:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42598:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42593:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "42593:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6438, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42623:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6439, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42630:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303266383831623030", + "id": 6440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42635:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_797448960_by_1", + "typeString": "int_const 797448960" + }, + "value": "0x000000000000000000000002f881b00" + }, + "src": "42630:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42623:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6443, + "nodeType": "ExpressionStatement", + "src": "42623:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6444, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42705:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6445, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42711:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6446, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42716:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6448, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42710:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6449, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42723:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42710:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42705:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6452, + "nodeType": "ExpressionStatement", + "src": "42705:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6453, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42735:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6454, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42742:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303031623239333430", + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42747:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_28480320_by_1", + "typeString": "int_const 28480320" + }, + "value": "0x0000000000000000000000001b29340" + }, + "src": "42742:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42735:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6458, + "nodeType": "ExpressionStatement", + "src": "42735:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6459, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42817:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6460, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42823:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6461, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42828:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42823:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6463, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42822:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6464, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42835:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42822:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42817:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6467, + "nodeType": "ExpressionStatement", + "src": "42817:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6468, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42847:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6469, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42854:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030306566633430", + "id": 6470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42859:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_982080_by_1", + "typeString": "int_const 982080" + }, + "value": "0x00000000000000000000000000efc40" + }, + "src": "42854:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42847:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6473, + "nodeType": "ExpressionStatement", + "src": "42847:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6474, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42929:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6475, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42935:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6476, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "42940:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42935:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6478, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42934:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6479, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "42947:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "42934:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42929:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6482, + "nodeType": "ExpressionStatement", + "src": "42929:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6483, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "42959:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6484, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "42966:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303037666530", + "id": 6485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "42971:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32736_by_1", + "typeString": "int_const 32736" + }, + "value": "0x0000000000000000000000000007fe0" + }, + "src": "42966:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "42959:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6488, + "nodeType": "ExpressionStatement", + "src": "42959:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6489, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43041:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6490, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43047:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6491, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43052:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43046:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6494, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43059:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43046:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43041:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6497, + "nodeType": "ExpressionStatement", + "src": "43041:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6498, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43071:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6499, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43078:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030343230", + "id": 6500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43083:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1056_by_1", + "typeString": "int_const 1056" + }, + "value": "0x0000000000000000000000000000420" + }, + "src": "43078:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43071:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6503, + "nodeType": "ExpressionStatement", + "src": "43071:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6504, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43153:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6505, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6506, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43164:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6508, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43158:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6509, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43171:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43158:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43153:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6512, + "nodeType": "ExpressionStatement", + "src": "43153:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6513, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43183:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6514, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43190:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030303231", + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43195:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_33_by_1", + "typeString": "int_const 33" + }, + "value": "0x0000000000000000000000000000021" + }, + "src": "43190:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43183:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "43183:45:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6519, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43265:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6520, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43271:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6521, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43276:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43271:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6523, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43270:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 6524, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43283:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43270:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43265:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6527, + "nodeType": "ExpressionStatement", + "src": "43265:28:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6528, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43295:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6529, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "43302:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303030303030303030303030303030303031", + "id": 6530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43307:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x0000000000000000000000000000001" + }, + "src": "43302:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43295:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6533, + "nodeType": "ExpressionStatement", + "src": "43295:45:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6534, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6051, + "src": "43386:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307836383835383963633065393530356532663266656535353830303030303030", + "id": 6535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "43392:33:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8683317618811886495518194401280000000_by_1", + "typeString": "int_const 8683...(29 digits omitted)...0000" + }, + "value": "0x688589cc0e9505e2f2fee5580000000" + }, + "src": "43386:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 6537, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6039, + "src": "43428:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43386:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6539, + "name": "ONE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "43434:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "id": 6540, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6041, + "src": "43441:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "43434:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6542, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "43433:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "43386:66:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6045, + "id": 6544, + "nodeType": "Return", + "src": "43379:73:7" + } + ] + }, + "documentation": { + "id": 6037, + "nodeType": "StructuredDocumentation", + "src": "39082:558:7", + "text": " @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'.\n it approximates \"e ^ x\" via maclaurin summation: \"(x^0)/0! + (x^1)/1! + ... + (x^n)/n!\".\n it returns \"e ^ (x / 2 ^ precision) * 2 ^ precision\", that is, the result is upshifted for accuracy.\n the global \"maxExpArray\" maps each \"precision\" to \"((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1\".\n the maximum permitted value for \"x\" is therefore given by \"maxExpArray[precision] >> (MAX_PRECISION - precision)\"." + }, + "id": 6546, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalExp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6039, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39666:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6041, + "mutability": "mutable", + "name": "_precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39678:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6040, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "39678:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39665:30:7" + }, + "returnParameters": { + "id": 6045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6044, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6546, + "src": "39719:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6043, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39719:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "39718:9:7" + }, + "scope": 8977, + "src": "39646:3864:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6865, + "nodeType": "Block", + "src": "44315:2735:7", + "statements": [ + { + "assignments": [ + 6555 + ], + "declarations": [ + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44326:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44326:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6557, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44340:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "44326:15:7" + }, + { + "assignments": [ + 6559 + ], + "declarations": [ + { + "constant": false, + "id": 6559, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44354:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6558, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44354:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6560, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44354:9:7" + }, + { + "assignments": [ + 6562 + ], + "declarations": [ + { + "constant": false, + "id": 6562, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44374:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6561, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44374:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6563, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44374:9:7" + }, + { + "assignments": [ + 6565 + ], + "declarations": [ + { + "constant": false, + "id": 6565, + "mutability": "mutable", + "name": "w", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6865, + "src": "44394:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6564, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44394:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6566, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "44394:9:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6567, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44420:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786433303934633730663033346465346239366666376435623666393966636438", + "id": 6568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44425:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_280515388193368458015406427511040113880_by_1", + "typeString": "int_const 2805...(31 digits omitted)...3880" + }, + "value": "0xd3094c70f034de4b96ff7d5b6f99fcd8" + }, + "src": "44420:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6583, + "nodeType": "IfStatement", + "src": "44416:143:7", + "trueBody": { + "id": 6582, + "nodeType": "Block", + "src": "44461:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6570, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44462:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783430303030303030303030303030303030303030303030303030303030303030", + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44469:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85070591730234615865843651857942052864_by_1", + "typeString": "int_const 8507...(30 digits omitted)...2864" + }, + "value": "0x40000000000000000000000000000000" + }, + "src": "44462:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6573, + "nodeType": "ExpressionStatement", + "src": "44462:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6574, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44505:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6575, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44509:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6576, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44509:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786433303934633730663033346465346239366666376435623666393966636438", + "id": 6578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44523:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_280515388193368458015406427511040113880_by_1", + "typeString": "int_const 2805...(31 digits omitted)...3880" + }, + "value": "0xd3094c70f034de4b96ff7d5b6f99fcd8" + }, + "src": "44509:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44505:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6581, + "nodeType": "ExpressionStatement", + "src": "44505:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6584, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44588:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786134356166316531663430633333336233646531646234646435356632396137", + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44593:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218465603988574474844591417643679820199_by_1", + "typeString": "int_const 2184...(31 digits omitted)...0199" + }, + "value": "0xa45af1e1f40c333b3de1db4dd55f29a7" + }, + "src": "44588:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6600, + "nodeType": "IfStatement", + "src": "44584:143:7", + "trueBody": { + "id": 6599, + "nodeType": "Block", + "src": "44629:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6587, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44630:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783230303030303030303030303030303030303030303030303030303030303030", + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44637:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42535295865117307932921825928971026432_by_1", + "typeString": "int_const 4253...(30 digits omitted)...6432" + }, + "value": "0x20000000000000000000000000000000" + }, + "src": "44630:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6590, + "nodeType": "ExpressionStatement", + "src": "44630:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6591, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44673:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6592, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44677:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6593, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44677:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786134356166316531663430633333336233646531646234646435356632396137", + "id": 6595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44691:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_218465603988574474844591417643679820199_by_1", + "typeString": "int_const 2184...(31 digits omitted)...0199" + }, + "value": "0xa45af1e1f40c333b3de1db4dd55f29a7" + }, + "src": "44677:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44673:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6598, + "nodeType": "ExpressionStatement", + "src": "44673:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6601, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44756:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783931306230323264623761653637636537366234343163323730333563366131", + "id": 6602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44761:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192795218841189805222451540510555621025_by_1", + "typeString": "int_const 1927...(31 digits omitted)...1025" + }, + "value": "0x910b022db7ae67ce76b441c27035c6a1" + }, + "src": "44756:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6617, + "nodeType": "IfStatement", + "src": "44752:143:7", + "trueBody": { + "id": 6616, + "nodeType": "Block", + "src": "44797:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6604, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44798:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030303030303030303030303030303030", + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44805:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x10000000000000000000000000000000" + }, + "src": "44798:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6607, + "nodeType": "ExpressionStatement", + "src": "44798:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6608, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44841:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6609, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44845:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6610, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "44849:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44845:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783931306230323264623761653637636537366234343163323730333563366131", + "id": 6612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44859:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_192795218841189805222451540510555621025_by_1", + "typeString": "int_const 1927...(31 digits omitted)...1025" + }, + "value": "0x910b022db7ae67ce76b441c27035c6a1" + }, + "src": "44845:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "44841:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6615, + "nodeType": "ExpressionStatement", + "src": "44841:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6618, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "44924:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783838343135616262653961373662656164386430306366313132653464346138", + "id": 6619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44929:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181114347027396448854165353426875372712_by_1", + "typeString": "int_const 1811...(31 digits omitted)...2712" + }, + "value": "0x88415abbe9a76bead8d00cf112e4d4a8" + }, + "src": "44924:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6634, + "nodeType": "IfStatement", + "src": "44920:143:7", + "trueBody": { + "id": 6633, + "nodeType": "Block", + "src": "44965:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6621, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "44966:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783038303030303030303030303030303030303030303030303030303030303030", + "id": 6622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "44973:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10633823966279326983230456482242756608_by_1", + "typeString": "int_const 1063...(30 digits omitted)...6608" + }, + "value": "0x08000000000000000000000000000000" + }, + "src": "44966:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6624, + "nodeType": "ExpressionStatement", + "src": "44966:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6625, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45009:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6626, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45013:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6627, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45017:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45013:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783838343135616262653961373662656164386430306366313132653464346138", + "id": 6629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45027:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181114347027396448854165353426875372712_by_1", + "typeString": "int_const 1811...(31 digits omitted)...2712" + }, + "value": "0x88415abbe9a76bead8d00cf112e4d4a8" + }, + "src": "45013:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45009:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6632, + "nodeType": "ExpressionStatement", + "src": "45009:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6635, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45092:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783834313032623030383933663634633730356538343164356434303634626433", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45097:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_175542044379434494067323265867529472979_by_1", + "typeString": "int_const 1755...(31 digits omitted)...2979" + }, + "value": "0x84102b00893f64c705e841d5d4064bd3" + }, + "src": "45092:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6651, + "nodeType": "IfStatement", + "src": "45088:143:7", + "trueBody": { + "id": 6650, + "nodeType": "Block", + "src": "45133:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6638, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45134:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783034303030303030303030303030303030303030303030303030303030303030", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45141:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5316911983139663491615228241121378304_by_1", + "typeString": "int_const 5316...(29 digits omitted)...8304" + }, + "value": "0x04000000000000000000000000000000" + }, + "src": "45134:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "45134:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6642, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45177:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6643, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45181:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6644, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45185:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45181:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783834313032623030383933663634633730356538343164356434303634626433", + "id": 6646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45195:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_175542044379434494067323265867529472979_by_1", + "typeString": "int_const 1755...(31 digits omitted)...2979" + }, + "value": "0x84102b00893f64c705e841d5d4064bd3" + }, + "src": "45181:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45177:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6649, + "nodeType": "ExpressionStatement", + "src": "45177:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6652, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45260:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783832303430353561616566316338626435633332353966343832323733356132", + "id": 6653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45265:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_172820517236198538127967385733353125282_by_1", + "typeString": "int_const 1728...(31 digits omitted)...5282" + }, + "value": "0x8204055aaef1c8bd5c3259f4822735a2" + }, + "src": "45260:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6668, + "nodeType": "IfStatement", + "src": "45256:143:7", + "trueBody": { + "id": 6667, + "nodeType": "Block", + "src": "45301:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6655, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45302:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783032303030303030303030303030303030303030303030303030303030303030", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45309:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2658455991569831745807614120560689152_by_1", + "typeString": "int_const 2658...(29 digits omitted)...9152" + }, + "value": "0x02000000000000000000000000000000" + }, + "src": "45302:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "45302:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6659, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45345:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6660, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45349:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6661, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45353:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45349:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783832303430353561616566316338626435633332353966343832323733356132", + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45363:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_172820517236198538127967385733353125282_by_1", + "typeString": "int_const 1728...(31 digits omitted)...5282" + }, + "value": "0x8204055aaef1c8bd5c3259f4822735a2" + }, + "src": "45349:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45345:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6666, + "nodeType": "ExpressionStatement", + "src": "45345:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6669, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45428:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783831303130306162303032323264383631393331633135653339623434653939", + "id": 6670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45433:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_171475617301169790829459146906809945753_by_1", + "typeString": "int_const 1714...(31 digits omitted)...5753" + }, + "value": "0x810100ab00222d861931c15e39b44e99" + }, + "src": "45428:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6685, + "nodeType": "IfStatement", + "src": "45424:143:7", + "trueBody": { + "id": 6684, + "nodeType": "Block", + "src": "45469:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6672, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45470:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783031303030303030303030303030303030303030303030303030303030303030", + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45477:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1329227995784915872903807060280344576_by_1", + "typeString": "int_const 1329...(29 digits omitted)...4576" + }, + "value": "0x01000000000000000000000000000000" + }, + "src": "45470:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6675, + "nodeType": "ExpressionStatement", + "src": "45470:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6676, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45513:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6677, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45517:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6678, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45521:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45517:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783831303130306162303032323264383631393331633135653339623434653939", + "id": 6680, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45531:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_171475617301169790829459146906809945753_by_1", + "typeString": "int_const 1714...(31 digits omitted)...5753" + }, + "value": "0x810100ab00222d861931c15e39b44e99" + }, + "src": "45517:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45513:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6683, + "nodeType": "ExpressionStatement", + "src": "45513:52:7" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6686, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45596:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783830383034303135356161626262653934353135323136393335353466373333", + "id": 6687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45601:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170807097224429000759274174605493073715_by_1", + "typeString": "int_const 1708...(31 digits omitted)...3715" + }, + "value": "0x808040155aabbbe9451521693554f733" + }, + "src": "45596:39:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 6702, + "nodeType": "IfStatement", + "src": "45592:143:7", + "trueBody": { + "id": 6701, + "nodeType": "Block", + "src": "45637:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6689, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45638:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30783030383030303030303030303030303030303030303030303030303030303030", + "id": 6690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45645:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_664613997892457936451903530140172288_by_1", + "typeString": "int_const 6646...(28 digits omitted)...2288" + }, + "value": "0x00800000000000000000000000000000" + }, + "src": "45638:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6692, + "nodeType": "ExpressionStatement", + "src": "45638:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6693, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45681:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6694, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45685:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6695, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45689:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45685:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783830383034303135356161626262653934353135323136393335353466373333", + "id": 6697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45699:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170807097224429000759274174605493073715_by_1", + "typeString": "int_const 1708...(31 digits omitted)...3715" + }, + "value": "0x808040155aabbbe9451521693554f733" + }, + "src": "45685:48:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45681:52:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6700, + "nodeType": "ExpressionStatement", + "src": "45681:52:7" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 6709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6703, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45762:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6704, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45766:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6705, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6549, + "src": "45770:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6706, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45774:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45770:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45766:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45762:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6710, + "nodeType": "ExpressionStatement", + "src": "45762:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6711, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "45792:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6712, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45796:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6713, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45800:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45796:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6715, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45804:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45796:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45792:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6718, + "nodeType": "ExpressionStatement", + "src": "45792:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6719, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45822:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6720, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45829:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45834:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6722, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "45872:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45834:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6724, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45833:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45829:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45877:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "src": "45829:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45822:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6729, + "nodeType": "ExpressionStatement", + "src": "45822:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6730, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45914:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6731, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45918:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6732, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "45922:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45918:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6734, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "45926:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45918:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45914:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6737, + "nodeType": "ExpressionStatement", + "src": "45914:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6738, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "45973:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6739, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "45980:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078306161616161616161616161616161616161616161616161616161616161616161", + "id": 6740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45985:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_226854911280625642308916404954512140970_by_1", + "typeString": "int_const 2268...(31 digits omitted)...0970" + }, + "value": "0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6741, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46023:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45985:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6743, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45984:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45980:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 6745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46028:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "src": "45980:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45973:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6748, + "nodeType": "ExpressionStatement", + "src": "45973:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6749, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46065:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6750, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46069:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6751, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46073:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46069:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6753, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46077:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46069:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46065:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "46065:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6757, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46124:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6758, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46131:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303939393939393939393939393939393939393939393939393939393939393939", + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46136:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_204169420152563078078024764459060926873_by_1", + "typeString": "int_const 2041...(31 digits omitted)...6873" + }, + "value": "0x099999999999999999999999999999999" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6760, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46174:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46136:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6762, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46135:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46131:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078333030303030303030303030303030303030303030303030303030303030303030", + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46179:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1020847100762815390390123822295304634368_by_1", + "typeString": "int_const 1020...(32 digits omitted)...4368" + }, + "value": "0x300000000000000000000000000000000" + }, + "src": "46131:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46124:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6767, + "nodeType": "ExpressionStatement", + "src": "46124:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6768, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46216:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6769, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46220:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6770, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46224:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46220:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6772, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46228:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46220:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46216:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6775, + "nodeType": "ExpressionStatement", + "src": "46216:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6776, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46275:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6777, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46282:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303932343932343932343932343932343932343932343932343932343932343932", + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46287:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_194447066811964836264785489961010406546_by_1", + "typeString": "int_const 1944...(31 digits omitted)...6546" + }, + "value": "0x092492492492492492492492492492492" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6779, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46325:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46287:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6781, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46286:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46282:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078343030303030303030303030303030303030303030303030303030303030303030", + "id": 6783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46330:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1361129467683753853853498429727072845824_by_1", + "typeString": "int_const 1361...(32 digits omitted)...5824" + }, + "value": "0x400000000000000000000000000000000" + }, + "src": "46282:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46275:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6786, + "nodeType": "ExpressionStatement", + "src": "46275:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6787, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46367:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6788, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46371:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6789, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46375:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46371:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6791, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46379:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46371:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46367:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "46367:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6795, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46426:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6796, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46433:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303865333865333865333865333865333865333865333865333865333865333865", + "id": 6797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46438:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_189045759400521368590763670795426784142_by_1", + "typeString": "int_const 1890...(31 digits omitted)...4142" + }, + "value": "0x08e38e38e38e38e38e38e38e38e38e38e" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6798, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46476:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46438:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6800, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46437:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46433:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078353030303030303030303030303030303030303030303030303030303030303030", + "id": 6802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46481:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1701411834604692317316873037158841057280_by_1", + "typeString": "int_const 1701...(32 digits omitted)...7280" + }, + "value": "0x500000000000000000000000000000000" + }, + "src": "46433:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46426:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6805, + "nodeType": "ExpressionStatement", + "src": "46426:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6806, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46518:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6807, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46522:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6808, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46526:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46522:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6810, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46522:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46518:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6813, + "nodeType": "ExpressionStatement", + "src": "46518:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6814, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46577:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6815, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46584:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303862613265386261326538626132653862613265386261326538626132653862", + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46589:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_185608563775057343707295240417328115339_by_1", + "typeString": "int_const 1856...(31 digits omitted)...5339" + }, + "value": "0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6817, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46627:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46589:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6819, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46588:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46584:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078363030303030303030303030303030303030303030303030303030303030303030", + "id": 6821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46632:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2041694201525630780780247644590609268736_by_1", + "typeString": "int_const 2041...(32 digits omitted)...8736" + }, + "value": "0x600000000000000000000000000000000" + }, + "src": "46584:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46577:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6824, + "nodeType": "ExpressionStatement", + "src": "46577:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6825, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46669:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6826, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46673:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6827, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46677:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46673:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6829, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46673:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46669:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6832, + "nodeType": "ExpressionStatement", + "src": "46669:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6833, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46728:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6834, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46735:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303839643839643839643839643839643839643839643839643839643839643839", + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46740:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_183228966803582249557201711694029036937_by_1", + "typeString": "int_const 1832...(31 digits omitted)...6937" + }, + "value": "0x089d89d89d89d89d89d89d89d89d89d89" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6836, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46778:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46740:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6838, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46739:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46735:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078373030303030303030303030303030303030303030303030303030303030303030", + "id": 6840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46783:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2381976568446569244243622252022377480192_by_1", + "typeString": "int_const 2381...(32 digits omitted)...0192" + }, + "value": "0x700000000000000000000000000000000" + }, + "src": "46735:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46728:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6843, + "nodeType": "ExpressionStatement", + "src": "46728:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6844, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46820:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6845, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46824:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6846, + "name": "w", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6565, + "src": "46828:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46824:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6848, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "46832:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46824:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46820:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6851, + "nodeType": "ExpressionStatement", + "src": "46820:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6852, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "46879:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6853, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6562, + "src": "46886:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3078303838383838383838383838383838383838383838383838383838383838383838", + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46891:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_181483929024500513847133123963609712776_by_1", + "typeString": "int_const 1814...(31 digits omitted)...2776" + }, + "value": "0x088888888888888888888888888888888" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 6855, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6559, + "src": "46929:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46891:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6857, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "46890:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46886:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078383030303030303030303030303030303030303030303030303030303030303030", + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "46934:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2722258935367507707706996859454145691648_by_1", + "typeString": "int_const 2722...(32 digits omitted)...1648" + }, + "value": "0x800000000000000000000000000000000" + }, + "src": "46886:83:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "46879:90:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6862, + "nodeType": "ExpressionStatement", + "src": "46879:90:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6863, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6555, + "src": "47039:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6553, + "id": 6864, + "nodeType": "Return", + "src": "47032:10:7" + } + ] + }, + "documentation": { + "id": 6547, + "nodeType": "StructuredDocumentation", + "src": "43518:728:7", + "text": " @dev computes log(x / FIXED_1) * FIXED_1\n Input range: FIXED_1 <= x <= OPT_LOG_MAX_VAL - 1\n Auto-generated via 'PrintFunctionOptimalLog.py'\n Detailed description:\n - Rewrite the input as a product of natural exponents and a single residual r, such that 1 < r < 2\n - The natural logarithm of each (pre-calculated) exponent is the degree of the exponent\n - The natural logarithm of r is calculated via Taylor series for log(1 + x), where x = r - 1\n - The natural logarithm of the input is calculated by summing up the intermediate results above\n - For example: log(250) = log(e^4 * e^1 * e^0.5 * 1.021692859) = 4 + 1 + 0.5 + log(1 + 0.021692859)" + }, + "id": 6866, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalLog", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6549, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6866, + "src": "44272:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44272:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44271:11:7" + }, + "returnParameters": { + "id": 6553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6552, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 6866, + "src": "44306:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44306:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "44305:9:7" + }, + "scope": 8977, + "src": "44252:2798:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7275, + "nodeType": "Block", + "src": "47810:3153:7", + "statements": [ + { + "assignments": [ + 6875 + ], + "declarations": [ + { + "constant": false, + "id": 6875, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47821:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47821:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6877, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 6876, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47835:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "47821:15:7" + }, + { + "assignments": [ + 6879 + ], + "declarations": [ + { + "constant": false, + "id": 6879, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47849:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6878, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47849:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6880, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "47849:9:7" + }, + { + "assignments": [ + 6882 + ], + "declarations": [ + { + "constant": false, + "id": 6882, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7275, + "src": "47869:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47869:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 6883, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "47869:9:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6884, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47891:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 6889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6885, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "47895:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6886, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "47899:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783130303030303030303030303030303030303030303030303030303030303030", + "id": 6887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "47903:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x10000000000000000000000000000000" + }, + "src": "47899:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47895:42:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47891:46:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6891, + "nodeType": "ExpressionStatement", + "src": "47891:46:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6892, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47979:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6893, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "47983:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6894, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "47987:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47983:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6896, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "47991:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47983:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "47979:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6899, + "nodeType": "ExpressionStatement", + "src": "47979:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6900, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48000:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6901, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48007:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307831306531623362653431356130303030", + "id": 6902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48011:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1216451004088320000_by_1", + "typeString": "int_const 1216451004088320000" + }, + "value": "0x10e1b3be415a0000" + }, + "src": "48007:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48000:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6905, + "nodeType": "ExpressionStatement", + "src": "48000:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6906, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48066:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6907, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48070:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6908, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48074:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48070:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6910, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48078:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48070:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48066:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6913, + "nodeType": "ExpressionStatement", + "src": "48066:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6914, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48087:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6915, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48094:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830356130393133663662316530303030", + "id": 6916, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48098:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_405483668029440000_by_1", + "typeString": "int_const 405483668029440000" + }, + "value": "0x05a0913f6b1e0000" + }, + "src": "48094:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48087:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6919, + "nodeType": "ExpressionStatement", + "src": "48087:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6920, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48153:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6921, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48157:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6922, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48161:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48157:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6924, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48165:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48157:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48153:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6927, + "nodeType": "ExpressionStatement", + "src": "48153:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6928, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48174:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6929, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48181:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830313638323434666461633738303030", + "id": 6930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48185:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_101370917007360000_by_1", + "typeString": "int_const 101370917007360000" + }, + "value": "0x0168244fdac78000" + }, + "src": "48181:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48174:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6933, + "nodeType": "ExpressionStatement", + "src": "48174:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6934, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48240:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6935, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48244:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6936, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48248:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48244:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6938, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48252:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48244:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48240:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "48240:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6942, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48261:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6943, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48268:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303438303734333262633138303030", + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48272:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20274183401472000_by_1", + "typeString": "int_const 20274183401472000" + }, + "value": "0x004807432bc18000" + }, + "src": "48268:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48261:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6947, + "nodeType": "ExpressionStatement", + "src": "48261:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6948, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48327:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6949, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48331:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6950, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48335:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48331:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6952, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48339:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48331:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48327:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6955, + "nodeType": "ExpressionStatement", + "src": "48327:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6956, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48348:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6957, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48355:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303063303133356463613034303030", + "id": 6958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48359:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3379030566912000_by_1", + "typeString": "int_const 3379030566912000" + }, + "value": "0x000c0135dca04000" + }, + "src": "48355:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48348:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6961, + "nodeType": "ExpressionStatement", + "src": "48348:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6962, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48414:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6963, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48418:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6964, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48422:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48418:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6966, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48426:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48418:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48414:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6969, + "nodeType": "ExpressionStatement", + "src": "48414:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6970, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48435:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6971, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48442:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303031623730376231636463303030", + "id": 6972, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48446:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_482718652416000_by_1", + "typeString": "int_const 482718652416000" + }, + "value": "0x0001b707b1cdc000" + }, + "src": "48442:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48435:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6975, + "nodeType": "ExpressionStatement", + "src": "48435:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6976, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48501:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6977, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48505:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6978, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48509:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48505:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6980, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48513:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48505:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48501:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6983, + "nodeType": "ExpressionStatement", + "src": "48501:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6984, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48522:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6985, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48529:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030333665306636333962383030", + "id": 6986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48533:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60339831552000_by_1", + "typeString": "int_const 60339831552000" + }, + "value": "0x000036e0f639b800" + }, + "src": "48529:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48522:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6989, + "nodeType": "ExpressionStatement", + "src": "48522:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 6996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6990, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48588:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6991, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48592:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 6992, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48596:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48592:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 6994, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48600:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48592:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48588:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6997, + "nodeType": "ExpressionStatement", + "src": "48588:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6998, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48609:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 6999, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48616:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303631386665653966383030", + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48620:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6704425728000_by_1", + "typeString": "int_const 6704425728000" + }, + "value": "0x00000618fee9f800" + }, + "src": "48616:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48609:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7003, + "nodeType": "ExpressionStatement", + "src": "48609:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7004, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48675:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7005, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48679:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7006, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48683:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48679:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7008, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48687:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48679:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48675:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7011, + "nodeType": "ExpressionStatement", + "src": "48675:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7012, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48696:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7013, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48703:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303039633139376463633030", + "id": 7014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48707:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_670442572800_by_1", + "typeString": "int_const 670442572800" + }, + "value": "0x0000009c197dcc00" + }, + "src": "48703:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48696:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7017, + "nodeType": "ExpressionStatement", + "src": "48696:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7018, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48762:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7019, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48766:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7020, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48770:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48766:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7022, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48774:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48766:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48762:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7025, + "nodeType": "ExpressionStatement", + "src": "48762:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7026, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48783:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7027, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48790:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030653330646365343030", + "id": 7028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48794:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_60949324800_by_1", + "typeString": "int_const 60949324800" + }, + "value": "0x0000000e30dce400" + }, + "src": "48790:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48783:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7031, + "nodeType": "ExpressionStatement", + "src": "48783:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7032, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48849:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7033, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48853:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7034, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48857:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48853:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7036, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48861:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48853:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48849:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7039, + "nodeType": "ExpressionStatement", + "src": "48849:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7040, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48870:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7041, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48877:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030313265626431333030", + "id": 7042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48881:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5079110400_by_1", + "typeString": "int_const 5079110400" + }, + "value": "0x000000012ebd1300" + }, + "src": "48877:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48870:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7045, + "nodeType": "ExpressionStatement", + "src": "48870:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7046, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48936:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7047, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48940:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7048, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "48944:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48940:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7050, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "48948:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48940:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48936:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7053, + "nodeType": "ExpressionStatement", + "src": "48936:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7054, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "48957:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7055, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "48964:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303137343939663030", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "48968:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_390700800_by_1", + "typeString": "int_const 390700800" + }, + "value": "0x0000000017499f00" + }, + "src": "48964:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "48957:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7059, + "nodeType": "ExpressionStatement", + "src": "48957:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7060, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49023:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7061, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49027:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7062, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49031:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49027:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7064, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49035:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49027:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49023:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7067, + "nodeType": "ExpressionStatement", + "src": "49023:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7068, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49044:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7069, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49051:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303031613964343830", + "id": 7070, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49055:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_27907200_by_1", + "typeString": "int_const 27907200" + }, + "value": "0x0000000001a9d480" + }, + "src": "49051:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49044:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7073, + "nodeType": "ExpressionStatement", + "src": "49044:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7074, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49110:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7075, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49114:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7076, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49118:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49114:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7078, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49114:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49110:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7081, + "nodeType": "ExpressionStatement", + "src": "49110:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7082, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49131:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7083, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49138:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030316336333830", + "id": 7084, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49142:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1860480_by_1", + "typeString": "int_const 1860480" + }, + "value": "0x00000000001c6380" + }, + "src": "49138:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49131:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7087, + "nodeType": "ExpressionStatement", + "src": "49131:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7088, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49197:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7089, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49201:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7090, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49205:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49201:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7092, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49209:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49201:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49197:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7095, + "nodeType": "ExpressionStatement", + "src": "49197:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7096, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49218:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7097, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49225:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303163363338", + "id": 7098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49229:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_116280_by_1", + "typeString": "int_const 116280" + }, + "value": "0x000000000001c638" + }, + "src": "49225:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49218:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7101, + "nodeType": "ExpressionStatement", + "src": "49218:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7102, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49284:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7103, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49288:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7104, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49292:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49288:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7106, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49296:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49288:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49284:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7109, + "nodeType": "ExpressionStatement", + "src": "49284:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7110, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49305:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7111, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49312:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303031616238", + "id": 7112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49316:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6840_by_1", + "typeString": "int_const 6840" + }, + "value": "0x0000000000001ab8" + }, + "src": "49312:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49305:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7115, + "nodeType": "ExpressionStatement", + "src": "49305:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7116, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49371:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7117, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49375:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7118, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49379:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49375:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7120, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49375:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49371:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7123, + "nodeType": "ExpressionStatement", + "src": "49371:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7124, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49392:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7125, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49399:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030313763", + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49403:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_380_by_1", + "typeString": "int_const 380" + }, + "value": "0x000000000000017c" + }, + "src": "49399:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49392:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "49392:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7130, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49458:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7131, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49462:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7132, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49466:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49462:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7134, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49470:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49462:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49458:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7137, + "nodeType": "ExpressionStatement", + "src": "49458:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7138, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7139, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49486:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303134", + "id": 7140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49490:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "0x0000000000000014" + }, + "src": "49486:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49479:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7143, + "nodeType": "ExpressionStatement", + "src": "49479:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7144, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49545:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7145, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49549:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7146, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49553:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49549:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7148, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49557:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49549:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49545:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7151, + "nodeType": "ExpressionStatement", + "src": "49545:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7152, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49566:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7153, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6882, + "src": "49573:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830303030303030303030303030303031", + "id": 7154, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49577:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "0x0000000000000001" + }, + "src": "49573:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49566:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7157, + "nodeType": "ExpressionStatement", + "src": "49566:29:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7158, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49632:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7159, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49638:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307832316333363737633832623430303030", + "id": 7160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49644:18:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2432902008176640000_by_1", + "typeString": "int_const 2432902008176640000" + }, + "value": "0x21c3677c82b40000" + }, + "src": "49638:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 7162, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "49665:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49638:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 7164, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "49669:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49638:38:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49632:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7167, + "nodeType": "ExpressionStatement", + "src": "49632:44:7" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7168, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "49744:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303130303030303030303030303030303030303030303030303030303030303030", + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49748:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21267647932558653966460912964485513216_by_1", + "typeString": "int_const 2126...(30 digits omitted)...3216" + }, + "value": "0x010000000000000000000000000000000" + }, + "src": "49744:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7171, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "49743:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49788:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "49743:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7182, + "nodeType": "IfStatement", + "src": "49739:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7174, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49791:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7175, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078316333643661323465643832323138373837643632346433653565626139356639", + "id": 7176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49803:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_600596269623765960634066700837880239609_by_1", + "typeString": "int_const 6005...(31 digits omitted)...9609" + }, + "value": "0x1c3d6a24ed82218787d624d3e5eba95f9" + }, + "src": "49797:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313865626566396561633832306165383638326239373933616336643165373736", + "id": 7178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49841:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_530024347646835984032474664511850276726_by_1", + "typeString": "int_const 5300...(31 digits omitted)...6726" + }, + "value": "0x18ebef9eac820ae8682b9793ac6d1e776" + }, + "src": "49797:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49791:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7181, + "nodeType": "ExpressionStatement", + "src": "49791:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7183, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "49916:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230303030303030303030303030303030303030303030303030303030303030", + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49920:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_42535295865117307932921825928971026432_by_1", + "typeString": "int_const 4253...(30 digits omitted)...6432" + }, + "value": "0x020000000000000000000000000000000" + }, + "src": "49916:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7186, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "49915:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49960:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "49915:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7197, + "nodeType": "IfStatement", + "src": "49911:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7189, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49963:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7190, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "49969:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313865626566396561633832306165383638326239373933616336643165373738", + "id": 7191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "49975:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_530024347646835984032474664511850276728_by_1", + "typeString": "int_const 5300...(31 digits omitted)...6728" + }, + "value": "0x18ebef9eac820ae8682b9793ac6d1e778" + }, + "src": "49969:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313336386232666336663936303966653761636562343661613631396261656434", + "id": 7193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50013:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_412783376994266390547521411024565284564_by_1", + "typeString": "int_const 4127...(31 digits omitted)...4564" + }, + "value": "0x1368b2fc6f9609fe7aceb46aa619baed4" + }, + "src": "49969:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "49963:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7196, + "nodeType": "ExpressionStatement", + "src": "49963:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7198, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50088:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303430303030303030303030303030303030303030303030303030303030303030", + "id": 7199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50092:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_85070591730234615865843651857942052864_by_1", + "typeString": "int_const 8507...(30 digits omitted)...2864" + }, + "value": "0x040000000000000000000000000000000" + }, + "src": "50088:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7201, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50087:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50132:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50087:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7212, + "nodeType": "IfStatement", + "src": "50083:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7204, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50135:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7205, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50141:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313336386232666336663936303966653761636562343661613631396261656435", + "id": 7206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50147:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_412783376994266390547521411024565284565_by_1", + "typeString": "int_const 4127...(31 digits omitted)...4565" + }, + "value": "0x1368b2fc6f9609fe7aceb46aa619baed5" + }, + "src": "50141:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306263356162316231363737396265333537356264386630353230613966323166", + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50185:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250365773966741064234501452596301656607_by_1", + "typeString": "int_const 2503...(31 digits omitted)...6607" + }, + "value": "0x0bc5ab1b16779be3575bd8f0520a9f21f" + }, + "src": "50141:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50135:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7211, + "nodeType": "ExpressionStatement", + "src": "50135:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7213, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50260:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303830303030303030303030303030303030303030303030303030303030303030", + "id": 7214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50264:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_170141183460469231731687303715884105728_by_1", + "typeString": "int_const 1701...(31 digits omitted)...5728" + }, + "value": "0x080000000000000000000000000000000" + }, + "src": "50260:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7216, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50259:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50304:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50259:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7227, + "nodeType": "IfStatement", + "src": "50255:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7219, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50307:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7220, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50313:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306263356162316231363737396265333537356264386630353230613966323165", + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50319:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_250365773966741064234501452596301656606_by_1", + "typeString": "int_const 2503...(31 digits omitted)...6606" + }, + "value": "0x0bc5ab1b16779be3575bd8f0520a9f21e" + }, + "src": "50313:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303435346161613865666530373265376636646462616238346234306135356339", + "id": 7223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50357:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92104421015340344839251721785254237641_by_1", + "typeString": "int_const 9210...(30 digits omitted)...7641" + }, + "value": "0x0454aaa8efe072e7f6ddbab84b40a55c9" + }, + "src": "50313:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50307:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7226, + "nodeType": "ExpressionStatement", + "src": "50307:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7228, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50432:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50436:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", + "typeString": "int_const 3402...(31 digits omitted)...1456" + }, + "value": "0x100000000000000000000000000000000" + }, + "src": "50432:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7231, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50431:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50476:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50431:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7242, + "nodeType": "IfStatement", + "src": "50427:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7234, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7235, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50485:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303435346161613865666530373265376636646462616238346234306135356335", + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50491:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_92104421015340344839251721785254237637_by_1", + "typeString": "int_const 9210...(30 digits omitted)...7637" + }, + "value": "0x0454aaa8efe072e7f6ddbab84b40a55c5" + }, + "src": "50485:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303039363061616463313039653761336266343537383039393631353731316561", + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50529:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12464977905455307901915658421775307242_by_1", + "typeString": "int_const 1246...(30 digits omitted)...7242" + }, + "value": "0x00960aadc109e7a3bf4578099615711ea" + }, + "src": "50485:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50479:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7241, + "nodeType": "ExpressionStatement", + "src": "50479:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7243, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50604:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323030303030303030303030303030303030303030303030303030303030303030", + "id": 7244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50608:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_680564733841876926926749214863536422912_by_1", + "typeString": "int_const 6805...(31 digits omitted)...2912" + }, + "value": "0x200000000000000000000000000000000" + }, + "src": "50604:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7246, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50603:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7247, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50648:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50603:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7257, + "nodeType": "IfStatement", + "src": "50599:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7249, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50651:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7250, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50657:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303039363061616463313039653761336266343537383039393631353731316437", + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50663:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_12464977905455307901915658421775307223_by_1", + "typeString": "int_const 1246...(30 digits omitted)...7223" + }, + "value": "0x00960aadc109e7a3bf4578099615711d7" + }, + "src": "50657:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030326266383432303832303466353937376639613863663031666463653364", + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50701:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228304034072369565894155946646425149_by_1", + "typeString": "int_const 2283...(28 digits omitted)...5149" + }, + "value": "0x0002bf84208204f5977f9a8cf01fdce3d" + }, + "src": "50657:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50651:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7256, + "nodeType": "ExpressionStatement", + "src": "50651:85:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7258, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6869, + "src": "50776:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078343030303030303030303030303030303030303030303030303030303030303030", + "id": 7259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50780:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1361129467683753853853498429727072845824_by_1", + "typeString": "int_const 1361...(32 digits omitted)...5824" + }, + "value": "0x400000000000000000000000000000000" + }, + "src": "50776:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7261, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "50775:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50820:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "50775:46:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7272, + "nodeType": "IfStatement", + "src": "50771:137:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 7270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7264, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50823:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7265, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50829:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030326266383432303832303466353937376639613863663031666463333037", + "id": 7266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50835:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_228304034072369565894155946646422279_by_1", + "typeString": "int_const 2283...(28 digits omitted)...2279" + }, + "value": "0x0002bf84208204f5977f9a8cf01fdc307" + }, + "src": "50829:41:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030336336616237373564643062393562346362656537653635643131", + "id": 7268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "50873:35:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_76587471230661696290698490699025_by_1", + "typeString": "int_const 76587471230661696290698490699025" + }, + "value": "0x0000003c6ab775dd0b95b4cbee7e65d11" + }, + "src": "50829:79:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "50823:85:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7271, + "nodeType": "ExpressionStatement", + "src": "50823:85:7" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 7273, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6875, + "src": "50952:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6873, + "id": 7274, + "nodeType": "Return", + "src": "50945:10:7" + } + ] + }, + "documentation": { + "id": 6867, + "nodeType": "StructuredDocumentation", + "src": "47058:683:7", + "text": " @dev computes e ^ (x / FIXED_1) * FIXED_1\n input range: 0 <= x <= OPT_EXP_MAX_VAL - 1\n auto-generated via 'PrintFunctionOptimalExp.py'\n Detailed description:\n - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible\n - The exponentiation of each binary exponent is given (pre-calculated)\n - The exponentiation of r is calculated via Taylor series for e^x, where x = r\n - The exponentiation of the input is calculated by multiplying the intermediate results above\n - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859" + }, + "id": 7276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalExp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 6870, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6869, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7276, + "src": "47767:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6868, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47767:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47766:11:7" + }, + "returnParameters": { + "id": 6873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6872, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7276, + "src": "47801:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6871, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47801:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "47800:9:7" + }, + "scope": 8977, + "src": "47747:3216:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7312, + "nodeType": "Block", + "src": "51116:264:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7284, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51131:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7285, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "51137:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51131:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7291, + "nodeType": "IfStatement", + "src": "51127:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7288, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51190:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7287, + "name": "lambertPos1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7842, + "src": "51178:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51178:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7290, + "nodeType": "Return", + "src": "51171:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7292, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51208:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7293, + "name": "LAMBERT_POS2_MAXVAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3613, + "src": "51214:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51208:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7299, + "nodeType": "IfStatement", + "src": "51204:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7296, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51267:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7295, + "name": "lambertPos2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7911, + "src": "51255:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 7297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51255:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7298, + "nodeType": "Return", + "src": "51248:22:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7300, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51285:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7301, + "name": "LAMBERT_POS3_MAXVAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3616, + "src": "51291:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51285:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7307, + "nodeType": "IfStatement", + "src": "51281:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7304, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7279, + "src": "51344:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7303, + "name": "lambertPos3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7961, + "src": "51332:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51332:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7283, + "id": 7306, + "nodeType": "Return", + "src": "51325:22:7" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 7309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51366:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 7308, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "51358:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 7310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51358:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7311, + "nodeType": "ExpressionStatement", + "src": "51358:14:7" + } + ] + }, + "documentation": { + "id": 7277, + "nodeType": "StructuredDocumentation", + "src": "50971:75:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1" + }, + "id": 7313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lowerStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7279, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7313, + "src": "51072:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7278, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51072:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51071:12:7" + }, + "returnParameters": { + "id": 7283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7313, + "src": "51107:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7281, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51107:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51106:9:7" + }, + "scope": 8977, + "src": "51052:328:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7335, + "nodeType": "Block", + "src": "51536:125:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7321, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51551:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 7322, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "51557:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51551:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 7328, + "nodeType": "IfStatement", + "src": "51547:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7325, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51610:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7324, + "name": "lambertNeg1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8466, + "src": "51598:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "51598:15:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7320, + "id": 7327, + "nodeType": "Return", + "src": "51591:22:7" + } + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7329, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51631:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7330, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51641:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51631:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7332, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7316, + "src": "51651:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51631:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7320, + "id": 7334, + "nodeType": "Return", + "src": "51624:29:7" + } + ] + }, + "documentation": { + "id": 7314, + "nodeType": "StructuredDocumentation", + "src": "51388:77:7", + "text": " @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1" + }, + "id": 7336, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "higherStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7316, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7336, + "src": "51492:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51492:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51491:12:7" + }, + "returnParameters": { + "id": 7320, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7319, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7336, + "src": "51527:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51527:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51526:9:7" + }, + "scope": 8977, + "src": "51471:190:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7841, + "nodeType": "Block", + "src": "51921:4576:7", + "statements": [ + { + "assignments": [ + 7345 + ], + "declarations": [ + { + "constant": false, + "id": 7345, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7841, + "src": "51932:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51932:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7347, + "initialValue": { + "argumentTypes": null, + "id": 7346, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "51945:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51932:15:7" + }, + { + "assignments": [ + 7349 + ], + "declarations": [ + { + "constant": false, + "id": 7349, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7841, + "src": "51958:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51958:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7356, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7350, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "51973:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7351, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "51983:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "51973:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7353, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "51972:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "51989:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "51972:51:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "51958:65:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7357, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52103:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7358, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52109:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7359, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52114:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52109:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52108:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7362, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52120:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52108:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52103:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7365, + "nodeType": "ExpressionStatement", + "src": "52103:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7366, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52129:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7367, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52136:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030313464323961373361366537623032633336363863376230383830303030303030", + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52141:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_442849198559406211271427914465280000000_by_1", + "typeString": "int_const 4428...(31 digits omitted)...0000" + }, + "value": "0x00000000014d29a73a6e7b02c3668c7b0880000000" + }, + "src": "52136:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52129:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "52129:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7372, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52238:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7373, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52244:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7374, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52249:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52244:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7376, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52243:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7377, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52255:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52243:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52238:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "52238:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7381, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52264:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7382, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52271:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030323530346130636439613766373231356236306639626534383030303030303030", + "id": 7383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52276:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_787287464105611042260316292382720000000_by_1", + "typeString": "int_const 7872...(31 digits omitted)...0000" + }, + "value": "0x0000000002504a0cd9a7f7215b60f9be4800000000" + }, + "src": "52271:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52264:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7386, + "nodeType": "ExpressionStatement", + "src": "52264:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7387, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52373:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7388, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52379:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7389, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52384:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52379:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7391, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52378:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7392, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52390:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52378:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52373:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7395, + "nodeType": "ExpressionStatement", + "src": "52373:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7396, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52399:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7397, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52406:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030343834643061313139316330656164323637393637633761346130303030303030", + "id": 7398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52411:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1537670828331271566914680258560000000000_by_1", + "typeString": "int_const 1537...(32 digits omitted)...0000" + }, + "value": "0x000000000484d0a1191c0ead267967c7a4a0000000" + }, + "src": "52406:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52399:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7401, + "nodeType": "ExpressionStatement", + "src": "52399:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7402, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52508:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7403, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52514:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7404, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52519:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52514:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7406, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52513:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7407, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52525:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52513:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52508:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7410, + "nodeType": "ExpressionStatement", + "src": "52508:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7411, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52534:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7412, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52541:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030393565633538306437653834323761346261663236613930613030303030303030", + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52546:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3188514229627724721154280984150016000000_by_1", + "typeString": "int_const 3188...(32 digits omitted)...0000" + }, + "value": "0x00000000095ec580d7e8427a4baf26a90a00000000" + }, + "src": "52541:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52534:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7416, + "nodeType": "ExpressionStatement", + "src": "52534:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7417, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52643:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7418, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52649:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7419, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52654:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52649:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7421, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52648:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7422, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52660:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52648:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52643:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "52643:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7426, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52669:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7427, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52676:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303031343430623062653136313561343764626136653562336231663130303030303030", + "id": 7428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52681:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6891635629803648326702674961498112000000_by_1", + "typeString": "int_const 6891...(32 digits omitted)...0000" + }, + "value": "0x000000001440b0be1615a47dba6e5b3b1f10000000" + }, + "src": "52676:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52669:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7431, + "nodeType": "ExpressionStatement", + "src": "52669:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7432, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52778:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7433, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52784:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7434, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52789:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52784:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7436, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52783:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7437, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52795:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52783:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52778:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7440, + "nodeType": "ExpressionStatement", + "src": "52778:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7441, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52804:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7442, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52811:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303032643230373630316634366139396234313132343138343030303030303030303030", + "id": 7443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52816:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15355854537983727757610740636188672000000_by_1", + "typeString": "int_const 1535...(33 digits omitted)...0000" + }, + "value": "0x000000002d207601f46a99b4112418400000000000" + }, + "src": "52811:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52804:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7446, + "nodeType": "ExpressionStatement", + "src": "52804:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7447, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52913:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7448, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52919:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7449, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "52924:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52919:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7451, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "52918:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7452, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "52930:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52918:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52913:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7455, + "nodeType": "ExpressionStatement", + "src": "52913:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7456, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "52939:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7457, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "52946:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303036366562616163346333376336323264643832383861376562316232303030303030", + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "52951:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35022056686251398262544482483830784000000_by_1", + "typeString": "int_const 3502...(33 digits omitted)...0000" + }, + "value": "0x0000000066ebaac4c37c622dd8288a7eb1b2000000" + }, + "src": "52946:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "52939:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7461, + "nodeType": "ExpressionStatement", + "src": "52939:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7462, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53048:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7463, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53054:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7464, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53059:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53054:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7466, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53053:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7467, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53065:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53053:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53048:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7470, + "nodeType": "ExpressionStatement", + "src": "53048:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7471, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53074:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7472, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53081:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303065663137323430313335663764626434336131626131306366323030303030303030", + "id": 7473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53086:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81358244885252463857919590400000000000000_by_1", + "typeString": "int_const 8135...(33 digits omitted)...0000" + }, + "value": "0x00000000ef17240135f7dbd43a1ba10cf200000000" + }, + "src": "53081:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53074:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7476, + "nodeType": "ExpressionStatement", + "src": "53074:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7477, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53183:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7478, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53189:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7479, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53194:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53189:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7481, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53188:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7482, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53188:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53183:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7485, + "nodeType": "ExpressionStatement", + "src": "53183:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7486, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53209:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7487, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53216:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303233336333336336373661356562323431363039346138376233363537303030303030", + "id": 7488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53221:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_191838485670993607105842450247345766400000_by_1", + "typeString": "int_const 1918...(34 digits omitted)...0000" + }, + "value": "0x0000000233c33c676a5eb2416094a87b3657000000" + }, + "src": "53216:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53209:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7491, + "nodeType": "ExpressionStatement", + "src": "53209:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7492, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53318:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7493, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53324:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7494, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53329:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53324:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7496, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53323:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7497, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53335:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53323:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53318:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7500, + "nodeType": "ExpressionStatement", + "src": "53318:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7501, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53344:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7502, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53351:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303534316364653438626330323534626564343961396638373030303030303030303030", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53356:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_457953461925960171898563951427426713600000_by_1", + "typeString": "int_const 4579...(34 digits omitted)...0000" + }, + "value": "0x0000000541cde48bc0254bed49a9f8700000000000" + }, + "src": "53351:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53344:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7506, + "nodeType": "ExpressionStatement", + "src": "53344:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7507, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53453:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7508, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53459:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7509, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53464:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53459:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7511, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53458:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7512, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53470:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53458:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53453:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7515, + "nodeType": "ExpressionStatement", + "src": "53453:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7516, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53479:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7517, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53486:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030306361653166616432636464346434636238643733616263613064313961343030303030", + "id": 7518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53491:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1104598668270551480892683896320648806400000_by_1", + "typeString": "int_const 1104...(35 digits omitted)...0000" + }, + "value": "0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000" + }, + "src": "53486:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53479:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7521, + "nodeType": "ExpressionStatement", + "src": "53479:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7522, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53588:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7523, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53594:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7524, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53599:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53594:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7526, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53593:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7527, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53605:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53593:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53588:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7530, + "nodeType": "ExpressionStatement", + "src": "53588:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7531, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53614:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7532, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53621:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030316564623261613266373630643135633431636565646261393536343030303030303030", + "id": 7533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53626:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2687947090053832841608264823563773542400000_by_1", + "typeString": "int_const 2687...(35 digits omitted)...0000" + }, + "value": "0x0000001edb2aa2f760d15c41ceedba956400000000" + }, + "src": "53621:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53614:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7536, + "nodeType": "ExpressionStatement", + "src": "53614:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7537, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53723:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7538, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53729:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7539, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53734:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53729:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7541, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53728:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7542, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53740:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53728:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53723:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7545, + "nodeType": "ExpressionStatement", + "src": "53723:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7546, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53749:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7547, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53756:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030346261386432306432646162643338366339353239363539383431613265323030303030", + "id": 7548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53761:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6590868088830032065882824000000000000000000_by_1", + "typeString": "int_const 6590...(35 digits omitted)...0000" + }, + "value": "0x0000004ba8d20d2dabd386c9529659841a2e200000" + }, + "src": "53756:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53749:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7551, + "nodeType": "ExpressionStatement", + "src": "53749:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7552, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53858:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7553, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53864:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7554, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "53869:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7556, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53863:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7557, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "53875:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53863:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53858:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7560, + "nodeType": "ExpressionStatement", + "src": "53858:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7561, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "53884:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7562, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53891:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030626163303835343662383637636461613230303030303030303030303030303030303030", + "id": 7563, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "53896:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16268396552280633070412438458028041175040000_by_1", + "typeString": "int_const 1626...(36 digits omitted)...0000" + }, + "value": "0x000000bac08546b867cdaa20000000000000000000" + }, + "src": "53891:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53884:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7566, + "nodeType": "ExpressionStatement", + "src": "53884:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7567, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53993:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7568, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "53999:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7569, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54004:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53999:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7571, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "53998:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7572, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54010:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53998:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "53993:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "53993:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7576, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54019:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7577, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54026:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303031636661386537306330333632356239646237366338656266356262663234383230303030", + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54031:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40390462938090940419774080664538139934720000_by_1", + "typeString": "int_const 4039...(36 digits omitted)...0000" + }, + "value": "0x000001cfa8e70c03625b9db76c8ebf5bbf24820000" + }, + "src": "54026:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54019:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7581, + "nodeType": "ExpressionStatement", + "src": "54019:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7582, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54128:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7583, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54134:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7584, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54139:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54134:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7586, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54133:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7587, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54145:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54133:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54128:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7590, + "nodeType": "ExpressionStatement", + "src": "54128:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7591, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54154:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7592, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54161:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303034383531643939663832303630646632363566333330396232366638323030303030303030", + "id": 7593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54166:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100798987671917000666814256179934522245120000_by_1", + "typeString": "int_const 1007...(37 digits omitted)...0000" + }, + "value": "0x000004851d99f82060df265f3309b26f8200000000" + }, + "src": "54161:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54154:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7596, + "nodeType": "ExpressionStatement", + "src": "54154:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7597, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54263:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7598, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54269:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7599, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54274:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54269:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7601, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54268:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7602, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54280:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54268:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54263:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7605, + "nodeType": "ExpressionStatement", + "src": "54263:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7606, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54289:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7607, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54296:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303062353530643139623132396432373063343466366635356630323737323363626230303030", + "id": 7608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54301:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_252717199309391137912965664538441463029760000_by_1", + "typeString": "int_const 2527...(37 digits omitted)...0000" + }, + "value": "0x00000b550d19b129d270c44f6f55f027723cbb0000" + }, + "src": "54296:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54289:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7611, + "nodeType": "ExpressionStatement", + "src": "54289:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7612, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54398:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7613, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54404:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7614, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54409:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54404:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7616, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54403:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7617, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54415:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54403:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54398:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7620, + "nodeType": "ExpressionStatement", + "src": "54398:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7621, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54424:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7622, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54431:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303163383737646164633736316463323732646562363564346230303030303030303030303030", + "id": 7623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54436:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_636223790447205380259840000000000000000000000_by_1", + "typeString": "int_const 6362...(37 digits omitted)...0000" + }, + "value": "0x00001c877dadc761dc272deb65d4b0000000000000" + }, + "src": "54431:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54424:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7626, + "nodeType": "ExpressionStatement", + "src": "54424:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7627, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54533:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7628, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54539:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7629, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54544:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54539:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7631, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54538:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7632, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54550:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54538:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54533:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7635, + "nodeType": "ExpressionStatement", + "src": "54533:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7636, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54559:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7637, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54566:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303438313738656365393734373966333361373766326164323261383162363434303663303030", + "id": 7638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54571:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1607705831573194746802610334450509017233408000_by_1", + "typeString": "int_const 1607...(38 digits omitted)...8000" + }, + "value": "0x000048178ece97479f33a77f2ad22a81b64406c000" + }, + "src": "54566:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54559:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7641, + "nodeType": "ExpressionStatement", + "src": "54559:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7642, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54668:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7643, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54674:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7644, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54679:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54674:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7646, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54673:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7647, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54685:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54673:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54668:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7650, + "nodeType": "ExpressionStatement", + "src": "54668:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7651, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54694:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7652, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54701:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030306236636138323638623964383130666564663636393565663266386136633030303030303030", + "id": 7653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54706:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4076376683803157531046819273912505658769408000_by_1", + "typeString": "int_const 4076...(38 digits omitted)...8000" + }, + "value": "0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000" + }, + "src": "54701:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54694:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7656, + "nodeType": "ExpressionStatement", + "src": "54694:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7657, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54803:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7658, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54809:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7659, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54814:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54809:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54808:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7662, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54820:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54808:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54803:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7665, + "nodeType": "ExpressionStatement", + "src": "54803:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7666, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54829:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7667, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54836:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030316430653736363331613562303564303037623863623732613763376631316563333665303030", + "id": 7668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54841:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10367703484962349537949059901011799777283072000_by_1", + "typeString": "int_const 1036...(39 digits omitted)...2000" + }, + "value": "0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000" + }, + "src": "54836:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54829:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7671, + "nodeType": "ExpressionStatement", + "src": "54829:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7672, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54938:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7673, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54944:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7674, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "54949:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54944:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "54943:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7677, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "54955:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54943:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54938:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7680, + "nodeType": "ExpressionStatement", + "src": "54938:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7681, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "54964:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7682, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "54971:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030346131633337626439663835666439633663373830303030303030303030303030303030303030", + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "54976:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26443412100478721735433130630260686447443968000_by_1", + "typeString": "int_const 2644...(39 digits omitted)...8000" + }, + "value": "0x0004a1c37bd9f85fd9c6c780000000000000000000" + }, + "src": "54971:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "54964:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7686, + "nodeType": "ExpressionStatement", + "src": "54964:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7687, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55073:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7688, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55079:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7689, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55084:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55079:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7691, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55078:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7692, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55090:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55078:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55073:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7695, + "nodeType": "ExpressionStatement", + "src": "55073:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7696, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55099:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7697, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55106:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030626438333639663162373032626634393165326562666365653038323530333133623635343030", + "id": 7698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55111:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67620617646753089502453804016113281250000000000_by_1", + "typeString": "int_const 6762...(39 digits omitted)...0000" + }, + "value": "0x000bd8369f1b702bf491e2ebfcee08250313b65400" + }, + "src": "55106:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55099:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7701, + "nodeType": "ExpressionStatement", + "src": "55099:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7702, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55208:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7703, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55214:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7704, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55219:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55214:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7706, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55213:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7707, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55225:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55213:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55208:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7710, + "nodeType": "ExpressionStatement", + "src": "55208:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7711, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55234:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7712, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55241:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303031653563376333326139663663373061623263623539643932323537363464343030303030303030", + "id": 7713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55246:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_173332210846474760735500226875327576716638945280_by_1", + "typeString": "int_const 1733...(40 digits omitted)...5280" + }, + "value": "0x001e5c7c32a9f6c70ab2cb59d9225764d400000000" + }, + "src": "55241:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55234:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7716, + "nodeType": "ExpressionStatement", + "src": "55234:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7717, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55343:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7718, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55349:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7719, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55354:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55349:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7721, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55348:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7722, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55360:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55348:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55343:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7725, + "nodeType": "ExpressionStatement", + "src": "55343:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7726, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55369:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7727, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55376:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303034646666353832306531363565393130663935313230613730386537343234393632323165363030", + "id": 7728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55381:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_445286656448864136819345605176268818347976680960_by_1", + "typeString": "int_const 4452...(40 digits omitted)...0960" + }, + "value": "0x004dff5820e165e910f95120a708e742496221e600" + }, + "src": "55376:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55369:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7731, + "nodeType": "ExpressionStatement", + "src": "55369:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7732, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55478:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7733, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55484:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7734, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55489:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55484:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7736, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55483:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7737, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55483:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55478:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7740, + "nodeType": "ExpressionStatement", + "src": "55478:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7741, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55504:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7742, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55511:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303063386338663636646231666365643337386565353065353336303030303030303030303030303030", + "id": 7743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55516:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1146279770154177862273033179056478989553563074560_by_1", + "typeString": "int_const 1146...(41 digits omitted)...4560" + }, + "value": "0x00c8c8f66db1fced378ee50e536000000000000000" + }, + "src": "55511:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55504:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7746, + "nodeType": "ExpressionStatement", + "src": "55504:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7747, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55613:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7748, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55619:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7749, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55624:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55619:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7751, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55618:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7752, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55630:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55618:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55613:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7755, + "nodeType": "ExpressionStatement", + "src": "55613:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7756, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55639:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7757, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55646:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230356462386466666666343562666132393338663132386635393964626631366562313164383830", + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55651:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2956444461658038477759873400213214992927382689920_by_1", + "typeString": "int_const 2956...(41 digits omitted)...9920" + }, + "value": "0x0205db8dffff45bfa2938f128f599dbf16eb11d880" + }, + "src": "55646:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55639:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7761, + "nodeType": "ExpressionStatement", + "src": "55639:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7762, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55748:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7763, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55754:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7764, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55759:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55754:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7766, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55753:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7767, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55765:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55753:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55748:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7770, + "nodeType": "ExpressionStatement", + "src": "55748:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7771, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55774:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7772, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55781:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303533613034346562643938343335313439336531373836616633386433396130383030303030303030", + "id": 7773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55786:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7638725713617153619200000000000000000000000000000_by_1", + "typeString": "int_const 7638...(41 digits omitted)...0000" + }, + "value": "0x053a044ebd984351493e1786af38d39a0800000000" + }, + "src": "55781:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55774:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7776, + "nodeType": "ExpressionStatement", + "src": "55774:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7777, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55883:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7778, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55889:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7779, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "55894:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55889:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7781, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "55888:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7782, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "55900:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55888:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55883:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7785, + "nodeType": "ExpressionStatement", + "src": "55883:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7786, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "55909:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7787, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "55916:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306438366461653261346363306634373633336135343434373937333538363962343837623539633430", + "id": 7788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "55921:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19769407354499582705095371848882117322613875645504_by_1", + "typeString": "int_const 1976...(42 digits omitted)...5504" + }, + "value": "0x0d86dae2a4cc0f47633a544479735869b487b59c40" + }, + "src": "55916:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "55909:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7791, + "nodeType": "ExpressionStatement", + "src": "55909:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7792, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56018:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7793, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56024:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7794, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56029:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56024:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7796, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56023:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7797, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56035:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56023:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56018:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7800, + "nodeType": "ExpressionStatement", + "src": "56018:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7801, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56044:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7802, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56051:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323331303030303030303030303030303030303030303030303030303030303030303030303030303030", + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56056:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51243901158914783569516699447114673376686134788096_by_1", + "typeString": "int_const 5124...(42 digits omitted)...8096" + }, + "value": "0x231000000000000000000000000000000000000000" + }, + "src": "56051:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56044:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7806, + "nodeType": "ExpressionStatement", + "src": "56044:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7807, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56153:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7808, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7809, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56164:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56159:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7811, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56158:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7812, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56170:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56158:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56153:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7815, + "nodeType": "ExpressionStatement", + "src": "56153:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7816, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56179:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7817, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56186:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078356230343835613736663636343663323033396462313530376364643531623038363439363830383232", + "id": 7818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56191:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_133022465544965907471119545993290733585983764695074_by_1", + "typeString": "int_const 1330...(43 digits omitted)...5074" + }, + "value": "0x5b0485a76f6646c2039db1507cdd51b08649680822" + }, + "src": "56186:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56179:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7821, + "nodeType": "ExpressionStatement", + "src": "56179:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7822, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56288:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7823, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7824, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7339, + "src": "56299:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56294:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7826, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56293:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7827, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "56305:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56293:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56288:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7830, + "nodeType": "ExpressionStatement", + "src": "56288:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7831, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56314:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7832, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7345, + "src": "56321:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078656339383363343663343935343562633137656661366235623030353565323432323030303030303030", + "id": 7833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56326:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_345783497216724000335707367685598692782880644399104_by_1", + "typeString": "int_const 3457...(43 digits omitted)...9104" + }, + "value": "0xec983c46c49545bc17efa6b5b0055e242200000000" + }, + "src": "56321:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56314:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7836, + "nodeType": "ExpressionStatement", + "src": "56314:56:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7837, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7349, + "src": "56432:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 7838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56438:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "56432:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7343, + "id": 7840, + "nodeType": "Return", + "src": "56425:47:7" + } + ] + }, + "documentation": { + "id": 7337, + "nodeType": "StructuredDocumentation", + "src": "51669:181:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: 1 <= x <= 1 / e * FIXED_1\n auto-generated via 'PrintFunctionLambertPos1.py'" + }, + "id": 7842, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos1", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7339, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7842, + "src": "51877:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51877:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51876:12:7" + }, + "returnParameters": { + "id": 7343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7842, + "src": "51912:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "51912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "51911:9:7" + }, + "scope": 8977, + "src": "51856:4641:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7910, + "nodeType": "Block", + "src": "56725:350:7", + "statements": [ + { + "assignments": [ + 7851 + ], + "declarations": [ + { + "constant": false, + "id": 7851, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56736:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56736:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7857, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7852, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7845, + "src": "56748:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7853, + "name": "LAMBERT_CONV_RADIUS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3607, + "src": "56753:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56748:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56775:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56748:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56736:40:7" + }, + { + "assignments": [ + 7859 + ], + "declarations": [ + { + "constant": false, + "id": 7859, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56787:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7858, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56787:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7863, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7860, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "56799:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7861, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56803:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56799:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56787:35:7" + }, + { + "assignments": [ + 7865 + ], + "declarations": [ + { + "constant": false, + "id": 7865, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56833:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56833:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7869, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7866, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56845:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7867, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56867:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56845:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56833:35:7" + }, + { + "assignments": [ + 7871 + ], + "declarations": [ + { + "constant": false, + "id": 7871, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56879:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56879:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7878, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7872, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "56891:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7873, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56914:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7874, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56918:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56914:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7876, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "56913:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "56891:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56879:41:7" + }, + { + "assignments": [ + 7880 + ], + "declarations": [ + { + "constant": false, + "id": 7880, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56931:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56931:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7884, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 7881, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "56943:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 7883, + "indexExpression": { + "argumentTypes": null, + "id": 7882, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56956:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "56943:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56931:27:7" + }, + { + "assignments": [ + 7886 + ], + "declarations": [ + { + "constant": false, + "id": 7886, + "mutability": "mutable", + "name": "d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7910, + "src": "56969:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7885, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56969:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7892, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 7887, + "name": "lambertArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4207, + "src": "56981:12:7", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$128_storage", + "typeString": "uint256[128] storage ref" + } + }, + "id": 7891, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7888, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7859, + "src": "56994:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 7889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "56998:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "56994:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "56981:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "56969:31:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7893, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7880, + "src": "57019:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7894, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7871, + "src": "57024:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7895, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "57028:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57024:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7897, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57023:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57019:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7899, + "name": "d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7886, + "src": "57033:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7900, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7851, + "src": "57038:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7901, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7865, + "src": "57042:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57038:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7903, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57037:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57033:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57019:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7906, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57018:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7907, + "name": "LAMBERT_POS2_SAMPLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3610, + "src": "57048:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57018:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7849, + "id": 7909, + "nodeType": "Return", + "src": "57011:56:7" + } + ] + }, + "documentation": { + "id": 7843, + "nodeType": "StructuredDocumentation", + "src": "56505:149:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: LAMBERT_CONV_RADIUS + 1 <= x <= LAMBERT_POS2_MAXVAL" + }, + "id": 7911, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7846, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7845, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7911, + "src": "56681:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7844, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56681:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56680:12:7" + }, + "returnParameters": { + "id": 7849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7848, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7911, + "src": "56716:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "56716:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "56715:9:7" + }, + "scope": 8977, + "src": "56660:415:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7960, + "nodeType": "Block", + "src": "57303:226:7", + "statements": [ + { + "assignments": [ + 7920 + ], + "declarations": [ + { + "constant": false, + "id": 7920, + "mutability": "mutable", + "name": "l1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7960, + "src": "57314:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7919, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57314:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7931, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7921, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57327:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 7922, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "57332:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57327:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7928, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57378:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7927, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "57367:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57367:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "57327:54:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7925, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57361:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7924, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "57350:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57350:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57314:67:7" + }, + { + "assignments": [ + 7933 + ], + "declarations": [ + { + "constant": false, + "id": 7933, + "mutability": "mutable", + "name": "l2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7960, + "src": "57392:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7944, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7934, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57405:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 7935, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "57410:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57405:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7941, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57456:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7940, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "57445:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57445:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "57405:54:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 7938, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57439:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7937, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "57428:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "57428:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57392:67:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7945, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57478:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 7946, + "name": "l2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7933, + "src": "57483:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57478:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7948, + "name": "l2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7933, + "src": "57488:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7949, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57493:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57488:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7951, + "name": "l1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7920, + "src": "57503:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57488:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57478:27:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7954, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57477:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7955, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57509:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57477:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7957, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7914, + "src": "57519:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57477:44:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7918, + "id": 7959, + "nodeType": "Return", + "src": "57470:51:7" + } + ] + }, + "documentation": { + "id": 7912, + "nodeType": "StructuredDocumentation", + "src": "57083:149:7", + "text": " @dev computes W(x / FIXED_1) / (x / FIXED_1) * FIXED_1\n input range: LAMBERT_POS2_MAXVAL + 1 <= x <= LAMBERT_POS3_MAXVAL" + }, + "id": 7961, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertPos3", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7915, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7914, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7961, + "src": "57259:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57259:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57258:12:7" + }, + "returnParameters": { + "id": 7918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7917, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 7961, + "src": "57294:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57294:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57293:9:7" + }, + "scope": 8977, + "src": "57238:291:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8465, + "nodeType": "Block", + "src": "57791:4551:7", + "statements": [ + { + "assignments": [ + 7970 + ], + "declarations": [ + { + "constant": false, + "id": 7970, + "mutability": "mutable", + "name": "xi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8465, + "src": "57802:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7969, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7972, + "initialValue": { + "argumentTypes": null, + "id": 7971, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "57815:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "57802:15:7" + }, + { + "assignments": [ + 7974 + ], + "declarations": [ + { + "constant": false, + "id": 7974, + "mutability": "mutable", + "name": "res", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8465, + "src": "57828:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57828:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 7976, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 7975, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57842:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "57828:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7977, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57856:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7978, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57862:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7979, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "57867:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57862:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7981, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57861:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7982, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "57873:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57861:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57856:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7985, + "nodeType": "ExpressionStatement", + "src": "57856:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7986, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "57882:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7987, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57889:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030313464323961373361366537623032633336363863376230383830303030303030", + "id": 7988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "57894:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_442849198559406211271427914465280000000_by_1", + "typeString": "int_const 4428...(31 digits omitted)...0000" + }, + "value": "0x00000000014d29a73a6e7b02c3668c7b0880000000" + }, + "src": "57889:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57882:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7991, + "nodeType": "ExpressionStatement", + "src": "57882:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 7999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 7992, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57991:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 7993, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "57997:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 7994, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58002:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57997:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 7996, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "57996:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 7997, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58008:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57996:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "57991:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8000, + "nodeType": "ExpressionStatement", + "src": "57991:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8001, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58017:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8002, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58024:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030323530346130636439613766373231356236306639626534383030303030303030", + "id": 8003, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58029:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_787287464105611042260316292382720000000_by_1", + "typeString": "int_const 7872...(31 digits omitted)...0000" + }, + "value": "0x0000000002504a0cd9a7f7215b60f9be4800000000" + }, + "src": "58024:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58017:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8006, + "nodeType": "ExpressionStatement", + "src": "58017:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8007, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58126:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8008, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58132:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8009, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58137:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58132:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8011, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58131:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8012, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58143:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58131:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58126:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8015, + "nodeType": "ExpressionStatement", + "src": "58126:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8016, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58152:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8017, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58159:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030343834643061313139316330656164323637393637633761346130303030303030", + "id": 8018, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58164:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1537670828331271566914680258560000000000_by_1", + "typeString": "int_const 1537...(32 digits omitted)...0000" + }, + "value": "0x000000000484d0a1191c0ead267967c7a4a0000000" + }, + "src": "58159:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58152:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8021, + "nodeType": "ExpressionStatement", + "src": "58152:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8022, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58261:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8023, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58267:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8024, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58272:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58267:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8026, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58266:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8027, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58278:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58266:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58261:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8030, + "nodeType": "ExpressionStatement", + "src": "58261:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8031, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58287:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8032, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58294:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303030393565633538306437653834323761346261663236613930613030303030303030", + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58299:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3188514229627724721154280984150016000000_by_1", + "typeString": "int_const 3188...(32 digits omitted)...0000" + }, + "value": "0x00000000095ec580d7e8427a4baf26a90a00000000" + }, + "src": "58294:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58287:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8036, + "nodeType": "ExpressionStatement", + "src": "58287:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8037, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58396:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8038, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58402:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8039, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58407:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58402:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8041, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58401:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8042, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58413:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58401:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58396:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8045, + "nodeType": "ExpressionStatement", + "src": "58396:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8046, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58422:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8047, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58429:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303031343430623062653136313561343764626136653562336231663130303030303030", + "id": 8048, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58434:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6891635629803648326702674961498112000000_by_1", + "typeString": "int_const 6891...(32 digits omitted)...0000" + }, + "value": "0x000000001440b0be1615a47dba6e5b3b1f10000000" + }, + "src": "58429:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58422:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8051, + "nodeType": "ExpressionStatement", + "src": "58422:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8052, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58531:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8053, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58537:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8054, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58542:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58537:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8056, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58536:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8057, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58548:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58536:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58531:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8060, + "nodeType": "ExpressionStatement", + "src": "58531:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8061, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58557:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8062, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58564:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303032643230373630316634366139396234313132343138343030303030303030303030", + "id": 8063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58569:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15355854537983727757610740636188672000000_by_1", + "typeString": "int_const 1535...(33 digits omitted)...0000" + }, + "value": "0x000000002d207601f46a99b4112418400000000000" + }, + "src": "58564:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58557:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8066, + "nodeType": "ExpressionStatement", + "src": "58557:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8067, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58666:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8068, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58672:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8069, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58677:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58672:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8071, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58671:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8072, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58683:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58671:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58666:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8075, + "nodeType": "ExpressionStatement", + "src": "58666:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8076, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58692:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8077, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58699:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303036366562616163346333376336323264643832383861376562316232303030303030", + "id": 8078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58704:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_35022056686251398262544482483830784000000_by_1", + "typeString": "int_const 3502...(33 digits omitted)...0000" + }, + "value": "0x0000000066ebaac4c37c622dd8288a7eb1b2000000" + }, + "src": "58699:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58692:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8081, + "nodeType": "ExpressionStatement", + "src": "58692:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8082, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58801:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8083, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58807:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8084, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58812:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58807:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8086, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58806:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8087, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58818:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58806:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58801:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8090, + "nodeType": "ExpressionStatement", + "src": "58801:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8091, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58827:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8092, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58834:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303065663137323430313335663764626434336131626131306366323030303030303030", + "id": 8093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58839:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_81358244885252463857919590400000000000000_by_1", + "typeString": "int_const 8135...(33 digits omitted)...0000" + }, + "value": "0x00000000ef17240135f7dbd43a1ba10cf200000000" + }, + "src": "58834:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58827:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8096, + "nodeType": "ExpressionStatement", + "src": "58827:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8097, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58936:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8098, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58942:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8099, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "58947:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58942:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8101, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "58941:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8102, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "58953:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58941:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58936:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8105, + "nodeType": "ExpressionStatement", + "src": "58936:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8106, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "58962:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8107, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "58969:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303233336333336336373661356562323431363039346138376233363537303030303030", + "id": 8108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "58974:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_191838485670993607105842450247345766400000_by_1", + "typeString": "int_const 1918...(34 digits omitted)...0000" + }, + "value": "0x0000000233c33c676a5eb2416094a87b3657000000" + }, + "src": "58969:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "58962:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8111, + "nodeType": "ExpressionStatement", + "src": "58962:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8112, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59071:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8113, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59077:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8114, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59082:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59077:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8116, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59076:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8117, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59088:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59076:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59071:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8120, + "nodeType": "ExpressionStatement", + "src": "59071:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8121, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59097:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8122, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59104:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030303534316364653438626330323534626564343961396638373030303030303030303030", + "id": 8123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59109:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_457953461925960171898563951427426713600000_by_1", + "typeString": "int_const 4579...(34 digits omitted)...0000" + }, + "value": "0x0000000541cde48bc0254bed49a9f8700000000000" + }, + "src": "59104:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59097:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8126, + "nodeType": "ExpressionStatement", + "src": "59097:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8127, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59206:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8128, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59212:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8129, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59217:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59212:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8131, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59211:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8132, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59223:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59211:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59206:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8135, + "nodeType": "ExpressionStatement", + "src": "59206:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8136, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59232:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8137, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59239:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030306361653166616432636464346434636238643733616263613064313961343030303030", + "id": 8138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59244:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1104598668270551480892683896320648806400000_by_1", + "typeString": "int_const 1104...(35 digits omitted)...0000" + }, + "value": "0x0000000cae1fad2cdd4d4cb8d73abca0d19a400000" + }, + "src": "59239:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59232:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8141, + "nodeType": "ExpressionStatement", + "src": "59232:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8142, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59341:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8143, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59347:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8144, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59352:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59347:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8146, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59346:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8147, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59358:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59346:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59341:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8150, + "nodeType": "ExpressionStatement", + "src": "59341:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8151, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59367:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8152, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59374:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030316564623261613266373630643135633431636565646261393536343030303030303030", + "id": 8153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59379:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2687947090053832841608264823563773542400000_by_1", + "typeString": "int_const 2687...(35 digits omitted)...0000" + }, + "value": "0x0000001edb2aa2f760d15c41ceedba956400000000" + }, + "src": "59374:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59367:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8156, + "nodeType": "ExpressionStatement", + "src": "59367:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8157, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59476:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8158, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59482:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8159, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59487:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59482:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8161, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59481:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8162, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59493:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59481:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59476:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8165, + "nodeType": "ExpressionStatement", + "src": "59476:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8166, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59502:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8167, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59509:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030346261386432306432646162643338366339353239363539383431613265323030303030", + "id": 8168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59514:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_6590868088830032065882824000000000000000000_by_1", + "typeString": "int_const 6590...(35 digits omitted)...0000" + }, + "value": "0x0000004ba8d20d2dabd386c9529659841a2e200000" + }, + "src": "59509:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59502:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8171, + "nodeType": "ExpressionStatement", + "src": "59502:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8172, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59611:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8173, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59617:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8174, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59622:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59617:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8176, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59616:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8177, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59628:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59616:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59611:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8180, + "nodeType": "ExpressionStatement", + "src": "59611:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8181, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59637:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8182, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59644:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303030626163303835343662383637636461613230303030303030303030303030303030303030", + "id": 8183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59649:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_16268396552280633070412438458028041175040000_by_1", + "typeString": "int_const 1626...(36 digits omitted)...0000" + }, + "value": "0x000000bac08546b867cdaa20000000000000000000" + }, + "src": "59644:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59637:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8186, + "nodeType": "ExpressionStatement", + "src": "59637:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8187, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59746:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8188, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59752:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8189, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59757:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8191, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59751:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8192, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59763:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59751:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59746:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8195, + "nodeType": "ExpressionStatement", + "src": "59746:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8196, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59772:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8197, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59779:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303031636661386537306330333632356239646237366338656266356262663234383230303030", + "id": 8198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59784:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40390462938090940419774080664538139934720000_by_1", + "typeString": "int_const 4039...(36 digits omitted)...0000" + }, + "value": "0x000001cfa8e70c03625b9db76c8ebf5bbf24820000" + }, + "src": "59779:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59772:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8201, + "nodeType": "ExpressionStatement", + "src": "59772:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8202, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59881:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8203, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59887:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8204, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "59892:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59887:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8206, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "59886:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8207, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "59898:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59886:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59881:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8210, + "nodeType": "ExpressionStatement", + "src": "59881:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8211, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "59907:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8212, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "59914:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303034383531643939663832303630646632363566333330396232366638323030303030303030", + "id": 8213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "59919:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100798987671917000666814256179934522245120000_by_1", + "typeString": "int_const 1007...(37 digits omitted)...0000" + }, + "value": "0x000004851d99f82060df265f3309b26f8200000000" + }, + "src": "59914:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "59907:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8216, + "nodeType": "ExpressionStatement", + "src": "59907:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8217, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60016:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8218, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60022:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8219, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60027:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60022:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8221, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60021:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8222, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60033:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60021:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60016:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8225, + "nodeType": "ExpressionStatement", + "src": "60016:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8226, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60042:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8227, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60049:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303062353530643139623132396432373063343466366635356630323737323363626230303030", + "id": 8228, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60054:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_252717199309391137912965664538441463029760000_by_1", + "typeString": "int_const 2527...(37 digits omitted)...0000" + }, + "value": "0x00000b550d19b129d270c44f6f55f027723cbb0000" + }, + "src": "60049:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60042:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8231, + "nodeType": "ExpressionStatement", + "src": "60042:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8232, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60151:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8233, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60157:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8234, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60162:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60157:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8236, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60156:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8237, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60168:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60156:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60151:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8240, + "nodeType": "ExpressionStatement", + "src": "60151:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8241, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60177:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8242, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60184:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303163383737646164633736316463323732646562363564346230303030303030303030303030", + "id": 8243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60189:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_636223790447205380259840000000000000000000000_by_1", + "typeString": "int_const 6362...(37 digits omitted)...0000" + }, + "value": "0x00001c877dadc761dc272deb65d4b0000000000000" + }, + "src": "60184:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60177:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8246, + "nodeType": "ExpressionStatement", + "src": "60177:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8247, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60286:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8248, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60292:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8249, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60297:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60292:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8251, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60291:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8252, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60303:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60291:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60286:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8255, + "nodeType": "ExpressionStatement", + "src": "60286:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8256, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60312:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8257, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60319:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030303438313738656365393734373966333361373766326164323261383162363434303663303030", + "id": 8258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60324:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1607705831573194746802610334450509017233408000_by_1", + "typeString": "int_const 1607...(38 digits omitted)...8000" + }, + "value": "0x000048178ece97479f33a77f2ad22a81b64406c000" + }, + "src": "60319:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60312:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8261, + "nodeType": "ExpressionStatement", + "src": "60312:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8262, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60421:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8263, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60427:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8264, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60432:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60427:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8266, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60426:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8267, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60438:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60426:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60421:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8270, + "nodeType": "ExpressionStatement", + "src": "60421:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8271, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60447:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8272, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60454:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030306236636138323638623964383130666564663636393565663266386136633030303030303030", + "id": 8273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60459:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4076376683803157531046819273912505658769408000_by_1", + "typeString": "int_const 4076...(38 digits omitted)...8000" + }, + "value": "0x0000b6ca8268b9d810fedf6695ef2f8a6c00000000" + }, + "src": "60454:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60447:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8276, + "nodeType": "ExpressionStatement", + "src": "60447:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8277, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60556:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8278, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60562:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8279, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60567:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60562:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8281, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60561:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8282, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60561:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60556:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8285, + "nodeType": "ExpressionStatement", + "src": "60556:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8286, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60582:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8287, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60589:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030316430653736363331613562303564303037623863623732613763376631316563333665303030", + "id": 8288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60594:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10367703484962349537949059901011799777283072000_by_1", + "typeString": "int_const 1036...(39 digits omitted)...2000" + }, + "value": "0x0001d0e76631a5b05d007b8cb72a7c7f11ec36e000" + }, + "src": "60589:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60582:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8291, + "nodeType": "ExpressionStatement", + "src": "60582:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8292, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60691:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8293, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60697:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8294, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60702:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60697:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8296, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60696:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8297, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60708:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60696:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60691:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8300, + "nodeType": "ExpressionStatement", + "src": "60691:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8301, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60717:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8302, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60724:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030346131633337626439663835666439633663373830303030303030303030303030303030303030", + "id": 8303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60729:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_26443412100478721735433130630260686447443968000_by_1", + "typeString": "int_const 2644...(39 digits omitted)...8000" + }, + "value": "0x0004a1c37bd9f85fd9c6c780000000000000000000" + }, + "src": "60724:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60717:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8306, + "nodeType": "ExpressionStatement", + "src": "60717:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8307, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60826:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8308, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60832:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8309, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60837:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60832:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8311, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60831:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8312, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60843:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60831:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60826:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8315, + "nodeType": "ExpressionStatement", + "src": "60826:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8316, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60852:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8317, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60859:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303030626438333639663162373032626634393165326562666365653038323530333133623635343030", + "id": 8318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60864:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_67620617646753089502453804016113281250000000000_by_1", + "typeString": "int_const 6762...(39 digits omitted)...0000" + }, + "value": "0x000bd8369f1b702bf491e2ebfcee08250313b65400" + }, + "src": "60859:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60852:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8321, + "nodeType": "ExpressionStatement", + "src": "60852:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8322, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60961:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8323, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60967:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8324, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "60972:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60967:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8326, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "60966:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8327, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "60978:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60966:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60961:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "60961:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8331, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "60987:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8332, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "60994:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303031653563376333326139663663373061623263623539643932323537363464343030303030303030", + "id": 8333, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "60999:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_173332210846474760735500226875327576716638945280_by_1", + "typeString": "int_const 1733...(40 digits omitted)...5280" + }, + "value": "0x001e5c7c32a9f6c70ab2cb59d9225764d400000000" + }, + "src": "60994:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "60987:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8336, + "nodeType": "ExpressionStatement", + "src": "60987:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8337, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61096:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8338, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61102:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8339, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61107:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61102:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8341, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61101:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8342, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61113:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61101:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61096:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8345, + "nodeType": "ExpressionStatement", + "src": "61096:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8346, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61122:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8347, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61129:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303034646666353832306531363565393130663935313230613730386537343234393632323165363030", + "id": 8348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61134:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_445286656448864136819345605176268818347976680960_by_1", + "typeString": "int_const 4452...(40 digits omitted)...0960" + }, + "value": "0x004dff5820e165e910f95120a708e742496221e600" + }, + "src": "61129:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61122:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8351, + "nodeType": "ExpressionStatement", + "src": "61122:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8352, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61231:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8353, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61237:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8354, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61242:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61237:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8356, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61236:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8357, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61248:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61236:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61231:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8360, + "nodeType": "ExpressionStatement", + "src": "61231:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8361, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61257:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8362, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61264:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303063386338663636646231666365643337386565353065353336303030303030303030303030303030", + "id": 8363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61269:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1146279770154177862273033179056478989553563074560_by_1", + "typeString": "int_const 1146...(41 digits omitted)...4560" + }, + "value": "0x00c8c8f66db1fced378ee50e536000000000000000" + }, + "src": "61264:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61257:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8366, + "nodeType": "ExpressionStatement", + "src": "61257:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8367, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61366:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8368, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61372:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8369, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61377:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8371, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61371:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8372, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61383:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61371:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61366:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8375, + "nodeType": "ExpressionStatement", + "src": "61366:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8376, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61392:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8377, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61399:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303230356462386466666666343562666132393338663132386635393964626631366562313164383830", + "id": 8378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61404:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2956444461658038477759873400213214992927382689920_by_1", + "typeString": "int_const 2956...(41 digits omitted)...9920" + }, + "value": "0x0205db8dffff45bfa2938f128f599dbf16eb11d880" + }, + "src": "61399:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61392:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8381, + "nodeType": "ExpressionStatement", + "src": "61392:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8382, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61501:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8383, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61507:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8384, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61512:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61507:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8386, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61506:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8387, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61518:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61506:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61501:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8390, + "nodeType": "ExpressionStatement", + "src": "61501:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8391, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61527:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8392, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61534:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078303533613034346562643938343335313439336531373836616633386433396130383030303030303030", + "id": 8393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61539:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_7638725713617153619200000000000000000000000000000_by_1", + "typeString": "int_const 7638...(41 digits omitted)...0000" + }, + "value": "0x053a044ebd984351493e1786af38d39a0800000000" + }, + "src": "61534:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61527:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8396, + "nodeType": "ExpressionStatement", + "src": "61527:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8397, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61636:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8398, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61642:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8399, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61647:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61642:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8401, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61641:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8402, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61653:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61641:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61636:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8405, + "nodeType": "ExpressionStatement", + "src": "61636:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8406, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61662:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8407, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61669:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078306438366461653261346363306634373633336135343434373937333538363962343837623539633430", + "id": 8408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61674:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_19769407354499582705095371848882117322613875645504_by_1", + "typeString": "int_const 1976...(42 digits omitted)...5504" + }, + "value": "0x0d86dae2a4cc0f47633a544479735869b487b59c40" + }, + "src": "61669:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61662:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8411, + "nodeType": "ExpressionStatement", + "src": "61662:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8412, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61771:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8413, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61777:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8414, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61782:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61777:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8416, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61776:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8417, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61788:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61776:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61771:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8420, + "nodeType": "ExpressionStatement", + "src": "61771:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8421, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61797:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8422, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61804:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078323331303030303030303030303030303030303030303030303030303030303030303030303030303030", + "id": 8423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61809:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_51243901158914783569516699447114673376686134788096_by_1", + "typeString": "int_const 5124...(42 digits omitted)...8096" + }, + "value": "0x231000000000000000000000000000000000000000" + }, + "src": "61804:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61797:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8426, + "nodeType": "ExpressionStatement", + "src": "61797:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8427, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61906:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8428, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61912:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8429, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "61917:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8431, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "61911:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8432, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "61923:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61911:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61906:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8435, + "nodeType": "ExpressionStatement", + "src": "61906:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8436, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "61932:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8437, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "61939:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078356230343835613736663636343663323033396462313530376364643531623038363439363830383232", + "id": 8438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "61944:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_133022465544965907471119545993290733585983764695074_by_1", + "typeString": "int_const 1330...(43 digits omitted)...5074" + }, + "value": "0x5b0485a76f6646c2039db1507cdd51b08649680822" + }, + "src": "61939:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "61932:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8441, + "nodeType": "ExpressionStatement", + "src": "61932:56:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8442, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62041:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8443, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62047:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8444, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "62052:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62047:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8446, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "62046:9:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8447, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62058:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62046:19:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62041:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8450, + "nodeType": "ExpressionStatement", + "src": "62041:24:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8451, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "62067:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8452, + "name": "xi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7970, + "src": "62074:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3078656339383363343663343935343562633137656661366235623030353565323432323030303030303030", + "id": 8453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62079:44:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_345783497216724000335707367685598692782880644399104_by_1", + "typeString": "int_const 3457...(43 digits omitted)...9104" + }, + "value": "0xec983c46c49545bc17efa6b5b0055e242200000000" + }, + "src": "62074:49:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62067:56:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8456, + "nodeType": "ExpressionStatement", + "src": "62067:56:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8457, + "name": "res", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7974, + "src": "62185:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30786465316263346431396566636163383234343564613735623030303030303030", + "id": 8458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "62191:34:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_295232799039604140847618609643520000000_by_1", + "typeString": "int_const 2952...(31 digits omitted)...0000" + }, + "value": "0xde1bc4d19efcac82445da75b00000000" + }, + "src": "62185:40:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 8460, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7964, + "src": "62228:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62185:45:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 8462, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62233:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62185:55:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7968, + "id": 8464, + "nodeType": "Return", + "src": "62178:62:7" + } + ] + }, + "documentation": { + "id": 7962, + "nodeType": "StructuredDocumentation", + "src": "57537:183:7", + "text": " @dev computes W(-x / FIXED_1) / (-x / FIXED_1) * FIXED_1\n input range: 1 <= x <= 1 / e * FIXED_1\n auto-generated via 'PrintFunctionLambertNeg1.py'" + }, + "id": 8466, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lambertNeg1", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 7965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7964, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8466, + "src": "57747:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7963, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57747:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57746:12:7" + }, + "returnParameters": { + "id": 7968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7967, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8466, + "src": "57782:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "57782:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "57781:9:7" + }, + "scope": 8977, + "src": "57726:4616:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8546, + "nodeType": "Block", + "src": "62643:343:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 8491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8484, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62655:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8485, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62660:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8486, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "62654:10:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8488, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62679:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8489, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62684:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8487, + "name": "safeFactors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8621, + "src": "62667:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 8490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62667:21:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "62654:34:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8492, + "nodeType": "ExpressionStatement", + "src": "62654:34:7" + }, + { + "assignments": [ + 8494 + ], + "declarations": [ + { + "constant": false, + "id": 8494, + "mutability": "mutable", + "name": "f", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62699:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8493, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62699:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8501, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8497, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62719:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8495, + "name": "_hi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8469, + "src": "62711:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62711:7:7", + "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": 8498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62711:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8499, + "name": "_lo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8471, + "src": "62730:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62711:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62699:34:7" + }, + { + "assignments": [ + 8503 + ], + "declarations": [ + { + "constant": false, + "id": 8503, + "mutability": "mutable", + "name": "g", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62744:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62744:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8514, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8504, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62756:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8505, + "name": "OPT_LOG_MAX_VAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3601, + "src": "62760:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62756:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8511, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62805:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8510, + "name": "generalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5906, + "src": "62794:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62794:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "62756:51:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8508, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8494, + "src": "62789:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8507, + "name": "optimalLog", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6866, + "src": "62778:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62778:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62744:63:7" + }, + { + "assignments": [ + 8516 + ], + "declarations": [ + { + "constant": false, + "id": 8516, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62818:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8515, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62818:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8523, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8519, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62836:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8517, + "name": "g", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8503, + "src": "62830:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62830:5:7", + "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": 8520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62830:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8521, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62843:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "62830:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62818:28:7" + }, + { + "assignments": [ + 8525 + ], + "declarations": [ + { + "constant": false, + "id": 8525, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8546, + "src": "62857:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62857:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8534, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 8526, + "name": "_lowerStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8477, + "src": "62869:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8531, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8516, + "src": "62911:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8530, + "name": "higherStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7336, + "src": "62899:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62899:14:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "62869:44:7", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8528, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8516, + "src": "62894:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8527, + "name": "lowerStake", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7313, + "src": "62883:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 8529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62883:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "62857:56:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8538, + "name": "_tq", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8473, + "src": "62955:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8536, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8525, + "src": "62949:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62949:5:7", + "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": 8539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62949:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8542, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "62969:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8540, + "name": "_rp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8475, + "src": "62961:3:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "62961:7:7", + "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": 8543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62961:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8535, + "name": "normalizedWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8656, + "src": "62931:17:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "62931:47:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8483, + "id": 8545, + "nodeType": "Return", + "src": "62924:54:7" + } + ] + }, + "documentation": { + "id": 8467, + "nodeType": "StructuredDocumentation", + "src": "62350:146:7", + "text": " @dev computes the weights based on \"W(log(hi / lo) * tq / rp) * tq / rp\", where \"W\" is a variation of the Lambert W function." + }, + "id": 8547, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balancedWeightsByStake", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8469, + "mutability": "mutable", + "name": "_hi", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62534:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62534:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8471, + "mutability": "mutable", + "name": "_lo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62547:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62547:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8473, + "mutability": "mutable", + "name": "_tq", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62560:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62560:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8475, + "mutability": "mutable", + "name": "_rp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62573:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "62573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8477, + "mutability": "mutable", + "name": "_lowerStake", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62586:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8476, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "62586:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62533:70:7" + }, + "returnParameters": { + "id": 8483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62627:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8479, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "62627:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8547, + "src": "62635:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8481, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "62635:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "62626:16:7" + }, + "scope": 8977, + "src": "62502:484:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8620, + "nodeType": "Block", + "src": "63162:358:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8559, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63177:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8560, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63183:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63177:13:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8562, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63194:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8563, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63194:13:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "63177:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8570, + "nodeType": "IfStatement", + "src": "63173:64:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8566, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63230:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8567, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63234:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8568, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63229:8:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8569, + "nodeType": "Return", + "src": "63222:15:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8571, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63252:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8572, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63257:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63252:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8582, + "nodeType": "IfStatement", + "src": "63248:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8574, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63287:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8575, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63292:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63287:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8577, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63302:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63287:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8579, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63306:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8580, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63286:28:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8581, + "nodeType": "Return", + "src": "63279:35:7" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8583, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63329:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 8584, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63334:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63329:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8594, + "nodeType": "IfStatement", + "src": "63325:66:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8586, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63364:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8587, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63373:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8588, + "name": "FIXED_2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "63378:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63373:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8590, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63388:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63373:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8592, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63363:28:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8593, + "nodeType": "Return", + "src": "63356:35:7" + } + }, + { + "assignments": [ + 8596 + ], + "declarations": [ + { + "constant": false, + "id": 8596, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8620, + "src": "63402:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63402:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8603, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8597, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63414:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 8598, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63419:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63414:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 8601, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63429:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "63414:17:7", + "trueExpression": { + "argumentTypes": null, + "id": 8600, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63424:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63402:29:7" + }, + { + "assignments": [ + 8605 + ], + "declarations": [ + { + "constant": false, + "id": 8605, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8620, + "src": "63442:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63442:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8607, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8596, + "src": "63464:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8608, + "name": "FIXED_1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "63468:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63464:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8606, + "name": "floorLog2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5969, + "src": "63454:9:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 8610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63454:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63442:34:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8612, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8550, + "src": "63495:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 8613, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8605, + "src": "63501:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63495:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8615, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8552, + "src": "63504:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "id": 8616, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8605, + "src": "63510:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63504:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8618, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63494:18:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8558, + "id": 8619, + "nodeType": "Return", + "src": "63487:25:7" + } + ] + }, + "documentation": { + "id": 8548, + "nodeType": "StructuredDocumentation", + "src": "62994:76:7", + "text": " @dev reduces \"a\" and \"b\" while maintaining their ratio." + }, + "id": 8621, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeFactors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8550, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63097:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8549, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63097:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8552, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63109:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63109:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63096:24:7" + }, + "returnParameters": { + "id": 8558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8555, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63144:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63144:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8557, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8621, + "src": "63153:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8556, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63153:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63143:18:7" + }, + "scope": 8977, + "src": "63076:444:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8655, + "nodeType": "Block", + "src": "63717:157:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8633, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63732:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 8634, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63738:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "63732:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8641, + "nodeType": "IfStatement", + "src": "63728:57:7", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8637, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63778:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8638, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63782:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8636, + "name": "accurateWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8721, + "src": "63762:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63762:23:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8632, + "id": 8640, + "nodeType": "Return", + "src": "63755:30:7" + } + }, + { + "assignments": [ + 8643, + 8645 + ], + "declarations": [ + { + "constant": false, + "id": 8643, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8655, + "src": "63797:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8642, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63797:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8645, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8655, + "src": "63807:8:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8644, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63807:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8650, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8647, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8626, + "src": "63835:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8648, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8624, + "src": "63839:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8646, + "name": "accurateWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8721, + "src": "63819:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 8649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "63819:23:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "63796:46:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 8651, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8645, + "src": "63861:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8652, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8643, + "src": "63864:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 8653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "63860:6:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8632, + "id": 8654, + "nodeType": "Return", + "src": "63853:13:7" + } + ] + }, + "documentation": { + "id": 8622, + "nodeType": "StructuredDocumentation", + "src": "63528:93:7", + "text": " @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\"." + }, + "id": 8656, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8624, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63654:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8623, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63654:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8626, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63666:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8625, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "63666:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63653:24:7" + }, + "returnParameters": { + "id": 8632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8629, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63701:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8628, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63701:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8631, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8656, + "src": "63709:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8630, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "63709:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "63700:16:7" + }, + "scope": 8977, + "src": "63627:247:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8720, + "nodeType": "Block", + "src": "64093:292:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8668, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64108:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 8669, + "name": "MAX_UNF_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3619, + "src": "64113:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64108:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 8691, + "nodeType": "IfStatement", + "src": "64104:137:7", + "trueBody": { + "id": 8690, + "nodeType": "Block", + "src": "64129:112:7", + "statements": [ + { + "assignments": [ + 8672 + ], + "declarations": [ + { + "constant": false, + "id": 8672, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8690, + "src": "64144:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64144:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8681, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8673, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64156:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8674, + "name": "MAX_UNF_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3619, + "src": "64162:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 8675, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64179:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "64162:18:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8677, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64161:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64156:25:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 8679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64184:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "64156:29:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64144:41:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8682, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64200:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 8683, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8672, + "src": "64206:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64200:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8685, + "nodeType": "ExpressionStatement", + "src": "64200:7:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 8688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 8686, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8661, + "src": "64222:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 8687, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8672, + "src": "64228:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64222:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8689, + "nodeType": "ExpressionStatement", + "src": "64222:7:7" + } + ] + } + }, + { + "assignments": [ + 8693 + ], + "declarations": [ + { + "constant": false, + "id": 8693, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8720, + "src": "64251:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64251:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8703, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8695, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64272:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 8696, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "64277:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "64272:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8700, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8661, + "src": "64296:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 8698, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8659, + "src": "64289:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 8699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "64289:6:7", + "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": 8701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64289:10:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8694, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8747, + "src": "64263:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 8702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64263:37:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64251:49:7" + }, + { + "assignments": [ + 8705 + ], + "declarations": [ + { + "constant": false, + "id": 8705, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8720, + "src": "64311:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8704, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64311:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 8709, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8706, + "name": "MAX_WEIGHT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "64323:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 8707, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8693, + "src": "64336:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64323:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "64311:26:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8712, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8693, + "src": "64363:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "64356:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 8710, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64356:6:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 8713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64356:9:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8716, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8705, + "src": "64374:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "64367:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint32_$", + "typeString": "type(uint32)" + }, + "typeName": { + "id": 8714, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64367:6:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 8717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "64367:9:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 8718, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64355:22:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 8667, + "id": 8719, + "nodeType": "Return", + "src": "64348:29:7" + } + ] + }, + "documentation": { + "id": 8657, + "nodeType": "StructuredDocumentation", + "src": "63882:117:7", + "text": " @dev computes \"MAX_WEIGHT * a / (a + b)\" and \"MAX_WEIGHT * b / (a + b)\", assuming that \"a <= b\"." + }, + "id": 8721, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8659, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64030:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64030:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8661, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64042:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8660, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64042:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64029:24:7" + }, + "returnParameters": { + "id": 8667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8664, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64077:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8663, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64077:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8666, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8721, + "src": "64085:6:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8665, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64085:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64076:16:7" + }, + "scope": 8977, + "src": "64005:380:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8746, + "nodeType": "Block", + "src": "64584:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8731, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8724, + "src": "64602:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 8732, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64607:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64602:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8734, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8724, + "src": "64612:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 8735, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64617:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64612:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8737, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64623:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 8738, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8726, + "src": "64628:2:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 8739, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "64633:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "64628:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64623:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8742, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "64622:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64612:23:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "64602:33:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8730, + "id": 8745, + "nodeType": "Return", + "src": "64595:40:7" + } + ] + }, + "documentation": { + "id": 8722, + "nodeType": "StructuredDocumentation", + "src": "64393:111:7", + "text": " @dev computes the nearest integer to a given quotient without overflowing or underflowing." + }, + "id": 8747, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8724, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64528:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64528:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8726, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64540:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8725, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64540:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64527:24:7" + }, + "returnParameters": { + "id": 8730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8729, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8747, + "src": "64575:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8728, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64575:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64574:9:7" + }, + "scope": 8977, + "src": "64510:133:7", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 8768, + "nodeType": "Block", + "src": "65019:97:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8762, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8750, + "src": "65058:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8763, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8752, + "src": "65067:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8764, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8754, + "src": "65084:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8765, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8756, + "src": "65100:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8761, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "65037:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "65037:71:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8760, + "id": 8767, + "nodeType": "Return", + "src": "65030:78:7" + } + ] + }, + "documentation": { + "id": 8748, + "nodeType": "StructuredDocumentation", + "src": "64651:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "29a00e7c", + "id": 8769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculatePurchaseReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8757, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8750, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64750:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8749, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64750:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8752, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64805:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8751, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8754, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64868:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8753, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "64868:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8756, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "64929:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "64929:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "64749:196:7" + }, + "returnParameters": { + "id": 8760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8759, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8769, + "src": "65005:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8758, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65005:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65004:9:7" + }, + "scope": 8977, + "src": "64717:399:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8790, + "nodeType": "Block", + "src": "65472:93:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8784, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8772, + "src": "65507:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8785, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8774, + "src": "65516:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8786, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8776, + "src": "65533:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8787, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8778, + "src": "65549:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8783, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5199, + "src": "65490:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "65490:67:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8782, + "id": 8789, + "nodeType": "Return", + "src": "65483:74:7" + } + ] + }, + "documentation": { + "id": 8770, + "nodeType": "StructuredDocumentation", + "src": "65124:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "49f9b0f7", + "id": 8791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateSaleReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8772, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65219:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8771, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65219:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8774, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65270:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65270:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8776, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65329:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8775, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65329:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8778, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65386:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8777, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65386:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65218:184:7" + }, + "returnParameters": { + "id": 8782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8781, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8791, + "src": "65458:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65457:9:7" + }, + "scope": 8977, + "src": "65190:375:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8815, + "nodeType": "Block", + "src": "66058:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8808, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8794, + "src": "66101:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8809, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8796, + "src": "66124:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8810, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8798, + "src": "66146:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8811, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "66169:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8812, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8802, + "src": "66191:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8807, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "66076:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "66076:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8806, + "id": 8814, + "nodeType": "Return", + "src": "66069:130:7" + } + ] + }, + "documentation": { + "id": 8792, + "nodeType": "StructuredDocumentation", + "src": "65573:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "79c1b450", + "id": 8816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCrossReserveReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8794, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65676:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8793, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65676:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8796, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65749:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8795, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65749:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8798, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65820:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8797, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65820:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8800, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65893:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8799, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "65893:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8802, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "65964:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "65964:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "65675:305:7" + }, + "returnParameters": { + "id": 8806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8805, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8816, + "src": "66044:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66044:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66043:9:7" + }, + "scope": 8977, + "src": "65639:568:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8840, + "nodeType": "Block", + "src": "66712:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8833, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8819, + "src": "66755:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8834, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8821, + "src": "66778:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8835, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8823, + "src": "66800:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8836, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8825, + "src": "66823:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8837, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8827, + "src": "66845:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8832, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "66730:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "66730:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8831, + "id": 8839, + "nodeType": "Return", + "src": "66723:130:7" + } + ] + }, + "documentation": { + "id": 8817, + "nodeType": "StructuredDocumentation", + "src": "66215:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "65098bb3", + "id": 8841, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateCrossConnectorReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8819, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66320:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66320:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8821, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66395:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8820, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "66395:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8823, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66468:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66468:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8825, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66543:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8824, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "66543:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8827, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66616:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8826, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66616:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66319:313:7" + }, + "returnParameters": { + "id": 8831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8830, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8841, + "src": "66698:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8829, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66698:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66697:9:7" + }, + "scope": 8977, + "src": "66281:580:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8862, + "nodeType": "Block", + "src": "67206:84:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8856, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8844, + "src": "67233:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8857, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8846, + "src": "67242:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8858, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8848, + "src": "67259:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8859, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8850, + "src": "67274:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8855, + "name": "fundCost", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5413, + "src": "67224:8:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "67224:58:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8854, + "id": 8861, + "nodeType": "Return", + "src": "67217:65:7" + } + ] + }, + "documentation": { + "id": 8842, + "nodeType": "StructuredDocumentation", + "src": "66869:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "1da6bbfb", + "id": 8863, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateFundCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8844, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "66962:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "66962:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8846, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67011:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67011:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8848, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67068:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8847, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67068:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8850, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67122:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8849, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67122:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "66961:177:7" + }, + "returnParameters": { + "id": 8854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8853, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8863, + "src": "67192:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8852, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67192:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67191:9:7" + }, + "scope": 8977, + "src": "66935:355:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8884, + "nodeType": "Block", + "src": "67670:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8878, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8866, + "src": "67711:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8879, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8868, + "src": "67720:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8880, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8870, + "src": "67737:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8881, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8872, + "src": "67752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8877, + "name": "liquidateReserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5626, + "src": "67688:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "67688:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8876, + "id": 8883, + "nodeType": "Return", + "src": "67681:79:7" + } + ] + }, + "documentation": { + "id": 8864, + "nodeType": "StructuredDocumentation", + "src": "67298:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "abfd231d", + "id": 8885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateLiquidateReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8873, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8866, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67398:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67398:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8868, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67454:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8867, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67454:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8870, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67518:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8869, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67518:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8872, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67579:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8871, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67579:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67397:198:7" + }, + "returnParameters": { + "id": 8876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8875, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8885, + "src": "67656:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67656:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67655:9:7" + }, + "scope": 8977, + "src": "67364:404:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8906, + "nodeType": "Block", + "src": "68089:97:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8900, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8888, + "src": "68128:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8901, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8890, + "src": "68137:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8902, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8892, + "src": "68154:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8903, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "68170:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8899, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "68107:20:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "68107:71:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8898, + "id": 8905, + "nodeType": "Return", + "src": "68100:78:7" + } + ] + }, + "documentation": { + "id": 8886, + "nodeType": "StructuredDocumentation", + "src": "67776:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "48d73fed", + "id": 8907, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "purchaseRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8888, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67864:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8890, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67908:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "67908:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8892, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "67960:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8891, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "67960:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "68010:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68010:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "67863:163:7" + }, + "returnParameters": { + "id": 8898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8897, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8907, + "src": "68075:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8896, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68075:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68074:9:7" + }, + "scope": 8977, + "src": "67842:344:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8928, + "nodeType": "Block", + "src": "68487:93:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8922, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8910, + "src": "68522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8923, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8912, + "src": "68531:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8924, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8914, + "src": "68548:14:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8925, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8916, + "src": "68564:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8921, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5199, + "src": "68505:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "68505:67:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8920, + "id": 8927, + "nodeType": "Return", + "src": "68498:74:7" + } + ] + }, + "documentation": { + "id": 8908, + "nodeType": "StructuredDocumentation", + "src": "68194:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f732f1c9", + "id": 8929, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "saleRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8910, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68278:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68278:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8912, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68318:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8911, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68318:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8914, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68366:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8913, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68366:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8916, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68412:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8915, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68412:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68277:151:7" + }, + "returnParameters": { + "id": 8920, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8919, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8929, + "src": "68473:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68473:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68472:9:7" + }, + "scope": 8977, + "src": "68260:320:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8953, + "nodeType": "Block", + "src": "69007:149:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8946, + "name": "_sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8932, + "src": "69050:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8947, + "name": "_sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8934, + "src": "69073:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8948, + "name": "_targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8936, + "src": "69095:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8949, + "name": "_targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8938, + "src": "69118:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8950, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8940, + "src": "69140:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8945, + "name": "crossReserveTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5305, + "src": "69025:24:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "69025:123:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8944, + "id": 8952, + "nodeType": "Return", + "src": "69018:130:7" + } + ] + }, + "documentation": { + "id": 8930, + "nodeType": "StructuredDocumentation", + "src": "68588:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "9d114108", + "id": 8954, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "crossReserveRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8932, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68680:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8931, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68680:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8934, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68742:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8933, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68742:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8936, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68802:29:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8938, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68864:27:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8937, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "68864:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8940, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68924:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8939, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68924:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68679:261:7" + }, + "returnParameters": { + "id": 8944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8943, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8954, + "src": "68993:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "68993:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "68992:9:7" + }, + "scope": 8977, + "src": "68654:502:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 8975, + "nodeType": "Block", + "src": "69481:98:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 8969, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8957, + "src": "69522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8970, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8959, + "src": "69531:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 8971, + "name": "_reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8961, + "src": "69548:13:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 8972, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8963, + "src": "69563:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8968, + "name": "liquidateReserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5626, + "src": "69499:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view returns (uint256)" + } + }, + "id": 8973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "69499:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8967, + "id": 8974, + "nodeType": "Return", + "src": "69492:79:7" + } + ] + }, + "documentation": { + "id": 8955, + "nodeType": "StructuredDocumentation", + "src": "69164:60:7", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "35b49af4", + "id": 8976, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidateRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 8964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8957, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69253:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8956, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8959, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69298:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8958, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69298:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8961, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69351:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 8960, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "69351:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 8963, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69401:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69401:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "69252:165:7" + }, + "returnParameters": { + "id": 8967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8966, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 8976, + "src": "69467:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "69467:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "69466:9:7" + }, + "scope": 8977, + "src": "69230:349:7", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 8978, + "src": "157:69425:7" + } + ], + "src": "52:69532:7" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": {}, + "address": "0xbc11EDec16f60B0B606921F88053C28f470E32d6", + "transactionHash": "0x24d52552794c7a4649d4b881db31094fc3c1fbbaf4718c04c9d4486304870b2c" + }, + "8995": { + "events": {}, + "links": {}, + "address": "0xbc11EDec16f60B0B606921F88053C28f470E32d6", + "transactionHash": "0x24d52552794c7a4649d4b881db31094fc3c1fbbaf4718c04c9d4486304870b2c" + }, + "1604964387852": { + "events": {}, + "links": {}, + "address": "0x2F8759fB1CF8Bbe0D1532B54c2143de2eF4BFC63", + "transactionHash": "0xabfbcd956a045c4ea82fbecbbde793829dbd8eda8433e34af02be26f95af0208" + }, + "1604964469407": { + "events": {}, + "links": {}, + "address": "0xD44121A85018De957506F96B17a2A7719b16E6e0", + "transactionHash": "0x383e2d0b5371324bf0f040bdf53c3c2f6172b81c7d1a322c5ae8fb310b4ccd39" + }, + "1604965528035": { + "events": {}, + "links": {}, + "address": "0xb242387159344b8620f9E7Affc284cb48EFB7c21", + "transactionHash": "0x3d19fbd65df5ffe30555f5164014dafca1aa48b52a9540094a3d87f0995b8cbc" + }, + "1604965645554": { + "events": {}, + "links": {}, + "address": "0xD6037d8eFbE3618035E96d776754F1090F5273Fc", + "transactionHash": "0x3bc51eeb718827268d161f6689a57de296d05538fc2fc066b0a93f1fe0539101" + }, + "1604965679541": { + "events": {}, + "links": {}, + "address": "0x8a2e520650DFC6A80f5891FBe928FA24Eb159772", + "transactionHash": "0xfc6563310e8c4fa7363b7127659cd66c376ab87682becda453b8cf37e93d9b69" + }, + "1604965719492": { + "events": {}, + "links": {}, + "address": "0xbF5918e320aeF4FCE0a91f352F1Cbcd2Ed1c08D1", + "transactionHash": "0x047670bde378079fcb6cf649b53e1f86125380aa3f7b82ac04323a06617544ba" + }, + "1604965760834": { + "events": {}, + "links": {}, + "address": "0x81Dd8B82b16D4552F222eE0B985DFa077e7B97CA", + "transactionHash": "0x7fc6bf0c25fd0dea62b704f018498d6a91ae9f8f4cacf4c47fab2b103a35d679" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:41.944Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "balancedWeights(uint256,uint256,uint256,uint256,uint256)": { + "details": "The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price. We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance. In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance. Formula input: - let t denote the primary reserve token staked balance - let s denote the primary reserve token balance - let r denote the secondary reserve token balance - let q denote the numerator of the rate between the tokens - let p denote the denominator of the rate between the tokens Where p primary tokens are equal to q secondary tokens Formula output: - compute x = W(t / r * q / p * log(s / t)) / log(s / t) - return x / (1 + x) as the weight of the primary reserve token - return 1 / (1 + x) as the weight of the secondary reserve token Where W is the Lambert W Function If the rate-provider provides the rates for a common unit, for example: - P = 2 ==> 2 primary reserve tokens = 1 ether - Q = 3 ==> 3 secondary reserve tokens = 1 ether Then you can simply use p = P and q = Q If the rate-provider provides the rates for a single unit, for example: - P = 2 ==> 1 primary reserve token = 2 ethers - Q = 3 ==> 1 secondary reserve token = 3 ethers Then you can simply use p = Q and q = P", + "params": { + "_primaryReserveBalance": "the primary reserve token balance", + "_primaryReserveStakedBalance": "the primary reserve token staked balance", + "_reserveRateDenominator": "the denominator of the rate between the tokens Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token", + "_reserveRateNumerator": "the numerator of the rate between the tokens", + "_secondaryReserveBalance": "the secondary reserve token balance" + }, + "returns": { + "_0": "the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)" + } + }, + "calculateCrossConnectorReturn(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateCrossReserveReturn(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateFundCost(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateLiquidateReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculatePurchaseReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateSaleReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "crossReserveRate(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "crossReserveTargetAmount(uint256,uint32,uint256,uint32,uint256)": { + "details": "given two reserve balances/weights and a sell amount (in the first reserve token), calculates the target amount for a conversion from the source reserve token to the target reserve token Formula: return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))", + "params": { + "_amount": "source reserve amount", + "_sourceReserveBalance": "source reserve balance", + "_sourceReserveWeight": "source reserve weight, represented in ppm (1-1000000)", + "_targetReserveBalance": "target reserve balance", + "_targetReserveWeight": "target reserve weight, represented in ppm (1-1000000)" + }, + "returns": { + "_0": "target reserve amount" + } + }, + "fundCost(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens, calculates the amount of reserve tokens required for purchasing the given amount of smart tokens Formula: return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)", + "params": { + "_amount": "requested amount of smart tokens", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + }, + "fundSupplyAmount(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with, calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens Formula: return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)", + "params": { + "_amount": "amount of reserve tokens to fund with", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "smart token amount" + } + }, + "init()": { + "details": "should be executed after construction (too large for the constructor)" + }, + "liquidateRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "liquidateReserveAmount(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate, calculates the amount of reserve tokens received for selling the given amount of smart tokens Formula: return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))", + "params": { + "_amount": "amount of smart tokens to liquidate", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + }, + "purchaseRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "purchaseTargetAmount(uint256,uint256,uint32,uint256)": { + "details": "given a token supply, reserve balance, weight and a deposit amount (in the reserve token), calculates the target amount for a given conversion (in the main token) Formula: return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)", + "params": { + "_amount": "amount of reserve tokens to get the target amount for", + "_reserveBalance": "reserve balance", + "_reserveWeight": "reserve weight, represented in ppm (1-1000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "smart token amount" + } + }, + "saleRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "saleTargetAmount(uint256,uint256,uint32,uint256)": { + "details": "given a token supply, reserve balance, weight and a sell amount (in the main token), calculates the target amount for a given conversion (in the reserve token) Formula: return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))", + "params": { + "_amount": "amount of smart tokens to get the target amount for", + "_reserveBalance": "reserve balance", + "_reserveWeight": "reserve weight, represented in ppm (1-1000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/BancorNetwork.json b/apps/cic-eth/tests/testdata/bancor/BancorNetwork.json new file mode 100644 index 00000000..679d79ac --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/BancorNetwork.json @@ -0,0 +1,56968 @@ +{ + "contractName": "BancorNetwork", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "etherTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "maxAffiliateFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxAffiliateFee", + "type": "uint256" + } + ], + "name": "setMaxAffiliateFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IEtherToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "bool", + "name": "_register", + "type": "bool" + } + ], + "name": "registerEtherToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + } + ], + "name": "conversionPath", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "rateByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convertByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_targetBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_targetAccount", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + } + ], + "name": "xConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_targetBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_targetAccount", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "xConvert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "contract IBancorX", + "name": "_bancorX", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "completeXConversion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturnByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convertFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convertFor2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "claimAndConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "claimAndConvert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "claimAndConvertFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "claimAndConvertFor2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"claimAndConvert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"claimAndConvert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"claimAndConvertFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"claimAndConvertFor2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"contract IBancorX\",\"name\":\"_bancorX\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"completeXConversion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"}],\"name\":\"conversionPath\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convertByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convertFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convertFor2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"etherTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturnByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxAffiliateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"rateByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IEtherToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_register\",\"type\":\"bool\"}],\"name\":\"registerEtherToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxAffiliateFee\",\"type\":\"uint256\"}],\"name\":\"setMaxAffiliateFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_targetBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_targetAccount\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"}],\"name\":\"xConvert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_targetBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_targetAccount\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"xConvert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The BancorNetwork contract is the main entry point for Bancor token conversions. It also allows for the conversion of any token in the Bancor Network to any other token in a single transaction by providing a conversion path. A note on Conversion Path: Conversion path is a data structure that is used when converting a token to another token in the Bancor Network, when the conversion cannot necessarily be done by a single converter and might require multiple 'hops'. The path defines which converters should be used and what kind of conversion should be done in each step. The path format doesn't include complex structure; instead, it is represented by a single array in which each 'hop' is represented by a 2-tuple - converter anchor & target token. In addition, the first element is always the source token. The converter anchor is only used as a pointer to a converter (since converter addresses are more likely to change as opposed to anchor addresses). Format: [source token, converter anchor, target token, converter anchor, target token...]\",\"events\":{\"Conversion(address,address,address,uint256,uint256,address)\":{\"details\":\"triggered when a conversion between two tokens occurs\",\"params\":{\"_fromAmount\":\"amount converted, in the source token\",\"_fromToken\":\"source ERC20 token\",\"_smartToken\":\"anchor governed by the converter\",\"_toAmount\":\"amount returned, minus conversion fee\",\"_toToken\":\"target ERC20 token\",\"_trader\":\"wallet that initiated the trade\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"claimAndConvert(address[],uint256,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvert2(address[],uint256,uint256,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvertFor(address[],uint256,uint256,address)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvertFor2(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"completeXConversion(address[],address,uint256,uint256,address)\":{\"details\":\"allows a user to convert a token that was sent from another blockchain into any other token on the BancorNetwork ideally this transaction is created before the previous conversion is even complete, so so the input amount isn't known at that point - the amount is actually take from the BancorX contract directly by specifying the conversion id\",\"params\":{\"_bancorX\":\"address of the BancorX contract for the source token\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this conversion\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\",\"_path\":\"conversion path\"},\"returns\":{\"_0\":\"amount of tokens received from the conversion\"}},\"constructor\":{\"details\":\"initializes a new BancorNetwork instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"conversionPath(address,address)\":{\"details\":\"returns the conversion path between two tokens in the network note that this method is quite expensive in terms of gas and should generally be called off-chain\",\"params\":{\"_sourceToken\":\"source token address\",\"_targetToken\":\"target token address\"},\"returns\":{\"_0\":\"conversion path between the two tokens\"}},\"convert(address[],uint256,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"convert2(address[],uint256,uint256,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"convertByPath(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"converts the token to any other token in the bancor network by following a predefined conversion path and transfers the result tokens to a target account affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees) note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_affiliateAccount\":\"wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\",\"_affiliateFee\":\"affiliate fee in PPM or 0 to disable affiliate fee\",\"_amount\":\"amount to convert from, in the source token\",\"_beneficiary\":\"account that will receive the conversion result or 0x0 to send the result to the sender account\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\"},\"returns\":{\"_0\":\"amount of tokens received from the conversion\"}},\"convertFor(address[],uint256,uint256,address)\":{\"details\":\"deprecated, backward compatibility\"},\"convertFor2(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturnByPath(address[],uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"rateByPath(address[],uint256)\":{\"details\":\"returns the expected target amount of converting a given amount on a given path note that there is no support for circular paths\",\"params\":{\"_amount\":\"amount of _path[0] tokens received from the sender\",\"_path\":\"conversion path (see conversion path format above)\"},\"returns\":{\"_0\":\"expected target amount\"}},\"registerEtherToken(address,bool)\":{\"details\":\"allows the owner to register/unregister ether tokens\",\"params\":{\"_register\":\"true to register, false to unregister\",\"_token\":\"ether token contract address\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setMaxAffiliateFee(uint256)\":{\"details\":\"allows the owner to update the maximum affiliate-fee\",\"params\":{\"_maxAffiliateFee\":\"maximum affiliate-fee\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"xConvert(address[],uint256,uint256,bytes32,bytes32,uint256)\":{\"details\":\"converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_amount\":\"amount to convert from, in the source token\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this transaction\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\",\"_targetAccount\":\"address/account on the target blockchain to send the BNT to\",\"_targetBlockchain\":\"blockchain BNT will be issued on\"},\"returns\":{\"_0\":\"the amount of BNT received from this conversion\"}},\"xConvert2(address[],uint256,uint256,bytes32,bytes32,uint256,address,uint256)\":{\"details\":\"converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_affiliateAccount\":\"affiliate account\",\"_affiliateFee\":\"affiliate fee in PPM\",\"_amount\":\"amount to convert from, in the source token\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this transaction\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\",\"_targetAccount\":\"address/account on the target blockchain to send the BNT to\",\"_targetBlockchain\":\"blockchain BNT will be issued on\"},\"returns\":{\"_0\":\"the amount of BNT received from this conversion\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":\"BancorNetwork\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b191690556175306004553480156200002457600080fd5b50604051620039ad380380620039ad833981810160405260208110156200004a57600080fd5b5051600080546001600160a01b0319163317905580806200006b81620000e6565b50600280546001600160a01b039092166001600160a01b03199283168117909155600380549092161790555073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260056020527fa1829a9003092132f585b6ccdd167c19fe9774dbdea4260287e8a8e8ca8185d7805460ff1916600117905562000145565b6001600160a01b03811662000142576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61385880620001556000396000f3fe6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063c98fefed11610095578063e57738e511610064578063e57738e514610ca7578063f2fde38b14610cca578063f3898a9714610cfd578063f3bc7d2a14610d13576101cd565b8063c98fefed14610b23578063cb32564e14610b39578063d4ee1d9014610c07578063d734fa1914610c1c576101cd565b8063b4a176d3116100d1578063b4a176d3146108de578063b77d239b146108f3578063c52173de146109b8578063c7ba24bc14610a70576101cd565b80638da5cb5b14610742578063ab6214ce14610757578063b1e9932b1461081c576101cd565b80635d732ff21161016f5780637b1039991161013e5780637b1039991461057f5780637f9c0ecd146105945780638077ccf71461064457806389f9cc6114610677576101cd565b80635d732ff2146104e15780635e35359e146104f657806361cd756e1461053957806379ba50971461056a576101cd565b80632978c10e116101ab5780632978c10e146103045780632fe8a6ad146103e857806349d10b6414610411578063569706eb14610426576101cd565b8063024c7ec7146101d257806302ef521e146102005780630c8496cc1461023b575b600080fd5b3480156101de57600080fd5b506101fe600480360360208110156101f557600080fd5b50351515610d3d565b005b34801561020c57600080fd5b506101fe6004803603604081101561022357600080fd5b506001600160a01b0381351690602001351515610d63565b34801561024757600080fd5b506102eb6004803603604081101561025e57600080fd5b810190602081018135600160201b81111561027857600080fd5b82018360208201111561028a57600080fd5b803590602001918460208302840111600160201b831117156102ab57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610dac915050565b6040805192835260208301919091528051918290030190f35b34801561031057600080fd5b506103d6600480360360c081101561032757600080fd5b810190602081018135600160201b81111561034157600080fd5b82018360208201111561035357600080fd5b803590602001918460208302840111600160201b8311171561037457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135610dc4565b60408051918252519081900360200190f35b3480156103f457600080fd5b506103fd610ddf565b604080519115158252519081900360200190f35b34801561041d57600080fd5b506101fe610def565b6103d6600480360360a081101561043c57600080fd5b810190602081018135600160201b81111561045657600080fd5b82018360208201111561046857600080fd5b803590602001918460208302840111600160201b8311171561048957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135169060600135610ff7565b3480156104ed57600080fd5b506103d6611012565b34801561050257600080fd5b506101fe6004803603606081101561051957600080fd5b506001600160a01b03813581169160208101359091169060400135611018565b34801561054557600080fd5b5061054e611051565b604080516001600160a01b039092168252519081900360200190f35b34801561057657600080fd5b506101fe611060565b34801561058b57600080fd5b5061054e611117565b3480156105a057600080fd5b506103d6600480360360408110156105b757600080fd5b810190602081018135600160201b8111156105d157600080fd5b8201836020820111156105e357600080fd5b803590602001918460208302840111600160201b8311171561060457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250611126915050565b34801561065057600080fd5b506103fd6004803603602081101561066757600080fd5b50356001600160a01b0316611843565b34801561068357600080fd5b506103d6600480360360a081101561069a57600080fd5b810190602081018135600160201b8111156106b457600080fd5b8201836020820111156106c657600080fd5b803590602001918460208302840111600160201b831117156106e757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550506001600160a01b038335811694506020840135936040810135935060600135169050611858565b34801561074e57600080fd5b5061054e6119cf565b6103d6600480360360c081101561076d57600080fd5b810190602081018135600160201b81111561078757600080fd5b82018360208201111561079957600080fd5b803590602001918460208302840111600160201b831117156107ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135811691606081013590911690608001356119de565b34801561082857600080fd5b506103d66004803603608081101561083f57600080fd5b810190602081018135600160201b81111561085957600080fd5b82018360208201111561086b57600080fd5b803590602001918460208302840111600160201b8311171561088c57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356001600160a01b0316611a04565b3480156108ea57600080fd5b506101fe611a1e565b6103d6600480360360c081101561090957600080fd5b810190602081018135600160201b81111561092357600080fd5b82018360208201111561093557600080fd5b803590602001918460208302840111600160201b8311171561095657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611a4a565b6103d6600480360360c08110156109ce57600080fd5b810190602081018135600160201b8111156109e857600080fd5b8201836020820111156109fa57600080fd5b803590602001918460208302840111600160201b83111715610a1b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060408101359060608101359060800135611c25565b348015610a7c57600080fd5b506103d660048036036060811015610a9357600080fd5b810190602081018135600160201b811115610aad57600080fd5b820183602082011115610abf57600080fd5b803590602001918460208302840111600160201b83111715610ae057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135611c38565b6103d66004803603608081101561083f57600080fd5b6103d66004803603610100811015610b5057600080fd5b810190602081018135600160201b811115610b6a57600080fd5b820183602082011115610b7c57600080fd5b803590602001918460208302840111600160201b83111715610b9d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906040810135906060810135906080810135906001600160a01b0360a0820135169060c00135611c52565b348015610c1357600080fd5b5061054e611dad565b348015610c2857600080fd5b50610c5760048036036040811015610c3f57600080fd5b506001600160a01b0381358116916020013516611dbc565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c93578181015183820152602001610c7b565b505050509050019250505060405180910390f35b348015610cb357600080fd5b506103d6600480360360a081101561043c57600080fd5b348015610cd657600080fd5b506101fe60048036036020811015610ced57600080fd5b50356001600160a01b0316611f10565b6103d660048036036060811015610a9357600080fd5b348015610d1f57600080fd5b506101fe60048036036020811015610d3657600080fd5b5035611f8e565b610d45611fef565b60038054911515600160a01b0260ff60a01b19909216919091179055565b610d6b611fef565b81610d7581612044565b82610d7f81612098565b50506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b600080610db98484611126565b946000945092505050565b6000610dd4878787878787611a4a565b979650505050505050565b600354600160a01b900460ff1681565b6000546001600160a01b0316331480610e125750600354600160a01b900460ff16155b610e57576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610e756f436f6e7472616374526567697374727960801b6120ec565b6002549091506001600160a01b03808316911614801590610e9e57506001600160a01b03811615155b610ee6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d6020811015610f7257600080fd5b50516001600160a01b03161415610fc7576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061100886868660008787611a4a565b9695505050505050565b60045481565b611020611fef565b8261102a81612044565b8261103481612044565b8361103e81612098565b61104986868661216c565b505050505050565b6003546001600160a01b031681565b6001546001600160a01b031633146110b3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b60008060008060008060008061114b6c42616e636f72466f726d756c6160981b6120ec565b905088965060028a5111801561116c575060028a518161116757fe5b066001145b6111b0576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b60025b8a518110156118325760008b60028303815181106111cd57fe5b6020026020010151905060008c60018403815181106111e857fe5b6020026020010151905060008d848151811061120057fe5b60200260200101519050816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124357600080fd5b505afa158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051955061127b86846122cc565b925061128786826122cc565b9050816001600160a01b0316816001600160a01b031614156115745760038410806112da57508d60038503815181106112bc57fe5b60200260200101516001600160a01b0316826001600160a01b031614155b1561134757816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131857600080fd5b505afa15801561132c573d6000803e3d6000fd5b505050506040513d602081101561134257600080fd5b505198505b856001600160a01b031663d8959512846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b505160408051630e53aae960e01b81526001600160a01b0386811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b15801561140d57600080fd5b505afa158015611421573d6000803e3d6000fd5b505050506040513d60a081101561143757600080fd5b506020908101516040805163799287f160e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b0388169263f3250fe292608480840193829003018186803b15801561149d57600080fd5b505afa1580156114b1573d6000803e3d6000fd5b505050506040513d60208110156114c757600080fd5b505160408051632bce69e560e11b81529051919c5061155c91620f424091611556916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d602081101561154357600080fd5b50518e9063ffffffff9081169061232c16565b9061238a565b9a8b90039a995061156d898c6123e9565b9850611827565b816001600160a01b0316836001600160a01b031614156118155760038410806115c557508d60038503815181106115a757fe5b60200260200101516001600160a01b0316826001600160a01b031614155b1561163257816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561160357600080fd5b505afa158015611617573d6000803e3d6000fd5b505050506040513d602081101561162d57600080fd5b505198505b856001600160a01b031663d8959512826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561167f57600080fd5b505afa158015611693573d6000803e3d6000fd5b505050506040513d60208110156116a957600080fd5b505160408051630e53aae960e01b81526001600160a01b0384811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156116f857600080fd5b505afa15801561170c573d6000803e3d6000fd5b505050506040513d60a081101561172257600080fd5b5060209081015160408051633b6785ab60e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b038816926376cf0b5692608480840193829003018186803b15801561178857600080fd5b505afa15801561179c573d6000803e3d6000fd5b505050506040513d60208110156117b257600080fd5b505160408051632bce69e560e11b81529051919c5061180491620f424091611556916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b15801561151957600080fd5b9a8b90039a995061156d898c612432565b6118218684838e61247f565b909b5099505b5050506002016111b3565b509596505050505050505b92915050565b60056020526000908152604090205460ff1681565b6000846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561189357600080fd5b505afa1580156118a7573d6000803e3d6000fd5b505050506040513d60208110156118bd57600080fd5b505186516001600160a01b039091169087906000906118d857fe5b60200260200101516001600160a01b03161461193b576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f534f555243455f544f4b454e0000000000000000604482015290519081900360640190fd5b6000856001600160a01b031663aafd6b7686336040518363ffffffff1660e01b815260040180838152602001826001600160a01b031681526020019250505060206040518083038186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d60208110156119bc57600080fd5b50519050610dd487828686600080611a4a565b6000546001600160a01b031681565b6000846119ea816125f3565b6119f8888888888888611a4a565b98975050505050505050565b6000611a1585858585600080611a4a565b95945050505050565b611a26611fef565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611a54612639565b6003805460ff60a81b1916600160a81b17905584611a71816125f3565b60028851118015611a8d57506002885181611a8857fe5b066001145b611ad1576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b611b0488600081518110611ae157fe5b602002602001015189600181518110611af657fe5b602002602001015189612689565b60006001600160a01b038516611b68578315611b63576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b611bcb565b836000108015611b7a57506004548411155b611bc7576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b5060015b336001600160a01b03871615611bde5750855b6060611beb8b8385612874565b90506000611bfc828c8c8b8b612c71565b9050611c09828285613145565b6003805460ff60a81b191690559b9a5050505050505050505050565b6000610dd4878787878787600080611c52565b6000611c4a8484846000806000611a4a565b949350505050565b600086611c5e816125f3565b60008a60018c510381518110611c7057fe5b602002602001015190506000611c8f66084c2dcc6dee4b60cb1b6120ec565b9050611ca56721272a2a37b5b2b760c11b6120ec565b6001600160a01b0316826001600160a01b031614611d0a576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f5441524745545f544f4b454e0000000000000000604482015290519081900360640190fd5b6000611d1a8d8d8d308b8b611a4a565b9050611d27838383613223565b6040805163109f00dd60e21b8152600481018c9052602481018b905260448101839052606481018a905290516001600160a01b0384169163427c037491608480830192600092919082900301818387803b158015611d8457600080fd5b505af1158015611d98573d6000803e3d6000fd5b50929f9e505050505050505050505050505050565b6001546001600160a01b031681565b60606000611de07321b7b73b32b939b4b7b72830ba342334b73232b960611b6120ec565b9050806001600160a01b031663a1c421cd85856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060006040518083038186803b158015611e4057600080fd5b505afa158015611e54573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611e7d57600080fd5b8101908080516040519392919084600160201b821115611e9c57600080fd5b908301906020820185811115611eb157600080fd5b82518660208202830111600160201b82111715611ecd57600080fd5b82525081516020918201928201910280838360005b83811015611efa578181015183820152602001611ee2565b5050505090500160405250505091505092915050565b611f18611fef565b6000546001600160a01b0382811691161415611f6c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611f96611fef565b620f4240811115611fea576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b600455565b6000546001600160a01b03163314612042576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116612095576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415612095576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561213857600080fd5b505afa15801561214c573d6000803e3d6000fd5b505050506040513d602081101561216257600080fd5b505190505b919050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106121e95780518252601f1990920191602091820191016121ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461224b576040519150601f19603f3d011682016040523d82523d6000602084013e612250565b606091505b509150915081801561227e57508051158061227e575080806020019051602081101561227b57600080fd5b50515b6122c5576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811660009081526005602052604081205460ff166122f357508061183d565b6122fc836132cd565b1561231c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61183d565b612325836133e4565b9392505050565b60008261233b5750600061183d565b8282028284828161234857fe5b0414612325576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b60008082116123d5576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816123e057fe5b04949350505050565b600082820183811015612325576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015612479576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528085166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166303c2803f60e31b178152925182516000948594938593606093918c169286928291908083835b602083106125095780518252601f1990920191602091820191016124ea565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612569576040519150601f19603f3d011682016040523d82523d6000602084013e61256e565b606091505b509150915081156125df578051604014156125af5780806020019051604081101561259857600080fd5b50805160209091015190955093506125ea92505050565b8051602014156125df578080602001905160208110156125ce57600080fd5b50519450600093506125ea92505050565b600080945094505050505b94509492505050565b60008111612095576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b600354600160a81b900460ff1615612042576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b6000826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126c457600080fd5b505afa1580156126d8573d6000803e3d6000fd5b505050506040513d60208110156126ee57600080fd5b5051905060006126fd826132cd565b905034156127c057823414612759576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b806127bb57612767826133e4565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127a157600080fd5b505af11580156127b5573d6000803e3d6000fd5b50505050505b6122c5565b6001600160a01b03851660009081526005602052604090205460ff1615612856576127ed85333086613523565b80156127bb57846001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561283957600080fd5b505af115801561284d573d6000803e3d6000fd5b505050506122c5565b8015612868576127bb85338486613523565b6122c585333086613523565b606080600285518161288257fe5b0467ffffffffffffffff8111801561289957600080fd5b506040519080825280602002602001820160405280156128d357816020015b6128c06137e6565b8152602001906001900390816128b85790505b5090506000806128ed6721272a2a37b5b2b760c11b6120ec565b905060005b6001885103811015612a8157600088826001018151811061290f57fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d602081101561297e57600080fd5b50518a519091506000908b906002860190811061299757fe5b6020026020010151905060008980156129ae575086155b80156129cb5750856001600160a01b0316826001600160a01b0316145b905080156129d857600196505b6040518060e00160405280846001600160a01b03168152602001856001600160a01b031681526020018d8781518110612a0d57fe5b60200260200101516001600160a01b03168152602001836001600160a01b0316815260200160006001600160a01b03168152602001612a4b856132cd565b15158152821515602090910152886002870481518110612a6757fe5b6020026020010181905250505050506002810190506128f2565b612a896137e6565b84600081518110612a9657fe5b6020908102919091018101516040808201516001600160a01b0316600090815260059093529091205490915060ff1615612b0d578060a0015115612af35773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6040820152612b0d565b8051612afe906133e4565b6001600160a01b031660408201525b84600186510381518110612b1d57fe5b60209081029190910181015160608101516001600160a01b03166000908152600590925260409091205490915060ff1615612b95578060a0015115612b7b5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6060820152612b95565b8051612b86906133e4565b6001600160a01b031660608201525b600091505b8451821015612c6457848281518110612baf57fe5b602002602001015190508060a0015115612c52578060c0015115612bd857306080820152612c4d565b6001855103821415612bf8576001600160a01b0388166080820152612c4d565b848260010181518110612c0757fe5b602002602001015160a0015115612c4657848260010181518110612c2757fe5b6020908102919091010151516001600160a01b03166080820152612c4d565b3060808201525b612c59565b3060808201525b600190910190612b9a565b5092979650505050505050565b60008085815b88518110156130ef57612c886137e6565b898281518110612c9457fe5b602002602001015190508060a0015115612d26578115801590612ce25750306001600160a01b03168a6001840381518110612ccb57fe5b6020026020010151608001516001600160a01b0316145b8015612d0957506040808201516001600160a01b031660009081526005602052205460ff16155b15612d2157612d21816040015182600001518561216c565b612d5a565b80602001516001600160a01b031681604001516001600160a01b031614612d5a57612d5a8160400151826000015185613223565b8060a00151612e0257805160408083015160608401518251635e5144eb60e01b81526001600160a01b039283166004820152908216602482015260448101879052600160648201529151921691635e5144eb916084808201926020929091908290030181600087803b158015612dcf57600080fd5b505af1158015612de3573d6000803e3d6000fd5b505050506040513d6020811015612df957600080fd5b50519350612f6d565b6040808201516001600160a01b031660009081526005602052205460ff1615612ec757805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff91349160a480830192602092919082900301818588803b158015612e9c57600080fd5b505af1158015612eb0573d6000803e3d6000fd5b50505050506040513d6020811015612df957600080fd5b805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff9160a4808201926020929091908290030181600087803b158015612f3e57600080fd5b505af1158015612f52573d6000803e3d6000fd5b505050506040513d6020811015612f6857600080fd5b505193505b8060c0015115613069576000612f8a620f4240611556878a61232c565b905081606001516001600160a01b031663a9059cbb89836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612fe757600080fd5b505af1158015612ffb573d6000803e3d6000fd5b505050506040513d602081101561301157600080fd5b5051613064576040805162461bcd60e51b815260206004820152601760248201527f4552525f4645455f5452414e534645525f4641494c4544000000000000000000604482015290519081900360640190fd5b909303925b80606001516001600160a01b031681604001516001600160a01b031682602001516001600160a01b03167f7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c09586883360405180848152602001838152602001826001600160a01b03168152602001935050505060405180910390a450829150600101612c77565b508582101561313a576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b509695505050505050565b61314d6137e6565b8360018551038151811061315d57fe5b60200260200101519050306001600160a01b031681608001516001600160a01b03161461318a575061321e565b60608101516001600160a01b03811660009081526005602052604090205460ff1615613213578160a00151156131bc57fe5b806001600160a01b031663205c287884866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561283957600080fd5b6122c581848661216c565b505050565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b15801561327457600080fd5b505afa158015613288573d6000803e3d6000fd5b505050506040513d602081101561329e57600080fd5b50519050818110156132c75780156132bc576132bc8484600061368e565b6132c784848461368e565b50505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106133395780518252601f19909201916020918201910161331a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461339a576040519150601f19603f3d011682016040523d82523d6000602084013e61339f565b606091505b50915091508180156133b2575080516020145b156133d9578080602001905160208110156133cc57600080fd5b5051935061216792505050565b506000949350505050565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561342057600080fd5b505afa158015613434573d6000803e3d6000fd5b505050506040513d602081101561344a57600080fd5b505161ffff16905060005b81811015613506576000846001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134a357600080fd5b505afa1580156134b7573d6000803e3d6000fd5b505050506040513d60208110156134cd57600080fd5b50516001600160a01b03811660009081526005602052604090205490915060ff16156134fd579250612167915050565b50600101613455565b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106135a85780518252601f199092019160209182019101613589565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461360a576040519150601f19603f3d011682016040523d82523d6000602084013e61360f565b606091505b509150915081801561363d57508051158061363d575080806020019051602081101561363a57600080fd5b50515b611049576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061370b5780518252601f1990920191602091820191016136ec565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461376d576040519150601f19603f3d011682016040523d82523d6000602084013e613772565b606091505b50915091508180156137a05750805115806137a0575080806020019051602081101561379d57600080fd5b50515b6122c5576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fea264697066735822122077a4a6153a0865a6077a6c21f0e36ac3a1a2290bcb3ce1b21870501d7465c9e164736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063c98fefed11610095578063e57738e511610064578063e57738e514610ca7578063f2fde38b14610cca578063f3898a9714610cfd578063f3bc7d2a14610d13576101cd565b8063c98fefed14610b23578063cb32564e14610b39578063d4ee1d9014610c07578063d734fa1914610c1c576101cd565b8063b4a176d3116100d1578063b4a176d3146108de578063b77d239b146108f3578063c52173de146109b8578063c7ba24bc14610a70576101cd565b80638da5cb5b14610742578063ab6214ce14610757578063b1e9932b1461081c576101cd565b80635d732ff21161016f5780637b1039991161013e5780637b1039991461057f5780637f9c0ecd146105945780638077ccf71461064457806389f9cc6114610677576101cd565b80635d732ff2146104e15780635e35359e146104f657806361cd756e1461053957806379ba50971461056a576101cd565b80632978c10e116101ab5780632978c10e146103045780632fe8a6ad146103e857806349d10b6414610411578063569706eb14610426576101cd565b8063024c7ec7146101d257806302ef521e146102005780630c8496cc1461023b575b600080fd5b3480156101de57600080fd5b506101fe600480360360208110156101f557600080fd5b50351515610d3d565b005b34801561020c57600080fd5b506101fe6004803603604081101561022357600080fd5b506001600160a01b0381351690602001351515610d63565b34801561024757600080fd5b506102eb6004803603604081101561025e57600080fd5b810190602081018135600160201b81111561027857600080fd5b82018360208201111561028a57600080fd5b803590602001918460208302840111600160201b831117156102ab57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610dac915050565b6040805192835260208301919091528051918290030190f35b34801561031057600080fd5b506103d6600480360360c081101561032757600080fd5b810190602081018135600160201b81111561034157600080fd5b82018360208201111561035357600080fd5b803590602001918460208302840111600160201b8311171561037457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135610dc4565b60408051918252519081900360200190f35b3480156103f457600080fd5b506103fd610ddf565b604080519115158252519081900360200190f35b34801561041d57600080fd5b506101fe610def565b6103d6600480360360a081101561043c57600080fd5b810190602081018135600160201b81111561045657600080fd5b82018360208201111561046857600080fd5b803590602001918460208302840111600160201b8311171561048957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135169060600135610ff7565b3480156104ed57600080fd5b506103d6611012565b34801561050257600080fd5b506101fe6004803603606081101561051957600080fd5b506001600160a01b03813581169160208101359091169060400135611018565b34801561054557600080fd5b5061054e611051565b604080516001600160a01b039092168252519081900360200190f35b34801561057657600080fd5b506101fe611060565b34801561058b57600080fd5b5061054e611117565b3480156105a057600080fd5b506103d6600480360360408110156105b757600080fd5b810190602081018135600160201b8111156105d157600080fd5b8201836020820111156105e357600080fd5b803590602001918460208302840111600160201b8311171561060457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250611126915050565b34801561065057600080fd5b506103fd6004803603602081101561066757600080fd5b50356001600160a01b0316611843565b34801561068357600080fd5b506103d6600480360360a081101561069a57600080fd5b810190602081018135600160201b8111156106b457600080fd5b8201836020820111156106c657600080fd5b803590602001918460208302840111600160201b831117156106e757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550506001600160a01b038335811694506020840135936040810135935060600135169050611858565b34801561074e57600080fd5b5061054e6119cf565b6103d6600480360360c081101561076d57600080fd5b810190602081018135600160201b81111561078757600080fd5b82018360208201111561079957600080fd5b803590602001918460208302840111600160201b831117156107ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135811691606081013590911690608001356119de565b34801561082857600080fd5b506103d66004803603608081101561083f57600080fd5b810190602081018135600160201b81111561085957600080fd5b82018360208201111561086b57600080fd5b803590602001918460208302840111600160201b8311171561088c57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356001600160a01b0316611a04565b3480156108ea57600080fd5b506101fe611a1e565b6103d6600480360360c081101561090957600080fd5b810190602081018135600160201b81111561092357600080fd5b82018360208201111561093557600080fd5b803590602001918460208302840111600160201b8311171561095657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611a4a565b6103d6600480360360c08110156109ce57600080fd5b810190602081018135600160201b8111156109e857600080fd5b8201836020820111156109fa57600080fd5b803590602001918460208302840111600160201b83111715610a1b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060408101359060608101359060800135611c25565b348015610a7c57600080fd5b506103d660048036036060811015610a9357600080fd5b810190602081018135600160201b811115610aad57600080fd5b820183602082011115610abf57600080fd5b803590602001918460208302840111600160201b83111715610ae057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135611c38565b6103d66004803603608081101561083f57600080fd5b6103d66004803603610100811015610b5057600080fd5b810190602081018135600160201b811115610b6a57600080fd5b820183602082011115610b7c57600080fd5b803590602001918460208302840111600160201b83111715610b9d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906040810135906060810135906080810135906001600160a01b0360a0820135169060c00135611c52565b348015610c1357600080fd5b5061054e611dad565b348015610c2857600080fd5b50610c5760048036036040811015610c3f57600080fd5b506001600160a01b0381358116916020013516611dbc565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c93578181015183820152602001610c7b565b505050509050019250505060405180910390f35b348015610cb357600080fd5b506103d6600480360360a081101561043c57600080fd5b348015610cd657600080fd5b506101fe60048036036020811015610ced57600080fd5b50356001600160a01b0316611f10565b6103d660048036036060811015610a9357600080fd5b348015610d1f57600080fd5b506101fe60048036036020811015610d3657600080fd5b5035611f8e565b610d45611fef565b60038054911515600160a01b0260ff60a01b19909216919091179055565b610d6b611fef565b81610d7581612044565b82610d7f81612098565b50506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b600080610db98484611126565b946000945092505050565b6000610dd4878787878787611a4a565b979650505050505050565b600354600160a01b900460ff1681565b6000546001600160a01b0316331480610e125750600354600160a01b900460ff16155b610e57576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610e756f436f6e7472616374526567697374727960801b6120ec565b6002549091506001600160a01b03808316911614801590610e9e57506001600160a01b03811615155b610ee6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d6020811015610f7257600080fd5b50516001600160a01b03161415610fc7576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061100886868660008787611a4a565b9695505050505050565b60045481565b611020611fef565b8261102a81612044565b8261103481612044565b8361103e81612098565b61104986868661216c565b505050505050565b6003546001600160a01b031681565b6001546001600160a01b031633146110b3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b60008060008060008060008061114b6c42616e636f72466f726d756c6160981b6120ec565b905088965060028a5111801561116c575060028a518161116757fe5b066001145b6111b0576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b60025b8a518110156118325760008b60028303815181106111cd57fe5b6020026020010151905060008c60018403815181106111e857fe5b6020026020010151905060008d848151811061120057fe5b60200260200101519050816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124357600080fd5b505afa158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b5051955061127b86846122cc565b925061128786826122cc565b9050816001600160a01b0316816001600160a01b031614156115745760038410806112da57508d60038503815181106112bc57fe5b60200260200101516001600160a01b0316826001600160a01b031614155b1561134757816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131857600080fd5b505afa15801561132c573d6000803e3d6000fd5b505050506040513d602081101561134257600080fd5b505198505b856001600160a01b031663d8959512846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d60208110156113be57600080fd5b505160408051630e53aae960e01b81526001600160a01b0386811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b15801561140d57600080fd5b505afa158015611421573d6000803e3d6000fd5b505050506040513d60a081101561143757600080fd5b506020908101516040805163799287f160e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b0388169263f3250fe292608480840193829003018186803b15801561149d57600080fd5b505afa1580156114b1573d6000803e3d6000fd5b505050506040513d60208110156114c757600080fd5b505160408051632bce69e560e11b81529051919c5061155c91620f424091611556916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d602081101561154357600080fd5b50518e9063ffffffff9081169061232c16565b9061238a565b9a8b90039a995061156d898c6123e9565b9850611827565b816001600160a01b0316836001600160a01b031614156118155760038410806115c557508d60038503815181106115a757fe5b60200260200101516001600160a01b0316826001600160a01b031614155b1561163257816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561160357600080fd5b505afa158015611617573d6000803e3d6000fd5b505050506040513d602081101561162d57600080fd5b505198505b856001600160a01b031663d8959512826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561167f57600080fd5b505afa158015611693573d6000803e3d6000fd5b505050506040513d60208110156116a957600080fd5b505160408051630e53aae960e01b81526001600160a01b0384811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156116f857600080fd5b505afa15801561170c573d6000803e3d6000fd5b505050506040513d60a081101561172257600080fd5b5060209081015160408051633b6785ab60e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b038816926376cf0b5692608480840193829003018186803b15801561178857600080fd5b505afa15801561179c573d6000803e3d6000fd5b505050506040513d60208110156117b257600080fd5b505160408051632bce69e560e11b81529051919c5061180491620f424091611556916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b15801561151957600080fd5b9a8b90039a995061156d898c612432565b6118218684838e61247f565b909b5099505b5050506002016111b3565b509596505050505050505b92915050565b60056020526000908152604090205460ff1681565b6000846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561189357600080fd5b505afa1580156118a7573d6000803e3d6000fd5b505050506040513d60208110156118bd57600080fd5b505186516001600160a01b039091169087906000906118d857fe5b60200260200101516001600160a01b03161461193b576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f534f555243455f544f4b454e0000000000000000604482015290519081900360640190fd5b6000856001600160a01b031663aafd6b7686336040518363ffffffff1660e01b815260040180838152602001826001600160a01b031681526020019250505060206040518083038186803b15801561199257600080fd5b505afa1580156119a6573d6000803e3d6000fd5b505050506040513d60208110156119bc57600080fd5b50519050610dd487828686600080611a4a565b6000546001600160a01b031681565b6000846119ea816125f3565b6119f8888888888888611a4a565b98975050505050505050565b6000611a1585858585600080611a4a565b95945050505050565b611a26611fef565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611a54612639565b6003805460ff60a81b1916600160a81b17905584611a71816125f3565b60028851118015611a8d57506002885181611a8857fe5b066001145b611ad1576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b611b0488600081518110611ae157fe5b602002602001015189600181518110611af657fe5b602002602001015189612689565b60006001600160a01b038516611b68578315611b63576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b611bcb565b836000108015611b7a57506004548411155b611bc7576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b5060015b336001600160a01b03871615611bde5750855b6060611beb8b8385612874565b90506000611bfc828c8c8b8b612c71565b9050611c09828285613145565b6003805460ff60a81b191690559b9a5050505050505050505050565b6000610dd4878787878787600080611c52565b6000611c4a8484846000806000611a4a565b949350505050565b600086611c5e816125f3565b60008a60018c510381518110611c7057fe5b602002602001015190506000611c8f66084c2dcc6dee4b60cb1b6120ec565b9050611ca56721272a2a37b5b2b760c11b6120ec565b6001600160a01b0316826001600160a01b031614611d0a576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f5441524745545f544f4b454e0000000000000000604482015290519081900360640190fd5b6000611d1a8d8d8d308b8b611a4a565b9050611d27838383613223565b6040805163109f00dd60e21b8152600481018c9052602481018b905260448101839052606481018a905290516001600160a01b0384169163427c037491608480830192600092919082900301818387803b158015611d8457600080fd5b505af1158015611d98573d6000803e3d6000fd5b50929f9e505050505050505050505050505050565b6001546001600160a01b031681565b60606000611de07321b7b73b32b939b4b7b72830ba342334b73232b960611b6120ec565b9050806001600160a01b031663a1c421cd85856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060006040518083038186803b158015611e4057600080fd5b505afa158015611e54573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611e7d57600080fd5b8101908080516040519392919084600160201b821115611e9c57600080fd5b908301906020820185811115611eb157600080fd5b82518660208202830111600160201b82111715611ecd57600080fd5b82525081516020918201928201910280838360005b83811015611efa578181015183820152602001611ee2565b5050505090500160405250505091505092915050565b611f18611fef565b6000546001600160a01b0382811691161415611f6c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b611f96611fef565b620f4240811115611fea576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b600455565b6000546001600160a01b03163314612042576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116612095576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415612095576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561213857600080fd5b505afa15801561214c573d6000803e3d6000fd5b505050506040513d602081101561216257600080fd5b505190505b919050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106121e95780518252601f1990920191602091820191016121ca565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461224b576040519150601f19603f3d011682016040523d82523d6000602084013e612250565b606091505b509150915081801561227e57508051158061227e575080806020019051602081101561227b57600080fd5b50515b6122c5576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811660009081526005602052604081205460ff166122f357508061183d565b6122fc836132cd565b1561231c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61183d565b612325836133e4565b9392505050565b60008261233b5750600061183d565b8282028284828161234857fe5b0414612325576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b60008082116123d5576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816123e057fe5b04949350505050565b600082820183811015612325576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015612479576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528085166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166303c2803f60e31b178152925182516000948594938593606093918c169286928291908083835b602083106125095780518252601f1990920191602091820191016124ea565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612569576040519150601f19603f3d011682016040523d82523d6000602084013e61256e565b606091505b509150915081156125df578051604014156125af5780806020019051604081101561259857600080fd5b50805160209091015190955093506125ea92505050565b8051602014156125df578080602001905160208110156125ce57600080fd5b50519450600093506125ea92505050565b600080945094505050505b94509492505050565b60008111612095576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b600354600160a81b900460ff1615612042576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b6000826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126c457600080fd5b505afa1580156126d8573d6000803e3d6000fd5b505050506040513d60208110156126ee57600080fd5b5051905060006126fd826132cd565b905034156127c057823414612759576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b806127bb57612767826133e4565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127a157600080fd5b505af11580156127b5573d6000803e3d6000fd5b50505050505b6122c5565b6001600160a01b03851660009081526005602052604090205460ff1615612856576127ed85333086613523565b80156127bb57846001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561283957600080fd5b505af115801561284d573d6000803e3d6000fd5b505050506122c5565b8015612868576127bb85338486613523565b6122c585333086613523565b606080600285518161288257fe5b0467ffffffffffffffff8111801561289957600080fd5b506040519080825280602002602001820160405280156128d357816020015b6128c06137e6565b8152602001906001900390816128b85790505b5090506000806128ed6721272a2a37b5b2b760c11b6120ec565b905060005b6001885103811015612a8157600088826001018151811061290f57fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d602081101561297e57600080fd5b50518a519091506000908b906002860190811061299757fe5b6020026020010151905060008980156129ae575086155b80156129cb5750856001600160a01b0316826001600160a01b0316145b905080156129d857600196505b6040518060e00160405280846001600160a01b03168152602001856001600160a01b031681526020018d8781518110612a0d57fe5b60200260200101516001600160a01b03168152602001836001600160a01b0316815260200160006001600160a01b03168152602001612a4b856132cd565b15158152821515602090910152886002870481518110612a6757fe5b6020026020010181905250505050506002810190506128f2565b612a896137e6565b84600081518110612a9657fe5b6020908102919091018101516040808201516001600160a01b0316600090815260059093529091205490915060ff1615612b0d578060a0015115612af35773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6040820152612b0d565b8051612afe906133e4565b6001600160a01b031660408201525b84600186510381518110612b1d57fe5b60209081029190910181015160608101516001600160a01b03166000908152600590925260409091205490915060ff1615612b95578060a0015115612b7b5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6060820152612b95565b8051612b86906133e4565b6001600160a01b031660608201525b600091505b8451821015612c6457848281518110612baf57fe5b602002602001015190508060a0015115612c52578060c0015115612bd857306080820152612c4d565b6001855103821415612bf8576001600160a01b0388166080820152612c4d565b848260010181518110612c0757fe5b602002602001015160a0015115612c4657848260010181518110612c2757fe5b6020908102919091010151516001600160a01b03166080820152612c4d565b3060808201525b612c59565b3060808201525b600190910190612b9a565b5092979650505050505050565b60008085815b88518110156130ef57612c886137e6565b898281518110612c9457fe5b602002602001015190508060a0015115612d26578115801590612ce25750306001600160a01b03168a6001840381518110612ccb57fe5b6020026020010151608001516001600160a01b0316145b8015612d0957506040808201516001600160a01b031660009081526005602052205460ff16155b15612d2157612d21816040015182600001518561216c565b612d5a565b80602001516001600160a01b031681604001516001600160a01b031614612d5a57612d5a8160400151826000015185613223565b8060a00151612e0257805160408083015160608401518251635e5144eb60e01b81526001600160a01b039283166004820152908216602482015260448101879052600160648201529151921691635e5144eb916084808201926020929091908290030181600087803b158015612dcf57600080fd5b505af1158015612de3573d6000803e3d6000fd5b505050506040513d6020811015612df957600080fd5b50519350612f6d565b6040808201516001600160a01b031660009081526005602052205460ff1615612ec757805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff91349160a480830192602092919082900301818588803b158015612e9c57600080fd5b505af1158015612eb0573d6000803e3d6000fd5b50505050506040513d6020811015612df957600080fd5b805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff9160a4808201926020929091908290030181600087803b158015612f3e57600080fd5b505af1158015612f52573d6000803e3d6000fd5b505050506040513d6020811015612f6857600080fd5b505193505b8060c0015115613069576000612f8a620f4240611556878a61232c565b905081606001516001600160a01b031663a9059cbb89836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612fe757600080fd5b505af1158015612ffb573d6000803e3d6000fd5b505050506040513d602081101561301157600080fd5b5051613064576040805162461bcd60e51b815260206004820152601760248201527f4552525f4645455f5452414e534645525f4641494c4544000000000000000000604482015290519081900360640190fd5b909303925b80606001516001600160a01b031681604001516001600160a01b031682602001516001600160a01b03167f7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c09586883360405180848152602001838152602001826001600160a01b03168152602001935050505060405180910390a450829150600101612c77565b508582101561313a576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b509695505050505050565b61314d6137e6565b8360018551038151811061315d57fe5b60200260200101519050306001600160a01b031681608001516001600160a01b03161461318a575061321e565b60608101516001600160a01b03811660009081526005602052604090205460ff1615613213578160a00151156131bc57fe5b806001600160a01b031663205c287884866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561283957600080fd5b6122c581848661216c565b505050565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b15801561327457600080fd5b505afa158015613288573d6000803e3d6000fd5b505050506040513d602081101561329e57600080fd5b50519050818110156132c75780156132bc576132bc8484600061368e565b6132c784848461368e565b50505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106133395780518252601f19909201916020918201910161331a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461339a576040519150601f19603f3d011682016040523d82523d6000602084013e61339f565b606091505b50915091508180156133b2575080516020145b156133d9578080602001905160208110156133cc57600080fd5b5051935061216792505050565b506000949350505050565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561342057600080fd5b505afa158015613434573d6000803e3d6000fd5b505050506040513d602081101561344a57600080fd5b505161ffff16905060005b81811015613506576000846001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156134a357600080fd5b505afa1580156134b7573d6000803e3d6000fd5b505050506040513d60208110156134cd57600080fd5b50516001600160a01b03811660009081526005602052604090205490915060ff16156134fd579250612167915050565b50600101613455565b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106135a85780518252601f199092019160209182019101613589565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461360a576040519150601f19603f3d011682016040523d82523d6000602084013e61360f565b606091505b509150915081801561363d57508051158061363d575080806020019051602081101561363a57600080fd5b50515b611049576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061370b5780518252601f1990920191602091820191016136ec565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461376d576040519150601f19603f3d011682016040523d82523d6000602084013e613772565b606091505b50915091508180156137a05750805115806137a0575080806020019051602081101561379d57600080fd5b50515b6122c5576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fea264697066735822122077a4a6153a0865a6077a6c21f0e36ac3a1a2290bcb3ce1b21870501d7465c9e164736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1956:32561:0:-:0;;;349:27:59;;;-1:-1:-1;;;;349:27:59;;;2563:5:0;2530:38;;3543:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3543:140:0;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;3543:140:0;;594:23:64;3543:140:0;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;2196:42:0::1;2122:8:56;3636:32:0::0;:11:::1;:32;::::0;;:39;;-1:-1:-1;;3636:39:0::1;2122::56::0;3636::0::1;::::0;;1956:32561;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;1956:32561:0:-;;;;;;;", + "deployedSourceMap": "1956:32561:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;4297:227:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4297:227:0;;;;;;;;;;:::i;31327:162::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31327:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31327:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31327:162:0;;-1:-1:-1;;31327:162:0;;;-1:-1:-1;31327:162:0;;-1:-1:-1;;31327:162:0:i;:::-;;;;;;;;;;;;;;;;;;;;;;;34120:394;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;34120:394:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;34120:394:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34120:394:0;;-1:-1:-1;;34120:394:0;;;-1:-1:-1;;;34120:394:0;;;;;-1:-1:-1;;;;;34120:394:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1333:38:56;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2300:925;;;;;;;;;;;;;:::i;31842:359:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31842:359:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31842:359:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31842:359:0;;-1:-1:-1;;31842:359:0;;;-1:-1:-1;;;31842:359:0;;;;;-1:-1:-1;;;;;31842:359:0;;;;;;;;;;:::i;2530:38::-;;;;;;;;;;;;;:::i;1196:290:62:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:62;;;;;;;;;;;;;;;;;:::i;1243:37:56:-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;1422:217:57;;;;;;;;;;;;;:::i;1154:33:56:-;;;;;;;;;;;;;:::i;5591:2853:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5591:2853:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5591:2853:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5591:2853:0;;-1:-1:-1;;5591:2853:0;;;-1:-1:-1;5591:2853:0;;-1:-1:-1;;5591:2853:0:i;2606:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2606:48:0;-1:-1:-1;;;;;2606:48:0;;:::i;15856:607::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15856:607:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15856:607:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15856:607:0;;-1:-1:-1;;;;;;;15856:607:0;;;;;-1:-1:-1;15856:607:0;;;;;;;;;;-1:-1:-1;15856:607:0;;;;;-1:-1:-1;15856:607:0;:::i;219:29:57:-;;;;;;;;;;;;;:::i;32589:440:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;32589:440:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;32589:440:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32589:440:0;;-1:-1:-1;;32589:440:0;;;-1:-1:-1;;;32589:440:0;;;;;-1:-1:-1;;;;;32589:440:0;;;;;;;;;;;;;;;;;;;:::i;33806:240::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33806:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33806:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33806:240:0;;-1:-1:-1;;33806:240:0;;;-1:-1:-1;;;33806:240:0;;;;;;;;-1:-1:-1;;;;;33806:240:0;;:::i;3304:137:56:-;;;;;;;;;;;;;:::i;9608:1669:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9608:1669:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9608:1669:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9608:1669:0;;-1:-1:-1;;9608:1669:0;;;-1:-1:-1;;;9608:1669:0;;;;;-1:-1:-1;;;;;9608:1669:0;;;;;;;;;;;;;;;;;;;:::i;12269:407::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12269:407:0;;-1:-1:-1;;12269:407:0;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;:::i;33103:205::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33103:205:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33103:205:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33103:205:0;;-1:-1:-1;;33103:205:0;;;-1:-1:-1;;;33103:205:0;;;;:::i;32275:240::-;;;;;;;;;;;;;;;13781:1124;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13781:1124:0;;-1:-1:-1;;13781:1124:0;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;13781:1124:0;;;;;;;;;;:::i;255:23:57:-;;;;;;;;;;;;;:::i;4906:290:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4906:290:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33382:350;;;;;;;;;;;;;;;;;;;;;;;;;1164:167:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;31563:205:0:-;;;;;;;;;;;;;;;3841:230;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3841:230:0;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;4297:227:0:-;726:12:57;:10;:12::i;:::-;4426:6:0::1;594:23:64;608:8;594:13;:23::i;:::-;4460:6:0::2;948:18:64;957:8;948;:18::i;:::-;-1:-1:-1::0;;;;;;;4485:19:0;;;::::3;;::::0;;;:11:::3;:19;::::0;;;;:31;;-1:-1:-1;;4485:31:0::3;::::0;::::3;;::::0;;;::::3;::::0;;4297:227::o;31327:162::-;31414:7;31423;31451:26;31462:5;31469:7;31451:10;:26::i;:::-;31443:38;31479:1;;-1:-1:-1;31327:162:0;-1:-1:-1;;;31327:162:0:o;34120:394::-;34385:7;34417:89;34431:5;34438:7;34447:10;34459:12;34473:17;34492:13;34417;:89::i;:::-;34410:96;34120:394;-1:-1:-1;;;;;;;34120:394:0:o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;31842:359:0:-;32074:7;32106:87;32120:5;32127:7;32136:10;32156:1;32160:17;32179:13;32106;:87::i;:::-;32099:94;31842:359;-1:-1:-1;;;;;;31842:359:0:o;2530:38::-;;;;:::o;1196:290:62:-;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:64::3;::::2;749::57::1;1196:290:62::0;;;:::o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;5591:2853:0:-;5673:7;5693:14;5718:11;5740:14;5765:15;5791:13;5815:20;5846:22;5886:25;-1:-1:-1;;;5886:9:0;:25::i;:::-;5846:66;;5934:7;5925:16;;6049:1;6034:5;:12;:16;:41;;;;;6069:1;6054:5;:12;:16;;;;;;6074:1;6054:21;6034:41;6026:70;;;;;-1:-1:-1;;;6026:70:0;;;;;;;;;;;;-1:-1:-1;;;6026:70:0;;;;;;;;;;;;;;;6171:1;6154:2257;6178:5;:12;6174:1;:16;6154:2257;;;6215:23;6253:5;6263:1;6259;:5;6253:12;;;;;;;;;;;;;;6215:51;;6281:14;6298:5;6308:1;6304;:5;6298:12;;;;;;;;;;;;;;6281:29;;6325:23;6363:5;6369:1;6363:8;;;;;;;;;;;;;;6325:47;;6437:6;-1:-1:-1;;;;;6420:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6420:32:0;;-1:-1:-1;6524:48:0;6420:32;6560:11;6524:24;:48::i;:::-;6510:62;;6601:48;6626:9;6637:11;6601:24;:48::i;:::-;6587:62;;6694:6;-1:-1:-1;;;;;6670:30:0;6678:11;-1:-1:-1;;;;;6670:30:0;;6666:1734;;;6817:1;6813;:5;:31;;;;6832:5;6842:1;6838;:5;6832:12;;;;;;;;;;;;;;-1:-1:-1;;;;;6822:22:0;:6;-1:-1:-1;;;;;6822:22:0;;;6813:31;6809:100;;;6888:6;-1:-1:-1;;;;;6876:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6876:33:0;;-1:-1:-1;6809:100:0;6996:9;-1:-1:-1;;;;;6996:29:0;;7026:11;6996:42;;;;;;;;;;;;;-1:-1:-1;;;;;6996:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6996:42:0;7076:33;;;-1:-1:-1;;;7076:33:0;;-1:-1:-1;;;;;7076:33:0;;;;;;;;;6996:42;;-1:-1:-1;7076:20:0;;;;;;:33;;;;;;;;;;;;;;;:20;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7076:33:0;;;;;;7137:61;;-1:-1:-1;;;7137:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7076:33;;-1:-1:-1;;;;;;7137:28:0;;;;;:61;;;;;;;;;;:28;:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7137:61:0;7234:25;;;-1:-1:-1;;;7234:25:0;;;;7137:61;;-1:-1:-1;7223:57:0;;2119:7;;7223:37;;-1:-1:-1;;;;;7234:23:0;;;;;:25;;;;;7137:61;;7234:25;;;;;;;:23;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7234:25:0;7223:6;;:37;;;;;:10;:37;:::i;:::-;:41;;:57::i;:::-;7299:13;;;;;7217:63;-1:-1:-1;7415:18:0;:6;7299:13;7415:10;:18::i;:::-;7406:27;;6666:1734;;;7496:6;-1:-1:-1;;;;;7472:30:0;7480:11;-1:-1:-1;;;;;7472:30:0;;7468:932;;;7620:1;7616;:5;:31;;;;7635:5;7645:1;7641;:5;7635:12;;;;;;;;;;;;;;-1:-1:-1;;;;;7625:22:0;:6;-1:-1:-1;;;;;7625:22:0;;;7616:31;7612:100;;;7691:6;-1:-1:-1;;;;;7679:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7679:33:0;;-1:-1:-1;7612:100:0;7799:9;-1:-1:-1;;;;;7799:29:0;;7829:11;7799:42;;;;;;;;;;;;;-1:-1:-1;;;;;7799:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7799:42:0;7879:33;;;-1:-1:-1;;;7879:33:0;;-1:-1:-1;;;;;7879:33:0;;;;;;;;;7799:42;;-1:-1:-1;7879:20:0;;;;;;:33;;;;;;;;;;;;;;;:20;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7879:33:0;;;;;;7940:57;;-1:-1:-1;;;7940:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7879:33;;-1:-1:-1;;;;;;7940:24:0;;;;;:57;;;;;;;;;;:24;:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7940:57:0;8033:25;;;-1:-1:-1;;;8033:25:0;;;;7940:57;;-1:-1:-1;8022:57:0;;2119:7;;8022:37;;-1:-1:-1;;;;;8033:23:0;;;;;:25;;;;;7940:57;;8033:25;;;;;;;:23;:25;;;;;;;;;;8022:57;8098:13;;;;;8016:63;-1:-1:-1;8214:18:0;:6;8098:13;8214:10;:18::i;7468:932::-;8330:54;8340:9;8351:11;8364;8377:6;8330:9;:54::i;:::-;8314:70;;-1:-1:-1;8314:70:0;-1:-1:-1;7468:932:0;-1:-1:-1;;;6197:1:0;6192:6;6154:2257;;;-1:-1:-1;8430:6:0;;-1:-1:-1;;;;;;;5591:2853:0;;;;;:::o;2606:48::-;;;;;;;;;;;;;;;:::o;15856:607::-;16026:7;16146:8;-1:-1:-1;;;;;16146:14:0;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16146:16:0;16133:8;;-1:-1:-1;;;;;16121:41:0;;;;16133:5;;16139:1;;16133:8;;;;;;;;;;-1:-1:-1;;;;;16121:41:0;;16113:78;;;;;-1:-1:-1;;;16113:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16260:14;16277:8;-1:-1:-1;;;;;16277:27:0;;16305:13;16320:10;16277:54;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16277:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16277:54:0;;-1:-1:-1;16386:69:0;16400:5;16277:54;16415:10;16427:12;16449:1;;16386:13;:69::i;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;32589:440:0:-;32900:7;32870:10;252:24:64;269:6;252:16;:24::i;:::-;32932:89:0::1;32946:5;32953:7;32962:10;32974:12;32988:17;33007:13;32932;:89::i;:::-;32925:96:::0;32589:440;-1:-1:-1;;;;;;;;32589:440:0:o;33806:240::-;33941:7;33968:70;33982:5;33989:7;33998:10;34010:12;34032:1;34036;33968:13;:70::i;:::-;33961:77;33806:240;-1:-1:-1;;;;;33806:240:0:o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;9608:1669:0:-;9934:7;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:59;-1:-1:-1;;;603:13:59;;;9904:10:0;252:24:64::1;9904:10:0::0;252:16:64::1;:24::i;:::-;10088:1:0::2;10073:5;:12;:16;:41;;;;;10108:1;10093:5;:12;:16;;;;;;10113:1;10093:21;10073:41;10065:70;;;::::0;;-1:-1:-1;;;10065:70:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10065:70:0;;;;;;;;;;;;;::::2;;10227:77;10257:5;10263:1;10257:8;;;;;;;;;;;;;;10285:5;10291:1;10285:8;;;;;;;;;;;;;;10296:7;10227:17;:77::i;:::-;10363:24;-1:-1:-1::0;;;;;10410:40:0;::::2;10406:303;;10475:18:::0;;10467:56:::2;;;::::0;;-1:-1:-1;;;10467:56:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10467:56:0;;;;;;;;;;;;;::::2;;10406:303;;;10577:13;10573:1;:17;:53;;;;;10611:15;;10594:13;:32;;10573:53;10565:91;;;::::0;;-1:-1:-1;;;10565:91:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10565:91:0;;;;;;;;;;;;;::::2;;-1:-1:-1::0;10693:4:0::2;10406:303;10791:10;-1:-1:-1::0;;;;;10816:26:0;::::2;::::0;10812:71:::2;;-1:-1:-1::0;10871:12:0;10812:71:::2;10945:28;10976:61;10997:5;11004:11;11017:19;10976:20;:61::i;:::-;10945:92;;11048:14;11065:73;11078:4;11084:7;11093:10;11105:17;11124:13;11065:12;:73::i;:::-;11048:90;;11199:44;11217:4;11223:6;11231:11;11199:17;:44::i;:::-;639:6:59::0;:14;;-1:-1:-1;;;;639:14:59;;;11263:6:0;9608:1669;-1:-1:-1;;;;;;;;;;;9608:1669:0:o;12269:407::-;12534:7;12566:102;12576:5;12583:7;12592:10;12604:17;12623:14;12639:13;12662:1;12666;12566:9;:102::i;33103:205::-;33205:7;33232:68;33246:5;33253:7;33262:10;33282:1;33294;33298;33232:13;:68::i;:::-;33225:75;33103:205;-1:-1:-1;;;;33103:205:0:o;13781:1124::-;14152:7;14122:10;252:24:64;269:6;252:16;:24::i;:::-;14177:23:0::1;14215:5;14236:1;14221:5;:12;:16;14215:23;;;;;;;;;;;;;;14177:62;;14250:16;14278:19;-1:-1:-1::0;;;14278:9:0::1;:19::i;:::-;14250:48;;14399:20;-1:-1:-1::0;;;14399:9:0::1;:20::i;:::-;-1:-1:-1::0;;;;;14372:48:0::1;:11;-1:-1:-1::0;;;;;14372:48:0::1;;14364:85;;;::::0;;-1:-1:-1;;;14364:85:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;14511:14;14528:99;14542:5;14549:7;14558:10;14586:4;14594:17;14613:13;14528;:99::i;:::-;14511:116;;14676:54;14692:11;14713:7;14723:6;14676:15;:54::i;:::-;14796:75;::::0;;-1:-1:-1;;;14796:75:0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14796:17:0;::::1;::::0;::::1;::::0;:75;;;;;-1:-1:-1;;14796:75:0;;;;;;;-1:-1:-1;14796:17:0;:75;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;14891:6:0;;13781:1124;-1:-1:-1;;;;;;;;;;;;;;;13781:1124:0:o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;4906:290:0:-;5003:16;5032:32;5089:33;-1:-1:-1;;;5089:9:0;:33::i;:::-;5032:91;;5141:10;-1:-1:-1;;;;;5141:19:0;;5161:12;5175;5141:47;;;;;;;;;;;;;-1:-1:-1;;;;;5141:47:0;;;;;;-1:-1:-1;;;;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5141:47:0;;;;;;;;;;;;-1:-1:-1;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5134:54;;;4906:290;;;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;3841:230:0:-;726:12:57;:10;:12::i;:::-;2119:7:0::1;3954:16;:34;;3946:72;;;::::0;;-1:-1:-1;;;3946:72:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3946:72:0;;;;;;;;;;;;;::::1;;4029:15;:34:::0;3841:230::o;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;4077:133:56;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;-1:-1:-1;4077:133:56;;;;:::o;1485:312:61:-;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o;29362:336:0:-;-1:-1:-1;;;;;29490:19:0;;29461:11;29490:19;;;:11;:19;;;;;;;;29485:52;;-1:-1:-1;29531:6:0;29524:13;;29485:52;29554:34;29577:10;29554:22;:34::i;:::-;29550:79;;;-1:-1:-1;2196:42:0;29603:26;;29550:79;29649:41;29679:10;29649:29;:41::i;:::-;29642:48;29362:336;-1:-1:-1;;;29362:336:0:o;1149:250:60:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;1627:174;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:60:o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;778:147;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;29889:670:0:-;30067:85;;;-1:-1:-1;;;;;30067:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30067:85:0;-1:-1:-1;;;30067:85:0;;;30205:31;;;;30018:7;;;;30067:85;30018:7;;30047:17;;30205:25;;;;30067:85;;30205:31;;30067:85;30205:31;;30067:85;30205:31;;;;;;;;;;-1:-1:-1;;30205:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30163:73;;;;30253:7;30249:277;;;30281:10;:17;30302:2;30281:23;30277:113;;;30343:10;30332:42;;;;;;;;;;;;;;;-1:-1:-1;30332:42:0;;;;;;;;;-1:-1:-1;30332:42:0;-1:-1:-1;30325:49:0;;-1:-1:-1;;;30325:49:0;30277:113;30410:10;:17;30431:2;30410:23;30406:109;;;30473:10;30462:33;;;;;;;;;;;;;;;-1:-1:-1;30462:33:0;;-1:-1:-1;30497:1:0;;-1:-1:-1;30454:45:0;;-1:-1:-1;;;30454:45:0;30406:109;30546:1;30549;30538:13;;;;;;;29889:670;;;;;;;;:::o;351:112:64:-;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;;;716:89:59;772:6;;-1:-1:-1;;;772:6:59;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;;;20128:1710:0;20243:25;20290:7;-1:-1:-1;;;;;20290:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20290:15:0;;-1:-1:-1;20318:21:0;20342:38;20290:15;20342:22;:38::i;:::-;20318:62;-1:-1:-1;20413:9:0;:13;20409:1422;;20499:7;20486:9;:20;20478:56;;;;;-1:-1:-1;;;20478:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20769:16;20764:137;;20824:45;20854:14;20824:29;:45::i;:::-;-1:-1:-1;;;;;20804:75:0;;20888:9;20804:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20764:137;20409:1422;;;-1:-1:-1;;;;;20955:25:0;;;;;;:11;:25;;;;;;;;20951:880;;;21167:66;21184:12;21198:10;21218:4;21225:7;21167:16;:66::i;:::-;21303:16;21299:91;;;21358:12;-1:-1:-1;;;;;21338:43:0;;21382:7;21338:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20951:880;;;21605:16;21601:218;;;21640:76;21657:12;21671:10;21691:14;21708:7;21640:16;:76::i;21601:218::-;21753:66;21770:12;21784:10;21804:4;21811:7;21753:16;:66::i;23592:4261::-;23735:23;23771:28;23848:1;23823:15;:22;:26;;;;;;23802:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;23771:79;;23863:26;23908:20;23943;-1:-1:-1;;;23943:9:0;:20::i;:::-;23908:56;;24060:9;24080:1251;24121:1;24096:15;:22;:26;24092:1;:30;24080:1251;;;24147:23;24190:15;24206:1;24210;24206:5;24190:22;;;;;;;;;;;;;;24147:66;;24228:20;24270:6;-1:-1:-1;;;;;24270:12:0;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24270:14:0;24339:22;;24270:14;;-1:-1:-1;24301:23:0;;24339:15;;24359:1;24355:5;;;24339:22;;;;;;;;;;;;24301:61;;24455:24;24482:20;:46;;;;;24507:21;24506:22;24482:46;:73;;;;;24547:8;-1:-1:-1;;;;;24532:23:0;:11;-1:-1:-1;;;;;24532:23:0;;24482:73;24455:100;;24574:19;24570:70;;;24636:4;24612:28;;24570:70;24671:648;;;;;;;;24834:9;-1:-1:-1;;;;;24671:648:0;;;;;24758:6;-1:-1:-1;;;;;24671:648:0;;;;;24938:15;24954:1;24938:18;;;;;;;;;;;;;;-1:-1:-1;;;;;24671:648:0;;;;;24989:11;-1:-1:-1;;;;;24671:648:0;;;;;25134:1;-1:-1:-1;;;;;24671:648:0;;;;;25211:33;25234:9;25211:22;:33::i;:::-;24671:648;;;;;;;;;;;;24657:4;24666:1;24662;:5;24657:11;;;;;;;;;;;;;:662;;;;24080:1251;;;;24129:1;24124:6;;;;24080:1251;;;25393:30;;:::i;:::-;25426:4;25431:1;25426:7;;;;;;;;;;;;;;;;;;;25460:20;;;;;-1:-1:-1;;;;;25448:33:0;;;;;:11;:33;;;;;;;25426:7;;-1:-1:-1;25448:33:0;;25444:472;;;25594:8;:31;;;25590:314;;;2196:42;25644:20;;;:42;25590:314;;;25885:18;;25855:49;;:29;:49::i;:::-;-1:-1:-1;;;;;25832:72:0;:20;;;:72;25590:314;25965:4;25984:1;25970:4;:11;:15;25965:21;;;;;;;;;;;;;;;;;;;26013:20;;;;-1:-1:-1;;;;;26001:33:0;;;;;:11;:33;;;;;;;;25965:21;;-1:-1:-1;26001:33:0;;25997:472;;;26147:8;:31;;;26143:314;;;2196:42;26197:20;;;:42;26143:314;;;26438:18;;26408:49;;:29;:49::i;:::-;-1:-1:-1;;;;;26385:72:0;:20;;;:72;26143:314;26536:1;26532:5;;26527:1295;26543:4;:11;26539:1;:15;26527:1295;;;26587:4;26592:1;26587:7;;;;;;;;;;;;;;26576:18;;26746:8;:31;;;26742:1069;;;26902:8;:28;;;26898:709;;;26992:4;26953:20;;;:45;26898:709;;;27125:1;27111:4;:11;:15;27106:1;:20;27102:505;;;-1:-1:-1;;;;;27149:35:0;;:20;;;:35;27102:505;;;27310:4;27315:1;27319;27315:5;27310:11;;;;;;;;;;;;;;:34;;;27306:301;;;27398:4;27403:1;27407;27403:5;27398:11;;;;;;;;;;;;;;;;;;:21;-1:-1:-1;;;;;27367:53:0;:20;;;:53;27306:301;;;27601:4;27562:20;;;:45;27306:301;26742:1069;;;27789:4;27750:20;;;:45;26742:1069;26556:3;;;;;26527:1295;;;-1:-1:-1;27841:4:0;;23592:4261;-1:-1:-1;;;;;;;23592:4261:0:o;17080:2701::-;17289:7;;17357;17289;17422:2194;17446:5;:12;17442:1;:16;17422:2194;;;17480:30;;:::i;:::-;17513:5;17519:1;17513:8;;;;;;;;;;;;;;17480:41;;17574:8;:31;;;17570:889;;;17820:6;;;;;:51;;;17866:4;-1:-1:-1;;;;;17830:41:0;:5;17840:1;17836;:5;17830:12;;;;;;;;;;;;;;:24;;;-1:-1:-1;;;;;17830:41:0;;17820:51;:89;;;;-1:-1:-1;17888:20:0;;;;;-1:-1:-1;;;;;17876:33:0;;;;;:11;:33;;;;;;17875:34;17820:89;17816:191;;;17932:75;17945:8;:20;;;17975:8;:18;;;17996:10;17932:12;:75::i;:::-;17570:889;;;18235:8;:15;;;-1:-1:-1;;;;;18191:61:0;:8;:20;;;-1:-1:-1;;;;;18191:61:0;;18187:272;;18365:78;18381:8;:20;;;18411:8;:18;;;18432:10;18365:15;:78::i;:::-;18514:8;:31;;;18509:564;;18600:18;;18628:20;;;;;18650;;;;18575:111;;-1:-1:-1;;;18575:111:0;;-1:-1:-1;;;;;18575:111:0;;;;;;;;;;;;;;;;;;;;18684:1;18575:111;;;;;;:52;;;;;:111;;;;;;;;;;;;;;;18600:18;18575:52;:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18575:111:0;;-1:-1:-1;18509:564:0;;;18722:20;;;;;-1:-1:-1;;;;;18710:33:0;;;;;:11;:33;;;;;;18706:367;;;18773:18;;18820:20;;;;;18842;;;;18888;;;;18773:136;;-1:-1:-1;;;18773:136:0;;-1:-1:-1;;;;;18773:136:0;;;;;;;;;;;;;;;;;;;;18876:10;18773:136;;;;;;;;;;;;:26;;;;;18808:9;;18773:136;;;;;;;;;;;;;;18808:9;18773:26;:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18706:367;18957:18;;18984:20;;;;;19006;;;;19052;;;;18957:116;;-1:-1:-1;;;18957:116:0;;-1:-1:-1;;;;;18957:116:0;;;;;;;;;;;;;;;;;;;;19040:10;18957:116;;;;;;;;;;;;:26;;;;;:116;;;;;;;;;;;;;;;:18;:26;:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18957:116:0;;-1:-1:-1;18706:367:0;19138:8;:28;;;19134:308;;;19187:23;19213:47;2119:7;19213:27;:8;19226:13;19213:12;:27::i;:47::-;19187:73;;19287:8;:20;;;-1:-1:-1;;;;;19287:29:0;;19317:17;19336:15;19287:65;;;;;;;;;;;;;-1:-1:-1;;;;;19287:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19287:65:0;19279:101;;;;;-1:-1:-1;;;19279:101:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;19399:27;;;;19134:308;19513:8;:20;;;-1:-1:-1;;;;;19463:105:0;19491:8;:20;;;-1:-1:-1;;;;;19463:105:0;19474:8;:15;;;-1:-1:-1;;;;;19463:105:0;;19535:10;19547:8;19557:10;19463:105;;;;;;;;;;;;;;-1:-1:-1;;;;;19463:105:0;;;;;;;;;;;;;;;;;-1:-1:-1;19596:8:0;;-1:-1:-1;17460:3:0;;17422:2194;;;;19712:10;19700:8;:22;;19692:53;;;;;-1:-1:-1;;;19692:53:0;;;;;;;;;;;;-1:-1:-1;;;19692:53:0;;;;;;;;;;;;;;;-1:-1:-1;19765:8:0;17080:2701;-1:-1:-1;;;;;;17080:2701:0:o;22182:893::-;22306:30;;:::i;:::-;22339:5;22360:1;22345:5;:12;:16;22339:23;;;;;;;;;;;;;;22306:56;;22476:4;-1:-1:-1;;;;;22444:37:0;:8;:20;;;-1:-1:-1;;;;;22444:37:0;;22440:63;;22496:7;;;22440:63;22541:20;;;;-1:-1:-1;;;;;22607:24:0;;22515:23;22607:24;;;:11;:24;;;;;;;;22603:465;;;22732:8;:31;;;22731:32;22724:40;;;;22889:11;-1:-1:-1;;;;;22869:44:0;;22914:12;22928:7;22869:67;;;;;;;;;;;;;-1:-1:-1;;;;;22869:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22603:465;23008:48;23021:11;23034:12;23048:7;23008:12;:48::i;22182:893::-;;;;:::o;28319:348::-;28437:41;;;-1:-1:-1;;;28437:41:0;;28462:4;28437:41;;;;-1:-1:-1;;;;;28437:41:0;;;;;;;;;28417:17;;28437:16;;;;;:41;;;;;;;;;;;;;;:16;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28437:41:0;;-1:-1:-1;28493:18:0;;;28489:171;;;28532:13;;28528:68;;28564:32;28576:6;28584:8;28594:1;28564:11;:32::i;:::-;28611:37;28623:6;28631:8;28641:6;28611:11;:37::i;:::-;28319:348;;;;:::o;30833:420::-;30948:54;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30948:54:0;-1:-1:-1;;;30948:54:0;;;31055:49;;;;30911:4;;;;30928:17;;-1:-1:-1;;;;;31055:30:0;;;31092:4;;30948:54;;31055:49;;;;;;30948:54;31055:49;;;;;;;;;;-1:-1:-1;;31055:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31013:91;;;;31121:7;:34;;;;;31132:10;:17;31153:2;31132:23;31121:34;31117:104;;;31190:10;31179:30;;;;;;;;;;;;;;;-1:-1:-1;31179:30:0;;-1:-1:-1;31172:37:0;;-1:-1:-1;;;31172:37:0;31117:104;-1:-1:-1;31240:5:0;;30833:420;-1:-1:-1;;;;30833:420:0:o;28751:449::-;28835:11;28859:20;28882:10;-1:-1:-1;;;;;28882:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28882:32:0;28859:55;;;-1:-1:-1;28930:9:0;28925:229;28949:12;28945:1;:16;28925:229;;;28983:31;29017:10;-1:-1:-1;;;;;29017:26:0;;29044:1;29017:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29017:29:0;-1:-1:-1;;;;;29065:32:0;;;;;;:11;29017:29;29065:32;;;;;29017:29;;-1:-1:-1;29065:32:0;;29061:81;;;29123:19;-1:-1:-1;29116:26:0;;-1:-1:-1;;29116:26:0;29061:81;-1:-1:-1;28963:3:0;;28925:229;;;-1:-1:-1;2196:42:0;;28751:449;-1:-1:-1;;;28751:449:0:o;2190:348:61:-;2355:71;;;-1:-1:-1;;;;;2355:71:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:61;-1:-1:-1;;;2355:71:61;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:61;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:61;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:61;;;;;;;;;;;;;;;;;;;;;;;;;;;815:320;966:63;;;-1:-1:-1;;;;;966:63:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;966:63:61;-1:-1:-1;;;966:63:61;;;945:85;;;;910:12;;924:17;;945:20;;;;966:63;945:85;;;966:63;945:85;;966:63;945:85;;;;;;;;;;-1:-1:-1;;945:85:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;909:121;;;;1048:7;:57;;;;-1:-1:-1;1060:11:61;;:16;;:44;;;1091:4;1080:24;;;;;;;;;;;;;;;-1:-1:-1;1080:24:61;1060:44;1040:88;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./IConversionPathFinder.sol\";\r\nimport \"./converter/interfaces/IConverter.sol\";\r\nimport \"./converter/interfaces/IConverterAnchor.sol\";\r\nimport \"./converter/interfaces/IBancorFormula.sol\";\r\nimport \"./utility/ContractRegistryClient.sol\";\r\nimport \"./utility/ReentrancyGuard.sol\";\r\nimport \"./utility/TokenHolder.sol\";\r\nimport \"./utility/SafeMath.sol\";\r\nimport \"./token/interfaces/IEtherToken.sol\";\r\nimport \"./token/interfaces/ISmartToken.sol\";\r\nimport \"./bancorx/interfaces/IBancorX.sol\";\r\n\r\n// interface of older converters for backward compatibility\r\ninterface ILegacyConverter {\r\n function change(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, uint256 _minReturn) external returns (uint256);\r\n}\r\n\r\n/**\r\n * @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\r\n * It also allows for the conversion of any token in the Bancor Network to any other token in a single\r\n * transaction by providing a conversion path.\r\n *\r\n * A note on Conversion Path: Conversion path is a data structure that is used when converting a token\r\n * to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\r\n * converter and might require multiple 'hops'.\r\n * The path defines which converters should be used and what kind of conversion should be done in each step.\r\n *\r\n * The path format doesn't include complex structure; instead, it is represented by a single array\r\n * in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\r\n * In addition, the first element is always the source token.\r\n * The converter anchor is only used as a pointer to a converter (since converter addresses are more\r\n * likely to change as opposed to anchor addresses).\r\n *\r\n * Format:\r\n * [source token, converter anchor, target token, converter anchor, target token...]\r\n*/\r\ncontract BancorNetwork is TokenHolder, ContractRegistryClient, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n uint256 private constant PPM_RESOLUTION = 1000000;\r\n IERC20Token private constant ETH_RESERVE_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n\r\n struct ConversionStep {\r\n IConverter converter;\r\n IConverterAnchor anchor;\r\n IERC20Token sourceToken;\r\n IERC20Token targetToken;\r\n address payable beneficiary;\r\n bool isV28OrHigherConverter;\r\n bool processAffiliateFee;\r\n }\r\n\r\n uint256 public maxAffiliateFee = 30000; // maximum affiliate-fee\r\n\r\n mapping (IERC20Token => bool) public etherTokens; // list of all supported ether tokens\r\n\r\n /**\r\n * @dev triggered when a conversion between two tokens occurs\r\n *\r\n * @param _smartToken anchor governed by the converter\r\n * @param _fromToken source ERC20 token\r\n * @param _toToken target ERC20 token\r\n * @param _fromAmount amount converted, in the source token\r\n * @param _toAmount amount returned, minus conversion fee\r\n * @param _trader wallet that initiated the trade\r\n */\r\n event Conversion(\r\n IConverterAnchor indexed _smartToken,\r\n IERC20Token indexed _fromToken,\r\n IERC20Token indexed _toToken,\r\n uint256 _fromAmount,\r\n uint256 _toAmount,\r\n address _trader\r\n );\r\n\r\n /**\r\n * @dev initializes a new BancorNetwork instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {\r\n etherTokens[ETH_RESERVE_ADDRESS] = true;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to update the maximum affiliate-fee\r\n *\r\n * @param _maxAffiliateFee maximum affiliate-fee\r\n */\r\n function setMaxAffiliateFee(uint256 _maxAffiliateFee)\r\n public\r\n ownerOnly\r\n {\r\n require(_maxAffiliateFee <= PPM_RESOLUTION, \"ERR_INVALID_AFFILIATE_FEE\");\r\n maxAffiliateFee = _maxAffiliateFee;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to register/unregister ether tokens\r\n *\r\n * @param _token ether token contract address\r\n * @param _register true to register, false to unregister\r\n */\r\n function registerEtherToken(IEtherToken _token, bool _register)\r\n public\r\n ownerOnly\r\n validAddress(address(_token))\r\n notThis(address(_token))\r\n {\r\n etherTokens[_token] = _register;\r\n }\r\n\r\n /**\r\n * @dev returns the conversion path between two tokens in the network\r\n * note that this method is quite expensive in terms of gas and should generally be called off-chain\r\n *\r\n * @param _sourceToken source token address\r\n * @param _targetToken target token address\r\n *\r\n * @return conversion path between the two tokens\r\n */\r\n function conversionPath(IERC20Token _sourceToken, IERC20Token _targetToken) public view returns (address[] memory) {\r\n IConversionPathFinder pathFinder = IConversionPathFinder(addressOf(CONVERSION_PATH_FINDER));\r\n return pathFinder.findPath(_sourceToken, _targetToken);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting a given amount on a given path\r\n * note that there is no support for circular paths\r\n *\r\n * @param _path conversion path (see conversion path format above)\r\n * @param _amount amount of _path[0] tokens received from the sender\r\n *\r\n * @return expected target amount\r\n */\r\n function rateByPath(address[] memory _path, uint256 _amount) public view returns (uint256) {\r\n uint256 amount;\r\n uint256 fee;\r\n uint256 supply;\r\n uint256 balance;\r\n uint32 weight;\r\n IConverter converter;\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n\r\n amount = _amount;\r\n\r\n // verify that the number of elements is larger than 2 and odd\r\n require(_path.length > 2 && _path.length % 2 == 1, \"ERR_INVALID_PATH\");\r\n\r\n // iterate over the conversion path\r\n for (uint256 i = 2; i < _path.length; i += 2) {\r\n IERC20Token sourceToken = IERC20Token(_path[i - 2]);\r\n address anchor = _path[i - 1];\r\n IERC20Token targetToken = IERC20Token(_path[i]);\r\n\r\n converter = IConverter(payable(IConverterAnchor(anchor).owner()));\r\n\r\n // backward compatibility\r\n sourceToken = getConverterTokenAddress(converter, sourceToken);\r\n targetToken = getConverterTokenAddress(converter, targetToken);\r\n\r\n if (address(targetToken) == anchor) { // buy the smart token\r\n // check if the current smart token has changed\r\n if (i < 3 || anchor != _path[i - 3])\r\n supply = ISmartToken(anchor).totalSupply();\r\n\r\n // get the amount & the conversion fee\r\n balance = converter.getConnectorBalance(sourceToken);\r\n (, weight, , , ) = converter.connectors(sourceToken);\r\n amount = formula.purchaseTargetAmount(supply, balance, weight, amount);\r\n fee = amount.mul(converter.conversionFee()).div(PPM_RESOLUTION);\r\n amount -= fee;\r\n\r\n // update the smart token supply for the next iteration\r\n supply = supply.add(amount);\r\n }\r\n else if (address(sourceToken) == anchor) { // sell the smart token\r\n // check if the current smart token has changed\r\n if (i < 3 || anchor != _path[i - 3])\r\n supply = ISmartToken(anchor).totalSupply();\r\n\r\n // get the amount & the conversion fee\r\n balance = converter.getConnectorBalance(targetToken);\r\n (, weight, , , ) = converter.connectors(targetToken);\r\n amount = formula.saleTargetAmount(supply, balance, weight, amount);\r\n fee = amount.mul(converter.conversionFee()).div(PPM_RESOLUTION);\r\n amount -= fee;\r\n\r\n // update the smart token supply for the next iteration\r\n supply = supply.sub(amount);\r\n }\r\n else { // cross reserve conversion\r\n (amount, fee) = getReturn(converter, sourceToken, targetToken, amount);\r\n }\r\n }\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev converts the token to any other token in the bancor network by following\r\n * a predefined conversion path and transfers the result tokens to a target account\r\n * affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\r\n * @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\r\n * @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function convertByPath(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee)\r\n public\r\n payable\r\n protected\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n // verify that the path contrains at least a single 'hop' and that the number of elements is odd\r\n require(_path.length > 2 && _path.length % 2 == 1, \"ERR_INVALID_PATH\");\r\n\r\n // validate msg.value and prepare the source token for the conversion\r\n handleSourceToken(IERC20Token(_path[0]), IConverterAnchor(_path[1]), _amount);\r\n\r\n // check if affiliate fee is enabled\r\n bool affiliateFeeEnabled = false;\r\n if (address(_affiliateAccount) == address(0)) {\r\n require(_affiliateFee == 0, \"ERR_INVALID_AFFILIATE_FEE\");\r\n }\r\n else {\r\n require(0 < _affiliateFee && _affiliateFee <= maxAffiliateFee, \"ERR_INVALID_AFFILIATE_FEE\");\r\n affiliateFeeEnabled = true;\r\n }\r\n\r\n // check if beneficiary is set\r\n address payable beneficiary = msg.sender;\r\n if (_beneficiary != address(0))\r\n beneficiary = _beneficiary;\r\n\r\n // convert and get the resulting amount\r\n ConversionStep[] memory data = createConversionData(_path, beneficiary, affiliateFeeEnabled);\r\n uint256 amount = doConversion(data, _amount, _minReturn, _affiliateAccount, _affiliateFee);\r\n\r\n // handle the conversion target tokens\r\n handleTargetToken(data, amount, beneficiary);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev converts any other token to BNT in the bancor network by following\r\n a predefined conversion path and transfers the result to an account on a different blockchain\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _targetBlockchain blockchain BNT will be issued on\r\n * @param _targetAccount address/account on the target blockchain to send the BNT to\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\r\n *\r\n * @return the amount of BNT received from this conversion\r\n */\r\n function xConvert(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n bytes32 _targetBlockchain,\r\n bytes32 _targetAccount,\r\n uint256 _conversionId\r\n )\r\n public\r\n payable\r\n returns (uint256)\r\n {\r\n return xConvert2(_path, _amount, _minReturn, _targetBlockchain, _targetAccount, _conversionId, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev converts any other token to BNT in the bancor network by following\r\n a predefined conversion path and transfers the result to an account on a different blockchain\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _targetBlockchain blockchain BNT will be issued on\r\n * @param _targetAccount address/account on the target blockchain to send the BNT to\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\r\n * @param _affiliateAccount affiliate account\r\n * @param _affiliateFee affiliate fee in PPM\r\n *\r\n * @return the amount of BNT received from this conversion\r\n */\r\n function xConvert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n bytes32 _targetBlockchain,\r\n bytes32 _targetAccount,\r\n uint256 _conversionId,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n IERC20Token targetToken = IERC20Token(_path[_path.length - 1]);\r\n IBancorX bancorX = IBancorX(addressOf(BANCOR_X));\r\n\r\n // verify that the destination token is BNT\r\n require(targetToken == IERC20Token(addressOf(BNT_TOKEN)), \"ERR_INVALID_TARGET_TOKEN\");\r\n\r\n // convert and get the resulting amount\r\n uint256 amount = convertByPath(_path, _amount, _minReturn, payable(address(this)), _affiliateAccount, _affiliateFee);\r\n\r\n // grant BancorX allowance\r\n ensureAllowance(targetToken, address(bancorX), amount);\r\n\r\n // transfer the resulting amount to BancorX\r\n bancorX.xTransfer(_targetBlockchain, _targetAccount, amount, _conversionId);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev allows a user to convert a token that was sent from another blockchain into any other\r\n * token on the BancorNetwork\r\n * ideally this transaction is created before the previous conversion is even complete, so\r\n * so the input amount isn't known at that point - the amount is actually take from the\r\n * BancorX contract directly by specifying the conversion id\r\n *\r\n * @param _path conversion path\r\n * @param _bancorX address of the BancorX contract for the source token\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function completeXConversion(address[] memory _path, IBancorX _bancorX, uint256 _conversionId, uint256 _minReturn, address payable _beneficiary)\r\n public returns (uint256)\r\n {\r\n // verify that the source token is the BancorX token\r\n require(IERC20Token(_path[0]) == _bancorX.token(), \"ERR_INVALID_SOURCE_TOKEN\");\r\n\r\n // get conversion amount from BancorX contract\r\n uint256 amount = _bancorX.getXTransferAmount(_conversionId, msg.sender);\r\n\r\n // perform the conversion\r\n return convertByPath(_path, amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev executes the actual conversion by following the conversion path\r\n *\r\n * @param _data conversion data, see ConversionStep struct above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _affiliateAccount affiliate account\r\n * @param _affiliateFee affiliate fee in PPM\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function doConversion(\r\n ConversionStep[] memory _data,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n ) private returns (uint256) {\r\n uint256 toAmount;\r\n uint256 fromAmount = _amount;\r\n\r\n // iterate over the conversion data\r\n for (uint256 i = 0; i < _data.length; i++) {\r\n ConversionStep memory stepData = _data[i];\r\n\r\n // newer converter\r\n if (stepData.isV28OrHigherConverter) {\r\n // transfer the tokens to the converter only if the network contract currently holds the tokens\r\n // not needed with ETH or if it's the first conversion step\r\n if (i != 0 && _data[i - 1].beneficiary == address(this) && !etherTokens[stepData.sourceToken])\r\n safeTransfer(stepData.sourceToken, address(stepData.converter), fromAmount);\r\n }\r\n // older converter\r\n // if the source token is the smart token, no need to do any transfers as the converter controls it\r\n else if (stepData.sourceToken != ISmartToken(address(stepData.anchor))) {\r\n // grant allowance for it to transfer the tokens from the network contract\r\n ensureAllowance(stepData.sourceToken, address(stepData.converter), fromAmount);\r\n }\r\n\r\n // do the conversion\r\n if (!stepData.isV28OrHigherConverter)\r\n toAmount = ILegacyConverter(address(stepData.converter)).change(stepData.sourceToken, stepData.targetToken, fromAmount, 1);\r\n else if (etherTokens[stepData.sourceToken])\r\n toAmount = stepData.converter.convert{ value: msg.value }(stepData.sourceToken, stepData.targetToken, fromAmount, msg.sender, stepData.beneficiary);\r\n else\r\n toAmount = stepData.converter.convert(stepData.sourceToken, stepData.targetToken, fromAmount, msg.sender, stepData.beneficiary);\r\n\r\n // pay affiliate-fee if needed\r\n if (stepData.processAffiliateFee) {\r\n uint256 affiliateAmount = toAmount.mul(_affiliateFee).div(PPM_RESOLUTION);\r\n require(stepData.targetToken.transfer(_affiliateAccount, affiliateAmount), \"ERR_FEE_TRANSFER_FAILED\");\r\n toAmount -= affiliateAmount;\r\n }\r\n\r\n emit Conversion(stepData.anchor, stepData.sourceToken, stepData.targetToken, fromAmount, toAmount, msg.sender);\r\n fromAmount = toAmount;\r\n }\r\n\r\n // ensure the trade meets the minimum requested amount\r\n require(toAmount >= _minReturn, \"ERR_RETURN_TOO_LOW\");\r\n\r\n return toAmount;\r\n }\r\n\r\n /**\r\n * @dev validates msg.value and prepares the conversion source token for the conversion\r\n *\r\n * @param _sourceToken source token of the first conversion step\r\n * @param _anchor converter anchor of the first conversion step\r\n * @param _amount amount to convert from, in the source token\r\n */\r\n function handleSourceToken(IERC20Token _sourceToken, IConverterAnchor _anchor, uint256 _amount) private {\r\n IConverter firstConverter = IConverter(payable(_anchor.owner()));\r\n bool isNewerConverter = isV28OrHigherConverter(firstConverter);\r\n\r\n // ETH\r\n if (msg.value > 0) {\r\n // validate msg.value\r\n require(msg.value == _amount, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n\r\n // EtherToken converter - deposit the ETH into the EtherToken\r\n // note that it can still be a non ETH converter if the path is wrong\r\n // but such conversion will simply revert\r\n if (!isNewerConverter)\r\n IEtherToken(address(getConverterEtherTokenAddress(firstConverter))).deposit{ value: msg.value }();\r\n }\r\n // EtherToken\r\n else if (etherTokens[_sourceToken]) {\r\n // claim the tokens - if the source token is ETH reserve, this call will fail\r\n // since in that case the transaction must be sent with msg.value\r\n safeTransferFrom(_sourceToken, msg.sender, address(this), _amount);\r\n\r\n // ETH converter - withdraw the ETH\r\n if (isNewerConverter)\r\n IEtherToken(address(_sourceToken)).withdraw(_amount);\r\n }\r\n // other ERC20 token\r\n else {\r\n // newer converter - transfer the tokens from the sender directly to the converter\r\n // otherwise claim the tokens\r\n if (isNewerConverter)\r\n safeTransferFrom(_sourceToken, msg.sender, address(firstConverter), _amount);\r\n else\r\n safeTransferFrom(_sourceToken, msg.sender, address(this), _amount);\r\n }\r\n }\r\n\r\n /**\r\n * @dev handles the conversion target token if the network still holds it at the end of the conversion\r\n *\r\n * @param _data conversion data, see ConversionStep struct above\r\n * @param _amount conversion target amount\r\n * @param _beneficiary wallet to receive the conversion result\r\n */\r\n function handleTargetToken(ConversionStep[] memory _data, uint256 _amount, address payable _beneficiary) private {\r\n ConversionStep memory stepData = _data[_data.length - 1];\r\n\r\n // network contract doesn't hold the tokens, do nothing\r\n if (stepData.beneficiary != address(this))\r\n return;\r\n\r\n IERC20Token targetToken = stepData.targetToken;\r\n\r\n // ETH / EtherToken\r\n if (etherTokens[targetToken]) {\r\n // newer converter should send ETH directly to the beneficiary\r\n assert(!stepData.isV28OrHigherConverter);\r\n\r\n // EtherToken converter - withdraw the ETH and transfer to the beneficiary\r\n IEtherToken(address(targetToken)).withdrawTo(_beneficiary, _amount);\r\n }\r\n // other ERC20 token\r\n else {\r\n safeTransfer(targetToken, _beneficiary, _amount);\r\n }\r\n }\r\n\r\n /**\r\n * @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\r\n *\r\n * @param _conversionPath conversion path, see conversion path format above\r\n * @param _beneficiary wallet to receive the conversion result\r\n * @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\r\n *\r\n * @return cached conversion data to be ingested later on by the conversion flow\r\n */\r\n function createConversionData(address[] memory _conversionPath, address payable _beneficiary, bool _affiliateFeeEnabled) private view returns (ConversionStep[] memory) {\r\n ConversionStep[] memory data = new ConversionStep[](_conversionPath.length / 2);\r\n\r\n bool affiliateFeeProcessed = false;\r\n IERC20Token bntToken = IERC20Token(addressOf(BNT_TOKEN));\r\n // iterate the conversion path and create the conversion data for each step\r\n uint256 i;\r\n for (i = 0; i < _conversionPath.length - 1; i += 2) {\r\n IConverterAnchor anchor = IConverterAnchor(_conversionPath[i + 1]);\r\n IConverter converter = IConverter(payable(anchor.owner()));\r\n IERC20Token targetToken = IERC20Token(_conversionPath[i + 2]);\r\n\r\n // check if the affiliate fee should be processed in this step\r\n bool processAffiliateFee = _affiliateFeeEnabled && !affiliateFeeProcessed && targetToken == bntToken;\r\n if (processAffiliateFee)\r\n affiliateFeeProcessed = true;\r\n\r\n data[i / 2] = ConversionStep({\r\n // set the converter anchor\r\n anchor: anchor,\r\n\r\n // set the converter\r\n converter: converter,\r\n\r\n // set the source/target tokens\r\n sourceToken: IERC20Token(_conversionPath[i]),\r\n targetToken: targetToken,\r\n\r\n // requires knowledge about the next step, so initialize in the next phase\r\n beneficiary: address(0),\r\n\r\n // set flags\r\n isV28OrHigherConverter: isV28OrHigherConverter(converter),\r\n processAffiliateFee: processAffiliateFee\r\n });\r\n }\r\n\r\n // ETH support\r\n // source is ETH\r\n ConversionStep memory stepData = data[0];\r\n if (etherTokens[stepData.sourceToken]) {\r\n // newer converter - replace the source token address with ETH reserve address\r\n if (stepData.isV28OrHigherConverter)\r\n stepData.sourceToken = ETH_RESERVE_ADDRESS;\r\n // older converter - replace the source token with the EtherToken address used by the converter\r\n else\r\n stepData.sourceToken = getConverterEtherTokenAddress(stepData.converter);\r\n }\r\n\r\n // target is ETH\r\n stepData = data[data.length - 1];\r\n if (etherTokens[stepData.targetToken]) {\r\n // newer converter - replace the target token address with ETH reserve address\r\n if (stepData.isV28OrHigherConverter)\r\n stepData.targetToken = ETH_RESERVE_ADDRESS;\r\n // older converter - replace the target token with the EtherToken address used by the converter\r\n else\r\n stepData.targetToken = getConverterEtherTokenAddress(stepData.converter);\r\n }\r\n\r\n // set the beneficiary for each step\r\n for (i = 0; i < data.length; i++) {\r\n stepData = data[i];\r\n\r\n // first check if the converter in this step is newer as older converters don't even support the beneficiary argument\r\n if (stepData.isV28OrHigherConverter) {\r\n // if affiliate fee is processed in this step, beneficiary is the network contract\r\n if (stepData.processAffiliateFee)\r\n stepData.beneficiary = payable(address(this));\r\n // if it's the last step, beneficiary is the final beneficiary\r\n else if (i == data.length - 1)\r\n stepData.beneficiary = _beneficiary;\r\n // if the converter in the next step is newer, beneficiary is the next converter\r\n else if (data[i + 1].isV28OrHigherConverter)\r\n stepData.beneficiary = address(data[i + 1].converter);\r\n // the converter in the next step is older, beneficiary is the network contract\r\n else\r\n stepData.beneficiary = payable(address(this));\r\n }\r\n else {\r\n // converter in this step is older, beneficiary is the network contract\r\n stepData.beneficiary = payable(address(this));\r\n }\r\n }\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\r\n * Note that we use the non standard erc-20 interface in which `approve` has no return value so that\r\n * this function will work for both standard and non standard tokens\r\n *\r\n * @param _token token to check the allowance in\r\n * @param _spender approved address\r\n * @param _value allowance amount\r\n */\r\n function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {\r\n uint256 allowance = _token.allowance(address(this), _spender);\r\n if (allowance < _value) {\r\n if (allowance > 0)\r\n safeApprove(_token, _spender, 0);\r\n safeApprove(_token, _spender, _value);\r\n }\r\n }\r\n\r\n // legacy - returns the address of an EtherToken used by the converter\r\n function getConverterEtherTokenAddress(IConverter _converter) private view returns (IERC20Token) {\r\n uint256 reserveCount = _converter.connectorTokenCount();\r\n for (uint256 i = 0; i < reserveCount; i++) {\r\n IERC20Token reserveTokenAddress = _converter.connectorTokens(i);\r\n if (etherTokens[reserveTokenAddress])\r\n return reserveTokenAddress;\r\n }\r\n\r\n return ETH_RESERVE_ADDRESS;\r\n }\r\n\r\n // legacy - if the token is an ether token, returns the ETH reserve address\r\n // used by the converter, otherwise returns the input token address\r\n function getConverterTokenAddress(IConverter _converter, IERC20Token _token) private view returns (IERC20Token) {\r\n if (!etherTokens[_token])\r\n return _token;\r\n\r\n if (isV28OrHigherConverter(_converter))\r\n return ETH_RESERVE_ADDRESS;\r\n\r\n return getConverterEtherTokenAddress(_converter);\r\n }\r\n\r\n bytes4 private constant GET_RETURN_FUNC_SELECTOR = bytes4(keccak256(\"getReturn(address,address,uint256)\"));\r\n\r\n // using a static call to get the return from older converters\r\n function getReturn(IConverter _dest, IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) internal view returns (uint256, uint256) {\r\n bytes memory data = abi.encodeWithSelector(GET_RETURN_FUNC_SELECTOR, _sourceToken, _targetToken, _amount);\r\n (bool success, bytes memory returnData) = address(_dest).staticcall(data);\r\n\r\n if (success) {\r\n if (returnData.length == 64) {\r\n return abi.decode(returnData, (uint256, uint256));\r\n }\r\n\r\n if (returnData.length == 32) {\r\n return (abi.decode(returnData, (uint256)), 0);\r\n }\r\n }\r\n\r\n return (0, 0);\r\n }\r\n\r\n bytes4 private constant IS_V28_OR_HIGHER_FUNC_SELECTOR = bytes4(keccak256(\"isV28OrHigher()\"));\r\n\r\n // using a static call to identify converter version\r\n // can't rely on the version number since the function had a different signature in older converters\r\n function isV28OrHigherConverter(IConverter _converter) internal view returns (bool) {\r\n bytes memory data = abi.encodeWithSelector(IS_V28_OR_HIGHER_FUNC_SELECTOR);\r\n (bool success, bytes memory returnData) = address(_converter).staticcall{ gas: 4000 }(data);\r\n\r\n if (success && returnData.length == 32) {\r\n return abi.decode(returnData, (bool));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function getReturnByPath(address[] memory _path, uint256 _amount) public view returns (uint256, uint256) {\r\n return (rateByPath(_path, _amount), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convert(address[] memory _path, uint256 _amount, uint256 _minReturn) public payable returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, address(0), address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, address(0), _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convertFor(address[] memory _path, uint256 _amount, uint256 _minReturn, address payable _beneficiary) public payable returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convertFor2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvert(address[] memory _path, uint256 _amount, uint256 _minReturn) public returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, address(0), address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, address(0), _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvertFor(address[] memory _path, uint256 _amount, uint256 _minReturn, address payable _beneficiary) public returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvertFor2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, _affiliateAccount, _affiliateFee);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "exportedSymbols": { + "BancorNetwork": [ + 1976 + ], + "ILegacyConverter": [ + 26 + ] + }, + "id": 1977, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:0" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 2547, + "src": "77:37:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13341, + "src": "116:47:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13350, + "src": "165:53:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./converter/interfaces/IBancorFormula.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13178, + "src": "220:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21720, + "src": "273:46:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "./utility/ReentrancyGuard.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22243, + "src": "321:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "./utility/TokenHolder.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22576, + "src": "362:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./utility/SafeMath.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22355, + "src": "399:32:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./token/interfaces/IEtherToken.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21154, + "src": "433:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./token/interfaces/ISmartToken.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21183, + "src": "479:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./bancorx/interfaces/IBancorX.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 3552, + "src": "525:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 26, + "linearizedBaseContracts": [ + 26 + ], + "name": "ILegacyConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e5144eb", + "id": 25, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "change", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "683:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "683:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "709:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "709:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "735:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "752:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "682:89:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "790:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "789:9:0" + }, + "scope": 26, + "src": "667:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1977, + "src": "633:169:0" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 28, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1982:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 29, + "nodeType": "InheritanceSpecifier", + "src": "1982:11:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 30, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1995:22:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 31, + "nodeType": "InheritanceSpecifier", + "src": "1995:22:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 32, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "2019:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 33, + "nodeType": "InheritanceSpecifier", + "src": "2019:15:0" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 27, + "nodeType": "StructuredDocumentation", + "src": "806:1148:0", + "text": " @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\n It also allows for the conversion of any token in the Bancor Network to any other token in a single\n transaction by providing a conversion path.\n A note on Conversion Path: Conversion path is a data structure that is used when converting a token\n to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\n converter and might require multiple 'hops'.\n The path defines which converters should be used and what kind of conversion should be done in each step.\n The path format doesn't include complex structure; instead, it is represented by a single array\n in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\n In addition, the first element is always the source token.\n The converter anchor is only used as a pointer to a converter (since converter addresses are more\n likely to change as opposed to anchor addresses).\n Format:\n [source token, converter anchor, target token, converter anchor, target token...]" + }, + "fullyImplemented": true, + "id": 1976, + "linearizedBaseContracts": [ + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "BancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 36, + "libraryName": { + "contractScope": null, + "id": 34, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "2048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "2042:27:0", + "typeName": { + "id": 35, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 39, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2077:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 37, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2077:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2119:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 44, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2133:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 40, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2133:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2196:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 41, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2184:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "canonicalName": "BancorNetwork.ConversionStep", + "id": 59, + "members": [ + { + "constant": false, + "id": 46, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2281:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 45, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2312:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2312:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 50, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2346:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 49, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2346:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 52, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2380:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 51, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2380:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2414:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 56, + "mutability": "mutable", + "name": "isV28OrHigherConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2452:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 55, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2452:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 58, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2490:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 57, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2490:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "ConversionStep", + "nodeType": "StructDefinition", + "scope": 1976, + "src": "2248:274:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5d732ff2", + "id": 62, + "mutability": "mutable", + "name": "maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2530:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2530:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3330303030", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2563:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30000_by_1", + "typeString": "int_const 30000" + }, + "value": "30000" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8077ccf7", + "id": 66, + "mutability": "mutable", + "name": "etherTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2606:48:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "typeName": { + "id": 65, + "keyType": { + "contractScope": null, + "id": 63, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2615:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2606:29:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 67, + "nodeType": "StructuredDocumentation", + "src": "2703:441:0", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _smartToken anchor governed by the converter\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _fromAmount amount converted, in the source token\n @param _toAmount amount returned, minus conversion fee\n @param _trader wallet that initiated the trade" + }, + "id": 81, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 80, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 69, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3177:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 68, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3177:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3224:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 70, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3224:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 73, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3265:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 72, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3265:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "indexed": false, + "mutability": "mutable", + "name": "_fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3304:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 74, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3304:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 77, + "indexed": false, + "mutability": "mutable", + "name": "_toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3334:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 79, + "indexed": false, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3362:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 78, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3362:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3166:218:0" + }, + "src": "3150:235:0" + }, + { + "body": { + "id": 96, + "nodeType": "Block", + "src": "3625:58:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "3636:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 92, + "indexExpression": { + "argumentTypes": null, + "id": 91, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "3648:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3636:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3636:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 95, + "nodeType": "ExpressionStatement", + "src": "3636:39:0" + } + ] + }, + "documentation": { + "id": 82, + "nodeType": "StructuredDocumentation", + "src": "3393:144:0", + "text": " @dev initializes a new BancorNetwork instance\n @param _registry address of a contract registry contract" + }, + "id": 97, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "3607:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 88, + "modifierName": { + "argumentTypes": null, + "id": 86, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3584:22:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3584:33:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 97, + "src": "3555:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 83, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3555:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3554:29:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "3625:0:0" + }, + "scope": 1976, + "src": "3543:140:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "3935:136:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 106, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "3954:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 107, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3974:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3954:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3990:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3946:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "3946:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "4029:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "4047:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4029:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "4029:34:0" + } + ] + }, + "documentation": { + "id": 98, + "nodeType": "StructuredDocumentation", + "src": "3691:144:0", + "text": " @dev allows the owner to update the maximum affiliate-fee\n @param _maxAffiliateFee maximum affiliate-fee" + }, + "functionSelector": "f3bc7d2a", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 103, + "modifierName": { + "argumentTypes": null, + "id": 102, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3920:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3920:9:0" + } + ], + "name": "setMaxAffiliateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 100, + "mutability": "mutable", + "name": "_maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 117, + "src": "3869:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3868:26:0" + }, + "returnParameters": { + "id": 104, + "nodeType": "ParameterList", + "parameters": [], + "src": "3935:0:0" + }, + "scope": 1976, + "src": "3841:230:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "4474:50:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 139, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "4485:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 141, + "indexExpression": { + "argumentTypes": null, + "id": 140, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4497:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4485:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 142, + "name": "_register", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "4507:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4485:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 144, + "nodeType": "ExpressionStatement", + "src": "4485:31:0" + } + ] + }, + "documentation": { + "id": 118, + "nodeType": "StructuredDocumentation", + "src": "4079:212:0", + "text": " @dev allows the owner to register/unregister ether tokens\n @param _token ether token contract address\n @param _register true to register, false to unregister" + }, + "functionSelector": "02ef521e", + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 125, + "modifierName": { + "argumentTypes": null, + "id": 124, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "4386:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4386:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 129, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4418:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 131, + "modifierName": { + "argumentTypes": null, + "id": 126, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "4405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4405:29:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 135, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 133, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4452:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 137, + "modifierName": { + "argumentTypes": null, + "id": 132, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "4444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4444:24:0" + } + ], + "name": "registerEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4325:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 119, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "4325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 122, + "mutability": "mutable", + "name": "_register", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4345:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 121, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4324:36:0" + }, + "returnParameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4474:0:0" + }, + "scope": 1976, + "src": "4297:227:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 171, + "nodeType": "Block", + "src": "5021:175:0", + "statements": [ + { + "assignments": [ + 158 + ], + "declarations": [ + { + "constant": false, + "id": 158, + "mutability": "mutable", + "name": "pathFinder", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 171, + "src": "5032:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + }, + "typeName": { + "contractScope": null, + "id": 157, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "5032:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 164, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "name": "CONVERSION_PATH_FINDER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21539, + "src": "5099:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 160, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5089:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5089:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 159, + "name": "IConversionPathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2546, + "src": "5067:21:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConversionPathFinder_$2546_$", + "typeString": "type(contract IConversionPathFinder)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5067:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5032:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "5161:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 168, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "5175:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 165, + "name": "pathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "5141:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPath", + "nodeType": "MemberAccess", + "referencedDeclaration": 2545, + "src": "5141:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 156, + "id": 170, + "nodeType": "Return", + "src": "5134:54:0" + } + ] + }, + "documentation": { + "id": 147, + "nodeType": "StructuredDocumentation", + "src": "4532:368:0", + "text": " @dev returns the conversion path between two tokens in the network\n note that this method is quite expensive in terms of gas and should generally be called off-chain\n @param _sourceToken source token address\n @param _targetToken target token address\n @return conversion path between the two tokens" + }, + "functionSelector": "d734fa19", + "id": 172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "conversionPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4930:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 148, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4930:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4956:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 150, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4956:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:52:0" + }, + "returnParameters": { + "id": 156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 155, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "5003:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 154, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5003:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5002:18:0" + }, + "scope": 1976, + "src": "4906:290:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "5682:2762:0", + "statements": [ + { + "assignments": [ + 184 + ], + "declarations": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5693:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 185, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5693:14:0" + }, + { + "assignments": [ + 187 + ], + "declarations": [ + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5718:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5718:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 188, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5718:11:0" + }, + { + "assignments": [ + 190 + ], + "declarations": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5740:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5740:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5740:14:0" + }, + { + "assignments": [ + 193 + ], + "declarations": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5765:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5765:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 194, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5765:15:0" + }, + { + "assignments": [ + 196 + ], + "declarations": [ + { + "constant": false, + "id": 196, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5791:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 195, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5791:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 197, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5791:13:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5815:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 198, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5815:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5815:20:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5846:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 201, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "5846:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 208, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 205, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 204, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 203, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5871:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5846:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "5925:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "5934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5925:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 212, + "nodeType": "ExpressionStatement", + "src": "5925:16:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6034:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6049:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6034:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6054:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6054:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6054:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6074:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6054:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6034:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "6026:70:0" + }, + { + "body": { + "id": 457, + "nodeType": "Block", + "src": "6200:2211:0", + "statements": [ + { + "assignments": [ + 241 + ], + "declarations": [ + { + "constant": false, + "id": 241, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6215:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 249, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 243, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6253:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 244, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6259:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6263:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6253:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 242, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6241:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6241:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6215:51:0" + }, + { + "assignments": [ + 251 + ], + "declarations": [ + { + "constant": false, + "id": 251, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6281:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6281:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 257, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 252, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6298:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 256, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6304:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6308:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6304:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6298:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6281:29:0" + }, + { + "assignments": [ + 259 + ], + "declarations": [ + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6325:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 258, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 265, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 261, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6363:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 263, + "indexExpression": { + "argumentTypes": null, + "id": 262, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6363:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 260, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6325:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6389:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6420:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "6420:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6412:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6412:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6412:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 267, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "6401:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "6389:65:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 278, + "nodeType": "ExpressionStatement", + "src": "6389:65:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 279, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6510:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 281, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6549:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 282, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6560:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 280, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6524:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6524:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6510:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 285, + "nodeType": "ExpressionStatement", + "src": "6510:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 286, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6587:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 288, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6626:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 289, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6637:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 287, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6601:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6601:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6587:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "6587:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 295, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6678:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6670:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 370, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7480:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7472:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 372, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7496:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7472:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 454, + "nodeType": "Block", + "src": "8267:133:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 443, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 444, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8323:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 445, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "8314:13:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8340:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 448, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "8351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 449, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "8364:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 450, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8377:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 446, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "8330:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8330:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "8314:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 453, + "nodeType": "ExpressionStatement", + "src": "8314:70:0" + } + ] + }, + "id": 455, + "nodeType": "IfStatement", + "src": "7468:932:0", + "trueBody": { + "id": 442, + "nodeType": "Block", + "src": "7504:744:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 374, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7616:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7620:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7616:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 377, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7625:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 378, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "7635:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 382, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 379, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7641:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7645:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7641:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7635:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7625:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7616:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 393, + "nodeType": "IfStatement", + "src": "7612:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 385, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7670:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7691:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 386, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "7679:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "7679:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7670:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "7670:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 394, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7789:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 397, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7829:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 395, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7799:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "7799:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7799:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7789:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 400, + "nodeType": "ExpressionStatement", + "src": "7789:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 401, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7863:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 402, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7860:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 405, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7900:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 403, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7879:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7879:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7879:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7860:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "7860:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7931:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7965:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 413, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7973:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 414, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 415, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7990:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7940:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7940:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7940:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7931:66:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 418, + "nodeType": "ExpressionStatement", + "src": "7931:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 419, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8016:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 427, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "8064:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8033:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8033:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8033:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 420, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8022:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "8022:10:0", + "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": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "8022:41:0", + "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": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8016:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 430, + "nodeType": "ExpressionStatement", + "src": "8016:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 431, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8098:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 432, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8098:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 434, + "nodeType": "ExpressionStatement", + "src": "8098:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 435, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 438, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8225:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 436, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8214:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8214:10:0", + "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": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8214:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8205:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 441, + "nodeType": "ExpressionStatement", + "src": "8205:27:0" + } + ] + } + }, + "id": 456, + "nodeType": "IfStatement", + "src": "6666:1734:0", + "trueBody": { + "id": 367, + "nodeType": "Block", + "src": "6702:747:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 299, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6813:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6813:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6822:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 303, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 304, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6838:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6842:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6838:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6832:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6822:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6813:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 318, + "nodeType": "IfStatement", + "src": "6809:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 310, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "6867:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 312, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6888:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 311, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6867:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 317, + "nodeType": "ExpressionStatement", + "src": "6867:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "6986:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 322, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 320, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6996:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "6996:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6996:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 325, + "nodeType": "ExpressionStatement", + "src": "6986:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 326, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 327, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7057:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 330, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7097:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 328, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7076:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7076:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7076:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7057:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 333, + "nodeType": "ExpressionStatement", + "src": "7057:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7128:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 337, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7166:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 338, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7174:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 339, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7191:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7137:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "7137:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7128:70:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "7128:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 344, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7217:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 352, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "7265:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 347, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "7234:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7234:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "7223:10:0", + "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": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "7223:41:0", + "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": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7217:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 355, + "nodeType": "ExpressionStatement", + "src": "7217:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 356, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7299:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 357, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7309:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7299:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ExpressionStatement", + "src": "7299:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7406:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7415:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "7415:10:0", + "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": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7406:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "7406:27:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6174:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6178:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6174:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 458, + "initializationExpression": { + "assignments": [ + 229 + ], + "declarations": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 458, + "src": "6159:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6159:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 231, + "initialValue": { + "argumentTypes": null, + "hexValue": "32", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6159:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 236, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6192:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "6192:6:0" + }, + "nodeType": "ForStatement", + "src": "6154:2257:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 459, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8430:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 182, + "id": 460, + "nodeType": "Return", + "src": "8423:13:0" + } + ] + }, + "documentation": { + "id": 173, + "nodeType": "StructuredDocumentation", + "src": "5204:381:0", + "text": " @dev returns the expected target amount of converting a given amount on a given path\n note that there is no support for circular paths\n @param _path conversion path (see conversion path format above)\n @param _amount amount of _path[0] tokens received from the sender\n @return expected target amount" + }, + "functionSelector": "7f9c0ecd", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rateByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 176, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5611:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5611:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 175, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5611:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5635:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5610:41:0" + }, + "returnParameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5673:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5673:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5672:9:0" + }, + "scope": 1976, + "src": "5591:2853:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 597, + "nodeType": "Block", + "src": "9948:1329:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10073:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10073:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10088:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10073:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 491, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10093:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10093:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10108:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10093:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10093:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10073:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10065:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10065:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 500, + "nodeType": "ExpressionStatement", + "src": "10065:70:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 503, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10257:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 505, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10263:1:0", + "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": "10257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 502, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "10245:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 508, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10285:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10291:1:0", + "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": "10285:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 507, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "10268:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 512, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "10296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 501, + "name": "handleSourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1110, + "src": "10227:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor,uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10227:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 514, + "nodeType": "ExpressionStatement", + "src": "10227:77:0" + }, + { + "assignments": [ + 516 + ], + "declarations": [ + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10363:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 515, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10363:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10390:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "10363:32:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 521, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "10418:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10410:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10448:1:0", + "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": 524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10440:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10410:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 551, + "nodeType": "Block", + "src": "10550:159:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10573:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10577:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10573:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 540, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10594:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "10611:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10594:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10573:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10628:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10565:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "10565:91:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 547, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "10671:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10671:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 550, + "nodeType": "ExpressionStatement", + "src": "10671:26:0" + } + ] + }, + "id": 552, + "nodeType": "IfStatement", + "src": "10406:303:0", + "trueBody": { + "id": 535, + "nodeType": "Block", + "src": "10452:83:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 529, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10475:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10492:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10475:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10495:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 528, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10467:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10467:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10467:56:0" + } + ] + } + }, + { + "assignments": [ + 554 + ], + "declarations": [ + { + "constant": false, + "id": 554, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10761:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10761:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 557, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 555, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10791:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:40:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 558, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10816:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10840:1:0", + "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": 560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10832:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10816:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 568, + "nodeType": "IfStatement", + "src": "10812:71:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 564, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "10857:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 565, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10871:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10857:26:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 567, + "nodeType": "ExpressionStatement", + "src": "10857:26:0" + } + }, + { + "assignments": [ + 572 + ], + "declarations": [ + { + "constant": false, + "id": 572, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10945:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 570, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "10945:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 578, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10997:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "11017:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 573, + "name": "createConversionData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "10976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_address_payable_$_t_bool_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address payable,bool) view returns (struct BancorNetwork.ConversionStep memory[] memory)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10976:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10945:92:0" + }, + { + "assignments": [ + 580 + ], + "declarations": [ + { + "constant": false, + "id": 580, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "11048:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 588, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11078:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "11084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "11093:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 585, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "11105:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 586, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "11124:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 581, + "name": "doConversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "11065:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,uint256,address,uint256) returns (uint256)" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11048:90:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 590, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11217:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 591, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 592, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11231:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 589, + "name": "handleTargetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1174, + "src": "11199:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,address payable)" + } + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11199:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 594, + "nodeType": "ExpressionStatement", + "src": "11199:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 595, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11263:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 485, + "id": 596, + "nodeType": "Return", + "src": "11256:13:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8452:1150:0", + "text": " @dev converts the token to any other token in the bancor network by following\n a predefined conversion path and transfers the result tokens to a target account\n affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\n @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\n @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\n @return amount of tokens received from the conversion" + }, + "functionSelector": "b77d239b", + "id": 598, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 479, + "modifierName": { + "argumentTypes": null, + "id": 478, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9869:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "9904:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 482, + "modifierName": { + "argumentTypes": null, + "id": 480, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9888:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9888:27:0" + } + ], + "name": "convertByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 466, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9641:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9641:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 465, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9674:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 470, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9700:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9700:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 472, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9729:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9729:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 474, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9768:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 473, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9768:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 476, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9804:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9804:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9630:196:0" + }, + "returnParameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9934:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9933:9:0" + }, + "scope": 1976, + "src": "9608:1669:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 631, + "nodeType": "Block", + "src": "12548:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 618, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "12576:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 619, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 604, + "src": "12583:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 620, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "12604:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "12623:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 612, + "src": "12639:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:1:0", + "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": 625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12654:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 617, + "name": "xConvert2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "12566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,bytes32,bytes32,uint256,address,uint256) returns (uint256)" + } + }, + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12566:102:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 616, + "id": 630, + "nodeType": "Return", + "src": "12559:109:0" + } + ] + }, + "documentation": { + "id": 599, + "nodeType": "StructuredDocumentation", + "src": "11285:978:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "c52173de", + "id": 632, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "xConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 602, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12297:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 600, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12297:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 601, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 604, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12330:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 603, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 606, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12356:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 608, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12385:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 607, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12421:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12421:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 612, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12454:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12286:196:0" + }, + "returnParameters": { + "id": 616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 615, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12534:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12533:9:0" + }, + "scope": 1976, + "src": "12269:407:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "14166:739:0", + "statements": [ + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14177:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 658, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14177:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 661, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14215:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 662, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14221:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14221:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14236:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14221:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14215:23:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 660, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14203:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14203:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14177:62:0" + }, + { + "assignments": [ + 670 + ], + "declarations": [ + { + "constant": false, + "id": 670, + "mutability": "mutable", + "name": "bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14250:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 669, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "14250:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 676, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "BANCOR_X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21554, + "src": "14288:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 672, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14278:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14278:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 671, + "name": "IBancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3551, + "src": "14269:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorX_$3551_$", + "typeString": "type(contract IBancorX)" + } + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14269:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14250:48:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 678, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14372:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 681, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "14409:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 680, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14399:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14399:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 679, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14387:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14372:48:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5441524745545f544f4b454e", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14422:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + }, + "value": "ERR_INVALID_TARGET_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + } + ], + "id": 677, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "ExpressionStatement", + "src": "14364:85:0" + }, + { + "assignments": [ + 689 + ], + "declarations": [ + { + "constant": false, + "id": 689, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14511:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 688, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14511:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 704, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 691, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14542:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "14549:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 693, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14558:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14586:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 696, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14578:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14570:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 701, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "14594:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 702, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14613:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 690, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "14528:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14528:99:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14511:116:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 706, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14692:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 709, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + ], + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14705:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 711, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14723:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 705, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14676:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14676:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "14676:54:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "14814:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "14833:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14849:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 720, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "14857:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 714, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3541, + "src": "14796:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14796:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "14796:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 657, + "id": 724, + "nodeType": "Return", + "src": "14884:13:0" + } + ] + }, + "documentation": { + "id": 633, + "nodeType": "StructuredDocumentation", + "src": "12684:1091:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "cb32564e", + "id": 726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 653, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14122:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 654, + "modifierName": { + "argumentTypes": null, + "id": 652, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "14106:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "14106:27:0" + } + ], + "name": "xConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13810:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13810:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 635, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13810:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 638, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13843:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13869:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 642, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13898:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 641, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 644, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13934:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13967:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13999:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13999:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14035:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14035:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13799:264:0" + }, + "returnParameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 656, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14152:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14151:9:0" + }, + "scope": 1976, + "src": "13781:1124:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 777, + "nodeType": "Block", + "src": "16040:423:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 745, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16133:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 747, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16139:1:0", + "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": "16133:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 744, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "16121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16121:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16146:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 3530, + "src": "16146:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16146:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "16121:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f534f555243455f544f4b454e", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16164:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + }, + "value": "ERR_INVALID_SOURCE_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + } + ], + "id": 743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16113:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16113:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 755, + "nodeType": "ExpressionStatement", + "src": "16113:78:0" + }, + { + "assignments": [ + 757 + ], + "declarations": [ + { + "constant": false, + "id": 757, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 777, + "src": "16260:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16260:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 764, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 760, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 734, + "src": "16305:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16320:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16320:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 758, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16277:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getXTransferAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3550, + "src": "16277:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view external returns (uint256)" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16277:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16260:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 766, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16400:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 767, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 757, + "src": "16407:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 768, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "16415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 738, + "src": "16427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:1:0", + "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": 771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 770, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16441:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16453:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 765, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "16386:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16386:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 742, + "id": 776, + "nodeType": "Return", + "src": "16379:76:0" + } + ] + }, + "documentation": { + "id": 727, + "nodeType": "StructuredDocumentation", + "src": "14913:937:0", + "text": " @dev allows a user to convert a token that was sent from another blockchain into any other\n token on the BancorNetwork\n ideally this transaction is created before the previous conversion is even complete, so\n so the input amount isn't known at that point - the amount is actually take from the\n BancorX contract directly by specifying the conversion id\n @param _path conversion path\n @param _bancorX address of the BancorX contract for the source token\n @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received from the conversion" + }, + "functionSelector": "89f9cc61", + "id": 778, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "completeXConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 730, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15885:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15885:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 729, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15885:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 732, + "mutability": "mutable", + "name": "_bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15909:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 731, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "15909:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 734, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15928:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 736, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15951:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 738, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15971:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 737, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15971:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15884:116:0" + }, + "returnParameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "16026:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16025:9:0" + }, + "scope": 1976, + "src": "15856:607:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "17298:2483:0", + "statements": [ + { + "assignments": [ + 796 + ], + "declarations": [ + { + "constant": false, + "id": 796, + "mutability": "mutable", + "name": "toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17309:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 797, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "17309:16:0" + }, + { + "assignments": [ + 799 + ], + "declarations": [ + { + "constant": false, + "id": 799, + "mutability": "mutable", + "name": "fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 801, + "initialValue": { + "argumentTypes": null, + "id": 800, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "17357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17336:28:0" + }, + { + "body": { + "id": 986, + "nodeType": "Block", + "src": "17465:2151:0", + "statements": [ + { + "assignments": [ + 814 + ], + "declarations": [ + { + "constant": false, + "id": 814, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 986, + "src": "17480:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 813, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 818, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17513:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17519:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17480:41:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17574:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "17574:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 855, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 860, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18235:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "18235:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18227:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 857, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "18215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18215:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "18191:61:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 877, + "nodeType": "IfStatement", + "src": "18187:272:0", + "trueBody": { + "id": 876, + "nodeType": "Block", + "src": "18254:205:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18381:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18411:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18411:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18403:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 873, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18432:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 865, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "18365:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18365:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "18365:78:0" + } + ] + } + }, + "id": 878, + "nodeType": "IfStatement", + "src": "17570:889:0", + "trueBody": { + "id": 854, + "nodeType": "Block", + "src": "17607:416:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 821, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17820:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17825:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17820:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17830:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 828, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17836:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17840:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17836:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17830:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "17830:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 832, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17866:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17858:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "17830:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:51:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "17875:34:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 836, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "17876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 837, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 838, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17876:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:89:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 853, + "nodeType": "IfStatement", + "src": "17816:191:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17945:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17945:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 847, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17975:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "17975:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17967:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 850, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "17996:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 842, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "17932:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17932:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "17932:75:0" + } + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18513:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18514:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "18514:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 900, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "18710:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 903, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 901, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18722:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18722:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18710:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 923, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18946:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 927, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18984:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18984:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 929, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19006:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19006:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 931, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19028:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19040:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19040:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 934, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19052:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "19052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 924, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18957:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18957:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18957:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18957:116:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18946:127:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "18946:127:0" + }, + "id": 939, + "nodeType": "IfStatement", + "src": "18706:367:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 904, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18762:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 911, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18820:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18820:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 913, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18842:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 915, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18864:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 916, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18876:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18876:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 918, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "18888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 905, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18773:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18773:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18808:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "18773:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$value", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18773:136:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18762:147:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "18762:147:0" + } + }, + "id": 940, + "nodeType": "IfStatement", + "src": "18509:564:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 882, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18564:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 891, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18628:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18628:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 893, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18650:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18650:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18684:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 886, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18600:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18600:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18592:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 883, + "name": "ILegacyConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "18575:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILegacyConverter_$26_$", + "typeString": "type(contract ILegacyConverter)" + } + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILegacyConverter_$26", + "typeString": "contract ILegacyConverter" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "change", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "18575:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256) external returns (uint256)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:111:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18564:122:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 899, + "nodeType": "ExpressionStatement", + "src": "18564:122:0" + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 941, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19138:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "19138:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 968, + "nodeType": "IfStatement", + "src": "19134:308:0", + "trueBody": { + "id": 967, + "nodeType": "Block", + "src": "19168:274:0", + "statements": [ + { + "assignments": [ + 944 + ], + "declarations": [ + { + "constant": false, + "id": 944, + "mutability": "mutable", + "name": "affiliateAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 967, + "src": "19187:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 950, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "19245:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 947, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "19226:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 945, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19213:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19213:12:0", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19213:31:0", + "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": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19187:73:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 957, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 788, + "src": "19317:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 958, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19336:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 954, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19287:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19287:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 21106, + "src": "19287:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19287:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4645455f5452414e534645525f4641494c4544", + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19354:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + }, + "value": "ERR_FEE_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + } + ], + "id": 953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19279:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19279:101:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 962, + "nodeType": "ExpressionStatement", + "src": "19279:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 963, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19399:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 964, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19411:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19399:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 966, + "nodeType": "ExpressionStatement", + "src": "19399:27:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 970, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19474:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "19474:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 972, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "19491:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 974, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 975, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19513:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 976, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19535:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 977, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19557:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19557:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 969, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "19463:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (contract IConverterAnchor,contract IERC20Token,contract IERC20Token,uint256,uint256,address)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19463:105:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 981, + "nodeType": "EmitStatement", + "src": "19458:110:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19583:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 983, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19596:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19583:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 985, + "nodeType": "ExpressionStatement", + "src": "19583:21:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 806, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17442:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 807, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17446:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17446:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17442:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 987, + "initializationExpression": { + "assignments": [ + 803 + ], + "declarations": [ + { + "constant": false, + "id": 803, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 987, + "src": "17427:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 805, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17439:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17427:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17460:3:0", + "subExpression": { + "argumentTypes": null, + "id": 810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17460:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "17460:3:0" + }, + "nodeType": "ForStatement", + "src": "17422:2194:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 989, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19700:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 786, + "src": "19712:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19700:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19724:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 988, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19692:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 994, + "nodeType": "ExpressionStatement", + "src": "19692:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 995, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19765:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 794, + "id": 996, + "nodeType": "Return", + "src": "19758:15:0" + } + ] + }, + "documentation": { + "id": 779, + "nodeType": "StructuredDocumentation", + "src": "16471:603:0", + "text": " @dev executes the actual conversion by following the conversion path\n @param _data conversion data, see ConversionStep struct above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return amount of tokens received from the conversion" + }, + "id": 998, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17112:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 780, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17112:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 781, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17112:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17178:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17178:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17207:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17207:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17243:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17101:170:0" + }, + "returnParameters": { + "id": 794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17289:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17288:9:0" + }, + "scope": 1976, + "src": "17080:2701:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1109, + "nodeType": "Block", + "src": "20232:1606:0", + "statements": [ + { + "assignments": [ + 1009 + ], + "declarations": [ + { + "constant": false, + "id": 1009, + "mutability": "mutable", + "name": "firstConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20243:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1008, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "20243:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1018, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1013, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1003, + "src": "20290:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "20290:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20282:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20282:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20282:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1010, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "20271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20243:64:0" + }, + { + "assignments": [ + 1020 + ], + "declarations": [ + { + "constant": false, + "id": 1020, + "mutability": "mutable", + "name": "isNewerConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20318:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1024, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1022, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20365:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1021, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "20342:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20342:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20318:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20413:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1055, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "20955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1057, + "indexExpression": { + "argumentTypes": null, + "id": 1056, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "20967:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20955:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1106, + "nodeType": "Block", + "src": "21447:384:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1082, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21605:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1095, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21770:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21784:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21784:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1100, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21804:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21796:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21811:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1094, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21753:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21753:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1104, + "nodeType": "ExpressionStatement", + "src": "21753:66:0" + }, + "id": 1105, + "nodeType": "IfStatement", + "src": "21601:218:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21657:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21671:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21671:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1089, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "21691:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21683:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1091, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1083, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21640:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:76:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "21640:76:0" + } + } + ] + }, + "id": 1107, + "nodeType": "IfStatement", + "src": "20951:880:0", + "trueBody": { + "id": 1081, + "nodeType": "Block", + "src": "20982:420:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21184:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1060, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1064, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21218:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21210:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1066, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21225:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21167:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21167:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1068, + "nodeType": "ExpressionStatement", + "src": "21167:66:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1069, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21303:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1080, + "nodeType": "IfStatement", + "src": "21299:91:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1073, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21358:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21350:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1070, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "21338:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21140, + "src": "21338:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "21338:52:0" + } + } + ] + } + }, + "id": 1108, + "nodeType": "IfStatement", + "src": "20409:1422:0", + "trueBody": { + "id": 1054, + "nodeType": "Block", + "src": "20428:485:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20486:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20486:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1032, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "20499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20486:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20508:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 1029, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20478:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20478:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1036, + "nodeType": "ExpressionStatement", + "src": "20478:56:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20768:17:0", + "subExpression": { + "argumentTypes": null, + "id": 1037, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "20769:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1053, + "nodeType": "IfStatement", + "src": "20764:137:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1043, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20854:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1042, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "20824:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20816:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1039, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "20804:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 21135, + "src": "20804:75:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$", + "typeString": "function () payable external" + } + }, + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20888:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20888:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "20804:95:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$value", + "typeString": "function () payable external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:97:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "20804:97:0" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 999, + "nodeType": "StructuredDocumentation", + "src": "19789:333:0", + "text": " @dev validates msg.value and prepares the conversion source token for the conversion\n @param _sourceToken source token of the first conversion step\n @param _anchor converter anchor of the first conversion step\n @param _amount amount to convert from, in the source token" + }, + "id": 1110, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleSourceToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1001, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20155:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1000, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20181:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1002, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "20181:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1005, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20207:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20207:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20154:69:0" + }, + "returnParameters": { + "id": 1007, + "nodeType": "ParameterList", + "parameters": [], + "src": "20232:0:0" + }, + "scope": 1976, + "src": "20128:1710:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "22295:780:0", + "statements": [ + { + "assignments": [ + 1122 + ], + "declarations": [ + { + "constant": false, + "id": 1122, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22306:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1121, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22306:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1129, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1123, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1128, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1124, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22345:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22345:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22360:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22345:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22339:23:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22306:56:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22444:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "22444:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1134, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "22476:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22468:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22444:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1138, + "nodeType": "IfStatement", + "src": "22440:63:0", + "trueBody": { + "expression": null, + "functionReturnParameters": 1120, + "id": 1137, + "nodeType": "Return", + "src": "22496:7:0" + } + }, + { + "assignments": [ + 1140 + ], + "declarations": [ + { + "constant": false, + "id": 1140, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22515:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1139, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22515:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1143, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1141, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22541:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "22541:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22515:46:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1144, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "22607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1146, + "indexExpression": { + "argumentTypes": null, + "id": 1145, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22619:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22607:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1171, + "nodeType": "Block", + "src": "22993:75:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "23021:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1167, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "23034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1168, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "23048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1165, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "23008:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23008:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1170, + "nodeType": "ExpressionStatement", + "src": "23008:48:0" + } + ] + }, + "id": 1172, + "nodeType": "IfStatement", + "src": "22603:465:0", + "trueBody": { + "id": 1164, + "nodeType": "Block", + "src": "22633:315:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22731:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1148, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "22732:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1147, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "22724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22724:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1152, + "nodeType": "ExpressionStatement", + "src": "22724:40:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1160, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "22914:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1161, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "22928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1156, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22889:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22881:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1153, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "22869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "22869:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1163, + "nodeType": "ExpressionStatement", + "src": "22869:67:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1111, + "nodeType": "StructuredDocumentation", + "src": "21846:330:0", + "text": " @dev handles the conversion target token if the network still holds it at the end of the conversion\n @param _data conversion data, see ConversionStep struct above\n @param _amount conversion target amount\n @param _beneficiary wallet to receive the conversion result" + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTargetToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1114, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22209:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1112, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22209:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1113, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22209:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22240:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1118, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22257:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22257:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22208:78:0" + }, + "returnParameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [], + "src": "22295:0:0" + }, + "scope": 1976, + "src": "22182:893:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1467, + "nodeType": "Block", + "src": "23760:4093:0", + "statements": [ + { + "assignments": [ + 1191 + ], + "declarations": [ + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23771:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1189, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23771:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1190, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23771:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1200, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1195, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "23823:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23823:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23848:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "23823:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "23802:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct BancorNetwork.ConversionStep memory[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1192, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23806:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1193, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23806:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23802:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23771:79:0" + }, + { + "assignments": [ + 1202 + ], + "declarations": [ + { + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "affiliateFeeProcessed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23863:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23863:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1204, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23892:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23863:34:0" + }, + { + "assignments": [ + 1206 + ], + "declarations": [ + { + "constant": false, + "id": 1206, + "mutability": "mutable", + "name": "bntToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23908:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1205, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23908:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1212, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1209, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "23953:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1208, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "23943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23943:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1207, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "23931:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23931:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23908:56:0" + }, + { + "assignments": [ + 1214 + ], + "declarations": [ + { + "constant": false, + "id": 1214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "24060:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1215, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24060:9:0" + }, + { + "body": { + "id": 1303, + "nodeType": "Block", + "src": "24132:1199:0", + "statements": [ + { + "assignments": [ + 1231 + ], + "declarations": [ + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24147:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1230, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24147:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1239, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24190:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24206:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24210:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24206:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24190:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1232, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "24173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24173:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24147:66:0" + }, + { + "assignments": [ + 1241 + ], + "declarations": [ + { + "constant": false, + "id": 1241, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24228:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1240, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "24228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1245, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24270:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "24270:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24270:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24262:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24262:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24262:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1242, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "24251:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24251:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24228:58:0" + }, + { + "assignments": [ + 1252 + ], + "declarations": [ + { + "constant": false, + "id": 1252, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24301:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1251, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24301:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1260, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24339:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1258, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1255, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24355:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24359:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24355:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24339:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1253, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24327:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24327:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24301:61:0" + }, + { + "assignments": [ + 1262 + ], + "declarations": [ + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24455:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1261, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "24455:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1271, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1263, + "name": "_affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "24482:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "24506:22:0", + "subExpression": { + "argumentTypes": null, + "id": 1264, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24507:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1267, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24532:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1268, + "name": "bntToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "24547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "24532:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:73:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24455:100:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1272, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "24574:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1277, + "nodeType": "IfStatement", + "src": "24570:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1273, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24612:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24636:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "24612:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1276, + "nodeType": "ExpressionStatement", + "src": "24612:28:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1278, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "24657:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1282, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1279, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24662:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24662:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24657:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1284, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24758:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 1285, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "24834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1287, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24938:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1289, + "indexExpression": { + "argumentTypes": null, + "id": 1288, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24954:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24938:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1286, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24926:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24989:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25134:1:0", + "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": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25126:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1297, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "25234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1296, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "25211:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25211:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1299, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "25284:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1283, + "name": "ConversionStep", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "24671:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ConversionStep_$59_storage_ptr_$", + "typeString": "type(struct BancorNetwork.ConversionStep storage pointer)" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "anchor", + "converter", + "sourceToken", + "targetToken", + "beneficiary", + "isV28OrHigherConverter", + "processAffiliateFee" + ], + "nodeType": "FunctionCall", + "src": "24671:648:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "24657:662:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "24657:662:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24092:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1221, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24096:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24096:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24096:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24092:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1304, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1216, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24089:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "24085:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24124:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24129:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1229, + "nodeType": "ExpressionStatement", + "src": "24124:6:0" + }, + "nodeType": "ForStatement", + "src": "24080:1251:0" + }, + { + "assignments": [ + 1306 + ], + "declarations": [ + { + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "25393:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1305, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "25393:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1310, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1307, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25426:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1309, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25431:1:0", + "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": "25426:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25393:40:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1311, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "25448:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1314, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1312, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25460:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25448:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1334, + "nodeType": "IfStatement", + "src": "25444:472:0", + "trueBody": { + "id": 1333, + "nodeType": "Block", + "src": "25483:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1315, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25594:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1316, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "25594:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25832:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1327, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "25885:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1326, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "25855:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25855:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25832:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "25832:72:0" + }, + "id": 1332, + "nodeType": "IfStatement", + "src": "25590:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1317, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25644:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "25667:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25644:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1322, + "nodeType": "ExpressionStatement", + "src": "25644:42:0" + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1335, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25954:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1336, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25965:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1341, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1337, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25970:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25984:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25970:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25965:21:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "25954:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "25954:32:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1344, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "26001:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1347, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1345, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26013:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1367, + "nodeType": "IfStatement", + "src": "25997:472:0", + "trueBody": { + "id": 1366, + "nodeType": "Block", + "src": "26036:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1348, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26147:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1356, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26385:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26385:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1360, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26438:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "26438:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1359, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "26408:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26408:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26385:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1364, + "nodeType": "ExpressionStatement", + "src": "26385:72:0" + }, + "id": 1365, + "nodeType": "IfStatement", + "src": "26143:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26197:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1352, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26197:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1353, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "26220:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26197:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1355, + "nodeType": "ExpressionStatement", + "src": "26197:42:0" + } + } + ] + } + }, + { + "body": { + "id": 1463, + "nodeType": "Block", + "src": "26561:1261:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1379, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26576:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1380, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26587:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1382, + "indexExpression": { + "argumentTypes": null, + "id": 1381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "26576:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1384, + "nodeType": "ExpressionStatement", + "src": "26576:18:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1385, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26746:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26746:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1461, + "nodeType": "Block", + "src": "27642:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1449, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27750:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1456, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27789:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27781:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27773:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27773:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27750:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "27750:45:0" + } + ] + }, + "id": 1462, + "nodeType": "IfStatement", + "src": "26742:1069:0", + "trueBody": { + "id": 1448, + "nodeType": "Block", + "src": "26779:844:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1387, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26902:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1388, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "26902:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1401, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27106:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1402, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27111:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27111:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27125:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27111:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1413, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27310:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1417, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1414, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27315:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27319:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27315:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1418, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "27310:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1433, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27562:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27562:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1440, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27601:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27593:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27585:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27585:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27585:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27562:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1444, + "nodeType": "ExpressionStatement", + "src": "27562:45:0" + }, + "id": 1445, + "nodeType": "IfStatement", + "src": "27306:301:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1419, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27367:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27367:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1424, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27398:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1428, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27403:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27407:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27403:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27398:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "27398:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1422, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27390:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27367:53:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1432, + "nodeType": "ExpressionStatement", + "src": "27367:53:0" + } + }, + "id": 1446, + "nodeType": "IfStatement", + "src": "27102:505:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1407, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27149:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27149:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1410, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "27172:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27149:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "27149:35:0" + } + }, + "id": 1447, + "nodeType": "IfStatement", + "src": "26898:709:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1389, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26953:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "26953:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1396, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26992:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26984:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26976:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26976:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26976:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26953:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1400, + "nodeType": "ExpressionStatement", + "src": "26953:45:0" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1372, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26539:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26543:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26539:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1464, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1368, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26532:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26536:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26532:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1371, + "nodeType": "ExpressionStatement", + "src": "26532:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "26556:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1376, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26556:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1378, + "nodeType": "ExpressionStatement", + "src": "26556:3:0" + }, + "nodeType": "ForStatement", + "src": "26527:1295:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1465, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27841:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "functionReturnParameters": 1187, + "id": 1466, + "nodeType": "Return", + "src": "27834:11:0" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "23083:503:0", + "text": " @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\n @param _conversionPath conversion path, see conversion path format above\n @param _beneficiary wallet to receive the conversion result\n @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\n @return cached conversion data to be ingested later on by the conversion flow" + }, + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConversionData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "_conversionPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23622:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23622:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1177, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1180, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23656:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23656:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1182, + "mutability": "mutable", + "name": "_affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23686:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1181, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23686:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23621:91:0" + }, + "returnParameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23735:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1184, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23735:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1185, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23735:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23734:25:0" + }, + "scope": 1976, + "src": "23592:4261:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1510, + "nodeType": "Block", + "src": "28406:261:0", + "statements": [ + { + "assignments": [ + 1479 + ], + "declarations": [ + { + "constant": false, + "id": 1479, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1510, + "src": "28417:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "28462:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28454:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1486, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28469:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1480, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 21097, + "src": "28437:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28437:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28417:61:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1489, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28493:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1490, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28505:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28493:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1509, + "nodeType": "IfStatement", + "src": "28489:171:0", + "trueBody": { + "id": 1508, + "nodeType": "Block", + "src": "28513:147:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1492, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28532:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28544:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28532:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1501, + "nodeType": "IfStatement", + "src": "28528:68:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28576:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1497, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28584:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28594:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1495, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28564:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28564:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "28564:32:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1503, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28623:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1504, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28631:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1505, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1502, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28611:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28611:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1507, + "nodeType": "ExpressionStatement", + "src": "28611:37:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "27861:452:0", + "text": " @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\n Note that we use the non standard erc-20 interface in which `approve` has no return value so that\n this function will work for both standard and non standard tokens\n @param _token token to check the allowance in\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 1511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ensureAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28344:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1470, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28344:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1473, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28364:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28364:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1475, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28343:54:0" + }, + "returnParameters": { + "id": 1477, + "nodeType": "ParameterList", + "parameters": [], + "src": "28406:0:0" + }, + "scope": 1976, + "src": "28319:348:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1551, + "nodeType": "Block", + "src": "28848:352:0", + "statements": [ + { + "assignments": [ + 1519 + ], + "declarations": [ + { + "constant": false, + "id": 1519, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1551, + "src": "28859:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28859:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1523, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1520, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "28882:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "28882:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28882:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28859:55:0" + }, + { + "body": { + "id": 1547, + "nodeType": "Block", + "src": "28968:186:0", + "statements": [ + { + "assignments": [ + 1535 + ], + "declarations": [ + { + "constant": false, + "id": 1535, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1547, + "src": "28983:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1534, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28983:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "29044:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "29017:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "29017:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29017:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28983:63:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1541, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29065:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1543, + "indexExpression": { + "argumentTypes": null, + "id": 1542, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29077:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1546, + "nodeType": "IfStatement", + "src": "29061:81:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1544, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29123:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1545, + "nodeType": "Return", + "src": "29116:26:0" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1528, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28945:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1529, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1519, + "src": "28949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1548, + "initializationExpression": { + "assignments": [ + 1525 + ], + "declarations": [ + { + "constant": false, + "id": 1525, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1548, + "src": "28930:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1527, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28942:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28930:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28963:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1531, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28963:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1533, + "nodeType": "ExpressionStatement", + "src": "28963:3:0" + }, + "nodeType": "ForStatement", + "src": "28925:229:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29173:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1550, + "nodeType": "Return", + "src": "29166:26:0" + } + ] + }, + "documentation": null, + "id": 1552, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterEtherTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1514, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1513, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28790:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1512, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "28790:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28789:23:0" + }, + "returnParameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1516, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28835:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1515, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28835:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28834:13:0" + }, + "scope": 1976, + "src": "28751:449:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1578, + "nodeType": "Block", + "src": "29474:224:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "29489:20:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1561, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29490:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1563, + "indexExpression": { + "argumentTypes": null, + "id": 1562, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29490:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1567, + "nodeType": "IfStatement", + "src": "29485:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1565, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29531:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1566, + "nodeType": "Return", + "src": "29524:13:0" + } + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29577:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1568, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "29554:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29554:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1573, + "nodeType": "IfStatement", + "src": "29550:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1571, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29610:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1572, + "nodeType": "Return", + "src": "29603:26:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1574, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "29649:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29649:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1577, + "nodeType": "Return", + "src": "29642:48:0" + } + ] + }, + "documentation": null, + "id": 1579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1554, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29396:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1553, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29396:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29419:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1555, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29419:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29395:43:0" + }, + "returnParameters": { + "id": 1560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1559, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29461:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1558, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29461:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29460:13:0" + }, + "scope": 1976, + "src": "29362:336:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 1587, + "mutability": "constant", + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "29706:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1580, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "67657452657475726e28616464726573732c616464726573732c75696e7432353629", + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29774:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + }, + "value": "getReturn(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + } + ], + "id": 1583, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "29764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29764:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1581, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29757:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1663, + "nodeType": "Block", + "src": "30036:523:0", + "statements": [ + { + "assignments": [ + 1603 + ], + "declarations": [ + { + "constant": false, + "id": 1603, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30047:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1602, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1606, + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "30090:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 1607, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "30116:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1608, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "30130:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "30144:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1604, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30067:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30067:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30067:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30047:105:0" + }, + { + "assignments": [ + 1613, + 1615 + ], + "declarations": [ + { + "constant": false, + "id": 1613, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30164:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1612, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30164:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1615, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30178:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1614, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1623, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "30231:4:0", + "typeDescriptions": { + "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": 1618, + "name": "_dest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "30213:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30205:25:0", + "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": 1622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30163:73:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1624, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1613, + "src": "30253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1658, + "nodeType": "IfStatement", + "src": "30249:277:0", + "trueBody": { + "id": 1657, + "nodeType": "Block", + "src": "30262:264:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1625, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30281:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30302:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "30281:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1640, + "nodeType": "IfStatement", + "src": "30277:113:0", + "trueBody": { + "id": 1639, + "nodeType": "Block", + "src": "30306:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1631, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30343:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + { + "argumentTypes": null, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1636, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30355:18:0", + "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": 1629, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30332:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30332:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30332:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 1601, + "id": 1638, + "nodeType": "Return", + "src": "30325:49:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1641, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30410:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30410:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30431:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "30410:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1656, + "nodeType": "IfStatement", + "src": "30406:109:0", + "trueBody": { + "id": 1655, + "nodeType": "Block", + "src": "30435:80:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1647, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30473:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1648, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1650, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30485:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 1645, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30462:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30462:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30462:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30497:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30461:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1654, + "nodeType": "Return", + "src": "30454:45:0" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30546:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30549:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$", + "typeString": "tuple(int_const 0,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1662, + "nodeType": "Return", + "src": "30538:13:0" + } + ] + }, + "documentation": null, + "id": 1664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "mutability": "mutable", + "name": "_dest", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29908:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1588, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29908:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29926:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1590, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29952:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1592, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29978:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29978:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29907:87:0" + }, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1598, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30018:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1600, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30027:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30027:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30017:18:0" + }, + "scope": 1976, + "src": "29889:670:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 1672, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "30567:93:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1665, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30567:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 1669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30641:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 1668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "30631:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30631:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1666, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30624:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1718, + "nodeType": "Block", + "src": "30917:336:0", + "statements": [ + { + "assignments": [ + 1680 + ], + "declarations": [ + { + "constant": false, + "id": 1680, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "30928:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1679, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30928:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1685, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1683, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30971:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 1681, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30948:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30948:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30948:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30928:74:0" + }, + { + "assignments": [ + 1687, + 1689 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31014:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1686, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31014:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1689, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31028:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1688, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31028:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1697, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "31099:4:0", + "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": 1692, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "31063:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31055:30:0", + "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": 1696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31092:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "31055:43:0", + "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": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31013:91:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1700, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "31121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1701, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31132:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31153:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "31132:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31121:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1715, + "nodeType": "IfStatement", + "src": "31117:104:0", + "trueBody": { + "id": 1714, + "nodeType": "Block", + "src": "31157:64:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1708, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31190:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 1709, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1711, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31202:6:0", + "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": 1706, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "31179:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31179:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31179:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1678, + "id": 1713, + "nodeType": "Return", + "src": "31172:37:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31240:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1678, + "id": 1717, + "nodeType": "Return", + "src": "31233:12:0" + } + ] + }, + "documentation": null, + "id": 1719, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1673, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "30865:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30864:23:0" + }, + "returnParameters": { + "id": 1678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30911:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1676, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30911:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30910:6:0" + }, + "scope": 1976, + "src": "30833:420:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "31432:57:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1733, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "31462:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1734, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "31469:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1732, + "name": "rateByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "31451:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256) view returns (uint256)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31451:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31479:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1737, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31450:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1731, + "id": 1738, + "nodeType": "Return", + "src": "31443:38:0" + } + ] + }, + "documentation": { + "id": 1720, + "nodeType": "StructuredDocumentation", + "src": "31261:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0c8496cc", + "id": 1740, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1726, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31352:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31352:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1722, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31352:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1725, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31376:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1724, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31351:41:0" + }, + "returnParameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1728, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31414:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1727, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31414:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1730, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31423:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31423:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31413:18:0" + }, + "scope": 1976, + "src": "31327:162:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1768, + "nodeType": "Block", + "src": "31674:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1754, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1744, + "src": "31706:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1755, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1746, + "src": "31713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1756, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "31722:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31742:1:0", + "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": 1758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31734:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31754:1:0", + "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": 1762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1761, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31746:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31758:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1753, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "31692:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31692:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1752, + "id": 1767, + "nodeType": "Return", + "src": "31685:75:0" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "31497:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f3898a97", + "id": 1769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1744, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31580:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31580:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1743, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31580:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1746, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31604:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1745, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31604:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1748, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31621:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31579:61:0" + }, + "returnParameters": { + "id": 1752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31665:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1750, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31664:9:0" + }, + "scope": 1976, + "src": "31563:205:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1798, + "nodeType": "Block", + "src": "32088:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "32120:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "32127:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1789, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1777, + "src": "32136:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32156:1:0", + "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": 1791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32148:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1794, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "32160:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1795, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "32179:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1786, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32106:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32106:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1785, + "id": 1797, + "nodeType": "Return", + "src": "32099:94:0" + } + ] + }, + "documentation": { + "id": 1770, + "nodeType": "StructuredDocumentation", + "src": "31776:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "569706eb", + "id": 1799, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1773, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31870:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31870:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1772, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31870:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1775, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31903:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31929:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1776, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31929:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1779, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31958:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31958:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1781, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31994:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31859:163:0" + }, + "returnParameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1784, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "32074:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32073:9:0" + }, + "scope": 1976, + "src": "31842:359:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1826, + "nodeType": "Block", + "src": "32419:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "32451:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1816, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1805, + "src": "32458:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1817, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1807, + "src": "32467:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1818, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "32479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32501:1:0", + "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": 1820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1819, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32493:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32505:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1814, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32437:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32437:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1813, + "id": 1825, + "nodeType": "Return", + "src": "32430:77:0" + } + ] + }, + "documentation": { + "id": 1800, + "nodeType": "StructuredDocumentation", + "src": "32209:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c98fefed", + "id": 1827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32295:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32295:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1802, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32295:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1805, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32319:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1809, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32356:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1808, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32356:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:91:0" + }, + "returnParameters": { + "id": 1813, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1812, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32410:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32409:9:0" + }, + "scope": 1976, + "src": "32275:240:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1858, + "nodeType": "Block", + "src": "32914:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1850, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1831, + "src": "32946:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1851, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "32953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1852, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32962:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1853, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "32974:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1854, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "32988:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1855, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "33007:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1849, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32932:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32932:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1848, + "id": 1857, + "nodeType": "Return", + "src": "32925:96:0" + } + ] + }, + "documentation": { + "id": 1828, + "nodeType": "StructuredDocumentation", + "src": "32523:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "ab6214ce", + "id": 1859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1844, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1845, + "modifierName": { + "argumentTypes": null, + "id": 1843, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "32854:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "32854:27:0" + } + ], + "name": "convertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32620:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1829, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32620:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1830, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32620:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32653:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32653:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1835, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32679:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32708:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32708:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32747:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32747:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32783:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32609:202:0" + }, + "returnParameters": { + "id": 1848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32900:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32900:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32899:9:0" + }, + "scope": 1976, + "src": "32589:440:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1887, + "nodeType": "Block", + "src": "33214:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1863, + "src": "33246:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1865, + "src": "33253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1875, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1867, + "src": "33262:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33282:1:0", + "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": 1877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33274:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33294:1:0", + "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": 1881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33286:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33298:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1872, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33232:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1871, + "id": 1886, + "nodeType": "Return", + "src": "33225:75:0" + } + ] + }, + "documentation": { + "id": 1860, + "nodeType": "StructuredDocumentation", + "src": "33037:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c7ba24bc", + "id": 1888, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1863, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33128:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1861, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33128:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1862, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33128:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1867, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33169:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33169:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33127:61:0" + }, + "returnParameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33205:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33204:9:0" + }, + "scope": 1976, + "src": "33103:205:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1917, + "nodeType": "Block", + "src": "33619:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1906, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "33651:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1907, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1894, + "src": "33658:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1896, + "src": "33667:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33687:1:0", + "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": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1909, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33679:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1913, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1898, + "src": "33691:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1914, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "33710:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1905, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33637:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33637:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1904, + "id": 1916, + "nodeType": "Return", + "src": "33630:94:0" + } + ] + }, + "documentation": { + "id": 1889, + "nodeType": "StructuredDocumentation", + "src": "33316:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "e57738e5", + "id": 1918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1892, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33418:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33418:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1891, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33418:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33451:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33451:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1896, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33477:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1898, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33506:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33506:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1900, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33542:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33542:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33407:163:0" + }, + "returnParameters": { + "id": 1904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33605:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33605:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33604:9:0" + }, + "scope": 1976, + "src": "33382:350:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1945, + "nodeType": "Block", + "src": "33950:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1934, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1922, + "src": "33982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1935, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1924, + "src": "33989:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1936, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "33998:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1937, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1928, + "src": "34010:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34032:1:0", + "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": 1939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34024:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34036:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1933, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33968:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1932, + "id": 1944, + "nodeType": "Return", + "src": "33961:77:0" + } + ] + }, + "documentation": { + "id": 1919, + "nodeType": "StructuredDocumentation", + "src": "33740:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "b1e9932b", + "id": 1946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33834:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1921, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1924, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1926, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33875:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33875:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1928, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33895:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33895:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33833:91:0" + }, + "returnParameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33941:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33941:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33940:9:0" + }, + "scope": 1976, + "src": "33806:240:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1974, + "nodeType": "Block", + "src": "34399:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "34431:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1967, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "34438:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1968, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "34447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1969, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1956, + "src": "34459:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1970, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "34473:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1971, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "34492:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1965, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "34417:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34417:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1964, + "id": 1973, + "nodeType": "Return", + "src": "34410:96:0" + } + ] + }, + "documentation": { + "id": 1947, + "nodeType": "StructuredDocumentation", + "src": "34054:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "2978c10e", + "id": 1975, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34159:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34159:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1949, + "length": null, + "nodeType": "ArrayTypeName", + "src": "34159:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1952, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34192:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34192:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34218:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34218:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1956, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34247:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34247:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1958, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34286:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34286:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1960, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34322:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34322:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34148:202:0" + }, + "returnParameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34384:9:0" + }, + "scope": 1976, + "src": "34120:394:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1977, + "src": "1956:32561:0" + } + ], + "src": "52:34467:0" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "exportedSymbols": { + "BancorNetwork": [ + 1976 + ], + "ILegacyConverter": [ + 26 + ] + }, + "id": 1977, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:0" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 2547, + "src": "77:37:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13341, + "src": "116:47:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13350, + "src": "165:53:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./converter/interfaces/IBancorFormula.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13178, + "src": "220:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21720, + "src": "273:46:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "./utility/ReentrancyGuard.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22243, + "src": "321:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "./utility/TokenHolder.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22576, + "src": "362:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./utility/SafeMath.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22355, + "src": "399:32:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./token/interfaces/IEtherToken.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21154, + "src": "433:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./token/interfaces/ISmartToken.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21183, + "src": "479:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./bancorx/interfaces/IBancorX.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 3552, + "src": "525:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 26, + "linearizedBaseContracts": [ + 26 + ], + "name": "ILegacyConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e5144eb", + "id": 25, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "change", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "683:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "683:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "709:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "709:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "735:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "752:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "682:89:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "790:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "789:9:0" + }, + "scope": 26, + "src": "667:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1977, + "src": "633:169:0" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 28, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1982:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 29, + "nodeType": "InheritanceSpecifier", + "src": "1982:11:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 30, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1995:22:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 31, + "nodeType": "InheritanceSpecifier", + "src": "1995:22:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 32, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "2019:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 33, + "nodeType": "InheritanceSpecifier", + "src": "2019:15:0" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 27, + "nodeType": "StructuredDocumentation", + "src": "806:1148:0", + "text": " @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\n It also allows for the conversion of any token in the Bancor Network to any other token in a single\n transaction by providing a conversion path.\n A note on Conversion Path: Conversion path is a data structure that is used when converting a token\n to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\n converter and might require multiple 'hops'.\n The path defines which converters should be used and what kind of conversion should be done in each step.\n The path format doesn't include complex structure; instead, it is represented by a single array\n in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\n In addition, the first element is always the source token.\n The converter anchor is only used as a pointer to a converter (since converter addresses are more\n likely to change as opposed to anchor addresses).\n Format:\n [source token, converter anchor, target token, converter anchor, target token...]" + }, + "fullyImplemented": true, + "id": 1976, + "linearizedBaseContracts": [ + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "BancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 36, + "libraryName": { + "contractScope": null, + "id": 34, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "2048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "2042:27:0", + "typeName": { + "id": 35, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 39, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2077:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 37, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2077:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2119:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 44, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2133:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 40, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2133:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2196:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 41, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2184:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "canonicalName": "BancorNetwork.ConversionStep", + "id": 59, + "members": [ + { + "constant": false, + "id": 46, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2281:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 45, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2312:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2312:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 50, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2346:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 49, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2346:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 52, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2380:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 51, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2380:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2414:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 56, + "mutability": "mutable", + "name": "isV28OrHigherConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2452:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 55, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2452:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 58, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2490:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 57, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2490:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "ConversionStep", + "nodeType": "StructDefinition", + "scope": 1976, + "src": "2248:274:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5d732ff2", + "id": 62, + "mutability": "mutable", + "name": "maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2530:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2530:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3330303030", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2563:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30000_by_1", + "typeString": "int_const 30000" + }, + "value": "30000" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8077ccf7", + "id": 66, + "mutability": "mutable", + "name": "etherTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2606:48:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "typeName": { + "id": 65, + "keyType": { + "contractScope": null, + "id": 63, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2615:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2606:29:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 67, + "nodeType": "StructuredDocumentation", + "src": "2703:441:0", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _smartToken anchor governed by the converter\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _fromAmount amount converted, in the source token\n @param _toAmount amount returned, minus conversion fee\n @param _trader wallet that initiated the trade" + }, + "id": 81, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 80, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 69, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3177:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 68, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3177:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3224:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 70, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3224:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 73, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3265:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 72, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3265:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "indexed": false, + "mutability": "mutable", + "name": "_fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3304:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 74, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3304:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 77, + "indexed": false, + "mutability": "mutable", + "name": "_toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3334:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 79, + "indexed": false, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3362:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 78, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3362:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3166:218:0" + }, + "src": "3150:235:0" + }, + { + "body": { + "id": 96, + "nodeType": "Block", + "src": "3625:58:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "3636:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 92, + "indexExpression": { + "argumentTypes": null, + "id": 91, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "3648:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3636:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3636:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 95, + "nodeType": "ExpressionStatement", + "src": "3636:39:0" + } + ] + }, + "documentation": { + "id": 82, + "nodeType": "StructuredDocumentation", + "src": "3393:144:0", + "text": " @dev initializes a new BancorNetwork instance\n @param _registry address of a contract registry contract" + }, + "id": 97, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "3607:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 88, + "modifierName": { + "argumentTypes": null, + "id": 86, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3584:22:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3584:33:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 97, + "src": "3555:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 83, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3555:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3554:29:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "3625:0:0" + }, + "scope": 1976, + "src": "3543:140:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "3935:136:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 106, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "3954:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 107, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3974:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3954:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3990:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3946:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "3946:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "4029:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "4047:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4029:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "4029:34:0" + } + ] + }, + "documentation": { + "id": 98, + "nodeType": "StructuredDocumentation", + "src": "3691:144:0", + "text": " @dev allows the owner to update the maximum affiliate-fee\n @param _maxAffiliateFee maximum affiliate-fee" + }, + "functionSelector": "f3bc7d2a", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 103, + "modifierName": { + "argumentTypes": null, + "id": 102, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3920:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3920:9:0" + } + ], + "name": "setMaxAffiliateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 100, + "mutability": "mutable", + "name": "_maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 117, + "src": "3869:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3868:26:0" + }, + "returnParameters": { + "id": 104, + "nodeType": "ParameterList", + "parameters": [], + "src": "3935:0:0" + }, + "scope": 1976, + "src": "3841:230:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "4474:50:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 139, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "4485:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 141, + "indexExpression": { + "argumentTypes": null, + "id": 140, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4497:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4485:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 142, + "name": "_register", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "4507:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4485:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 144, + "nodeType": "ExpressionStatement", + "src": "4485:31:0" + } + ] + }, + "documentation": { + "id": 118, + "nodeType": "StructuredDocumentation", + "src": "4079:212:0", + "text": " @dev allows the owner to register/unregister ether tokens\n @param _token ether token contract address\n @param _register true to register, false to unregister" + }, + "functionSelector": "02ef521e", + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 125, + "modifierName": { + "argumentTypes": null, + "id": 124, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "4386:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4386:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 129, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4418:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 131, + "modifierName": { + "argumentTypes": null, + "id": 126, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "4405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4405:29:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 135, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 133, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4452:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 137, + "modifierName": { + "argumentTypes": null, + "id": 132, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "4444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4444:24:0" + } + ], + "name": "registerEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4325:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 119, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "4325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 122, + "mutability": "mutable", + "name": "_register", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4345:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 121, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4324:36:0" + }, + "returnParameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4474:0:0" + }, + "scope": 1976, + "src": "4297:227:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 171, + "nodeType": "Block", + "src": "5021:175:0", + "statements": [ + { + "assignments": [ + 158 + ], + "declarations": [ + { + "constant": false, + "id": 158, + "mutability": "mutable", + "name": "pathFinder", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 171, + "src": "5032:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + }, + "typeName": { + "contractScope": null, + "id": 157, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "5032:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 164, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "name": "CONVERSION_PATH_FINDER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21539, + "src": "5099:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 160, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5089:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5089:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 159, + "name": "IConversionPathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2546, + "src": "5067:21:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConversionPathFinder_$2546_$", + "typeString": "type(contract IConversionPathFinder)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5067:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5032:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "5161:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 168, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "5175:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 165, + "name": "pathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "5141:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPath", + "nodeType": "MemberAccess", + "referencedDeclaration": 2545, + "src": "5141:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 156, + "id": 170, + "nodeType": "Return", + "src": "5134:54:0" + } + ] + }, + "documentation": { + "id": 147, + "nodeType": "StructuredDocumentation", + "src": "4532:368:0", + "text": " @dev returns the conversion path between two tokens in the network\n note that this method is quite expensive in terms of gas and should generally be called off-chain\n @param _sourceToken source token address\n @param _targetToken target token address\n @return conversion path between the two tokens" + }, + "functionSelector": "d734fa19", + "id": 172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "conversionPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4930:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 148, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4930:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4956:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 150, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4956:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:52:0" + }, + "returnParameters": { + "id": 156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 155, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "5003:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 154, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5003:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5002:18:0" + }, + "scope": 1976, + "src": "4906:290:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "5682:2762:0", + "statements": [ + { + "assignments": [ + 184 + ], + "declarations": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5693:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 185, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5693:14:0" + }, + { + "assignments": [ + 187 + ], + "declarations": [ + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5718:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5718:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 188, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5718:11:0" + }, + { + "assignments": [ + 190 + ], + "declarations": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5740:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5740:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5740:14:0" + }, + { + "assignments": [ + 193 + ], + "declarations": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5765:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5765:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 194, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5765:15:0" + }, + { + "assignments": [ + 196 + ], + "declarations": [ + { + "constant": false, + "id": 196, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5791:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 195, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5791:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 197, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5791:13:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5815:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 198, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5815:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5815:20:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5846:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 201, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "5846:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 208, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 205, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 204, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 203, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5871:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5846:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "5925:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "5934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5925:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 212, + "nodeType": "ExpressionStatement", + "src": "5925:16:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6034:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6049:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6034:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6054:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6054:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6054:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6074:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6054:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6034:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "6026:70:0" + }, + { + "body": { + "id": 457, + "nodeType": "Block", + "src": "6200:2211:0", + "statements": [ + { + "assignments": [ + 241 + ], + "declarations": [ + { + "constant": false, + "id": 241, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6215:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 249, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 243, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6253:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 244, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6259:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6263:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6253:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 242, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6241:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6241:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6215:51:0" + }, + { + "assignments": [ + 251 + ], + "declarations": [ + { + "constant": false, + "id": 251, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6281:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6281:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 257, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 252, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6298:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 256, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6304:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6308:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6304:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6298:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6281:29:0" + }, + { + "assignments": [ + 259 + ], + "declarations": [ + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6325:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 258, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 265, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 261, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6363:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 263, + "indexExpression": { + "argumentTypes": null, + "id": 262, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6363:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 260, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6325:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6389:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6420:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "6420:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6412:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6412:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6412:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 267, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "6401:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "6389:65:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 278, + "nodeType": "ExpressionStatement", + "src": "6389:65:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 279, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6510:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 281, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6549:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 282, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6560:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 280, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6524:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6524:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6510:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 285, + "nodeType": "ExpressionStatement", + "src": "6510:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 286, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6587:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 288, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6626:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 289, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6637:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 287, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6601:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6601:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6587:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "6587:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 295, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6678:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6670:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 370, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7480:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7472:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 372, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7496:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7472:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 454, + "nodeType": "Block", + "src": "8267:133:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 443, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 444, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8323:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 445, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "8314:13:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8340:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 448, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "8351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 449, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "8364:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 450, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8377:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 446, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "8330:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8330:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "8314:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 453, + "nodeType": "ExpressionStatement", + "src": "8314:70:0" + } + ] + }, + "id": 455, + "nodeType": "IfStatement", + "src": "7468:932:0", + "trueBody": { + "id": 442, + "nodeType": "Block", + "src": "7504:744:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 374, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7616:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7620:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7616:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 377, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7625:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 378, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "7635:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 382, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 379, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7641:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7645:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7641:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7635:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7625:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7616:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 393, + "nodeType": "IfStatement", + "src": "7612:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 385, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7670:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7691:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 386, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "7679:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "7679:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7670:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "7670:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 394, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7789:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 397, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7829:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 395, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7799:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "7799:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7799:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7789:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 400, + "nodeType": "ExpressionStatement", + "src": "7789:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 401, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7863:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 402, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7860:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 405, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7900:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 403, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7879:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7879:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7879:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7860:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "7860:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7931:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7965:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 413, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7973:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 414, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 415, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7990:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7940:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7940:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7940:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7931:66:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 418, + "nodeType": "ExpressionStatement", + "src": "7931:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 419, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8016:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 427, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "8064:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8033:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8033:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8033:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 420, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8022:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "8022:10:0", + "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": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "8022:41:0", + "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": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8016:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 430, + "nodeType": "ExpressionStatement", + "src": "8016:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 431, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8098:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 432, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8098:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 434, + "nodeType": "ExpressionStatement", + "src": "8098:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 435, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 438, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8225:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 436, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8214:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8214:10:0", + "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": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8214:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8205:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 441, + "nodeType": "ExpressionStatement", + "src": "8205:27:0" + } + ] + } + }, + "id": 456, + "nodeType": "IfStatement", + "src": "6666:1734:0", + "trueBody": { + "id": 367, + "nodeType": "Block", + "src": "6702:747:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 299, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6813:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6813:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6822:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 303, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 304, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6838:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6842:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6838:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6832:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6822:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6813:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 318, + "nodeType": "IfStatement", + "src": "6809:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 310, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "6867:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 312, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6888:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 311, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6867:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 317, + "nodeType": "ExpressionStatement", + "src": "6867:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "6986:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 322, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 320, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6996:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "6996:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6996:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 325, + "nodeType": "ExpressionStatement", + "src": "6986:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 326, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 327, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7057:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 330, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7097:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 328, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7076:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7076:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7076:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7057:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 333, + "nodeType": "ExpressionStatement", + "src": "7057:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7128:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 337, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7166:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 338, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7174:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 339, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7191:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7137:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "7137:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7128:70:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "7128:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 344, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7217:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 352, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "7265:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 347, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "7234:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7234:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "7223:10:0", + "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": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "7223:41:0", + "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": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7217:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 355, + "nodeType": "ExpressionStatement", + "src": "7217:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 356, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7299:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 357, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7309:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7299:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ExpressionStatement", + "src": "7299:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7406:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7415:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "7415:10:0", + "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": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7406:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "7406:27:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6174:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6178:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6174:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 458, + "initializationExpression": { + "assignments": [ + 229 + ], + "declarations": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 458, + "src": "6159:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6159:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 231, + "initialValue": { + "argumentTypes": null, + "hexValue": "32", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6159:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 236, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6192:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "6192:6:0" + }, + "nodeType": "ForStatement", + "src": "6154:2257:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 459, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8430:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 182, + "id": 460, + "nodeType": "Return", + "src": "8423:13:0" + } + ] + }, + "documentation": { + "id": 173, + "nodeType": "StructuredDocumentation", + "src": "5204:381:0", + "text": " @dev returns the expected target amount of converting a given amount on a given path\n note that there is no support for circular paths\n @param _path conversion path (see conversion path format above)\n @param _amount amount of _path[0] tokens received from the sender\n @return expected target amount" + }, + "functionSelector": "7f9c0ecd", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rateByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 176, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5611:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5611:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 175, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5611:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5635:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5610:41:0" + }, + "returnParameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5673:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5673:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5672:9:0" + }, + "scope": 1976, + "src": "5591:2853:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 597, + "nodeType": "Block", + "src": "9948:1329:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10073:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10073:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10088:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10073:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 491, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10093:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10093:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10108:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10093:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10093:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10073:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10065:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10065:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 500, + "nodeType": "ExpressionStatement", + "src": "10065:70:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 503, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10257:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 505, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10263:1:0", + "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": "10257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 502, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "10245:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 508, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10285:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10291:1:0", + "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": "10285:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 507, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "10268:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 512, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "10296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 501, + "name": "handleSourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1110, + "src": "10227:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor,uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10227:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 514, + "nodeType": "ExpressionStatement", + "src": "10227:77:0" + }, + { + "assignments": [ + 516 + ], + "declarations": [ + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10363:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 515, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10363:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10390:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "10363:32:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 521, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "10418:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10410:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10448:1:0", + "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": 524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10440:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10410:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 551, + "nodeType": "Block", + "src": "10550:159:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10573:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10577:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10573:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 540, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10594:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "10611:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10594:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10573:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10628:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10565:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "10565:91:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 547, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "10671:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10671:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 550, + "nodeType": "ExpressionStatement", + "src": "10671:26:0" + } + ] + }, + "id": 552, + "nodeType": "IfStatement", + "src": "10406:303:0", + "trueBody": { + "id": 535, + "nodeType": "Block", + "src": "10452:83:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 529, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10475:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10492:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10475:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10495:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 528, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10467:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10467:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10467:56:0" + } + ] + } + }, + { + "assignments": [ + 554 + ], + "declarations": [ + { + "constant": false, + "id": 554, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10761:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10761:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 557, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 555, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10791:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:40:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 558, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10816:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10840:1:0", + "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": 560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10832:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10816:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 568, + "nodeType": "IfStatement", + "src": "10812:71:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 564, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "10857:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 565, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10871:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10857:26:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 567, + "nodeType": "ExpressionStatement", + "src": "10857:26:0" + } + }, + { + "assignments": [ + 572 + ], + "declarations": [ + { + "constant": false, + "id": 572, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10945:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 570, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "10945:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 578, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10997:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "11017:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 573, + "name": "createConversionData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "10976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_address_payable_$_t_bool_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address payable,bool) view returns (struct BancorNetwork.ConversionStep memory[] memory)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10976:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10945:92:0" + }, + { + "assignments": [ + 580 + ], + "declarations": [ + { + "constant": false, + "id": 580, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "11048:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 588, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11078:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "11084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "11093:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 585, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "11105:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 586, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "11124:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 581, + "name": "doConversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "11065:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,uint256,address,uint256) returns (uint256)" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11048:90:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 590, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11217:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 591, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 592, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11231:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 589, + "name": "handleTargetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1174, + "src": "11199:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,address payable)" + } + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11199:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 594, + "nodeType": "ExpressionStatement", + "src": "11199:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 595, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11263:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 485, + "id": 596, + "nodeType": "Return", + "src": "11256:13:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8452:1150:0", + "text": " @dev converts the token to any other token in the bancor network by following\n a predefined conversion path and transfers the result tokens to a target account\n affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\n @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\n @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\n @return amount of tokens received from the conversion" + }, + "functionSelector": "b77d239b", + "id": 598, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 479, + "modifierName": { + "argumentTypes": null, + "id": 478, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9869:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "9904:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 482, + "modifierName": { + "argumentTypes": null, + "id": 480, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9888:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9888:27:0" + } + ], + "name": "convertByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 466, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9641:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9641:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 465, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9674:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 470, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9700:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9700:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 472, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9729:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9729:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 474, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9768:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 473, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9768:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 476, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9804:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9804:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9630:196:0" + }, + "returnParameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9934:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9933:9:0" + }, + "scope": 1976, + "src": "9608:1669:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 631, + "nodeType": "Block", + "src": "12548:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 618, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "12576:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 619, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 604, + "src": "12583:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 620, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "12604:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "12623:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 612, + "src": "12639:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:1:0", + "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": 625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12654:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 617, + "name": "xConvert2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "12566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,bytes32,bytes32,uint256,address,uint256) returns (uint256)" + } + }, + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12566:102:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 616, + "id": 630, + "nodeType": "Return", + "src": "12559:109:0" + } + ] + }, + "documentation": { + "id": 599, + "nodeType": "StructuredDocumentation", + "src": "11285:978:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "c52173de", + "id": 632, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "xConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 602, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12297:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 600, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12297:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 601, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 604, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12330:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 603, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 606, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12356:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 608, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12385:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 607, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12421:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12421:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 612, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12454:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12286:196:0" + }, + "returnParameters": { + "id": 616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 615, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12534:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12533:9:0" + }, + "scope": 1976, + "src": "12269:407:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "14166:739:0", + "statements": [ + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14177:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 658, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14177:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 661, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14215:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 662, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14221:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14221:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14236:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14221:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14215:23:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 660, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14203:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14203:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14177:62:0" + }, + { + "assignments": [ + 670 + ], + "declarations": [ + { + "constant": false, + "id": 670, + "mutability": "mutable", + "name": "bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14250:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 669, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "14250:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 676, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "BANCOR_X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21554, + "src": "14288:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 672, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14278:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14278:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 671, + "name": "IBancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3551, + "src": "14269:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorX_$3551_$", + "typeString": "type(contract IBancorX)" + } + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14269:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14250:48:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 678, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14372:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 681, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "14409:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 680, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14399:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14399:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 679, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14387:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14372:48:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5441524745545f544f4b454e", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14422:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + }, + "value": "ERR_INVALID_TARGET_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + } + ], + "id": 677, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "ExpressionStatement", + "src": "14364:85:0" + }, + { + "assignments": [ + 689 + ], + "declarations": [ + { + "constant": false, + "id": 689, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14511:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 688, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14511:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 704, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 691, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14542:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "14549:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 693, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14558:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14586:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 696, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14578:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14570:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 701, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "14594:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 702, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14613:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 690, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "14528:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14528:99:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14511:116:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 706, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14692:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 709, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + ], + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14705:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 711, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14723:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 705, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14676:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14676:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "14676:54:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "14814:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "14833:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14849:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 720, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "14857:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 714, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3541, + "src": "14796:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14796:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "14796:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 657, + "id": 724, + "nodeType": "Return", + "src": "14884:13:0" + } + ] + }, + "documentation": { + "id": 633, + "nodeType": "StructuredDocumentation", + "src": "12684:1091:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "cb32564e", + "id": 726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 653, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14122:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 654, + "modifierName": { + "argumentTypes": null, + "id": 652, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "14106:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "14106:27:0" + } + ], + "name": "xConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13810:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13810:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 635, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13810:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 638, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13843:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13869:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 642, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13898:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 641, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 644, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13934:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13967:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13999:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13999:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14035:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14035:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13799:264:0" + }, + "returnParameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 656, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14152:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14151:9:0" + }, + "scope": 1976, + "src": "13781:1124:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 777, + "nodeType": "Block", + "src": "16040:423:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 745, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16133:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 747, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16139:1:0", + "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": "16133:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 744, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "16121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16121:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16146:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 3530, + "src": "16146:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16146:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "16121:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f534f555243455f544f4b454e", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16164:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + }, + "value": "ERR_INVALID_SOURCE_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + } + ], + "id": 743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16113:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16113:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 755, + "nodeType": "ExpressionStatement", + "src": "16113:78:0" + }, + { + "assignments": [ + 757 + ], + "declarations": [ + { + "constant": false, + "id": 757, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 777, + "src": "16260:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16260:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 764, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 760, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 734, + "src": "16305:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16320:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16320:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 758, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16277:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getXTransferAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3550, + "src": "16277:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view external returns (uint256)" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16277:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16260:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 766, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16400:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 767, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 757, + "src": "16407:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 768, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "16415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 738, + "src": "16427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:1:0", + "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": 771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 770, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16441:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16453:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 765, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "16386:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16386:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 742, + "id": 776, + "nodeType": "Return", + "src": "16379:76:0" + } + ] + }, + "documentation": { + "id": 727, + "nodeType": "StructuredDocumentation", + "src": "14913:937:0", + "text": " @dev allows a user to convert a token that was sent from another blockchain into any other\n token on the BancorNetwork\n ideally this transaction is created before the previous conversion is even complete, so\n so the input amount isn't known at that point - the amount is actually take from the\n BancorX contract directly by specifying the conversion id\n @param _path conversion path\n @param _bancorX address of the BancorX contract for the source token\n @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received from the conversion" + }, + "functionSelector": "89f9cc61", + "id": 778, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "completeXConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 730, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15885:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15885:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 729, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15885:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 732, + "mutability": "mutable", + "name": "_bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15909:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 731, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "15909:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 734, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15928:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 736, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15951:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 738, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15971:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 737, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15971:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15884:116:0" + }, + "returnParameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "16026:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16025:9:0" + }, + "scope": 1976, + "src": "15856:607:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "17298:2483:0", + "statements": [ + { + "assignments": [ + 796 + ], + "declarations": [ + { + "constant": false, + "id": 796, + "mutability": "mutable", + "name": "toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17309:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 797, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "17309:16:0" + }, + { + "assignments": [ + 799 + ], + "declarations": [ + { + "constant": false, + "id": 799, + "mutability": "mutable", + "name": "fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 801, + "initialValue": { + "argumentTypes": null, + "id": 800, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "17357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17336:28:0" + }, + { + "body": { + "id": 986, + "nodeType": "Block", + "src": "17465:2151:0", + "statements": [ + { + "assignments": [ + 814 + ], + "declarations": [ + { + "constant": false, + "id": 814, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 986, + "src": "17480:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 813, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 818, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17513:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17519:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17480:41:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17574:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "17574:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 855, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 860, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18235:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "18235:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18227:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 857, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "18215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18215:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "18191:61:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 877, + "nodeType": "IfStatement", + "src": "18187:272:0", + "trueBody": { + "id": 876, + "nodeType": "Block", + "src": "18254:205:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18381:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18411:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18411:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18403:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 873, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18432:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 865, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "18365:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18365:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "18365:78:0" + } + ] + } + }, + "id": 878, + "nodeType": "IfStatement", + "src": "17570:889:0", + "trueBody": { + "id": 854, + "nodeType": "Block", + "src": "17607:416:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 821, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17820:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17825:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17820:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17830:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 828, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17836:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17840:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17836:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17830:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "17830:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 832, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17866:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17858:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "17830:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:51:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "17875:34:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 836, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "17876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 837, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 838, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17876:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:89:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 853, + "nodeType": "IfStatement", + "src": "17816:191:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17945:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17945:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 847, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17975:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "17975:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17967:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 850, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "17996:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 842, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "17932:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17932:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "17932:75:0" + } + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18513:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18514:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "18514:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 900, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "18710:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 903, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 901, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18722:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18722:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18710:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 923, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18946:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 927, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18984:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18984:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 929, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19006:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19006:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 931, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19028:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19040:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19040:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 934, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19052:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "19052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 924, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18957:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18957:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18957:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18957:116:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18946:127:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "18946:127:0" + }, + "id": 939, + "nodeType": "IfStatement", + "src": "18706:367:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 904, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18762:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 911, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18820:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18820:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 913, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18842:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 915, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18864:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 916, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18876:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18876:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 918, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "18888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 905, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18773:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18773:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18808:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "18773:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$value", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18773:136:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18762:147:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "18762:147:0" + } + }, + "id": 940, + "nodeType": "IfStatement", + "src": "18509:564:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 882, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18564:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 891, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18628:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18628:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 893, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18650:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18650:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18684:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 886, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18600:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18600:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18592:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 883, + "name": "ILegacyConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "18575:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILegacyConverter_$26_$", + "typeString": "type(contract ILegacyConverter)" + } + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILegacyConverter_$26", + "typeString": "contract ILegacyConverter" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "change", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "18575:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256) external returns (uint256)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:111:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18564:122:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 899, + "nodeType": "ExpressionStatement", + "src": "18564:122:0" + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 941, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19138:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "19138:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 968, + "nodeType": "IfStatement", + "src": "19134:308:0", + "trueBody": { + "id": 967, + "nodeType": "Block", + "src": "19168:274:0", + "statements": [ + { + "assignments": [ + 944 + ], + "declarations": [ + { + "constant": false, + "id": 944, + "mutability": "mutable", + "name": "affiliateAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 967, + "src": "19187:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 950, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "19245:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 947, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "19226:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 945, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19213:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19213:12:0", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19213:31:0", + "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": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19187:73:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 957, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 788, + "src": "19317:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 958, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19336:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 954, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19287:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19287:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 21106, + "src": "19287:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19287:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4645455f5452414e534645525f4641494c4544", + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19354:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + }, + "value": "ERR_FEE_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + } + ], + "id": 953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19279:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19279:101:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 962, + "nodeType": "ExpressionStatement", + "src": "19279:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 963, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19399:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 964, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19411:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19399:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 966, + "nodeType": "ExpressionStatement", + "src": "19399:27:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 970, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19474:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "19474:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 972, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "19491:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 974, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 975, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19513:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 976, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19535:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 977, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19557:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19557:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 969, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "19463:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (contract IConverterAnchor,contract IERC20Token,contract IERC20Token,uint256,uint256,address)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19463:105:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 981, + "nodeType": "EmitStatement", + "src": "19458:110:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19583:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 983, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19596:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19583:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 985, + "nodeType": "ExpressionStatement", + "src": "19583:21:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 806, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17442:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 807, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17446:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17446:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17442:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 987, + "initializationExpression": { + "assignments": [ + 803 + ], + "declarations": [ + { + "constant": false, + "id": 803, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 987, + "src": "17427:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 805, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17439:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17427:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17460:3:0", + "subExpression": { + "argumentTypes": null, + "id": 810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17460:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "17460:3:0" + }, + "nodeType": "ForStatement", + "src": "17422:2194:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 989, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19700:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 786, + "src": "19712:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19700:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19724:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 988, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19692:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 994, + "nodeType": "ExpressionStatement", + "src": "19692:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 995, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19765:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 794, + "id": 996, + "nodeType": "Return", + "src": "19758:15:0" + } + ] + }, + "documentation": { + "id": 779, + "nodeType": "StructuredDocumentation", + "src": "16471:603:0", + "text": " @dev executes the actual conversion by following the conversion path\n @param _data conversion data, see ConversionStep struct above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return amount of tokens received from the conversion" + }, + "id": 998, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17112:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 780, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17112:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 781, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17112:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17178:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17178:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17207:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17207:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17243:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17101:170:0" + }, + "returnParameters": { + "id": 794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17289:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17288:9:0" + }, + "scope": 1976, + "src": "17080:2701:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1109, + "nodeType": "Block", + "src": "20232:1606:0", + "statements": [ + { + "assignments": [ + 1009 + ], + "declarations": [ + { + "constant": false, + "id": 1009, + "mutability": "mutable", + "name": "firstConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20243:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1008, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "20243:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1018, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1013, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1003, + "src": "20290:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "20290:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20282:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20282:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20282:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1010, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "20271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20243:64:0" + }, + { + "assignments": [ + 1020 + ], + "declarations": [ + { + "constant": false, + "id": 1020, + "mutability": "mutable", + "name": "isNewerConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20318:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1024, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1022, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20365:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1021, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "20342:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20342:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20318:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20413:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1055, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "20955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1057, + "indexExpression": { + "argumentTypes": null, + "id": 1056, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "20967:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20955:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1106, + "nodeType": "Block", + "src": "21447:384:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1082, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21605:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1095, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21770:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21784:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21784:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1100, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21804:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21796:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21811:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1094, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21753:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21753:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1104, + "nodeType": "ExpressionStatement", + "src": "21753:66:0" + }, + "id": 1105, + "nodeType": "IfStatement", + "src": "21601:218:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21657:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21671:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21671:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1089, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "21691:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21683:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1091, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1083, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21640:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:76:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "21640:76:0" + } + } + ] + }, + "id": 1107, + "nodeType": "IfStatement", + "src": "20951:880:0", + "trueBody": { + "id": 1081, + "nodeType": "Block", + "src": "20982:420:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21184:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1060, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1064, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21218:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21210:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1066, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21225:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21167:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21167:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1068, + "nodeType": "ExpressionStatement", + "src": "21167:66:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1069, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21303:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1080, + "nodeType": "IfStatement", + "src": "21299:91:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1073, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21358:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21350:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1070, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "21338:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21140, + "src": "21338:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "21338:52:0" + } + } + ] + } + }, + "id": 1108, + "nodeType": "IfStatement", + "src": "20409:1422:0", + "trueBody": { + "id": 1054, + "nodeType": "Block", + "src": "20428:485:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20486:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20486:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1032, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "20499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20486:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20508:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 1029, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20478:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20478:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1036, + "nodeType": "ExpressionStatement", + "src": "20478:56:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20768:17:0", + "subExpression": { + "argumentTypes": null, + "id": 1037, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "20769:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1053, + "nodeType": "IfStatement", + "src": "20764:137:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1043, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20854:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1042, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "20824:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20816:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1039, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "20804:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 21135, + "src": "20804:75:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$", + "typeString": "function () payable external" + } + }, + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20888:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20888:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "20804:95:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$value", + "typeString": "function () payable external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:97:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "20804:97:0" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 999, + "nodeType": "StructuredDocumentation", + "src": "19789:333:0", + "text": " @dev validates msg.value and prepares the conversion source token for the conversion\n @param _sourceToken source token of the first conversion step\n @param _anchor converter anchor of the first conversion step\n @param _amount amount to convert from, in the source token" + }, + "id": 1110, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleSourceToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1001, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20155:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1000, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20181:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1002, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "20181:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1005, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20207:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20207:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20154:69:0" + }, + "returnParameters": { + "id": 1007, + "nodeType": "ParameterList", + "parameters": [], + "src": "20232:0:0" + }, + "scope": 1976, + "src": "20128:1710:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "22295:780:0", + "statements": [ + { + "assignments": [ + 1122 + ], + "declarations": [ + { + "constant": false, + "id": 1122, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22306:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1121, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22306:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1129, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1123, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1128, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1124, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22345:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22345:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22360:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22345:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22339:23:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22306:56:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22444:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "22444:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1134, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "22476:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22468:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22444:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1138, + "nodeType": "IfStatement", + "src": "22440:63:0", + "trueBody": { + "expression": null, + "functionReturnParameters": 1120, + "id": 1137, + "nodeType": "Return", + "src": "22496:7:0" + } + }, + { + "assignments": [ + 1140 + ], + "declarations": [ + { + "constant": false, + "id": 1140, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22515:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1139, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22515:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1143, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1141, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22541:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "22541:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22515:46:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1144, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "22607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1146, + "indexExpression": { + "argumentTypes": null, + "id": 1145, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22619:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22607:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1171, + "nodeType": "Block", + "src": "22993:75:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "23021:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1167, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "23034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1168, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "23048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1165, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "23008:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23008:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1170, + "nodeType": "ExpressionStatement", + "src": "23008:48:0" + } + ] + }, + "id": 1172, + "nodeType": "IfStatement", + "src": "22603:465:0", + "trueBody": { + "id": 1164, + "nodeType": "Block", + "src": "22633:315:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22731:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1148, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "22732:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1147, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "22724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22724:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1152, + "nodeType": "ExpressionStatement", + "src": "22724:40:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1160, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "22914:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1161, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "22928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1156, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22889:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22881:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1153, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "22869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "22869:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1163, + "nodeType": "ExpressionStatement", + "src": "22869:67:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1111, + "nodeType": "StructuredDocumentation", + "src": "21846:330:0", + "text": " @dev handles the conversion target token if the network still holds it at the end of the conversion\n @param _data conversion data, see ConversionStep struct above\n @param _amount conversion target amount\n @param _beneficiary wallet to receive the conversion result" + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTargetToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1114, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22209:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1112, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22209:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1113, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22209:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22240:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1118, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22257:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22257:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22208:78:0" + }, + "returnParameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [], + "src": "22295:0:0" + }, + "scope": 1976, + "src": "22182:893:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1467, + "nodeType": "Block", + "src": "23760:4093:0", + "statements": [ + { + "assignments": [ + 1191 + ], + "declarations": [ + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23771:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1189, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23771:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1190, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23771:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1200, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1195, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "23823:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23823:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23848:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "23823:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "23802:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct BancorNetwork.ConversionStep memory[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1192, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23806:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1193, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23806:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23802:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23771:79:0" + }, + { + "assignments": [ + 1202 + ], + "declarations": [ + { + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "affiliateFeeProcessed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23863:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23863:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1204, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23892:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23863:34:0" + }, + { + "assignments": [ + 1206 + ], + "declarations": [ + { + "constant": false, + "id": 1206, + "mutability": "mutable", + "name": "bntToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23908:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1205, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23908:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1212, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1209, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "23953:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1208, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "23943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23943:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1207, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "23931:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23931:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23908:56:0" + }, + { + "assignments": [ + 1214 + ], + "declarations": [ + { + "constant": false, + "id": 1214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "24060:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1215, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24060:9:0" + }, + { + "body": { + "id": 1303, + "nodeType": "Block", + "src": "24132:1199:0", + "statements": [ + { + "assignments": [ + 1231 + ], + "declarations": [ + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24147:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1230, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24147:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1239, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24190:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24206:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24210:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24206:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24190:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1232, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "24173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24173:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24147:66:0" + }, + { + "assignments": [ + 1241 + ], + "declarations": [ + { + "constant": false, + "id": 1241, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24228:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1240, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "24228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1245, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24270:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "24270:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24270:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24262:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24262:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24262:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1242, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "24251:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24251:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24228:58:0" + }, + { + "assignments": [ + 1252 + ], + "declarations": [ + { + "constant": false, + "id": 1252, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24301:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1251, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24301:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1260, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24339:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1258, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1255, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24355:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24359:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24355:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24339:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1253, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24327:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24327:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24301:61:0" + }, + { + "assignments": [ + 1262 + ], + "declarations": [ + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24455:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1261, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "24455:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1271, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1263, + "name": "_affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "24482:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "24506:22:0", + "subExpression": { + "argumentTypes": null, + "id": 1264, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24507:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1267, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24532:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1268, + "name": "bntToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "24547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "24532:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:73:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24455:100:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1272, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "24574:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1277, + "nodeType": "IfStatement", + "src": "24570:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1273, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24612:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24636:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "24612:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1276, + "nodeType": "ExpressionStatement", + "src": "24612:28:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1278, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "24657:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1282, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1279, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24662:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24662:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24657:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1284, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24758:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 1285, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "24834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1287, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24938:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1289, + "indexExpression": { + "argumentTypes": null, + "id": 1288, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24954:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24938:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1286, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24926:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24989:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25134:1:0", + "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": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25126:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1297, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "25234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1296, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "25211:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25211:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1299, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "25284:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1283, + "name": "ConversionStep", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "24671:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ConversionStep_$59_storage_ptr_$", + "typeString": "type(struct BancorNetwork.ConversionStep storage pointer)" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "anchor", + "converter", + "sourceToken", + "targetToken", + "beneficiary", + "isV28OrHigherConverter", + "processAffiliateFee" + ], + "nodeType": "FunctionCall", + "src": "24671:648:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "24657:662:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "24657:662:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24092:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1221, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24096:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24096:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24096:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24092:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1304, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1216, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24089:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "24085:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24124:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24129:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1229, + "nodeType": "ExpressionStatement", + "src": "24124:6:0" + }, + "nodeType": "ForStatement", + "src": "24080:1251:0" + }, + { + "assignments": [ + 1306 + ], + "declarations": [ + { + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "25393:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1305, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "25393:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1310, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1307, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25426:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1309, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25431:1:0", + "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": "25426:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25393:40:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1311, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "25448:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1314, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1312, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25460:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25448:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1334, + "nodeType": "IfStatement", + "src": "25444:472:0", + "trueBody": { + "id": 1333, + "nodeType": "Block", + "src": "25483:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1315, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25594:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1316, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "25594:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25832:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1327, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "25885:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1326, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "25855:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25855:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25832:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "25832:72:0" + }, + "id": 1332, + "nodeType": "IfStatement", + "src": "25590:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1317, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25644:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "25667:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25644:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1322, + "nodeType": "ExpressionStatement", + "src": "25644:42:0" + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1335, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25954:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1336, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25965:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1341, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1337, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25970:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25984:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25970:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25965:21:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "25954:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "25954:32:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1344, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "26001:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1347, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1345, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26013:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1367, + "nodeType": "IfStatement", + "src": "25997:472:0", + "trueBody": { + "id": 1366, + "nodeType": "Block", + "src": "26036:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1348, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26147:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1356, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26385:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26385:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1360, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26438:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "26438:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1359, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "26408:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26408:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26385:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1364, + "nodeType": "ExpressionStatement", + "src": "26385:72:0" + }, + "id": 1365, + "nodeType": "IfStatement", + "src": "26143:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26197:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1352, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26197:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1353, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "26220:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26197:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1355, + "nodeType": "ExpressionStatement", + "src": "26197:42:0" + } + } + ] + } + }, + { + "body": { + "id": 1463, + "nodeType": "Block", + "src": "26561:1261:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1379, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26576:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1380, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26587:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1382, + "indexExpression": { + "argumentTypes": null, + "id": 1381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "26576:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1384, + "nodeType": "ExpressionStatement", + "src": "26576:18:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1385, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26746:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26746:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1461, + "nodeType": "Block", + "src": "27642:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1449, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27750:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1456, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27789:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27781:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27773:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27773:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27750:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "27750:45:0" + } + ] + }, + "id": 1462, + "nodeType": "IfStatement", + "src": "26742:1069:0", + "trueBody": { + "id": 1448, + "nodeType": "Block", + "src": "26779:844:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1387, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26902:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1388, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "26902:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1401, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27106:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1402, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27111:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27111:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27125:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27111:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1413, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27310:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1417, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1414, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27315:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27319:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27315:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1418, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "27310:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1433, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27562:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27562:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1440, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27601:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27593:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27585:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27585:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27585:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27562:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1444, + "nodeType": "ExpressionStatement", + "src": "27562:45:0" + }, + "id": 1445, + "nodeType": "IfStatement", + "src": "27306:301:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1419, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27367:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27367:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1424, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27398:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1428, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27403:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27407:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27403:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27398:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "27398:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1422, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27390:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27367:53:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1432, + "nodeType": "ExpressionStatement", + "src": "27367:53:0" + } + }, + "id": 1446, + "nodeType": "IfStatement", + "src": "27102:505:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1407, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27149:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27149:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1410, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "27172:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27149:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "27149:35:0" + } + }, + "id": 1447, + "nodeType": "IfStatement", + "src": "26898:709:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1389, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26953:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "26953:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1396, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26992:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26984:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26976:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26976:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26976:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26953:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1400, + "nodeType": "ExpressionStatement", + "src": "26953:45:0" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1372, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26539:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26543:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26539:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1464, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1368, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26532:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26536:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26532:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1371, + "nodeType": "ExpressionStatement", + "src": "26532:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "26556:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1376, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26556:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1378, + "nodeType": "ExpressionStatement", + "src": "26556:3:0" + }, + "nodeType": "ForStatement", + "src": "26527:1295:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1465, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27841:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "functionReturnParameters": 1187, + "id": 1466, + "nodeType": "Return", + "src": "27834:11:0" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "23083:503:0", + "text": " @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\n @param _conversionPath conversion path, see conversion path format above\n @param _beneficiary wallet to receive the conversion result\n @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\n @return cached conversion data to be ingested later on by the conversion flow" + }, + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConversionData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "_conversionPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23622:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23622:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1177, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1180, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23656:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23656:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1182, + "mutability": "mutable", + "name": "_affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23686:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1181, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23686:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23621:91:0" + }, + "returnParameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23735:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1184, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23735:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1185, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23735:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23734:25:0" + }, + "scope": 1976, + "src": "23592:4261:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1510, + "nodeType": "Block", + "src": "28406:261:0", + "statements": [ + { + "assignments": [ + 1479 + ], + "declarations": [ + { + "constant": false, + "id": 1479, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1510, + "src": "28417:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "28462:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28454:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1486, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28469:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1480, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 21097, + "src": "28437:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28437:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28417:61:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1489, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28493:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1490, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28505:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28493:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1509, + "nodeType": "IfStatement", + "src": "28489:171:0", + "trueBody": { + "id": 1508, + "nodeType": "Block", + "src": "28513:147:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1492, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28532:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28544:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28532:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1501, + "nodeType": "IfStatement", + "src": "28528:68:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28576:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1497, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28584:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28594:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1495, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28564:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28564:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "28564:32:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1503, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28623:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1504, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28631:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1505, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1502, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28611:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28611:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1507, + "nodeType": "ExpressionStatement", + "src": "28611:37:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "27861:452:0", + "text": " @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\n Note that we use the non standard erc-20 interface in which `approve` has no return value so that\n this function will work for both standard and non standard tokens\n @param _token token to check the allowance in\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 1511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ensureAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28344:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1470, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28344:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1473, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28364:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28364:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1475, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28343:54:0" + }, + "returnParameters": { + "id": 1477, + "nodeType": "ParameterList", + "parameters": [], + "src": "28406:0:0" + }, + "scope": 1976, + "src": "28319:348:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1551, + "nodeType": "Block", + "src": "28848:352:0", + "statements": [ + { + "assignments": [ + 1519 + ], + "declarations": [ + { + "constant": false, + "id": 1519, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1551, + "src": "28859:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28859:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1523, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1520, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "28882:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "28882:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28882:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28859:55:0" + }, + { + "body": { + "id": 1547, + "nodeType": "Block", + "src": "28968:186:0", + "statements": [ + { + "assignments": [ + 1535 + ], + "declarations": [ + { + "constant": false, + "id": 1535, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1547, + "src": "28983:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1534, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28983:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "29044:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "29017:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "29017:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29017:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28983:63:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1541, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29065:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1543, + "indexExpression": { + "argumentTypes": null, + "id": 1542, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29077:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1546, + "nodeType": "IfStatement", + "src": "29061:81:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1544, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29123:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1545, + "nodeType": "Return", + "src": "29116:26:0" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1528, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28945:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1529, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1519, + "src": "28949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1548, + "initializationExpression": { + "assignments": [ + 1525 + ], + "declarations": [ + { + "constant": false, + "id": 1525, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1548, + "src": "28930:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1527, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28942:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28930:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28963:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1531, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28963:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1533, + "nodeType": "ExpressionStatement", + "src": "28963:3:0" + }, + "nodeType": "ForStatement", + "src": "28925:229:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29173:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1550, + "nodeType": "Return", + "src": "29166:26:0" + } + ] + }, + "documentation": null, + "id": 1552, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterEtherTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1514, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1513, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28790:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1512, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "28790:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28789:23:0" + }, + "returnParameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1516, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28835:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1515, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28835:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28834:13:0" + }, + "scope": 1976, + "src": "28751:449:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1578, + "nodeType": "Block", + "src": "29474:224:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "29489:20:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1561, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29490:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1563, + "indexExpression": { + "argumentTypes": null, + "id": 1562, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29490:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1567, + "nodeType": "IfStatement", + "src": "29485:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1565, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29531:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1566, + "nodeType": "Return", + "src": "29524:13:0" + } + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29577:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1568, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "29554:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29554:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1573, + "nodeType": "IfStatement", + "src": "29550:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1571, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29610:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1572, + "nodeType": "Return", + "src": "29603:26:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1574, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "29649:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29649:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1577, + "nodeType": "Return", + "src": "29642:48:0" + } + ] + }, + "documentation": null, + "id": 1579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1554, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29396:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1553, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29396:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29419:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1555, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29419:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29395:43:0" + }, + "returnParameters": { + "id": 1560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1559, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29461:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1558, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29461:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29460:13:0" + }, + "scope": 1976, + "src": "29362:336:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 1587, + "mutability": "constant", + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "29706:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1580, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "67657452657475726e28616464726573732c616464726573732c75696e7432353629", + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29774:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + }, + "value": "getReturn(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + } + ], + "id": 1583, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "29764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29764:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1581, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29757:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1663, + "nodeType": "Block", + "src": "30036:523:0", + "statements": [ + { + "assignments": [ + 1603 + ], + "declarations": [ + { + "constant": false, + "id": 1603, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30047:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1602, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1606, + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "30090:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 1607, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "30116:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1608, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "30130:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "30144:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1604, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30067:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30067:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30067:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30047:105:0" + }, + { + "assignments": [ + 1613, + 1615 + ], + "declarations": [ + { + "constant": false, + "id": 1613, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30164:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1612, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30164:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1615, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30178:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1614, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1623, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "30231:4:0", + "typeDescriptions": { + "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": 1618, + "name": "_dest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "30213:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30205:25:0", + "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": 1622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30163:73:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1624, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1613, + "src": "30253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1658, + "nodeType": "IfStatement", + "src": "30249:277:0", + "trueBody": { + "id": 1657, + "nodeType": "Block", + "src": "30262:264:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1625, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30281:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30302:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "30281:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1640, + "nodeType": "IfStatement", + "src": "30277:113:0", + "trueBody": { + "id": 1639, + "nodeType": "Block", + "src": "30306:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1631, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30343:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + { + "argumentTypes": null, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1636, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30355:18:0", + "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": 1629, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30332:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30332:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30332:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 1601, + "id": 1638, + "nodeType": "Return", + "src": "30325:49:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1641, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30410:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30410:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30431:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "30410:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1656, + "nodeType": "IfStatement", + "src": "30406:109:0", + "trueBody": { + "id": 1655, + "nodeType": "Block", + "src": "30435:80:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1647, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30473:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1648, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1650, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30485:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 1645, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30462:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30462:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30462:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30497:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30461:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1654, + "nodeType": "Return", + "src": "30454:45:0" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30546:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30549:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$", + "typeString": "tuple(int_const 0,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1662, + "nodeType": "Return", + "src": "30538:13:0" + } + ] + }, + "documentation": null, + "id": 1664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "mutability": "mutable", + "name": "_dest", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29908:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1588, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29908:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29926:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1590, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29952:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1592, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29978:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29978:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29907:87:0" + }, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1598, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30018:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1600, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30027:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30027:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30017:18:0" + }, + "scope": 1976, + "src": "29889:670:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 1672, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "30567:93:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1665, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30567:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 1669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30641:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 1668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "30631:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30631:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1666, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30624:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1718, + "nodeType": "Block", + "src": "30917:336:0", + "statements": [ + { + "assignments": [ + 1680 + ], + "declarations": [ + { + "constant": false, + "id": 1680, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "30928:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1679, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30928:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1685, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1683, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30971:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 1681, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30948:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30948:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30948:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30928:74:0" + }, + { + "assignments": [ + 1687, + 1689 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31014:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1686, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31014:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1689, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31028:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1688, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31028:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1697, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "31099:4:0", + "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": 1692, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "31063:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31055:30:0", + "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": 1696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31092:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "31055:43:0", + "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": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31013:91:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1700, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "31121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1701, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31132:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31153:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "31132:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31121:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1715, + "nodeType": "IfStatement", + "src": "31117:104:0", + "trueBody": { + "id": 1714, + "nodeType": "Block", + "src": "31157:64:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1708, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31190:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 1709, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1711, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31202:6:0", + "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": 1706, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "31179:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31179:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31179:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1678, + "id": 1713, + "nodeType": "Return", + "src": "31172:37:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31240:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1678, + "id": 1717, + "nodeType": "Return", + "src": "31233:12:0" + } + ] + }, + "documentation": null, + "id": 1719, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1673, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "30865:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30864:23:0" + }, + "returnParameters": { + "id": 1678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30911:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1676, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30911:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30910:6:0" + }, + "scope": 1976, + "src": "30833:420:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "31432:57:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1733, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "31462:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1734, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "31469:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1732, + "name": "rateByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "31451:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256) view returns (uint256)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31451:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31479:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1737, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31450:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1731, + "id": 1738, + "nodeType": "Return", + "src": "31443:38:0" + } + ] + }, + "documentation": { + "id": 1720, + "nodeType": "StructuredDocumentation", + "src": "31261:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0c8496cc", + "id": 1740, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1726, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31352:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31352:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1722, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31352:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1725, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31376:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1724, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31351:41:0" + }, + "returnParameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1728, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31414:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1727, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31414:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1730, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31423:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31423:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31413:18:0" + }, + "scope": 1976, + "src": "31327:162:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1768, + "nodeType": "Block", + "src": "31674:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1754, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1744, + "src": "31706:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1755, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1746, + "src": "31713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1756, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "31722:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31742:1:0", + "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": 1758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31734:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31754:1:0", + "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": 1762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1761, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31746:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31758:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1753, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "31692:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31692:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1752, + "id": 1767, + "nodeType": "Return", + "src": "31685:75:0" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "31497:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f3898a97", + "id": 1769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1744, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31580:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31580:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1743, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31580:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1746, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31604:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1745, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31604:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1748, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31621:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31579:61:0" + }, + "returnParameters": { + "id": 1752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31665:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1750, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31664:9:0" + }, + "scope": 1976, + "src": "31563:205:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1798, + "nodeType": "Block", + "src": "32088:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "32120:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "32127:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1789, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1777, + "src": "32136:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32156:1:0", + "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": 1791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32148:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1794, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "32160:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1795, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "32179:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1786, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32106:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32106:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1785, + "id": 1797, + "nodeType": "Return", + "src": "32099:94:0" + } + ] + }, + "documentation": { + "id": 1770, + "nodeType": "StructuredDocumentation", + "src": "31776:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "569706eb", + "id": 1799, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1773, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31870:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31870:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1772, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31870:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1775, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31903:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31929:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1776, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31929:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1779, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31958:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31958:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1781, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31994:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31859:163:0" + }, + "returnParameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1784, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "32074:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32073:9:0" + }, + "scope": 1976, + "src": "31842:359:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1826, + "nodeType": "Block", + "src": "32419:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "32451:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1816, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1805, + "src": "32458:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1817, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1807, + "src": "32467:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1818, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "32479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32501:1:0", + "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": 1820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1819, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32493:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32505:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1814, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32437:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32437:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1813, + "id": 1825, + "nodeType": "Return", + "src": "32430:77:0" + } + ] + }, + "documentation": { + "id": 1800, + "nodeType": "StructuredDocumentation", + "src": "32209:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c98fefed", + "id": 1827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32295:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32295:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1802, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32295:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1805, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32319:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1809, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32356:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1808, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32356:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:91:0" + }, + "returnParameters": { + "id": 1813, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1812, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32410:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32409:9:0" + }, + "scope": 1976, + "src": "32275:240:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1858, + "nodeType": "Block", + "src": "32914:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1850, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1831, + "src": "32946:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1851, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "32953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1852, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32962:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1853, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "32974:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1854, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "32988:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1855, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "33007:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1849, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32932:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32932:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1848, + "id": 1857, + "nodeType": "Return", + "src": "32925:96:0" + } + ] + }, + "documentation": { + "id": 1828, + "nodeType": "StructuredDocumentation", + "src": "32523:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "ab6214ce", + "id": 1859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1844, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1845, + "modifierName": { + "argumentTypes": null, + "id": 1843, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "32854:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "32854:27:0" + } + ], + "name": "convertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32620:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1829, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32620:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1830, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32620:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32653:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32653:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1835, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32679:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32708:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32708:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32747:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32747:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32783:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32609:202:0" + }, + "returnParameters": { + "id": 1848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32900:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32900:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32899:9:0" + }, + "scope": 1976, + "src": "32589:440:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1887, + "nodeType": "Block", + "src": "33214:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1863, + "src": "33246:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1865, + "src": "33253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1875, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1867, + "src": "33262:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33282:1:0", + "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": 1877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33274:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33294:1:0", + "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": 1881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33286:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33298:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1872, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33232:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1871, + "id": 1886, + "nodeType": "Return", + "src": "33225:75:0" + } + ] + }, + "documentation": { + "id": 1860, + "nodeType": "StructuredDocumentation", + "src": "33037:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c7ba24bc", + "id": 1888, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1863, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33128:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1861, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33128:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1862, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33128:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1867, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33169:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33169:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33127:61:0" + }, + "returnParameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33205:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33204:9:0" + }, + "scope": 1976, + "src": "33103:205:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1917, + "nodeType": "Block", + "src": "33619:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1906, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "33651:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1907, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1894, + "src": "33658:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1896, + "src": "33667:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33687:1:0", + "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": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1909, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33679:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1913, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1898, + "src": "33691:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1914, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "33710:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1905, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33637:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33637:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1904, + "id": 1916, + "nodeType": "Return", + "src": "33630:94:0" + } + ] + }, + "documentation": { + "id": 1889, + "nodeType": "StructuredDocumentation", + "src": "33316:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "e57738e5", + "id": 1918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1892, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33418:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33418:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1891, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33418:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33451:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33451:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1896, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33477:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1898, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33506:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33506:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1900, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33542:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33542:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33407:163:0" + }, + "returnParameters": { + "id": 1904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33605:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33605:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33604:9:0" + }, + "scope": 1976, + "src": "33382:350:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1945, + "nodeType": "Block", + "src": "33950:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1934, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1922, + "src": "33982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1935, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1924, + "src": "33989:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1936, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "33998:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1937, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1928, + "src": "34010:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34032:1:0", + "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": 1939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34024:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34036:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1933, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33968:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1932, + "id": 1944, + "nodeType": "Return", + "src": "33961:77:0" + } + ] + }, + "documentation": { + "id": 1919, + "nodeType": "StructuredDocumentation", + "src": "33740:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "b1e9932b", + "id": 1946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33834:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1921, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1924, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1926, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33875:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33875:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1928, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33895:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33895:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33833:91:0" + }, + "returnParameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33941:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33941:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33940:9:0" + }, + "scope": 1976, + "src": "33806:240:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1974, + "nodeType": "Block", + "src": "34399:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "34431:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1967, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "34438:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1968, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "34447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1969, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1956, + "src": "34459:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1970, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "34473:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1971, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "34492:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1965, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "34417:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34417:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1964, + "id": 1973, + "nodeType": "Return", + "src": "34410:96:0" + } + ] + }, + "documentation": { + "id": 1947, + "nodeType": "StructuredDocumentation", + "src": "34054:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "2978c10e", + "id": 1975, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34159:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34159:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1949, + "length": null, + "nodeType": "ArrayTypeName", + "src": "34159:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1952, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34192:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34192:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34218:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34218:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1956, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34247:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34247:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1958, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34286:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34286:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1960, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34322:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34322:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34148:202:0" + }, + "returnParameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34384:9:0" + }, + "scope": 1976, + "src": "34120:394:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1977, + "src": "1956:32561:0" + } + ], + "src": "52:34467:0" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xc7dFBf7C3865831728bF0c5b1B662d4E11909005", + "transactionHash": "0x47d9f1de607c670ebe9de58d95782b46ab64eacf5e2cabc0c71d8269c20be48a" + }, + "8995": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xc7dFBf7C3865831728bF0c5b1B662d4E11909005", + "transactionHash": "0x47d9f1de607c670ebe9de58d95782b46ab64eacf5e2cabc0c71d8269c20be48a" + }, + "1604964387852": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x79Df6FCbe685456c0B6c2142d096cf28b107D5E2", + "transactionHash": "0x9f34297d1c73a34acf54f0235b7d59cce9f7f1755c43516fd4551cc8795f0eb8" + }, + "1604964469407": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x1C591A1950ca22c368d79c1cc9648cAc7426797E", + "transactionHash": "0x03a83b3e4affee17bffb32d1a3c7f576607a8de5e32e86b0101d72b7d78f860a" + }, + "1604965528035": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xa187689A9912C7422097922cF8D16601A0284422", + "transactionHash": "0xb3f6d67e818f1f33cb382fd41771ff17cd2707c790aedc9d32245608868459e7" + }, + "1604965645554": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x453FB4036a75fAA2e9373E475b22Ac1a5006A855", + "transactionHash": "0xa320f62f3a0a7125f7a692d182a2a43c7f4824510771365e6116c1208a55fff4" + }, + "1604965679541": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x4dF29e19Ee922f24355217E0E99ccC7E0428e047", + "transactionHash": "0xcc96660274b6be9da1e54c81047b4d359ca98f5132c7854c142d0c7b94d8012a" + }, + "1604965719492": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x82E0022A199255785123B8AEAa10913fc88cB97f", + "transactionHash": "0x17803233e04d31d33dca399b94cdc9e717b1d492727d33c7f15e4e550e6873f7" + }, + "1604965760834": { + "events": { + "0x7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c095": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x965e4A39955c8c4EF02366420d35F82aB56669b7", + "transactionHash": "0x595c8ba6fe67726990ab55caf71047b0f0cf5821870849a67b2bc5c17d9a8413" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.742Z", + "networkType": "ethereum", + "devdoc": { + "details": "The BancorNetwork contract is the main entry point for Bancor token conversions. It also allows for the conversion of any token in the Bancor Network to any other token in a single transaction by providing a conversion path. A note on Conversion Path: Conversion path is a data structure that is used when converting a token to another token in the Bancor Network, when the conversion cannot necessarily be done by a single converter and might require multiple 'hops'. The path defines which converters should be used and what kind of conversion should be done in each step. The path format doesn't include complex structure; instead, it is represented by a single array in which each 'hop' is represented by a 2-tuple - converter anchor & target token. In addition, the first element is always the source token. The converter anchor is only used as a pointer to a converter (since converter addresses are more likely to change as opposed to anchor addresses). Format: [source token, converter anchor, target token, converter anchor, target token...]", + "events": { + "Conversion(address,address,address,uint256,uint256,address)": { + "details": "triggered when a conversion between two tokens occurs", + "params": { + "_fromAmount": "amount converted, in the source token", + "_fromToken": "source ERC20 token", + "_smartToken": "anchor governed by the converter", + "_toAmount": "amount returned, minus conversion fee", + "_toToken": "target ERC20 token", + "_trader": "wallet that initiated the trade" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "claimAndConvert(address[],uint256,uint256)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvert2(address[],uint256,uint256,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvertFor(address[],uint256,uint256,address)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvertFor2(address[],uint256,uint256,address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "completeXConversion(address[],address,uint256,uint256,address)": { + "details": "allows a user to convert a token that was sent from another blockchain into any other token on the BancorNetwork ideally this transaction is created before the previous conversion is even complete, so so the input amount isn't known at that point - the amount is actually take from the BancorX contract directly by specifying the conversion id", + "params": { + "_bancorX": "address of the BancorX contract for the source token", + "_beneficiary": "wallet to receive the conversion result", + "_conversionId": "pre-determined unique (if non zero) id which refers to this conversion", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero", + "_path": "conversion path" + }, + "returns": { + "_0": "amount of tokens received from the conversion" + } + }, + "constructor": { + "details": "initializes a new BancorNetwork instance", + "params": { + "_registry": "address of a contract registry contract" + } + }, + "conversionPath(address,address)": { + "details": "returns the conversion path between two tokens in the network note that this method is quite expensive in terms of gas and should generally be called off-chain", + "params": { + "_sourceToken": "source token address", + "_targetToken": "target token address" + }, + "returns": { + "_0": "conversion path between the two tokens" + } + }, + "convert(address[],uint256,uint256)": { + "details": "deprecated, backward compatibility" + }, + "convert2(address[],uint256,uint256,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "convertByPath(address[],uint256,uint256,address,address,uint256)": { + "details": "converts the token to any other token in the bancor network by following a predefined conversion path and transfers the result tokens to a target account affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees) note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_affiliateAccount": "wallet address to receive the affiliate fee or 0x0 to disable affiliate fee", + "_affiliateFee": "affiliate fee in PPM or 0 to disable affiliate fee", + "_amount": "amount to convert from, in the source token", + "_beneficiary": "account that will receive the conversion result or 0x0 to send the result to the sender account", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above" + }, + "returns": { + "_0": "amount of tokens received from the conversion" + } + }, + "convertFor(address[],uint256,uint256,address)": { + "details": "deprecated, backward compatibility" + }, + "convertFor2(address[],uint256,uint256,address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "getReturnByPath(address[],uint256)": { + "details": "deprecated, backward compatibility" + }, + "rateByPath(address[],uint256)": { + "details": "returns the expected target amount of converting a given amount on a given path note that there is no support for circular paths", + "params": { + "_amount": "amount of _path[0] tokens received from the sender", + "_path": "conversion path (see conversion path format above)" + }, + "returns": { + "_0": "expected target amount" + } + }, + "registerEtherToken(address,bool)": { + "details": "allows the owner to register/unregister ether tokens", + "params": { + "_register": "true to register, false to unregister", + "_token": "ether token contract address" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setMaxAffiliateFee(uint256)": { + "details": "allows the owner to update the maximum affiliate-fee", + "params": { + "_maxAffiliateFee": "maximum affiliate-fee" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "xConvert(address[],uint256,uint256,bytes32,bytes32,uint256)": { + "details": "converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_amount": "amount to convert from, in the source token", + "_conversionId": "pre-determined unique (if non zero) id which refers to this transaction", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above", + "_targetAccount": "address/account on the target blockchain to send the BNT to", + "_targetBlockchain": "blockchain BNT will be issued on" + }, + "returns": { + "_0": "the amount of BNT received from this conversion" + } + }, + "xConvert2(address[],uint256,uint256,bytes32,bytes32,uint256,address,uint256)": { + "details": "converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_affiliateAccount": "affiliate account", + "_affiliateFee": "affiliate fee in PPM", + "_amount": "amount to convert from, in the source token", + "_conversionId": "pre-determined unique (if non zero) id which refers to this transaction", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above", + "_targetAccount": "address/account on the target blockchain to send the BNT to", + "_targetBlockchain": "blockchain BNT will be issued on" + }, + "returns": { + "_0": "the amount of BNT received from this conversion" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/BancorX.json b/apps/cic-eth/tests/testdata/bancor/BancorX.json new file mode 100644 index 00000000..9568edb9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/BancorX.json @@ -0,0 +1,24111 @@ +{ + "contractName": "BancorX", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxReleaseLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_limitIncPerBlock", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_minRequiredReports", + "type": "uint8" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "TokensLock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "TokensRelease", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_reporter", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_fromBlockchain", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_txId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_xTransferId", + "type": "uint256" + } + ], + "name": "TxReport", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_toBlockchain", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "XTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "XTransferComplete", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "limitIncPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLockLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxReleaseLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minRequiredReports", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevLockBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevLockLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevReleaseBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevReleaseLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "reportedTxs", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "reporters", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reportingEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transactionIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transactions", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "fromBlockchain", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint8", + "name": "numOfReports", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xTransfersEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLockLimit", + "type": "uint256" + } + ], + "name": "setMaxLockLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxReleaseLimit", + "type": "uint256" + } + ], + "name": "setMaxReleaseLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minLimit", + "type": "uint256" + } + ], + "name": "setMinLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limitIncPerBlock", + "type": "uint256" + } + ], + "name": "setLimitIncPerBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_minRequiredReports", + "type": "uint8" + } + ], + "name": "setMinRequiredReports", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_reporter", + "type": "address" + }, + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setReporter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "enableXTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "enableReporting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_reporters", + "type": "address[]" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_toBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "xTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_toBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "xTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_fromBlockchain", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_xTransferId", + "type": "uint256" + } + ], + "name": "reportTx", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_xTransferId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_for", + "type": "address" + } + ], + "name": "getXTransferAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentLockLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentReleaseLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxLockLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxReleaseLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_limitIncPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_minRequiredReports\",\"type\":\"uint8\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"TokensLock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"TokensRelease\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reporter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_fromBlockchain\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_xTransferId\",\"type\":\"uint256\"}],\"name\":\"TxReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"XTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"XTransferComplete\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableReporting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableXTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentLockLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentReleaseLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_xTransferId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_for\",\"type\":\"address\"}],\"name\":\"getXTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"limitIncPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLockLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxReleaseLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minRequiredReports\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevLockBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevLockLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevReleaseBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevReleaseLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_fromBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_xTransferId\",\"type\":\"uint256\"}],\"name\":\"reportTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reportedTxs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reporters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reportingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_limitIncPerBlock\",\"type\":\"uint256\"}],\"name\":\"setLimitIncPerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxLockLimit\",\"type\":\"uint256\"}],\"name\":\"setMaxLockLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxReleaseLimit\",\"type\":\"uint256\"}],\"name\":\"setMaxReleaseLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minLimit\",\"type\":\"uint256\"}],\"name\":\"setMinLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_minRequiredReports\",\"type\":\"uint8\"}],\"name\":\"setMinRequiredReports\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reporter\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_active\",\"type\":\"bool\"}],\"name\":\"setReporter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactionIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"fromBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"numOfReports\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"completed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_reporters\",\"type\":\"address[]\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"xTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"xTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xTransfersEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The BancorX contract allows cross chain token transfers. There are two processes that take place in the contract - - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum) - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum) Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple callers are required to report a transfer before tokens are released to the target account.\",\"events\":{\"TokensLock(address,uint256)\":{\"details\":\"triggered when tokens are locked in smart contract\",\"params\":{\"_amount\":\"amount locked\",\"_from\":\"wallet address that the tokens are locked from\"}},\"TokensRelease(address,uint256)\":{\"details\":\"triggered when tokens are released by the smart contract\",\"params\":{\"_amount\":\"amount released\",\"_to\":\"wallet address that the tokens are released to\"}},\"TxReport(address,bytes32,uint256,address,uint256,uint256)\":{\"details\":\"triggered when report is successfully submitted\",\"params\":{\"_amount\":\"transfer amount\",\"_fromBlockchain\":\"source blockchain\",\"_reporter\":\"reporter wallet\",\"_to\":\"target wallet\",\"_txId\":\"tx id on the source blockchain\",\"_xTransferId\":\"xtransfer id\"}},\"XTransfer(address,bytes32,bytes32,uint256,uint256)\":{\"details\":\"triggered when xTransfer is successfully called\",\"params\":{\"_amount\":\"transfer amount\",\"_from\":\"wallet address that initiated the xtransfer\",\"_id\":\"xtransfer id\",\"_to\":\"target wallet\",\"_toBlockchain\":\"target blockchain\"}},\"XTransferComplete(address,uint256)\":{\"details\":\"triggered when final report is successfully submitted\",\"params\":{\"_id\":\"xtransfer id\",\"_to\":\"target wallet\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new BancorX instance\",\"params\":{\"_limitIncPerBlock\":\"how much the limit increases per block\",\"_maxLockLimit\":\"maximum amount of tokens that can be locked in one transaction\",\"_maxReleaseLimit\":\"maximum amount of tokens that can be released in one transaction\",\"_minLimit\":\"minimum amount of tokens that can be transferred in one transaction\",\"_minRequiredReports\":\"minimum number of reporters to report transaction before tokens can be released\",\"_registry\":\"address of contract registry\",\"_token\":\"erc20 token\"}},\"enableReporting(bool)\":{\"details\":\"allows the owner enable/disable the reportTransaction method\",\"params\":{\"_enable\":\"true to enable, false to disable\"}},\"enableXTransfers(bool)\":{\"details\":\"allows the owner enable/disable the xTransfer method\",\"params\":{\"_enable\":\"true to enable, false to disable\"}},\"getCurrentLockLimit()\":{\"details\":\"method for calculating current lock limit\",\"returns\":{\"_0\":\"the current maximum limit of tokens that can be locked\"}},\"getCurrentReleaseLimit()\":{\"details\":\"method for calculating current release limit\",\"returns\":{\"_0\":\"the current maximum limit of tokens that can be released\"}},\"getXTransferAmount(uint256,address)\":{\"details\":\"gets x transfer amount by xTransferId (not txId)\",\"params\":{\"_for\":\"address corresponding to xTransferId\",\"_xTransferId\":\"unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been broadcasted)\"},\"returns\":{\"_0\":\"amount that was sent in xTransfer corresponding to _xTransferId\"}},\"reportTx(bytes32,uint256,address,uint256,uint256)\":{\"details\":\"allows reporter to report transaction which occured on another blockchain\",\"params\":{\"_amount\":\"amount of tokens destroyed on another blockchain\",\"_fromBlockchain\":\"blockchain in which tokens were destroyed\",\"_to\":\"address to receive tokens\",\"_txId\":\"transactionId of transaction thats being reported\",\"_xTransferId\":\"unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been mined)\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setLimitIncPerBlock(uint256)\":{\"details\":\"setter\",\"params\":{\"_limitIncPerBlock\":\"new limitIncPerBlock\"}},\"setMaxLockLimit(uint256)\":{\"details\":\"setter\",\"params\":{\"_maxLockLimit\":\"new maxLockLimit\"}},\"setMaxReleaseLimit(uint256)\":{\"details\":\"setter\",\"params\":{\"_maxReleaseLimit\":\"new maxReleaseLimit\"}},\"setMinLimit(uint256)\":{\"details\":\"setter\",\"params\":{\"_minLimit\":\"new minLimit\"}},\"setMinRequiredReports(uint8)\":{\"details\":\"setter\",\"params\":{\"_minRequiredReports\":\"new minRequiredReports\"}},\"setReporter(address,bool)\":{\"details\":\"allows the owner to set/remove reporters\",\"params\":{\"_active\":\"true if the reporter is approved, false otherwise\",\"_reporter\":\"reporter whos status is to be set\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade(address[])\":{\"details\":\"upgrades the contract to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new contract after the upgrade\",\"params\":{\"_reporters\":\"new list of reporters\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"xTransfer(bytes32,bytes32,uint256)\":{\"details\":\"claims tokens from msg.sender to be converted to tokens on another blockchain\",\"params\":{\"_amount\":\"the amount of tokens to transfer\",\"_to\":\"address to send the tokens to\",\"_toBlockchain\":\"blockchain on which tokens will be issued\"}},\"xTransfer(bytes32,bytes32,uint256,uint256)\":{\"details\":\"claims tokens from msg.sender to be converted to tokens on another blockchain\",\"params\":{\"_amount\":\"the amount of tokens to transfer\",\"_id\":\"pre-determined unique (if non zero) id which refers to this transaction\",\"_to\":\"address to send the tokens to\",\"_toBlockchain\":\"blockchain on which tokens will be issued\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/BancorX.sol\":\"BancorX\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/BancorX.sol\":{\"keccak256\":\"0xe2b3099bba3c6688433611b13621418fb330030f4c11e43a76046ceaee03ef5c\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://971f9e6ccc18878706965dead5c2cfd92ab33a3bf73e7a256d53b4d00e8fc058\",\"dweb:/ipfs/Qmdg4tpFLzy4FVX7t9CeT9gBdmJWJzLpVsz5Dr611EtuaA\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol\":{\"keccak256\":\"0x5292f6484aafd5e225b0d4f7fe61235ebee69ada5044a84e3f94014053d8a373\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f796012a45f7d9c47239725ad638f8636146686a5a390bd85892e889a20459b2\",\"dweb:/ipfs/QmRbfxfYCssyj1PkQMdv1rsjUz35BDTLag4wrxnq4SAy2j\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x6080604052600c805460ff60b01b1960ff60a81b19909116600160a81b1716600160b01b1790553480156200003357600080fd5b506040516200205938038062002059833981810160405260e08110156200005957600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151600080546001600160a01b0319163317905594959394929391929091908180620000a581620001f6565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905586620000dc8162000255565b86620000e88162000255565b86620000f48162000255565b86620001008162000255565b60ff87166200010f8162000255565b856200011b81620001f6565b8662000127816200029c565b8d8c111580156200013857508c8c11155b6200018a576040805162461bcd60e51b815260206004820152601560248201527f4552525f494e56414c49445f4d494e5f4c494d49540000000000000000000000604482015290519081900360640190fd5b50505060048b905550505060058790555060069490945550600991909155600c805460079590955560089390935543600a819055600b556001600160a01b0390911661010002610100600160a81b031960ff90921660ff199094169390931716919091179055620002fb565b6001600160a01b03811662000252576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b6000811162000252576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b6001600160a01b03811630141562000252576040805162461bcd60e51b815260206004820152601360248201527f4552525f414444524553535f49535f53454c4600000000000000000000000000604482015290519081900360640190fd5b611d4e806200030b6000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80637b10399911610151578063b4a176d3116100c3578063e36f8dc511610087578063e36f8dc5146106c1578063ed1d73a6146106de578063f2fde38b146106fd578063f7385f7614610723578063fbb246921461072b578063fc0c546a1461073357610269565b8063b4a176d314610648578063bf28ece414610650578063ca27e0111461066d578063d4ee1d901461068b578063e1bb51331461069357610269565b80639ace38c2116101155780639ace38c214610566578063a50c326c146105bb578063a5c670ca146105d8578063a8c36a90146105f7578063aafd6b76146105ff578063af2b96181461062b57610269565b80637b103999146105025780637b15879c1461050a5780638544c52d1461052a5780638da5cb5b146105565780639390701c1461055e57610269565b806349282538116101ea5780635e35359e116101ae5780635e35359e1461043d57806361cd756e146104735780636dc6a01b146104975780636ec6d4a6146104d557806372f43d19146104f257806379ba5097146104fa57610269565b806349282538146103dd57806349d10b64146104065780634b3e475c1461040e57806352e94ce31461041657806354fd4d501461041e57610269565b80631e04a593116102315780631e04a5931461035c5780631fd8088d146103645780632cc1cd9e1461036c5780632fe8a6ad146103a6578063427c0374146103ae57610269565b80630183592b1461026e578063024c7ec71461031357806316c76c2714610332578063199674391461034c5780631aff29eb14610354575b600080fd5b6103116004803603602081101561028457600080fd5b81019060208101813564010000000081111561029f57600080fd5b8201836020820111156102b157600080fd5b803590602001918460208302840111640100000000831117156102d357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061073b945050505050565b005b6103116004803603602081101561032957600080fd5b5035151561081a565b61033a610840565b60408051918252519081900360200190f35b61033a610846565b61033a610892565b61033a610898565b61033a6108d8565b6103926004803603602081101561038257600080fd5b50356001600160a01b03166108de565b604080519115158252519081900360200190f35b6103926108f3565b610311600480360360808110156103c457600080fd5b5080359060208101359060408101359060600135610903565b610311600480360360608110156103f357600080fd5b50803590602081013590604001356109d5565b610311610aa6565b61033a610cae565b61033a610cb4565b610426610cba565b6040805161ffff9092168252519081900360200190f35b6103116004803603606081101561045357600080fd5b506001600160a01b03813581169160208101359091169060400135610cbf565b61047b610cf8565b604080516001600160a01b039092168252519081900360200190f35b610311600480360360a08110156104ad57600080fd5b508035906020810135906001600160a01b036040820135169060608101359060800135610d07565b610311600480360360208110156104eb57600080fd5b50356110c5565b61033a61113a565b610311611140565b61047b6111f7565b6103116004803603602081101561052057600080fd5b503560ff16611206565b6103926004803603604081101561054057600080fd5b50803590602001356001600160a01b0316611232565b61047b611252565b610392611261565b6105836004803603602081101561057c57600080fd5b5035611271565b6040805195865260208601949094526001600160a01b039092168484015260ff16606084015215156080830152519081900360a00190f35b610311600480360360208110156105d157600080fd5b50356112b1565b610311600480360360208110156105ee57600080fd5b503515156112c9565b61033a6112ef565b61033a6004803603604081101561061557600080fd5b50803590602001356001600160a01b03166112f5565b6103116004803603602081101561064157600080fd5b50356113be565b6103116113d6565b6103116004803603602081101561066657600080fd5b5035611402565b61067561141a565b6040805160ff9092168252519081900360200190f35b61047b611423565b610311600480360360408110156106a957600080fd5b506001600160a01b0381351690602001351515611432565b61033a600480360360208110156106d757600080fd5b5035611465565b610311600480360360208110156106f457600080fd5b50351515611477565b6103116004803603602081101561071357600080fd5b50356001600160a01b031661149d565b61033a61151b565b610392611521565b61047b611531565b610743611545565b60006107606e2130b731b7b92c2ab833b930b232b960891b61159a565b905061076b8161149d565b6040805163151a1cb360e21b81526004818101818152602483019384528551604484015285516001600160a01b0386169463546872cc948893926064909101906020808601910280838360005b838110156107d05781810151838201526020016107b8565b505050509050019350505050600060405180830381600087803b1580156107f657600080fd5b505af115801561080a573d6000803e3d6000fd5b50505050610816611140565b5050565b610822611545565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60075481565b60008061087661086d600954610867600a544361161890919063ffffffff16565b90611665565b600754906116ca565b905060045481111561088c57505060045461088f565b90505b90565b600a5481565b6000806108c26108b9600954610867600b544361161890919063ffffffff16565b600854906116ca565b905060055481111561088c57505060055461088f565b60065481565b60106020526000908152604090205460ff1681565b600354600160a01b900460ff1681565b61090b611713565b6000610915610846565b905060065483101580156109295750808311155b610970576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b61097983611760565b6109838184611618565b60075543600a5560408051868152602081018590528082018490529051859133917f4780f3edc9124597ede658e04ed3d8887b58c86943b2a805dc961cf512570b629181900360600190a35050505050565b6109dd611713565b60006109e7610846565b905060065482101580156109fb5750808211155b610a42576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b610a4b82611760565b610a558183611618565b60075543600a5560408051858152602081018490526000818301529051849133917f4780f3edc9124597ede658e04ed3d8887b58c86943b2a805dc961cf512570b629181900360600190a350505050565b6000546001600160a01b0316331480610ac95750600354600160a01b900460ff16155b610b0e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610b2c6f436f6e7472616374526567697374727960801b61159a565b6002549091506001600160a01b03808316911614801590610b5557506001600160a01b03811615155b610b9d576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bff57600080fd5b505afa158015610c13573d6000803e3d6000fd5b505050506040513d6020811015610c2957600080fd5b50516001600160a01b03161415610c7e576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600b5481565b60055481565b600481565b610cc7611545565b82610cd1816117b6565b82610cdb816117b6565b83610ce58161180a565b610cf086868661185e565b505050505050565b6003546001600160a01b031681565b610d0f6119be565b610d17611a16565b82610d21816117b6565b82610d2b81611a63565b6000868152600f6020908152604080832033845290915290205460ff1615610d91576040805162461bcd60e51b815260206004820152601460248201527311549497d053149150511657d4915413d495115160621b604482015290519081900360640190fd5b6000868152600f602090815260408083203384528252808320805460ff19166001179055888352600d90915290206002810154600160a01b900460ff16610e6f576002810180546001600160a01b0319166001600160a01b038816179055848155600181018890558315610e6a576000848152600e602052604090205415610e58576040805162461bcd60e51b81526020600482015260156024820152744552525f54585f414c52454144595f45584953545360581b604482015290519081900360640190fd5b6000848152600e602052604090208790555b610f40565b60028101546001600160a01b038781169116148015610e8e5750805485145b8015610e9d5750878160010154145b610ee0576040805162461bcd60e51b815260206004820152600f60248201526e08aa4a4bea8b0be9a92a69a82a8869608b1b604482015290519081900360640190fd5b8315610f40576000848152600e60205260409020548714610f40576040805162461bcd60e51b81526020600482015260156024820152744552525f54585f414c52454144595f45584953545360581b604482015290519081900360640190fd5b600281018054600160ff600160a01b808404821692909201160260ff60a01b1990911617905560408051898152602081018990526001600160a01b038816818301526060810187905260808101869052905133917f5e77831e701760f7f4a1e61a8e9834d773b52c45d91ba9006b7d2afb7a144739919081900360a00190a2600c54600282015460ff918216600160a01b909104909116106110bb576000878152600d6020526040902060020154600160a81b900460ff161561104a576040805162461bcd60e51b815260206004820152601860248201527f4552525f54585f414c52454144595f434f4d504c455445440000000000000000604482015290519081900360640190fd5b6000878152600d6020908152604091829020600201805460ff60a81b1916600160a81b17905581516001600160a01b038916815290810186905281517fd87906b7fce534fc5e6dde30064e777d92d0aaf3a28c72315de8ef2e4134dfef929181900390910190a16110bb8686611aa9565b5050505050505050565b6110cd611545565b806110d781611a63565b60045482111580156110eb57506005548211155b611134576040805162461bcd60e51b815260206004820152601560248201527411549497d253959053125117d3525397d312535255605a1b604482015290519081900360640190fd5b50600655565b60095481565b6001546001600160a01b03163314611193576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b61120e611545565b8060ff1661121b81611a63565b50600c805460ff191660ff92909216919091179055565b600f60209081526000928352604080842090915290825290205460ff1681565b6000546001600160a01b031681565b600c54600160b01b900460ff1681565b600d602052600090815260409020805460018201546002909201549091906001600160a01b0381169060ff600160a01b8204811691600160a81b90041685565b6112b9611545565b806112c381611a63565b50600955565b6112d1611545565b600c8054911515600160a81b0260ff60a81b19909216919091179055565b60045481565b60006112ff611cea565b506000838152600e60209081526040808320548352600d825291829020825160a08101845281548152600182015492810192909252600201546001600160a01b0380821693830184905260ff600160a01b830481166060850152600160a81b909204909116151560808301529091908416146113b4576040805162461bcd60e51b815260206004820152600f60248201526e08aa4a4bea8b0be9a92a69a82a8869608b1b604482015290519081900360640190fd5b5190505b92915050565b6113c6611545565b806113d081611a63565b50600455565b6113de611545565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b61140a611545565b8061141481611a63565b50600555565b600c5460ff1681565b6001546001600160a01b031681565b61143a611545565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b600e6020526000908152604090205481565b61147f611545565b600c8054911515600160b01b0260ff60b01b19909216919091179055565b6114a5611545565b6000546001600160a01b03828116911614156114f9576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b600c54600160a81b900460ff1681565b600c5461010090046001600160a01b031681565b6000546001600160a01b03163314611598576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156115e657600080fd5b505afa1580156115fa573d6000803e3d6000fd5b505050506040513d602081101561161057600080fd5b505192915050565b60008183101561165f576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082611674575060006113b8565b8282028284828161168157fe5b04146116c3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b6000828201838110156116c3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600c54600160a81b900460ff16611598576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fd5b600c5461177d9061010090046001600160a01b0316333084611b7f565b60408051828152905133917ff5d7535a395393675f56d066384113754ca9cf4abd37298469934e2e9c2ec902919081900360200190a250565b6001600160a01b038116611807576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415611807576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106118db5780518252601f1990920191602091820191016118bc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461193d576040519150601f19603f3d011682016040523d82523d6000602084013e611942565b606091505b5091509150818015611970575080511580611970575080806020019051602081101561196d57600080fd5b50515b6119b7576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b3360009081526010602052604090205460ff16611598576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600c54600160b01b900460ff16611598576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fd5b60008111611807576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b6000611ab3610898565b90506006548210158015611ac75750808211155b611b0e576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b611b188183611618565b60085543600b55600c54611b3b9061010090046001600160a01b0316848461185e565b6040805183815290516001600160a01b038516917fbfdc1f3c02b4715077e0be4a262f967d53d4d0fcd76c6987fa2ad6e2257d7c8f919081900360200190a2505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310611c045780518252601f199092019160209182019101611be5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c66576040519150601f19603f3d011682016040523d82523d6000602084013e611c6b565b606091505b5091509150818015611c99575080511580611c995750808060200190516020811015611c9657600080fd5b50515b610cf0576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea2646970667358221220115bb7a48a11cc43f6e7bee4df69098380dfe3262177df02543cafb26cc9deda64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102695760003560e01c80637b10399911610151578063b4a176d3116100c3578063e36f8dc511610087578063e36f8dc5146106c1578063ed1d73a6146106de578063f2fde38b146106fd578063f7385f7614610723578063fbb246921461072b578063fc0c546a1461073357610269565b8063b4a176d314610648578063bf28ece414610650578063ca27e0111461066d578063d4ee1d901461068b578063e1bb51331461069357610269565b80639ace38c2116101155780639ace38c214610566578063a50c326c146105bb578063a5c670ca146105d8578063a8c36a90146105f7578063aafd6b76146105ff578063af2b96181461062b57610269565b80637b103999146105025780637b15879c1461050a5780638544c52d1461052a5780638da5cb5b146105565780639390701c1461055e57610269565b806349282538116101ea5780635e35359e116101ae5780635e35359e1461043d57806361cd756e146104735780636dc6a01b146104975780636ec6d4a6146104d557806372f43d19146104f257806379ba5097146104fa57610269565b806349282538146103dd57806349d10b64146104065780634b3e475c1461040e57806352e94ce31461041657806354fd4d501461041e57610269565b80631e04a593116102315780631e04a5931461035c5780631fd8088d146103645780632cc1cd9e1461036c5780632fe8a6ad146103a6578063427c0374146103ae57610269565b80630183592b1461026e578063024c7ec71461031357806316c76c2714610332578063199674391461034c5780631aff29eb14610354575b600080fd5b6103116004803603602081101561028457600080fd5b81019060208101813564010000000081111561029f57600080fd5b8201836020820111156102b157600080fd5b803590602001918460208302840111640100000000831117156102d357600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061073b945050505050565b005b6103116004803603602081101561032957600080fd5b5035151561081a565b61033a610840565b60408051918252519081900360200190f35b61033a610846565b61033a610892565b61033a610898565b61033a6108d8565b6103926004803603602081101561038257600080fd5b50356001600160a01b03166108de565b604080519115158252519081900360200190f35b6103926108f3565b610311600480360360808110156103c457600080fd5b5080359060208101359060408101359060600135610903565b610311600480360360608110156103f357600080fd5b50803590602081013590604001356109d5565b610311610aa6565b61033a610cae565b61033a610cb4565b610426610cba565b6040805161ffff9092168252519081900360200190f35b6103116004803603606081101561045357600080fd5b506001600160a01b03813581169160208101359091169060400135610cbf565b61047b610cf8565b604080516001600160a01b039092168252519081900360200190f35b610311600480360360a08110156104ad57600080fd5b508035906020810135906001600160a01b036040820135169060608101359060800135610d07565b610311600480360360208110156104eb57600080fd5b50356110c5565b61033a61113a565b610311611140565b61047b6111f7565b6103116004803603602081101561052057600080fd5b503560ff16611206565b6103926004803603604081101561054057600080fd5b50803590602001356001600160a01b0316611232565b61047b611252565b610392611261565b6105836004803603602081101561057c57600080fd5b5035611271565b6040805195865260208601949094526001600160a01b039092168484015260ff16606084015215156080830152519081900360a00190f35b610311600480360360208110156105d157600080fd5b50356112b1565b610311600480360360208110156105ee57600080fd5b503515156112c9565b61033a6112ef565b61033a6004803603604081101561061557600080fd5b50803590602001356001600160a01b03166112f5565b6103116004803603602081101561064157600080fd5b50356113be565b6103116113d6565b6103116004803603602081101561066657600080fd5b5035611402565b61067561141a565b6040805160ff9092168252519081900360200190f35b61047b611423565b610311600480360360408110156106a957600080fd5b506001600160a01b0381351690602001351515611432565b61033a600480360360208110156106d757600080fd5b5035611465565b610311600480360360208110156106f457600080fd5b50351515611477565b6103116004803603602081101561071357600080fd5b50356001600160a01b031661149d565b61033a61151b565b610392611521565b61047b611531565b610743611545565b60006107606e2130b731b7b92c2ab833b930b232b960891b61159a565b905061076b8161149d565b6040805163151a1cb360e21b81526004818101818152602483019384528551604484015285516001600160a01b0386169463546872cc948893926064909101906020808601910280838360005b838110156107d05781810151838201526020016107b8565b505050509050019350505050600060405180830381600087803b1580156107f657600080fd5b505af115801561080a573d6000803e3d6000fd5b50505050610816611140565b5050565b610822611545565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60075481565b60008061087661086d600954610867600a544361161890919063ffffffff16565b90611665565b600754906116ca565b905060045481111561088c57505060045461088f565b90505b90565b600a5481565b6000806108c26108b9600954610867600b544361161890919063ffffffff16565b600854906116ca565b905060055481111561088c57505060055461088f565b60065481565b60106020526000908152604090205460ff1681565b600354600160a01b900460ff1681565b61090b611713565b6000610915610846565b905060065483101580156109295750808311155b610970576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b61097983611760565b6109838184611618565b60075543600a5560408051868152602081018590528082018490529051859133917f4780f3edc9124597ede658e04ed3d8887b58c86943b2a805dc961cf512570b629181900360600190a35050505050565b6109dd611713565b60006109e7610846565b905060065482101580156109fb5750808211155b610a42576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b610a4b82611760565b610a558183611618565b60075543600a5560408051858152602081018490526000818301529051849133917f4780f3edc9124597ede658e04ed3d8887b58c86943b2a805dc961cf512570b629181900360600190a350505050565b6000546001600160a01b0316331480610ac95750600354600160a01b900460ff16155b610b0e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610b2c6f436f6e7472616374526567697374727960801b61159a565b6002549091506001600160a01b03808316911614801590610b5557506001600160a01b03811615155b610b9d576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610bff57600080fd5b505afa158015610c13573d6000803e3d6000fd5b505050506040513d6020811015610c2957600080fd5b50516001600160a01b03161415610c7e576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600b5481565b60055481565b600481565b610cc7611545565b82610cd1816117b6565b82610cdb816117b6565b83610ce58161180a565b610cf086868661185e565b505050505050565b6003546001600160a01b031681565b610d0f6119be565b610d17611a16565b82610d21816117b6565b82610d2b81611a63565b6000868152600f6020908152604080832033845290915290205460ff1615610d91576040805162461bcd60e51b815260206004820152601460248201527311549497d053149150511657d4915413d495115160621b604482015290519081900360640190fd5b6000868152600f602090815260408083203384528252808320805460ff19166001179055888352600d90915290206002810154600160a01b900460ff16610e6f576002810180546001600160a01b0319166001600160a01b038816179055848155600181018890558315610e6a576000848152600e602052604090205415610e58576040805162461bcd60e51b81526020600482015260156024820152744552525f54585f414c52454144595f45584953545360581b604482015290519081900360640190fd5b6000848152600e602052604090208790555b610f40565b60028101546001600160a01b038781169116148015610e8e5750805485145b8015610e9d5750878160010154145b610ee0576040805162461bcd60e51b815260206004820152600f60248201526e08aa4a4bea8b0be9a92a69a82a8869608b1b604482015290519081900360640190fd5b8315610f40576000848152600e60205260409020548714610f40576040805162461bcd60e51b81526020600482015260156024820152744552525f54585f414c52454144595f45584953545360581b604482015290519081900360640190fd5b600281018054600160ff600160a01b808404821692909201160260ff60a01b1990911617905560408051898152602081018990526001600160a01b038816818301526060810187905260808101869052905133917f5e77831e701760f7f4a1e61a8e9834d773b52c45d91ba9006b7d2afb7a144739919081900360a00190a2600c54600282015460ff918216600160a01b909104909116106110bb576000878152600d6020526040902060020154600160a81b900460ff161561104a576040805162461bcd60e51b815260206004820152601860248201527f4552525f54585f414c52454144595f434f4d504c455445440000000000000000604482015290519081900360640190fd5b6000878152600d6020908152604091829020600201805460ff60a81b1916600160a81b17905581516001600160a01b038916815290810186905281517fd87906b7fce534fc5e6dde30064e777d92d0aaf3a28c72315de8ef2e4134dfef929181900390910190a16110bb8686611aa9565b5050505050505050565b6110cd611545565b806110d781611a63565b60045482111580156110eb57506005548211155b611134576040805162461bcd60e51b815260206004820152601560248201527411549497d253959053125117d3525397d312535255605a1b604482015290519081900360640190fd5b50600655565b60095481565b6001546001600160a01b03163314611193576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b61120e611545565b8060ff1661121b81611a63565b50600c805460ff191660ff92909216919091179055565b600f60209081526000928352604080842090915290825290205460ff1681565b6000546001600160a01b031681565b600c54600160b01b900460ff1681565b600d602052600090815260409020805460018201546002909201549091906001600160a01b0381169060ff600160a01b8204811691600160a81b90041685565b6112b9611545565b806112c381611a63565b50600955565b6112d1611545565b600c8054911515600160a81b0260ff60a81b19909216919091179055565b60045481565b60006112ff611cea565b506000838152600e60209081526040808320548352600d825291829020825160a08101845281548152600182015492810192909252600201546001600160a01b0380821693830184905260ff600160a01b830481166060850152600160a81b909204909116151560808301529091908416146113b4576040805162461bcd60e51b815260206004820152600f60248201526e08aa4a4bea8b0be9a92a69a82a8869608b1b604482015290519081900360640190fd5b5190505b92915050565b6113c6611545565b806113d081611a63565b50600455565b6113de611545565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b61140a611545565b8061141481611a63565b50600555565b600c5460ff1681565b6001546001600160a01b031681565b61143a611545565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b600e6020526000908152604090205481565b61147f611545565b600c8054911515600160b01b0260ff60b01b19909216919091179055565b6114a5611545565b6000546001600160a01b03828116911614156114f9576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b600c54600160a81b900460ff1681565b600c5461010090046001600160a01b031681565b6000546001600160a01b03163314611598576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156115e657600080fd5b505afa1580156115fa573d6000803e3d6000fd5b505050506040513d602081101561161057600080fd5b505192915050565b60008183101561165f576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082611674575060006113b8565b8282028284828161168157fe5b04146116c3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b6000828201838110156116c3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600c54600160a81b900460ff16611598576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fd5b600c5461177d9061010090046001600160a01b0316333084611b7f565b60408051828152905133917ff5d7535a395393675f56d066384113754ca9cf4abd37298469934e2e9c2ec902919081900360200190a250565b6001600160a01b038116611807576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415611807576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106118db5780518252601f1990920191602091820191016118bc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461193d576040519150601f19603f3d011682016040523d82523d6000602084013e611942565b606091505b5091509150818015611970575080511580611970575080806020019051602081101561196d57600080fd5b50515b6119b7576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b3360009081526010602052604090205460ff16611598576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600c54600160b01b900460ff16611598576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fd5b60008111611807576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b6000611ab3610898565b90506006548210158015611ac75750808211155b611b0e576040805162461bcd60e51b815260206004820152601360248201527208aa4a4be829a9eaa9ca8bea89e9ebe90928e9606b1b604482015290519081900360640190fd5b611b188183611618565b60085543600b55600c54611b3b9061010090046001600160a01b0316848461185e565b6040805183815290516001600160a01b038516917fbfdc1f3c02b4715077e0be4a262f967d53d4d0fcd76c6987fa2ad6e2257d7c8f919081900360200190a2505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310611c045780518252601f199092019160209182019101611be5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c66576040519150601f19603f3d011682016040523d82523d6000602084013e611c6b565b606091505b5091509150818015611c99575080511580611c995750808060200190516020811015611c9657600080fd5b50515b610cf0576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea2646970667358221220115bb7a48a11cc43f6e7bee4df69098380dfe3262177df02543cafb26cc9deda64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "900:17593:3:-:0;;;2305:36;;;-1:-1:-1;;;;;;;;2305:36:3;;;-1:-1:-1;;;2305:36:3;2399:35;-1:-1:-1;;;2399:35:3;;;5579:1321;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5579:1321:3;;;;;;;;;;;;;;;;;;;;;;;;;;;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;5579:1321:3;;;;;;;;;;;;;594:23:64;5579:1321:3;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;5909:13:3;252:24:64::1;5909:13:3::0;252:16:64::1;:24::i;:::-;5949:16:3::0;252:24:64::2;5949:16:3::0;252::64::2;:24::i;:::-;5992:9:3::0;252:24:64::3;5992:9:3::0;252:16:64::3;:24::i;:::-;6028:17:3::0;252:24:64::4;6028:17:3::0;252:16:64::4;:24::i;:::-;200:96:::5;::::0;::::5;252:24;200:96:::0;252:16:::5;:24::i;:::-;6123:6:3::0;594:23:64::6;6123:6:3::0;594:13:64::6;:23::i;:::-;6157:6:3::0;948:18:64::7;6157:6:3::0;948:8:64::7;:18::i;:::-;6230:13:3::8;6217:9;:26;;:59;;;;;6260:16;6247:9;:29;;6217:59;6209:93;;;::::0;;-1:-1:-1;;;6209:93:3;;::::8;;::::0;::::8;::::0;::::8;::::0;;;;::::8;::::0;;;;;;;;;;;;;::::8;;-1:-1:-1::0;;;6391:12:3::8;:28:::0;;;-1:-1:-1;;;6430:15:3::8;:34:::0;;;-1:-1:-1;6475:8:3::8;:20:::0;;;;-1:-1:-1;6506:16:3::8;:36:::0;;;;6553:18:::8;:40:::0;;6697:13:::8;:29:::0;;;;6737:16:::8;:35:::0;;;;6805:12:::8;6783:19;:34:::0;;;6828:22:::8;:37:::0;-1:-1:-1;;;;;6878:14:3;;::::8;6553:40;6878:14;-1:-1:-1::0;;;;;;6553:40:3::8;::::0;;::::8;-1:-1:-1::0;;6553:40:3;;::::8;::::0;;;::::8;6878:14;::::0;;;::::8;::::0;;900:17593;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;351:112::-;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;;;1041:126;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;;;;;;;;;;;;;;900:17593:3;;;;;;;", + "deployedSourceMap": "900:17593:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10400:302;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10400:302:3;;-1:-1:-1;10400:302:3;;-1:-1:-1;;;;;10400:302:3:i;:::-;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;1675:28:3:-;;;:::i;:::-;;;;;;;;;;;;;;;;16338:392;;;:::i;1949:34::-;;;:::i;16898:422::-;;;:::i;1555:23::-;;;:::i;2856:42::-;;;;;;;;;;;;;;;;-1:-1:-1;2856:42:3;-1:-1:-1;;;;;2856:42:3;;:::i;:::-;;;;;;;;;;;;;;;;;;1333:38:56;;;:::i;12106:684:3:-;;;;;;;;;;;;;;;;-1:-1:-1;12106:684:3;;;;;;;;;;;;;;;;;:::i;11033:637::-;;;;;;;;;;;;;;;;-1:-1:-1;11033:637:3;;;;;;;;;;;;:::i;2300:925:56:-;;;:::i;2043:37:3:-;;;:::i;1438:30::-;;;:::i;1280:34::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1196:290:62;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:62;;;;;;;;;;;;;;;;;:::i;1243:37:56:-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;13353:2023:3;;;;;;;;;;;;;;;;-1:-1:-1;13353:2023:3;;;;;;;;-1:-1:-1;;;;;13353:2023:3;;;;;;;;;;;;;;;:::i;8408:254::-;;;;;;;;;;;;;;;;-1:-1:-1;8408:254:3;;:::i;1862:31::-;;;:::i;1422:217:57:-;;;:::i;1154:33:56:-;;;:::i;9057:171:3:-;;;;;;;;;;;;;;;;-1:-1:-1;9057:171:3;;;;:::i;2735:65::-;;;;;;;;;;;;;;;;-1:-1:-1;2735:65:3;;;;;;-1:-1:-1;;;;;2735:65:3;;:::i;219:29:57:-;;;:::i;2399:35:3:-;;;:::i;2520:52::-;;;;;;;;;;;;;;;;-1:-1:-1;2520:52:3;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;;;;;2520:52:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;8776:163;;;;;;;;;;;;;;;;-1:-1:-1;8776:163:3;;:::i;9743:103::-;;;;;;;;;;;;;;;;-1:-1:-1;9743:103:3;;;;:::i;1323:27::-;;;:::i;15778:397::-;;;;;;;;;;;;;;;;-1:-1:-1;15778:397:3;;;;;;-1:-1:-1;;;;;15778:397:3;;:::i;7897:143::-;;;;;;;;;;;;;;;;-1:-1:-1;7897:143:3;;:::i;3304:137:56:-;;;:::i;8152:158:3:-;;;;;;;;;;;;;;;;-1:-1:-1;8152:158:3;;:::i;2140:31::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;255:23:57;;;:::i;9460:120:3:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9460:120:3;;;;;;;;;;:::i;2609:50::-;;;;;;;;;;;;;;;;-1:-1:-1;2609:50:3;;:::i;10017:101::-;;;;;;;;;;;;;;;;-1:-1:-1;10017:101:3;;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1767:31:3:-;;;:::i;2305:36::-;;;:::i;2243:33::-;;;:::i;10400:302::-;726:12:57;:10;:12::i;:::-;10474:32:3::1;10526:28;-1:-1:-1::0;;;10526:9:3::1;:28::i;:::-;10474:81;;10568:43;10594:15;10568:17;:43::i;:::-;10622:44;::::0;;-1:-1:-1;;;10622:44:3;;1313:1:::1;10622:44:::0;;::::1;::::0;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10622:23:3;::::1;::::0;::::1;::::0;10655:10;;10622:44;;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;-1:-1:-1;10622:44:3::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;10677:17;:15;:17::i;:::-;749:1:57;10400:302:3::0;:::o;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;1675:28:3:-;;;;:::o;16338:392::-;16390:7;16499:24;16526:82;16544:63;16590:16;;16545:39;16564:19;;16546:12;16545:18;;:39;;;;:::i;:::-;16544:45;;:63::i;:::-;16526:13;;;:17;:82::i;:::-;16499:109;;16642:12;;16623:16;:31;16619:69;;;-1:-1:-1;;16676:12:3;;16669:19;;16619:69;16706:16;-1:-1:-1;16338:392:3;;:::o;1949:34::-;;;;:::o;16898:422::-;16953:7;17068:27;17098:88;17119:66;17168:16;;17120:42;17139:22;;17121:12;17120:18;;:42;;;;:::i;17119:66::-;17098:16;;;:20;:88::i;:::-;17068:118;;17223:15;;17201:19;:37;17197:78;;;-1:-1:-1;;17260:15:3;;17253:22;;1555:23;;;;:::o;2856:42::-;;;;;;;;;;;;;;;:::o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;12106:684:3:-;7293:20;:18;:20::i;:::-;12275:24:::1;12302:21;:19;:21::i;:::-;12275:48;;12421:8;;12410:7;:19;;:50;;;;;12444:16;12433:7;:27;;12410:50;12402:82;;;::::0;;-1:-1:-1;;;12402:82:3;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;12402:82:3;;;;;;;;;;;;;::::1;;12497:19;12508:7;12497:10;:19::i;:::-;12602:29;:16:::0;12623:7;12602:20:::1;:29::i;:::-;12586:13;:45:::0;12664:12:::1;12642:19;:34:::0;12727:55:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;12764:3;;12737:10:::1;::::0;12727:55:::1;::::0;;;;;;;::::1;7324:1;12106:684:::0;;;;:::o;11033:637::-;7293:20;:18;:20::i;:::-;11180:24:::1;11207:21;:19;:21::i;:::-;11180:48;;11290:8;;11279:7;:19;;:50;;;;;11313:16;11302:7;:27;;11279:50;11271:82;;;::::0;;-1:-1:-1;;;11271:82:3;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11271:82:3;;;;;;;;;;;;;::::1;;11366:19;11377:7;11366:10;:19::i;:::-;11471:29;:16:::0;11492:7;11471:20:::1;:29::i;:::-;11455:13;:45:::0;11533:12:::1;11511:19;:34:::0;11609:53:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;-1:-1:-1;11609:53:3;;;;;;11646:3;;11619:10:::1;::::0;11609:53:::1;::::0;;;;;;;::::1;7324:1;11033:637:::0;;;:::o;2300:925:56:-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;2043:37:3:-;;;;:::o;1438:30::-;;;;:::o;1280:34::-;1313:1;1280:34;:::o;1196:290:62:-;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:64::3;::::2;749::57::1;1196:290:62::0;;;:::o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;13353:2023:3:-;6989:15;:13;:15::i;:::-;7594:19:::1;:17;:19::i;:::-;13601:3:::2;594:23:64;608:8;594:13;:23::i;:::-;13631:7:3::3;252:24:64;269:6;252:16;:24::i;:::-;13748:18:3::4;::::0;;;:11:::4;:18;::::0;;;;;;;13767:10:::4;13748:30:::0;;;;;;;;::::4;;13747:31;13739:64;;;::::0;;-1:-1:-1;;;13739:64:3;;::::4;;::::0;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;13739:64:3;;;;;;;;;;;;;::::4;;13849:18;::::0;;;:11:::4;:18;::::0;;;;;;;13868:10:::4;13849:30:::0;;;;;;;:37;;-1:-1:-1;;13849:37:3::4;13882:4;13849:37;::::0;;13925:19;;;:12:::4;:19:::0;;;;;14038:16:::4;::::0;::::4;::::0;-1:-1:-1;;;14038:16:3;::::4;13849:37;14038:16;14034:756;;14076:6;::::0;::::4;:12:::0;;-1:-1:-1;;;;;;14076:12:3::4;-1:-1:-1::0;;;;;14076:12:3;::::4;;::::0;;14103:20;;;-1:-1:-1;14138:18:3;::::4;:36:::0;;;14195:17;;14191:257:::4;;14318:28;::::0;;;:14:::4;:28;::::0;;;;;:33;14310:67:::4;;;::::0;;-1:-1:-1;;;14310:67:3;;::::4;;::::0;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;14310:67:3;;;;;;;;;;;;;::::4;;14396:28;::::0;;;:14:::4;:28;::::0;;;;:36;;;14191:257:::4;14034:756;;;14551:6;::::0;::::4;::::0;-1:-1:-1;;;;;14551:13:3;;::::4;:6:::0;::::4;:13;:38:::0;::::4;;;-1:-1:-1::0;14568:10:3;;:21;::::4;14551:38;:79;;;;;14615:15;14593:3;:18;;;:37;14551:79;14543:107;;;::::0;;-1:-1:-1;;;14543:107:3;;::::4;;::::0;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;14543:107:3;;;;;;;;;;;;;::::4;;14671:17:::0;;14667:111:::4;;14715:28;::::0;;;:14:::4;:28;::::0;;;;;:37;::::4;14707:71;;;::::0;;-1:-1:-1;;;14707:71:3;;::::4;;::::0;::::4;::::0;::::4;::::0;;;;-1:-1:-1;;;14707:71:3;;;;;;;;;;;;;::::4;;14846:16;::::0;::::4;:18:::0;;::::4;;-1:-1:-1::0;;;14846:18:3;;::::4;::::0;::::4;::::0;;;::::4;;;-1:-1:-1::0;;;;14846:18:3;;::::4;;::::0;;14882:72:::4;::::0;;;;;::::4;::::0;::::4;::::0;;;-1:-1:-1;;;;;14882:72:3;::::4;::::0;;;;;;;;;;;;;;;;;;14891:10:::4;::::0;14882:72:::4;::::0;;;;;;;;::::4;15051:18;::::0;15031:16:::4;::::0;::::4;::::0;15051:18:::4;::::0;;::::4;-1:-1:-1::0;;;15031:16:3;;::::4;::::0;;::::4;:38;15027:342;;15095:19;::::0;;;:12:::4;:19;::::0;;;;:29:::4;;::::0;-1:-1:-1;;;15095:29:3;::::4;;;15094:30;15086:67;;;::::0;;-1:-1:-1;;;15086:67:3;;::::4;;::::0;::::4;::::0;::::4;::::0;;;;::::4;::::0;;;;;;;;;;;;;::::4;;15219:19;::::0;;;:12:::4;:19;::::0;;;;;;;;:29:::4;;:36:::0;;-1:-1:-1;;;;15219:36:3::4;-1:-1:-1::0;;;15219:36:3::4;::::0;;15277;;-1:-1:-1;;;;;15277:36:3;::::4;::::0;;;;::::4;::::0;;;;;::::4;::::0;;;;;;;;;::::4;15330:27;15344:3;15349:7;15330:13;:27::i;:::-;287:1:64;628::::3;7624::3::2;13353:2023:::0;;;;;:::o;8408:254::-;726:12:57;:10;:12::i;:::-;8481:9:3::1;252:24:64;269:6;252:16;:24::i;:::-;8551:12:3::2;;8538:9;:25;;:57;;;;;8580:15;;8567:9;:28;;8538:57;8530:91;;;::::0;;-1:-1:-1;;;8530:91:3;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;8530:91:3;;;;;;;;;;;;;::::2;;-1:-1:-1::0;8634:8:3::2;:20:::0;8408:254::o;1862:31::-;;;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;9057:171:3:-;726:12:57;:10;:12::i;:::-;9148:19:3::1;200:96:64;;252:24;269:6;252:16;:24::i;:::-;-1:-1:-1::0;9180:18:3::2;:40:::0;;-1:-1:-1;;9180:40:3::2;;::::0;;;::::2;::::0;;;::::2;::::0;;9057:171::o;2735:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;2399:35:3:-;;;-1:-1:-1;;;2399:35:3;;;;;:::o;2520:52::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2520:52:3;;;;-1:-1:-1;;;2520:52:3;;;;;-1:-1:-1;;;2520:52:3;;;;:::o;8776:163::-;726:12:57;:10;:12::i;:::-;8865:17:3::1;252:24:64;269:6;252:16;:24::i;:::-;-1:-1:-1::0;8895:16:3::2;:36:::0;8776:163::o;9743:103::-;726:12:57;:10;:12::i;:::-;9811:17:3::1;:27:::0;;;::::1;;-1:-1:-1::0;;;9811:27:3::1;-1:-1:-1::0;;;;9811:27:3;;::::1;::::0;;;::::1;::::0;;9743:103::o;1323:27::-;;;;:::o;15778:397::-;15872:7;15939:30;;:::i;:::-;-1:-1:-1;15972:42:3;15985:28;;;:14;:28;;;;;;;;;15972:42;;:12;:42;;;;;;15939:75;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15939:75:3;;;;;;;;;;-1:-1:-1;;;15939:75:3;;;;;;;;-1:-1:-1;;;15939:75:3;;;;;;;;;;;;;;16087:22;;;;16079:50;;;;;-1:-1:-1;;;16079:50:3;;;;;;;;;;;;-1:-1:-1;;;16079:50:3;;;;;;;;;;;;;;;16149:18;;-1:-1:-1;15778:397:3;;;;;:::o;7897:143::-;726:12:57;:10;:12::i;:::-;7978:13:3::1;252:24:64;269:6;252:16;:24::i;:::-;-1:-1:-1::0;8004:12:3::2;:28:::0;7897:143::o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;8152:158:3:-;726:12:57;:10;:12::i;:::-;8239:16:3::1;252:24:64;269:6;252:16;:24::i;:::-;-1:-1:-1::0;8268:15:3::2;:34:::0;8152:158::o;2140:31::-;;;;;;:::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;9460:120:3:-;726:12:57;:10;:12::i;:::-;-1:-1:-1;;;;;9542:20:3;;;::::1;;::::0;;;:9:::1;:20;::::0;;;;:30;;-1:-1:-1;;9542:30:3::1;::::0;::::1;;::::0;;;::::1;::::0;;9460:120::o;2609:50::-;;;;;;;;;;;;;:::o;10017:101::-;726:12:57;:10;:12::i;:::-;10084:16:3::1;:26:::0;;;::::1;;-1:-1:-1::0;;;10084:26:3::1;-1:-1:-1::0;;;;10084:26:3;;::::1;::::0;;;::::1;::::0;;10017:101::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;1767:31:3:-;;;;:::o;2305:36::-;;;-1:-1:-1;;;2305:36:3;;;;;:::o;2243:33::-;;;;;;-1:-1:-1;;;;;2243:33:3;;:::o;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o;778:147:60:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;1149:250::-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;;1390:1;1149:250;-1:-1:-1;;;1149:250:60:o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;7388:105:3;7451:17;;-1:-1:-1;;;7451:17:3;;;;7443:42;;;;;-1:-1:-1;;;7443:42:3;;;;;;;;;;;;-1:-1:-1;;;7443:42:3;;;;;;;;;;;;;;17511:170;17584:5;;17567:59;;17584:5;;;-1:-1:-1;;;;;17584:5:3;17591:10;17611:4;17618:7;17567:16;:59::i;:::-;17642:31;;;;;;;;17653:10;;17642:31;;;;;;;;;;17511:170;:::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;1485:312:61;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o;7079:109:3:-;7147:10;7137:21;;;;:9;:21;;;;;;;;7129:51;;;;;-1:-1:-1;;;7129:51:3;;;;;;;;;;;;-1:-1:-1;;;7129:51:3;;;;;;;;;;;;;;7688:103;7750:16;;-1:-1:-1;;;7750:16:3;;;;7742:41;;;;;-1:-1:-1;;;7742:41:3;;;;;;;;;;;;-1:-1:-1;;;7742:41:3;;;;;;;;;;;;;;351:112:64;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;;;17899:591:3;18013:27;18043:24;:22;:24::i;:::-;18013:54;;18099:8;;18088:7;:19;;:53;;;;;18122:19;18111:7;:30;;18088:53;18080:85;;;;;-1:-1:-1;;;18080:85:3;;;;;;;;;;;;-1:-1:-1;;;18080:85:3;;;;;;;;;;;;;;;18260:32;:19;18284:7;18260:23;:32::i;:::-;18241:16;:51;18328:12;18303:22;:37;18417:5;;18404:33;;18417:5;;;-1:-1:-1;;;;;18417:5:3;18424:3;18429:7;18404:12;:33::i;:::-;18455:27;;;;;;;;-1:-1:-1;;;;;18455:27:3;;;;;;;;;;;;;17899:591;;;:::o;2190:348:61:-;2355:71;;;-1:-1:-1;;;;;2355:71:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:61;-1:-1:-1;;;2355:71:61;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:61;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:61;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:61;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IBancorXUpgrader.sol\";\r\nimport \"./interfaces/IBancorX.sol\";\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\nimport \"../utility/TokenHandler.sol\";\r\nimport \"../utility/TokenHolder.sol\";\r\n\r\n/**\r\n * @dev The BancorX contract allows cross chain token transfers.\r\n *\r\n * There are two processes that take place in the contract -\r\n * - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)\r\n * - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)\r\n *\r\n * Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple\r\n * callers are required to report a transfer before tokens are released to the target account.\r\n*/\r\ncontract BancorX is IBancorX, TokenHandler, TokenHolder, ContractRegistryClient {\r\n using SafeMath for uint256;\r\n\r\n // represents a transaction on another blockchain where tokens were destroyed/locked\r\n struct Transaction {\r\n uint256 amount;\r\n bytes32 fromBlockchain;\r\n address to;\r\n uint8 numOfReports;\r\n bool completed;\r\n }\r\n\r\n uint16 public constant version = 4;\r\n\r\n uint256 public maxLockLimit; // the maximum amount of tokens that can be locked in one transaction\r\n uint256 public maxReleaseLimit; // the maximum amount of tokens that can be released in one transaction\r\n uint256 public minLimit; // the minimum amount of tokens that can be transferred in one transaction\r\n uint256 public prevLockLimit; // the lock limit *after* the last transaction\r\n uint256 public prevReleaseLimit; // the release limit *after* the last transaction\r\n uint256 public limitIncPerBlock; // how much the limit increases per block\r\n uint256 public prevLockBlockNumber; // the block number of the last lock transaction\r\n uint256 public prevReleaseBlockNumber; // the block number of the last release transaction\r\n uint8 public minRequiredReports; // minimum number of required reports to release tokens\r\n\r\n IERC20Token public override token; // erc20 token\r\n\r\n bool public xTransfersEnabled = true; // true if x transfers are enabled, false if not\r\n bool public reportingEnabled = true; // true if reporting is enabled, false if not\r\n\r\n // txId -> Transaction\r\n mapping (uint256 => Transaction) public transactions;\r\n\r\n // xTransferId -> txId\r\n mapping (uint256 => uint256) public transactionIds;\r\n\r\n // txId -> reporter -> true if reporter already reported txId\r\n mapping (uint256 => mapping (address => bool)) public reportedTxs;\r\n\r\n // address -> true if address is reporter\r\n mapping (address => bool) public reporters;\r\n\r\n /**\r\n * @dev triggered when tokens are locked in smart contract\r\n *\r\n * @param _from wallet address that the tokens are locked from\r\n * @param _amount amount locked\r\n */\r\n event TokensLock(\r\n address indexed _from,\r\n uint256 _amount\r\n );\r\n\r\n /**\r\n * @dev triggered when tokens are released by the smart contract\r\n *\r\n * @param _to wallet address that the tokens are released to\r\n * @param _amount amount released\r\n */\r\n event TokensRelease(\r\n address indexed _to,\r\n uint256 _amount\r\n );\r\n\r\n /**\r\n * @dev triggered when xTransfer is successfully called\r\n *\r\n * @param _from wallet address that initiated the xtransfer\r\n * @param _toBlockchain target blockchain\r\n * @param _to target wallet\r\n * @param _amount transfer amount\r\n * @param _id xtransfer id\r\n */\r\n event XTransfer(\r\n address indexed _from,\r\n bytes32 _toBlockchain,\r\n bytes32 indexed _to,\r\n uint256 _amount,\r\n uint256 _id\r\n );\r\n\r\n /**\r\n * @dev triggered when report is successfully submitted\r\n *\r\n * @param _reporter reporter wallet\r\n * @param _fromBlockchain source blockchain\r\n * @param _txId tx id on the source blockchain\r\n * @param _to target wallet\r\n * @param _amount transfer amount\r\n * @param _xTransferId xtransfer id\r\n */\r\n event TxReport(\r\n address indexed _reporter,\r\n bytes32 _fromBlockchain,\r\n uint256 _txId,\r\n address _to,\r\n uint256 _amount,\r\n uint256 _xTransferId\r\n );\r\n\r\n /**\r\n * @dev triggered when final report is successfully submitted\r\n *\r\n * @param _to target wallet\r\n * @param _id xtransfer id\r\n */\r\n event XTransferComplete(\r\n address _to,\r\n uint256 _id\r\n );\r\n\r\n /**\r\n * @dev initializes a new BancorX instance\r\n *\r\n * @param _maxLockLimit maximum amount of tokens that can be locked in one transaction\r\n * @param _maxReleaseLimit maximum amount of tokens that can be released in one transaction\r\n * @param _minLimit minimum amount of tokens that can be transferred in one transaction\r\n * @param _limitIncPerBlock how much the limit increases per block\r\n * @param _minRequiredReports minimum number of reporters to report transaction before tokens can be released\r\n * @param _registry address of contract registry\r\n * @param _token erc20 token\r\n */\r\n constructor(\r\n uint256 _maxLockLimit,\r\n uint256 _maxReleaseLimit,\r\n uint256 _minLimit,\r\n uint256 _limitIncPerBlock,\r\n uint8 _minRequiredReports,\r\n IContractRegistry _registry,\r\n IERC20Token _token\r\n ) ContractRegistryClient(_registry)\r\n public\r\n greaterThanZero(_maxLockLimit)\r\n greaterThanZero(_maxReleaseLimit)\r\n greaterThanZero(_minLimit)\r\n greaterThanZero(_limitIncPerBlock)\r\n greaterThanZero(_minRequiredReports)\r\n validAddress(address(_token))\r\n notThis(address(_token))\r\n {\r\n // validate input\r\n require(_minLimit <= _maxLockLimit && _minLimit <= _maxReleaseLimit, \"ERR_INVALID_MIN_LIMIT\");\r\n\r\n // the maximum limits, minimum limit, and limit increase per block\r\n maxLockLimit = _maxLockLimit;\r\n maxReleaseLimit = _maxReleaseLimit;\r\n minLimit = _minLimit;\r\n limitIncPerBlock = _limitIncPerBlock;\r\n minRequiredReports = _minRequiredReports;\r\n\r\n // previous limit is _maxLimit, and previous block number is current block number\r\n prevLockLimit = _maxLockLimit;\r\n prevReleaseLimit = _maxReleaseLimit;\r\n prevLockBlockNumber = block.number;\r\n prevReleaseBlockNumber = block.number;\r\n\r\n token = _token;\r\n }\r\n\r\n // validates that the caller is a reporter\r\n modifier reporterOnly {\r\n _reporterOnly();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _reporterOnly() internal view {\r\n require(reporters[msg.sender], \"ERR_ACCESS_DENIED\");\r\n }\r\n\r\n // allows execution only when x transfers are enabled\r\n modifier xTransfersAllowed {\r\n _xTransfersAllowed();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _xTransfersAllowed() internal view {\r\n require(xTransfersEnabled, \"ERR_DISABLED\");\r\n }\r\n\r\n // allows execution only when reporting is enabled\r\n modifier reportingAllowed {\r\n _reportingAllowed();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _reportingAllowed() internal view {\r\n require(reportingEnabled, \"ERR_DISABLED\");\r\n }\r\n\r\n /**\r\n * @dev setter\r\n *\r\n * @param _maxLockLimit new maxLockLimit\r\n */\r\n function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly greaterThanZero(_maxLockLimit) {\r\n maxLockLimit = _maxLockLimit;\r\n }\r\n\r\n /**\r\n * @dev setter\r\n *\r\n * @param _maxReleaseLimit new maxReleaseLimit\r\n */\r\n function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly greaterThanZero(_maxReleaseLimit) {\r\n maxReleaseLimit = _maxReleaseLimit;\r\n }\r\n\r\n /**\r\n * @dev setter\r\n *\r\n * @param _minLimit new minLimit\r\n */\r\n function setMinLimit(uint256 _minLimit) public ownerOnly greaterThanZero(_minLimit) {\r\n // validate input\r\n require(_minLimit <= maxLockLimit && _minLimit <= maxReleaseLimit, \"ERR_INVALID_MIN_LIMIT\");\r\n\r\n minLimit = _minLimit;\r\n }\r\n\r\n /**\r\n * @dev setter\r\n *\r\n * @param _limitIncPerBlock new limitIncPerBlock\r\n */\r\n function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly greaterThanZero(_limitIncPerBlock) {\r\n limitIncPerBlock = _limitIncPerBlock;\r\n }\r\n\r\n /**\r\n * @dev setter\r\n *\r\n * @param _minRequiredReports new minRequiredReports\r\n */\r\n function setMinRequiredReports(uint8 _minRequiredReports) public ownerOnly greaterThanZero(_minRequiredReports) {\r\n minRequiredReports = _minRequiredReports;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to set/remove reporters\r\n *\r\n * @param _reporter reporter whos status is to be set\r\n * @param _active true if the reporter is approved, false otherwise\r\n */\r\n function setReporter(address _reporter, bool _active) public ownerOnly {\r\n reporters[_reporter] = _active;\r\n }\r\n\r\n /**\r\n * @dev allows the owner enable/disable the xTransfer method\r\n *\r\n * @param _enable true to enable, false to disable\r\n */\r\n function enableXTransfers(bool _enable) public ownerOnly {\r\n xTransfersEnabled = _enable;\r\n }\r\n\r\n /**\r\n * @dev allows the owner enable/disable the reportTransaction method\r\n *\r\n * @param _enable true to enable, false to disable\r\n */\r\n function enableReporting(bool _enable) public ownerOnly {\r\n reportingEnabled = _enable;\r\n }\r\n\r\n /**\r\n * @dev upgrades the contract to the latest version\r\n * can only be called by the owner\r\n * note that the owner needs to call acceptOwnership on the new contract after the upgrade\r\n *\r\n * @param _reporters new list of reporters\r\n */\r\n function upgrade(address[] memory _reporters) public ownerOnly {\r\n IBancorXUpgrader bancorXUpgrader = IBancorXUpgrader(addressOf(BANCOR_X_UPGRADER));\r\n\r\n transferOwnership(address(bancorXUpgrader));\r\n bancorXUpgrader.upgrade(version, _reporters);\r\n acceptOwnership();\r\n }\r\n\r\n /**\r\n * @dev claims tokens from msg.sender to be converted to tokens on another blockchain\r\n *\r\n * @param _toBlockchain blockchain on which tokens will be issued\r\n * @param _to address to send the tokens to\r\n * @param _amount the amount of tokens to transfer\r\n */\r\n function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public xTransfersAllowed {\r\n // get the current lock limit\r\n uint256 currentLockLimit = getCurrentLockLimit();\r\n\r\n // verify lock limit\r\n require(_amount >= minLimit && _amount <= currentLockLimit, \"ERR_AMOUNT_TOO_HIGH\");\r\n\r\n lockTokens(_amount);\r\n\r\n // set the previous lock limit and block number\r\n prevLockLimit = currentLockLimit.sub(_amount);\r\n prevLockBlockNumber = block.number;\r\n\r\n // emit XTransfer event with id of 0\r\n emit XTransfer(msg.sender, _toBlockchain, _to, _amount, 0);\r\n }\r\n\r\n /**\r\n * @dev claims tokens from msg.sender to be converted to tokens on another blockchain\r\n *\r\n * @param _toBlockchain blockchain on which tokens will be issued\r\n * @param _to address to send the tokens to\r\n * @param _amount the amount of tokens to transfer\r\n * @param _id pre-determined unique (if non zero) id which refers to this transaction\r\n */\r\n function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount, uint256 _id) public override xTransfersAllowed {\r\n // get the current lock limit\r\n uint256 currentLockLimit = getCurrentLockLimit();\r\n\r\n // require that; minLimit <= _amount <= currentLockLimit\r\n require(_amount >= minLimit && _amount <= currentLockLimit, \"ERR_AMOUNT_TOO_HIGH\");\r\n\r\n lockTokens(_amount);\r\n\r\n // set the previous lock limit and block number\r\n prevLockLimit = currentLockLimit.sub(_amount);\r\n prevLockBlockNumber = block.number;\r\n\r\n // emit XTransfer event\r\n emit XTransfer(msg.sender, _toBlockchain, _to, _amount, _id);\r\n }\r\n\r\n /**\r\n * @dev allows reporter to report transaction which occured on another blockchain\r\n *\r\n * @param _fromBlockchain blockchain in which tokens were destroyed\r\n * @param _txId transactionId of transaction thats being reported\r\n * @param _to address to receive tokens\r\n * @param _amount amount of tokens destroyed on another blockchain\r\n * @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been mined)\r\n */\r\n function reportTx(\r\n bytes32 _fromBlockchain,\r\n uint256 _txId,\r\n address _to,\r\n uint256 _amount,\r\n uint256 _xTransferId\r\n )\r\n public\r\n reporterOnly\r\n reportingAllowed\r\n validAddress(_to)\r\n greaterThanZero(_amount)\r\n {\r\n // require that the transaction has not been reported yet by the reporter\r\n require(!reportedTxs[_txId][msg.sender], \"ERR_ALREADY_REPORTED\");\r\n\r\n // set reported as true\r\n reportedTxs[_txId][msg.sender] = true;\r\n\r\n Transaction storage txn = transactions[_txId];\r\n\r\n // If the caller is the first reporter, set the transaction details\r\n if (txn.numOfReports == 0) {\r\n txn.to = _to;\r\n txn.amount = _amount;\r\n txn.fromBlockchain = _fromBlockchain;\r\n\r\n if (_xTransferId != 0) {\r\n // verify uniqueness of xTransfer id to prevent overwriting\r\n require(transactionIds[_xTransferId] == 0, \"ERR_TX_ALREADY_EXISTS\");\r\n transactionIds[_xTransferId] = _txId;\r\n }\r\n }\r\n else {\r\n // otherwise, verify transaction details\r\n require(txn.to == _to && txn.amount == _amount && txn.fromBlockchain == _fromBlockchain, \"ERR_TX_MISMATCH\");\r\n\r\n if (_xTransferId != 0)\r\n require(transactionIds[_xTransferId] == _txId, \"ERR_TX_ALREADY_EXISTS\");\r\n }\r\n\r\n // increment the number of reports\r\n txn.numOfReports++;\r\n\r\n emit TxReport(msg.sender, _fromBlockchain, _txId, _to, _amount, _xTransferId);\r\n\r\n // if theres enough reports, try to release tokens\r\n if (txn.numOfReports >= minRequiredReports) {\r\n require(!transactions[_txId].completed, \"ERR_TX_ALREADY_COMPLETED\");\r\n\r\n // set the transaction as completed\r\n transactions[_txId].completed = true;\r\n\r\n emit XTransferComplete(_to, _xTransferId);\r\n\r\n releaseTokens(_to, _amount);\r\n }\r\n }\r\n\r\n /**\r\n * @dev gets x transfer amount by xTransferId (not txId)\r\n *\r\n * @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been broadcasted)\r\n * @param _for address corresponding to xTransferId\r\n *\r\n * @return amount that was sent in xTransfer corresponding to _xTransferId\r\n */\r\n function getXTransferAmount(uint256 _xTransferId, address _for) public view override returns (uint256) {\r\n // xTransferId -> txId -> Transaction\r\n Transaction memory transaction = transactions[transactionIds[_xTransferId]];\r\n\r\n // verify that the xTransferId is for _for\r\n require(transaction.to == _for, \"ERR_TX_MISMATCH\");\r\n\r\n return transaction.amount;\r\n }\r\n\r\n /**\r\n * @dev method for calculating current lock limit\r\n *\r\n * @return the current maximum limit of tokens that can be locked\r\n */\r\n function getCurrentLockLimit() public view returns (uint256) {\r\n // prevLockLimit + ((currBlockNumber - prevLockBlockNumber) * limitIncPerBlock)\r\n uint256 currentLockLimit = prevLockLimit.add(((block.number).sub(prevLockBlockNumber)).mul(limitIncPerBlock));\r\n if (currentLockLimit > maxLockLimit)\r\n return maxLockLimit;\r\n return currentLockLimit;\r\n }\r\n\r\n /**\r\n * @dev method for calculating current release limit\r\n *\r\n * @return the current maximum limit of tokens that can be released\r\n */\r\n function getCurrentReleaseLimit() public view returns (uint256) {\r\n // prevReleaseLimit + ((currBlockNumber - prevReleaseBlockNumber) * limitIncPerBlock)\r\n uint256 currentReleaseLimit = prevReleaseLimit.add(((block.number).sub(prevReleaseBlockNumber)).mul(limitIncPerBlock));\r\n if (currentReleaseLimit > maxReleaseLimit)\r\n return maxReleaseLimit;\r\n return currentReleaseLimit;\r\n }\r\n\r\n /**\r\n * @dev claims and locks tokens from msg.sender to be converted to tokens on another blockchain\r\n *\r\n * @param _amount the amount of tokens to lock\r\n */\r\n function lockTokens(uint256 _amount) private {\r\n safeTransferFrom(token, msg.sender, address(this), _amount);\r\n emit TokensLock(msg.sender, _amount);\r\n }\r\n\r\n /**\r\n * @dev private method to release tokens held by the contract\r\n *\r\n * @param _to the address to release tokens to\r\n * @param _amount the amount of tokens to release\r\n */\r\n function releaseTokens(address _to, uint256 _amount) private {\r\n // get the current release limit\r\n uint256 currentReleaseLimit = getCurrentReleaseLimit();\r\n\r\n require(_amount >= minLimit && _amount <= currentReleaseLimit, \"ERR_AMOUNT_TOO_HIGH\");\r\n\r\n // update the previous release limit and block number\r\n prevReleaseLimit = currentReleaseLimit.sub(_amount);\r\n prevReleaseBlockNumber = block.number;\r\n\r\n // no need to require, reverts on failure\r\n safeTransfer(token, _to, _amount);\r\n\r\n emit TokensRelease(_to, _amount);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/BancorX.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/BancorX.sol", + "exportedSymbols": { + "BancorX": [ + 3447 + ] + }, + "id": 3448, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2548, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:3" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol", + "file": "./interfaces/IBancorXUpgrader.sol", + "id": 2549, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 3563, + "src": "77:43:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./interfaces/IBancorX.sol", + "id": 2550, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 3552, + "src": "122:35:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 2551, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 21720, + "src": "159:47:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 2552, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22355, + "src": "208:33:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 2553, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22527, + "src": "243:37:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 2554, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22576, + "src": "282:36:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2556, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "920:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 2557, + "nodeType": "InheritanceSpecifier", + "src": "920:8:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2558, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "930:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 2559, + "nodeType": "InheritanceSpecifier", + "src": "930:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2560, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "944:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 2561, + "nodeType": "InheritanceSpecifier", + "src": "944:11:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2562, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "957:22:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 2563, + "nodeType": "InheritanceSpecifier", + "src": "957:22:3" + } + ], + "contractDependencies": [ + 3551, + 21719, + 21818, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "322:576:3", + "text": " @dev The BancorX contract allows cross chain token transfers.\n There are two processes that take place in the contract -\n - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)\n - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)\n Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple\n callers are required to report a transfer before tokens are released to the target account." + }, + "fullyImplemented": true, + "id": 3447, + "linearizedBaseContracts": [ + 3447, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847, + 3551 + ], + "name": "BancorX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2566, + "libraryName": { + "contractScope": null, + "id": 2564, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "993:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "987:27:3", + "typeName": { + "id": 2565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "BancorX.Transaction", + "id": 2577, + "members": [ + { + "constant": false, + "id": 2568, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1142:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2567, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1142:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2570, + "mutability": "mutable", + "name": "fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1167:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2569, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1167:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2572, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1200:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2571, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1200:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "numOfReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1221:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2573, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1221:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "completed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1250:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2575, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1250:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Transaction", + "nodeType": "StructDefinition", + "scope": 3447, + "src": "1112:160:3", + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "54fd4d50", + "id": 2580, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1280:34:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2578, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1280:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "34", + "id": 2579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1313:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "a8c36a90", + "id": 2582, + "mutability": "mutable", + "name": "maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1323:27:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "52e94ce3", + "id": 2584, + "mutability": "mutable", + "name": "maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1438:30:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2583, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1438:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1fd8088d", + "id": 2586, + "mutability": "mutable", + "name": "minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1555:23:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1555:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "16c76c27", + "id": 2588, + "mutability": "mutable", + "name": "prevLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1675:28:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2587, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1675:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "f7385f76", + "id": 2590, + "mutability": "mutable", + "name": "prevReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1767:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1767:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "72f43d19", + "id": 2592, + "mutability": "mutable", + "name": "limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1862:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2591, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1862:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1aff29eb", + "id": 2594, + "mutability": "mutable", + "name": "prevLockBlockNumber", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1949:34:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1949:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "4b3e475c", + "id": 2596, + "mutability": "mutable", + "name": "prevReleaseBlockNumber", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2043:37:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2043:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "ca27e011", + "id": 2598, + "mutability": "mutable", + "name": "minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2140:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2597, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2140:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 3530 + ], + "constant": false, + "functionSelector": "fc0c546a", + "id": 2601, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 2600, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2262:8:3" + }, + "scope": 3447, + "src": "2243:33:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2599, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2243:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "fbb24692", + "id": 2604, + "mutability": "mutable", + "name": "xTransfersEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2305:36:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2602, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2305:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2337:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9390701c", + "id": 2607, + "mutability": "mutable", + "name": "reportingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2399:35:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2605, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2399:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2430:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9ace38c2", + "id": 2611, + "mutability": "mutable", + "name": "transactions", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2520:52:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction)" + }, + "typeName": { + "id": 2610, + "keyType": { + "id": 2608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2529:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2520:32:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction)" + }, + "valueType": { + "contractScope": null, + "id": 2609, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "2540:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e36f8dc5", + "id": 2615, + "mutability": "mutable", + "name": "transactionIds", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2609:50:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 2614, + "keyType": { + "id": 2612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2618:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2609:28:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 2613, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2629:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8544c52d", + "id": 2621, + "mutability": "mutable", + "name": "reportedTxs", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2735:65:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + }, + "typeName": { + "id": 2620, + "keyType": { + "id": 2616, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2744:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2735:46:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + }, + "valueType": { + "id": 2619, + "keyType": { + "id": 2617, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2764:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2755:25:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2618, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "2cc1cd9e", + "id": 2625, + "mutability": "mutable", + "name": "reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2856:42:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2624, + "keyType": { + "id": 2622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2865:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2856:25:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2623, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2876:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 2626, + "nodeType": "StructuredDocumentation", + "src": "2907:196:3", + "text": " @dev triggered when tokens are locked in smart contract\n @param _from wallet address that the tokens are locked from\n @param _amount amount locked" + }, + "id": 2632, + "name": "TokensLock", + "nodeType": "EventDefinition", + "parameters": { + "id": 2631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2632, + "src": "3136:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2627, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2630, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2632, + "src": "3168:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3168:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3125:65:3" + }, + "src": "3109:82:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2633, + "nodeType": "StructuredDocumentation", + "src": "3199:204:3", + "text": " @dev triggered when tokens are released by the smart contract\n @param _to wallet address that the tokens are released to\n @param _amount amount released" + }, + "id": 2639, + "name": "TokensRelease", + "nodeType": "EventDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2635, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2639, + "src": "3439:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3439:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2637, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2639, + "src": "3469:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2636, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3469:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3428:63:3" + }, + "src": "3409:83:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2640, + "nodeType": "StructuredDocumentation", + "src": "3500:352:3", + "text": " @dev triggered when xTransfer is successfully called\n @param _from wallet address that initiated the xtransfer\n @param _toBlockchain target blockchain\n @param _to target wallet\n @param _amount transfer amount\n @param _id xtransfer id" + }, + "id": 2652, + "name": "XTransfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 2651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2642, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3884:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3884:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2644, + "indexed": false, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3916:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3916:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2646, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3948:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2645, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2648, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3978:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2647, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3978:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2650, + "indexed": false, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "4004:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4004:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3873:149:3" + }, + "src": "3858:165:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2653, + "nodeType": "StructuredDocumentation", + "src": "4031:388:3", + "text": " @dev triggered when report is successfully submitted\n @param _reporter reporter wallet\n @param _fromBlockchain source blockchain\n @param _txId tx id on the source blockchain\n @param _to target wallet\n @param _amount transfer amount\n @param _xTransferId xtransfer id" + }, + "id": 2667, + "name": "TxReport", + "nodeType": "EventDefinition", + "parameters": { + "id": 2666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2655, + "indexed": true, + "mutability": "mutable", + "name": "_reporter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4450:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4450:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2657, + "indexed": false, + "mutability": "mutable", + "name": "_fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4486:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2656, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4486:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2659, + "indexed": false, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4520:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4520:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2661, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4544:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2660, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4544:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2663, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4566:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2665, + "indexed": false, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4592:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4592:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4439:180:3" + }, + "src": "4425:195:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2668, + "nodeType": "StructuredDocumentation", + "src": "4628:157:3", + "text": " @dev triggered when final report is successfully submitted\n @param _to target wallet\n @param _id xtransfer id" + }, + "id": 2674, + "name": "XTransferComplete", + "nodeType": "EventDefinition", + "parameters": { + "id": 2673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2674, + "src": "4825:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4825:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2672, + "indexed": false, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2674, + "src": "4847:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4847:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4814:51:3" + }, + "src": "4791:75:3" + }, + { + "body": { + "id": 2775, + "nodeType": "Block", + "src": "6171:729:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2723, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6217:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2724, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6230:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6217:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2726, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6247:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2727, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6260:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6247:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6217:59:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4d494e5f4c494d4954", + "id": 2730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6278:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + }, + "value": "ERR_INVALID_MIN_LIMIT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + } + ], + "id": 2722, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6209:93:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2732, + "nodeType": "ExpressionStatement", + "src": "6209:93:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2733, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "6391:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2734, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6406:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2736, + "nodeType": "ExpressionStatement", + "src": "6391:28:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2737, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "6430:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2738, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6448:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6430:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2740, + "nodeType": "ExpressionStatement", + "src": "6430:34:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2741, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "6475:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2742, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6486:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6475:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2744, + "nodeType": "ExpressionStatement", + "src": "6475:20:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2745, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "6506:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2746, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2683, + "src": "6525:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6506:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2748, + "nodeType": "ExpressionStatement", + "src": "6506:36:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2749, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "6553:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2750, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2685, + "src": "6574:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6553:40:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2752, + "nodeType": "ExpressionStatement", + "src": "6553:40:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2753, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "6697:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2754, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6713:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6697:29:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2756, + "nodeType": "ExpressionStatement", + "src": "6697:29:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2757, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "6737:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2758, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6756:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6737:35:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2760, + "nodeType": "ExpressionStatement", + "src": "6737:35:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2761, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "6783:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2762, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6805:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6805:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6783:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2765, + "nodeType": "ExpressionStatement", + "src": "6783:34:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2766, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "6828:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2767, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6853:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6853:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6828:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2770, + "nodeType": "ExpressionStatement", + "src": "6828:37:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2771, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "6878:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2772, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6886:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6878:14:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 2774, + "nodeType": "ExpressionStatement", + "src": "6878:14:3" + } + ] + }, + "documentation": { + "id": 2675, + "nodeType": "StructuredDocumentation", + "src": "4874:699:3", + "text": " @dev initializes a new BancorX instance\n @param _maxLockLimit maximum amount of tokens that can be locked in one transaction\n @param _maxReleaseLimit maximum amount of tokens that can be released in one transaction\n @param _minLimit minimum amount of tokens that can be transferred in one transaction\n @param _limitIncPerBlock how much the limit increases per block\n @param _minRequiredReports minimum number of reporters to report transaction before tokens can be released\n @param _registry address of contract registry\n @param _token erc20 token" + }, + "id": 2776, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2692, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2687, + "src": "5857:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 2693, + "modifierName": { + "argumentTypes": null, + "id": 2691, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "5834:22:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5834:33:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2695, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "5909:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2696, + "modifierName": { + "argumentTypes": null, + "id": 2694, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5893:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5893:30:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2698, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "5949:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2699, + "modifierName": { + "argumentTypes": null, + "id": 2697, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5933:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5933:33:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2701, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "5992:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2702, + "modifierName": { + "argumentTypes": null, + "id": 2700, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5976:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5976:26:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2704, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2683, + "src": "6028:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2705, + "modifierName": { + "argumentTypes": null, + "id": 2703, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "6012:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6012:34:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2707, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2685, + "src": "6072:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2708, + "modifierName": { + "argumentTypes": null, + "id": 2706, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "6056:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6056:36:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2712, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6123:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6115:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2710, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6115:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6115:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 2714, + "modifierName": { + "argumentTypes": null, + "id": 2709, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "6102:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6102:29:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2718, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6157:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6149:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2716, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6149:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6149:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 2720, + "modifierName": { + "argumentTypes": null, + "id": 2715, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "6141:7:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6141:24:3" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2690, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2677, + "mutability": "mutable", + "name": "_maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5601:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5601:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2679, + "mutability": "mutable", + "name": "_maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5633:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5633:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "_minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5668:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2680, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5668:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2683, + "mutability": "mutable", + "name": "_limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5696:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2685, + "mutability": "mutable", + "name": "_minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5732:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2684, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5732:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2687, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5768:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2686, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "5768:17:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2689, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5806:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2688, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5806:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5590:241:3" + }, + "returnParameters": { + "id": 2721, + "nodeType": "ParameterList", + "parameters": [], + "src": "6171:0:3" + }, + "scope": 3447, + "src": "5579:1321:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2782, + "nodeType": "Block", + "src": "6978:46:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2778, + "name": "_reporterOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2795, + "src": "6989:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6989:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2780, + "nodeType": "ExpressionStatement", + "src": "6989:15:3" + }, + { + "id": 2781, + "nodeType": "PlaceholderStatement", + "src": "7015:1:3" + } + ] + }, + "documentation": null, + "id": 2783, + "name": "reporterOnly", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2777, + "nodeType": "ParameterList", + "parameters": [], + "src": "6978:0:3" + }, + "src": "6956:68:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2794, + "nodeType": "Block", + "src": "7118:70:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2787, + "name": "reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2625, + "src": "7137:9:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2790, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2788, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7147:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7147:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7137:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 2791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7160:19:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 2786, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7129:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7129:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2793, + "nodeType": "ExpressionStatement", + "src": "7129:51:3" + } + ] + }, + "documentation": null, + "id": 2795, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reporterOnly", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "7101:2:3" + }, + "returnParameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "7118:0:3" + }, + "scope": 3447, + "src": "7079:109:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "7282:51:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2797, + "name": "_xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7293:18:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7293:20:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2799, + "nodeType": "ExpressionStatement", + "src": "7293:20:3" + }, + { + "id": 2800, + "nodeType": "PlaceholderStatement", + "src": "7324:1:3" + } + ] + }, + "documentation": null, + "id": 2802, + "name": "xTransfersAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2796, + "nodeType": "ParameterList", + "parameters": [], + "src": "7282:0:3" + }, + "src": "7255:78:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2810, + "nodeType": "Block", + "src": "7432:61:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2806, + "name": "xTransfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "7451:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7470:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 2805, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7443:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7443:42:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2809, + "nodeType": "ExpressionStatement", + "src": "7443:42:3" + } + ] + }, + "documentation": null, + "id": 2811, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_xTransfersAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2803, + "nodeType": "ParameterList", + "parameters": [], + "src": "7415:2:3" + }, + "returnParameters": { + "id": 2804, + "nodeType": "ParameterList", + "parameters": [], + "src": "7432:0:3" + }, + "scope": 3447, + "src": "7388:105:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2817, + "nodeType": "Block", + "src": "7583:50:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2813, + "name": "_reportingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2827, + "src": "7594:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7594:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2815, + "nodeType": "ExpressionStatement", + "src": "7594:19:3" + }, + { + "id": 2816, + "nodeType": "PlaceholderStatement", + "src": "7624:1:3" + } + ] + }, + "documentation": null, + "id": 2818, + "name": "reportingAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2812, + "nodeType": "ParameterList", + "parameters": [], + "src": "7583:0:3" + }, + "src": "7557:76:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2826, + "nodeType": "Block", + "src": "7731:60:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2822, + "name": "reportingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "7750:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 2823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7768:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 2821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7742:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7742:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2825, + "nodeType": "ExpressionStatement", + "src": "7742:41:3" + } + ] + }, + "documentation": null, + "id": 2827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reportingAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2819, + "nodeType": "ParameterList", + "parameters": [], + "src": "7714:2:3" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "7731:0:3" + }, + "scope": 3447, + "src": "7688:103:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2842, + "nodeType": "Block", + "src": "7993:47:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2838, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "8004:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2839, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "8019:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8004:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2841, + "nodeType": "ExpressionStatement", + "src": "8004:28:3" + } + ] + }, + "documentation": { + "id": 2828, + "nodeType": "StructuredDocumentation", + "src": "7799:92:3", + "text": " @dev setter\n @param _maxLockLimit new maxLockLimit" + }, + "functionSelector": "af2b9618", + "id": 2843, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2833, + "modifierName": { + "argumentTypes": null, + "id": 2832, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "7952:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7952:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2835, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "7978:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2836, + "modifierName": { + "argumentTypes": null, + "id": 2834, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "7962:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7962:30:3" + } + ], + "name": "setMaxLockLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2830, + "mutability": "mutable", + "name": "_maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2843, + "src": "7922:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2829, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7922:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7921:23:3" + }, + "returnParameters": { + "id": 2837, + "nodeType": "ParameterList", + "parameters": [], + "src": "7993:0:3" + }, + "scope": 3447, + "src": "7897:143:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2858, + "nodeType": "Block", + "src": "8257:53:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2854, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "8268:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2855, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "8286:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8268:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2857, + "nodeType": "ExpressionStatement", + "src": "8268:34:3" + } + ] + }, + "documentation": { + "id": 2844, + "nodeType": "StructuredDocumentation", + "src": "8048:98:3", + "text": " @dev setter\n @param _maxReleaseLimit new maxReleaseLimit" + }, + "functionSelector": "bf28ece4", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2849, + "modifierName": { + "argumentTypes": null, + "id": 2848, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8213:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8213:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2851, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "8239:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2852, + "modifierName": { + "argumentTypes": null, + "id": 2850, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8223:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8223:33:3" + } + ], + "name": "setMaxReleaseLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2847, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2846, + "mutability": "mutable", + "name": "_maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2859, + "src": "8180:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8180:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8179:26:3" + }, + "returnParameters": { + "id": 2853, + "nodeType": "ParameterList", + "parameters": [], + "src": "8257:0:3" + }, + "scope": 3447, + "src": "8152:158:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2885, + "nodeType": "Block", + "src": "8492:170:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2871, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8538:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2872, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "8551:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8538:25:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2874, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8567:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2875, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "8580:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8567:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8538:57:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4d494e5f4c494d4954", + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8597:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + }, + "value": "ERR_INVALID_MIN_LIMIT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + } + ], + "id": 2870, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8530:7:3", + "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": "8530:91:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2880, + "nodeType": "ExpressionStatement", + "src": "8530:91:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2881, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "8634:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2882, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8645:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8634:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2884, + "nodeType": "ExpressionStatement", + "src": "8634:20:3" + } + ] + }, + "documentation": { + "id": 2860, + "nodeType": "StructuredDocumentation", + "src": "8318:84:3", + "text": " @dev setter\n @param _minLimit new minLimit" + }, + "functionSelector": "6ec6d4a6", + "id": 2886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2865, + "modifierName": { + "argumentTypes": null, + "id": 2864, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8455:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8455:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2867, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8481:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2868, + "modifierName": { + "argumentTypes": null, + "id": 2866, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8465:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8465:26:3" + } + ], + "name": "setMinLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2862, + "mutability": "mutable", + "name": "_minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2886, + "src": "8429:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8429:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8428:19:3" + }, + "returnParameters": { + "id": 2869, + "nodeType": "ParameterList", + "parameters": [], + "src": "8492:0:3" + }, + "scope": 3447, + "src": "8408:254:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2901, + "nodeType": "Block", + "src": "8884:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2897, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "8895:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2898, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "8914:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8895:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2900, + "nodeType": "ExpressionStatement", + "src": "8895:36:3" + } + ] + }, + "documentation": { + "id": 2887, + "nodeType": "StructuredDocumentation", + "src": "8670:100:3", + "text": " @dev setter\n @param _limitIncPerBlock new limitIncPerBlock" + }, + "functionSelector": "a50c326c", + "id": 2902, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2892, + "modifierName": { + "argumentTypes": null, + "id": 2891, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8839:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8839:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2894, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "8865:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2895, + "modifierName": { + "argumentTypes": null, + "id": 2893, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8849:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8849:34:3" + } + ], + "name": "setLimitIncPerBlock", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2889, + "mutability": "mutable", + "name": "_limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2902, + "src": "8805:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8805:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8804:27:3" + }, + "returnParameters": { + "id": 2896, + "nodeType": "ParameterList", + "parameters": [], + "src": "8884:0:3" + }, + "scope": 3447, + "src": "8776:163:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2917, + "nodeType": "Block", + "src": "9169:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2913, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "9180:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2914, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2905, + "src": "9201:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "9180:40:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2916, + "nodeType": "ExpressionStatement", + "src": "9180:40:3" + } + ] + }, + "documentation": { + "id": 2903, + "nodeType": "StructuredDocumentation", + "src": "8947:104:3", + "text": " @dev setter\n @param _minRequiredReports new minRequiredReports" + }, + "functionSelector": "7b15879c", + "id": 2918, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2908, + "modifierName": { + "argumentTypes": null, + "id": 2907, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9122:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9122:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2910, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2905, + "src": "9148:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2911, + "modifierName": { + "argumentTypes": null, + "id": 2909, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9132:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9132:36:3" + } + ], + "name": "setMinRequiredReports", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2905, + "mutability": "mutable", + "name": "_minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2918, + "src": "9088:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2904, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "9088:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9087:27:3" + }, + "returnParameters": { + "id": 2912, + "nodeType": "ParameterList", + "parameters": [], + "src": "9169:0:3" + }, + "scope": 3447, + "src": "9057:171:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2934, + "nodeType": "Block", + "src": "9531:49:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2928, + "name": "reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2625, + "src": "9542:9:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2930, + "indexExpression": { + "argumentTypes": null, + "id": 2929, + "name": "_reporter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2921, + "src": "9552:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9542:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2931, + "name": "_active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2923, + "src": "9565:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9542:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2933, + "nodeType": "ExpressionStatement", + "src": "9542:30:3" + } + ] + }, + "documentation": { + "id": 2919, + "nodeType": "StructuredDocumentation", + "src": "9236:218:3", + "text": " @dev allows the owner to set/remove reporters\n @param _reporter reporter whos status is to be set\n @param _active true if the reporter is approved, false otherwise" + }, + "functionSelector": "e1bb5133", + "id": 2935, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2926, + "modifierName": { + "argumentTypes": null, + "id": 2925, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9521:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9521:9:3" + } + ], + "name": "setReporter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "_reporter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2935, + "src": "9481:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9481:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2923, + "mutability": "mutable", + "name": "_active", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2935, + "src": "9500:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9500:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9480:33:3" + }, + "returnParameters": { + "id": 2927, + "nodeType": "ParameterList", + "parameters": [], + "src": "9531:0:3" + }, + "scope": 3447, + "src": "9460:120:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2947, + "nodeType": "Block", + "src": "9800:46:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2943, + "name": "xTransfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "9811:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2944, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "9831:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9811:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2946, + "nodeType": "ExpressionStatement", + "src": "9811:27:3" + } + ] + }, + "documentation": { + "id": 2936, + "nodeType": "StructuredDocumentation", + "src": "9588:149:3", + "text": " @dev allows the owner enable/disable the xTransfer method\n @param _enable true to enable, false to disable" + }, + "functionSelector": "a5c670ca", + "id": 2948, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2941, + "modifierName": { + "argumentTypes": null, + "id": 2940, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9790:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9790:9:3" + } + ], + "name": "enableXTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2948, + "src": "9769:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2937, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9769:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9768:14:3" + }, + "returnParameters": { + "id": 2942, + "nodeType": "ParameterList", + "parameters": [], + "src": "9800:0:3" + }, + "scope": 3447, + "src": "9743:103:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2960, + "nodeType": "Block", + "src": "10073:45:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2956, + "name": "reportingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "10084:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2951, + "src": "10103:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10084:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2959, + "nodeType": "ExpressionStatement", + "src": "10084:26:3" + } + ] + }, + "documentation": { + "id": 2949, + "nodeType": "StructuredDocumentation", + "src": "9854:157:3", + "text": " @dev allows the owner enable/disable the reportTransaction method\n @param _enable true to enable, false to disable" + }, + "functionSelector": "ed1d73a6", + "id": 2961, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2954, + "modifierName": { + "argumentTypes": null, + "id": 2953, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10063:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10063:9:3" + } + ], + "name": "enableReporting", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2951, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2961, + "src": "10042:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2950, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10042:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10041:14:3" + }, + "returnParameters": { + "id": 2955, + "nodeType": "ParameterList", + "parameters": [], + "src": "10073:0:3" + }, + "scope": 3447, + "src": "10017:101:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2995, + "nodeType": "Block", + "src": "10463:239:3", + "statements": [ + { + "assignments": [ + 2971 + ], + "declarations": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "bancorXUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2995, + "src": "10474:32:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + }, + "typeName": { + "contractScope": null, + "id": 2970, + "name": "IBancorXUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3562, + "src": "10474:16:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2977, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2974, + "name": "BANCOR_X_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21557, + "src": "10536:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2973, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10526:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 2975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10526:28:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2972, + "name": "IBancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3562, + "src": "10509:16:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorXUpgrader_$3562_$", + "typeString": "type(contract IBancorXUpgrader)" + } + }, + "id": 2976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10509:46:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10474:81:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2981, + "name": "bancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "10594:15:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + ], + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10586:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2979, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10586:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10586:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2978, + "name": "transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21787, + "src": "10568:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10568:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2984, + "nodeType": "ExpressionStatement", + "src": "10568:43:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2988, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "10646:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 2989, + "name": "_reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2965, + "src": "10655:10:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2985, + "name": "bancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "10622:15:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "id": 2987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 3561, + "src": "10622:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_array$_t_address_$dyn_memory_ptr_$returns$__$", + "typeString": "function (uint16,address[] memory) external" + } + }, + "id": 2990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10622:44:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2991, + "nodeType": "ExpressionStatement", + "src": "10622:44:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2992, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21817, + "src": "10677:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 2993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10677:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2994, + "nodeType": "ExpressionStatement", + "src": "10677:17:3" + } + ] + }, + "documentation": { + "id": 2962, + "nodeType": "StructuredDocumentation", + "src": "10126:268:3", + "text": " @dev upgrades the contract to the latest version\n can only be called by the owner\n note that the owner needs to call acceptOwnership on the new contract after the upgrade\n @param _reporters new list of reporters" + }, + "functionSelector": "0183592b", + "id": 2996, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2968, + "modifierName": { + "argumentTypes": null, + "id": 2967, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10453:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10453:9:3" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2965, + "mutability": "mutable", + "name": "_reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2996, + "src": "10417:27:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10417:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2964, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10417:9:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10416:29:3" + }, + "returnParameters": { + "id": 2969, + "nodeType": "ParameterList", + "parameters": [], + "src": "10463:0:3" + }, + "scope": 3447, + "src": "10400:302:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3049, + "nodeType": "Block", + "src": "11130:540:3", + "statements": [ + { + "assignments": [ + 3009 + ], + "declarations": [ + { + "constant": false, + "id": 3009, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3049, + "src": "11180:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11180:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3012, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3010, + "name": "getCurrentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "11207:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11207:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11180:48:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3014, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11279:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3015, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "11290:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11279:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3017, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11302:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3018, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3009, + "src": "11313:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11302:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11279:50:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11331:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3013, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11271:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11271:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3023, + "nodeType": "ExpressionStatement", + "src": "11271:82:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3025, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11377:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3024, + "name": "lockTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "11366:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11366:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3027, + "nodeType": "ExpressionStatement", + "src": "11366:19:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3028, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "11455:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3031, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11492:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3029, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3009, + "src": "11471:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "11471:20:3", + "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": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11471:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11455:45:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3034, + "nodeType": "ExpressionStatement", + "src": "11455:45:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3035, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "11511:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3036, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "11533:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11533:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11511:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "11511:34:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3041, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11619:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11619:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3043, + "name": "_toBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "11631:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3044, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "11646:3:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3045, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11651:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11660:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3040, + "name": "XTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "11609:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,bytes32,uint256,uint256)" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11609:53:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "EmitStatement", + "src": "11604:58:3" + } + ] + }, + "documentation": { + "id": 2997, + "nodeType": "StructuredDocumentation", + "src": "10710:317:3", + "text": " @dev claims tokens from msg.sender to be converted to tokens on another blockchain\n @param _toBlockchain blockchain on which tokens will be issued\n @param _to address to send the tokens to\n @param _amount the amount of tokens to transfer" + }, + "functionSelector": "49282538", + "id": 3050, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3006, + "modifierName": { + "argumentTypes": null, + "id": 3005, + "name": "xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "11112:17:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11112:17:3" + } + ], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2999, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11052:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2998, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11052:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3001, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11075:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11075:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3003, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11088:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11088:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11051:53:3" + }, + "returnParameters": { + "id": 3007, + "nodeType": "ParameterList", + "parameters": [], + "src": "11130:0:3" + }, + "scope": 3447, + "src": "11033:637:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 3541 + ], + "body": { + "id": 3106, + "nodeType": "Block", + "src": "12225:565:3", + "statements": [ + { + "assignments": [ + 3066 + ], + "declarations": [ + { + "constant": false, + "id": 3066, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3106, + "src": "12275:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12275:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3069, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3067, + "name": "getCurrentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "12302:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12302:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12275:48:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3071, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12410:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3072, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "12421:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12410:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3074, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12433:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3075, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "12444:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12433:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12410:50:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12462:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3070, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12402:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12402:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3080, + "nodeType": "ExpressionStatement", + "src": "12402:82:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12508:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3081, + "name": "lockTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "12497:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12497:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3084, + "nodeType": "ExpressionStatement", + "src": "12497:19:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3085, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "12586:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3088, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12623:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3086, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "12602:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "12602:20:3", + "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": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12602:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12586:45:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3091, + "nodeType": "ExpressionStatement", + "src": "12586:45:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3092, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "12642:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3093, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "12664:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12664:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12642:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3096, + "nodeType": "ExpressionStatement", + "src": "12642:34:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3098, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12737:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12737:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3100, + "name": "_toBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3053, + "src": "12749:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3101, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3055, + "src": "12764:3:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3103, + "name": "_id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3059, + "src": "12778:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3097, + "name": "XTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "12727:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,bytes32,uint256,uint256)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12727:55:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3105, + "nodeType": "EmitStatement", + "src": "12722:60:3" + } + ] + }, + "documentation": { + "id": 3051, + "nodeType": "StructuredDocumentation", + "src": "11678:422:3", + "text": " @dev claims tokens from msg.sender to be converted to tokens on another blockchain\n @param _toBlockchain blockchain on which tokens will be issued\n @param _to address to send the tokens to\n @param _amount the amount of tokens to transfer\n @param _id pre-determined unique (if non zero) id which refers to this transaction" + }, + "functionSelector": "427c0374", + "id": 3107, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3063, + "modifierName": { + "argumentTypes": null, + "id": 3062, + "name": "xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "12207:17:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12207:17:3" + } + ], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3061, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12198:8:3" + }, + "parameters": { + "id": 3060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3053, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12125:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3052, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12125:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3055, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12148:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3054, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12148:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12161:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12161:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3059, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12178:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12178:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12124:66:3" + }, + "returnParameters": { + "id": 3064, + "nodeType": "ParameterList", + "parameters": [], + "src": "12225:0:3" + }, + "scope": 3447, + "src": "12106:684:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3280, + "nodeType": "Block", + "src": "13645:1731:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13747:31:3", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3132, + "name": "reportedTxs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "13748:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + } + }, + "id": 3134, + "indexExpression": { + "argumentTypes": null, + "id": 3133, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13760:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13748:18:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3137, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3135, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13767:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13767:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13748:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414c52454144595f5245504f52544544", + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13780:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eacdf1b09650a9214fcd03c8cca153c1ef5430f33502fe3fc1e6f73a52233e56", + "typeString": "literal_string \"ERR_ALREADY_REPORTED\"" + }, + "value": "ERR_ALREADY_REPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eacdf1b09650a9214fcd03c8cca153c1ef5430f33502fe3fc1e6f73a52233e56", + "typeString": "literal_string \"ERR_ALREADY_REPORTED\"" + } + ], + "id": 3131, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13739:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13739:64:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3141, + "nodeType": "ExpressionStatement", + "src": "13739:64:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3142, + "name": "reportedTxs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "13849:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + } + }, + "id": 3146, + "indexExpression": { + "argumentTypes": null, + "id": 3143, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13861:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13849:18:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3147, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3144, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13868:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13868:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13849:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13882:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "13849:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "13849:37:3" + }, + { + "assignments": [ + 3152 + ], + "declarations": [ + { + "constant": false, + "id": 3152, + "mutability": "mutable", + "name": "txn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3280, + "src": "13899:23:3", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + }, + "typeName": { + "contractScope": null, + "id": 3151, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "13899:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3156, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3153, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "13925:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3155, + "indexExpression": { + "argumentTypes": null, + "id": 3154, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13938:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13925:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13899:45:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3157, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14038:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3158, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "14038:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14058:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14038:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3231, + "nodeType": "Block", + "src": "14474:316:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3201, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14551:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3202, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "14551:6:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3203, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14561:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "14551:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3205, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14568:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "14568:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14582:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14568:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14551:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3210, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14593:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3211, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fromBlockchain", + "nodeType": "MemberAccess", + "referencedDeclaration": 2570, + "src": "14593:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3212, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14615:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14593:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14551:79:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f4d49534d41544348", + "id": 3215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14632:17:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + }, + "value": "ERR_TX_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + } + ], + "id": 3200, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14543:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14543:107:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3217, + "nodeType": "ExpressionStatement", + "src": "14543:107:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3218, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14671:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14687:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14671:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3230, + "nodeType": "IfStatement", + "src": "14667:111:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3222, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14715:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3224, + "indexExpression": { + "argumentTypes": null, + "id": 3223, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14730:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14715:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3225, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14747:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14715:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f455849535453", + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14754:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + }, + "value": "ERR_TX_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + } + ], + "id": 3221, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14707:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14707:71:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3229, + "nodeType": "ExpressionStatement", + "src": "14707:71:3" + } + } + ] + }, + "id": 3232, + "nodeType": "IfStatement", + "src": "14034:756:3", + "trueBody": { + "id": 3199, + "nodeType": "Block", + "src": "14061:398:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3161, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14076:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "14076:6:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3164, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14085:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "14076:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3166, + "nodeType": "ExpressionStatement", + "src": "14076:12:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3167, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14103:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "14103:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3170, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14116:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14103:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3172, + "nodeType": "ExpressionStatement", + "src": "14103:20:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3173, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14138:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "fromBlockchain", + "nodeType": "MemberAccess", + "referencedDeclaration": 2570, + "src": "14138:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3176, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14159:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14138:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3178, + "nodeType": "ExpressionStatement", + "src": "14138:36:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3179, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14195:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14211:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14195:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3198, + "nodeType": "IfStatement", + "src": "14191:257:3", + "trueBody": { + "id": 3197, + "nodeType": "Block", + "src": "14214:234:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14318:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14333:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14318:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14350:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14318:33:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f455849535453", + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14353:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + }, + "value": "ERR_TX_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + } + ], + "id": 3182, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14310:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14310:67:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3190, + "nodeType": "ExpressionStatement", + "src": "14310:67:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3191, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14396:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3193, + "indexExpression": { + "argumentTypes": null, + "id": 3192, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14411:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14396:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3194, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14427:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14396:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3196, + "nodeType": "ExpressionStatement", + "src": "14396:36:3" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14846:18:3", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3233, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14846:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "14846:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3237, + "nodeType": "ExpressionStatement", + "src": "14846:18:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3239, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14891:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14891:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3241, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14903:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3242, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14920:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14927:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3244, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14932:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3245, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14941:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3238, + "name": "TxReport", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2667, + "src": "14882:8:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,address,uint256,uint256)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14882:72:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3247, + "nodeType": "EmitStatement", + "src": "14877:77:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3248, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "15031:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "15031:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3250, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "15051:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "15031:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3279, + "nodeType": "IfStatement", + "src": "15027:342:3", + "trueBody": { + "id": 3278, + "nodeType": "Block", + "src": "15071:298:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15094:30:3", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3253, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15095:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3255, + "indexExpression": { + "argumentTypes": null, + "id": 3254, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "15108:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15095:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "id": 3256, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "completed", + "nodeType": "MemberAccess", + "referencedDeclaration": 2576, + "src": "15095:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f434f4d504c45544544", + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15126:26:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8458c6336176452534d737fe1d081580bd6710b63bb64c5c00fe229feb3ce8c8", + "typeString": "literal_string \"ERR_TX_ALREADY_COMPLETED\"" + }, + "value": "ERR_TX_ALREADY_COMPLETED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8458c6336176452534d737fe1d081580bd6710b63bb64c5c00fe229feb3ce8c8", + "typeString": "literal_string \"ERR_TX_ALREADY_COMPLETED\"" + } + ], + "id": 3252, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15086:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15086:67:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3260, + "nodeType": "ExpressionStatement", + "src": "15086:67:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3261, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15219:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3263, + "indexExpression": { + "argumentTypes": null, + "id": 3262, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "15232:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15219:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "id": 3264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "completed", + "nodeType": "MemberAccess", + "referencedDeclaration": 2576, + "src": "15219:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15251:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "15219:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3267, + "nodeType": "ExpressionStatement", + "src": "15219:36:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3269, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "15295:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3270, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "15300:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3268, + "name": "XTransferComplete", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2674, + "src": "15277:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15277:36:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3272, + "nodeType": "EmitStatement", + "src": "15272:41:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3274, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "15344:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3275, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "15349:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3273, + "name": "releaseTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "15330:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15330:27:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3277, + "nodeType": "ExpressionStatement", + "src": "15330:27:3" + } + ] + } + } + ] + }, + "documentation": { + "id": 3108, + "nodeType": "StructuredDocumentation", + "src": "12798:549:3", + "text": " @dev allows reporter to report transaction which occured on another blockchain\n @param _fromBlockchain blockchain in which tokens were destroyed\n @param _txId transactionId of transaction thats being reported\n @param _to address to receive tokens\n @param _amount amount of tokens destroyed on another blockchain\n @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been mined)" + }, + "functionSelector": "6dc6a01b", + "id": 3281, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3121, + "modifierName": { + "argumentTypes": null, + "id": 3120, + "name": "reporterOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2783, + "src": "13540:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:12:3" + }, + { + "arguments": null, + "id": 3123, + "modifierName": { + "argumentTypes": null, + "id": 3122, + "name": "reportingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "13562:16:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13562:16:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 3125, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13601:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3126, + "modifierName": { + "argumentTypes": null, + "id": 3124, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "13588:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13588:17:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 3128, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "13631:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "modifierName": { + "argumentTypes": null, + "id": 3127, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "13615:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13615:24:3" + } + ], + "name": "reportTx", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3110, + "mutability": "mutable", + "name": "_fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13381:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3109, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13381:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3112, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13415:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13415:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3114, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13439:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13439:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13461:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3118, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13487:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13487:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13370:144:3" + }, + "returnParameters": { + "id": 3130, + "nodeType": "ParameterList", + "parameters": [], + "src": "13645:0:3" + }, + "scope": 3447, + "src": "13353:2023:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 3550 + ], + "body": { + "id": 3311, + "nodeType": "Block", + "src": "15881:294:3", + "statements": [ + { + "assignments": [ + 3293 + ], + "declarations": [ + { + "constant": false, + "id": 3293, + "mutability": "mutable", + "name": "transaction", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3311, + "src": "15939:30:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction" + }, + "typeName": { + "contractScope": null, + "id": 3292, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "15939:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3299, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3294, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15972:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3298, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3295, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "15985:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3297, + "indexExpression": { + "argumentTypes": null, + "id": 3296, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16000:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15985:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15972:42:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15939:75:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3301, + "name": "transaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "16087:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction memory" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "16087:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3303, + "name": "_for", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16105:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16087:22:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f4d49534d41544348", + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16111:17:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + }, + "value": "ERR_TX_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + } + ], + "id": 3300, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16079:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16079:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3307, + "nodeType": "ExpressionStatement", + "src": "16079:50:3" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3308, + "name": "transaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "16149:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction memory" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "16149:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3291, + "id": 3310, + "nodeType": "Return", + "src": "16142:25:3" + } + ] + }, + "documentation": { + "id": 3282, + "nodeType": "StructuredDocumentation", + "src": "15384:388:3", + "text": " @dev gets x transfer amount by xTransferId (not txId)\n @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been broadcasted)\n @param _for address corresponding to xTransferId\n @return amount that was sent in xTransfer corresponding to _xTransferId" + }, + "functionSelector": "aafd6b76", + "id": 3312, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getXTransferAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3288, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15854:8:3" + }, + "parameters": { + "id": 3287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3284, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15806:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3283, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15806:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3286, + "mutability": "mutable", + "name": "_for", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15828:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3285, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15828:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15805:36:3" + }, + "returnParameters": { + "id": 3291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3290, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15872:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15872:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15871:9:3" + }, + "scope": 3447, + "src": "15778:397:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3342, + "nodeType": "Block", + "src": "16399:331:3", + "statements": [ + { + "assignments": [ + 3319 + ], + "declarations": [ + { + "constant": false, + "id": 3319, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3342, + "src": "16499:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16499:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3333, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3330, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "16590:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3326, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "16564:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3322, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "16546:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3324, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16545:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "16545:18:3", + "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": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16545:39:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3328, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16544:41:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "16544:45:3", + "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": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16544:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3320, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "16526:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "16526:17:3", + "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": 3332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16526:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16499:109:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3334, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3319, + "src": "16623:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 3335, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "16642:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16623:31:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3339, + "nodeType": "IfStatement", + "src": "16619:69:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 3337, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "16676:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3317, + "id": 3338, + "nodeType": "Return", + "src": "16669:19:3" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3340, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3319, + "src": "16706:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3317, + "id": 3341, + "nodeType": "Return", + "src": "16699:23:3" + } + ] + }, + "documentation": { + "id": 3313, + "nodeType": "StructuredDocumentation", + "src": "16183:149:3", + "text": " @dev method for calculating current lock limit\n @return the current maximum limit of tokens that can be locked" + }, + "functionSelector": "19967439", + "id": 3343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentLockLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3314, + "nodeType": "ParameterList", + "parameters": [], + "src": "16366:2:3" + }, + "returnParameters": { + "id": 3317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3316, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3343, + "src": "16390:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16390:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16389:9:3" + }, + "scope": 3447, + "src": "16338:392:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3373, + "nodeType": "Block", + "src": "16962:358:3", + "statements": [ + { + "assignments": [ + 3350 + ], + "declarations": [ + { + "constant": false, + "id": 3350, + "mutability": "mutable", + "name": "currentReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3373, + "src": "17068:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3349, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17068:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3364, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3361, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "17168:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3357, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "17139:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3353, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "17121:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17121:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3355, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17120:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "17120:18:3", + "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": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17120:42:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3359, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17119:44:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "17119:48:3", + "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": "17119:66:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3351, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "17098:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "17098:20:3", + "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": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17098:88:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17068:118:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3365, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3350, + "src": "17201:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 3366, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "17223:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17201:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "17197:78:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 3368, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "17260:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3348, + "id": 3369, + "nodeType": "Return", + "src": "17253:22:3" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3371, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3350, + "src": "17293:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3348, + "id": 3372, + "nodeType": "Return", + "src": "17286:26:3" + } + ] + }, + "documentation": { + "id": 3344, + "nodeType": "StructuredDocumentation", + "src": "16738:154:3", + "text": " @dev method for calculating current release limit\n @return the current maximum limit of tokens that can be released" + }, + "functionSelector": "1e04a593", + "id": 3374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentReleaseLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3345, + "nodeType": "ParameterList", + "parameters": [], + "src": "16929:2:3" + }, + "returnParameters": { + "id": 3348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3347, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3374, + "src": "16953:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16953:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16952:9:3" + }, + "scope": 3447, + "src": "16898:422:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3397, + "nodeType": "Block", + "src": "17556:125:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3381, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "17584:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3382, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17591:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17591:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3386, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17611:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorX_$3447", + "typeString": "contract BancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorX_$3447", + "typeString": "contract BancorX" + } + ], + "id": 3385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17603:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17603:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17603:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3388, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3377, + "src": "17618:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3380, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "17567:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17567:59:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "ExpressionStatement", + "src": "17567:59:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3392, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17653:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17653:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3394, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3377, + "src": "17665:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3391, + "name": "TokensLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2632, + "src": "17642:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17642:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3396, + "nodeType": "EmitStatement", + "src": "17637:36:3" + } + ] + }, + "documentation": { + "id": 3375, + "nodeType": "StructuredDocumentation", + "src": "17328:177:3", + "text": " @dev claims and locks tokens from msg.sender to be converted to tokens on another blockchain\n @param _amount the amount of tokens to lock" + }, + "id": 3398, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lockTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3377, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3398, + "src": "17531:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17530:17:3" + }, + "returnParameters": { + "id": 3379, + "nodeType": "ParameterList", + "parameters": [], + "src": "17556:0:3" + }, + "scope": 3447, + "src": "17511:170:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3445, + "nodeType": "Block", + "src": "17960:530:3", + "statements": [ + { + "assignments": [ + 3407 + ], + "declarations": [ + { + "constant": false, + "id": 3407, + "mutability": "mutable", + "name": "currentReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3445, + "src": "18013:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18013:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3410, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3408, + "name": "getCurrentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "18043:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18043:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18013:54:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3412, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18088:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3413, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "18099:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18088:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3415, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18111:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3416, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "18122:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18111:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18088:53:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18143:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3411, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18080:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18080:85:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3421, + "nodeType": "ExpressionStatement", + "src": "18080:85:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3422, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "18241:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3425, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18284:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3423, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "18260:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "18260:23:3", + "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": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18260:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18241:51:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3428, + "nodeType": "ExpressionStatement", + "src": "18241:51:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3429, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "18303:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3430, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "18328:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18328:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18303:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3433, + "nodeType": "ExpressionStatement", + "src": "18303:37:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3435, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "18417:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 3436, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "18424:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3437, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18429:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3434, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "18404:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18404:33:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3439, + "nodeType": "ExpressionStatement", + "src": "18404:33:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3441, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "18469:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3442, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18474:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3440, + "name": "TokensRelease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2639, + "src": "18455:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18455:27:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3444, + "nodeType": "EmitStatement", + "src": "18450:32:3" + } + ] + }, + "documentation": { + "id": 3399, + "nodeType": "StructuredDocumentation", + "src": "17689:204:3", + "text": " @dev private method to release tokens held by the contract\n @param _to the address to release tokens to\n @param _amount the amount of tokens to release" + }, + "id": 3446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releaseTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3446, + "src": "17922:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17922:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3403, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3446, + "src": "17935:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3402, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17935:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17921:30:3" + }, + "returnParameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [], + "src": "17960:0:3" + }, + "scope": 3447, + "src": "17899:591:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3448, + "src": "900:17593:3" + } + ], + "src": "52:18443:3" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/BancorX.sol", + "exportedSymbols": { + "BancorX": [ + 3447 + ] + }, + "id": 3448, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2548, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:3" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol", + "file": "./interfaces/IBancorXUpgrader.sol", + "id": 2549, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 3563, + "src": "77:43:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./interfaces/IBancorX.sol", + "id": 2550, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 3552, + "src": "122:35:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 2551, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 21720, + "src": "159:47:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 2552, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22355, + "src": "208:33:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 2553, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22527, + "src": "243:37:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 2554, + "nodeType": "ImportDirective", + "scope": 3448, + "sourceUnit": 22576, + "src": "282:36:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2556, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "920:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 2557, + "nodeType": "InheritanceSpecifier", + "src": "920:8:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2558, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "930:12:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 2559, + "nodeType": "InheritanceSpecifier", + "src": "930:12:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2560, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "944:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 2561, + "nodeType": "InheritanceSpecifier", + "src": "944:11:3" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2562, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "957:22:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 2563, + "nodeType": "InheritanceSpecifier", + "src": "957:22:3" + } + ], + "contractDependencies": [ + 3551, + 21719, + 21818, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "322:576:3", + "text": " @dev The BancorX contract allows cross chain token transfers.\n There are two processes that take place in the contract -\n - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)\n - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)\n Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple\n callers are required to report a transfer before tokens are released to the target account." + }, + "fullyImplemented": true, + "id": 3447, + "linearizedBaseContracts": [ + 3447, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847, + 3551 + ], + "name": "BancorX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2566, + "libraryName": { + "contractScope": null, + "id": 2564, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "993:8:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "987:27:3", + "typeName": { + "id": 2565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1006:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "BancorX.Transaction", + "id": 2577, + "members": [ + { + "constant": false, + "id": 2568, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1142:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2567, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1142:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2570, + "mutability": "mutable", + "name": "fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1167:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2569, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1167:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2572, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1200:10:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2571, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1200:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2574, + "mutability": "mutable", + "name": "numOfReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1221:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2573, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1221:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "completed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2577, + "src": "1250:14:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2575, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1250:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Transaction", + "nodeType": "StructDefinition", + "scope": 3447, + "src": "1112:160:3", + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "54fd4d50", + "id": 2580, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1280:34:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 2578, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1280:6:3", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "34", + "id": 2579, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1313:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "a8c36a90", + "id": 2582, + "mutability": "mutable", + "name": "maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1323:27:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1323:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "52e94ce3", + "id": 2584, + "mutability": "mutable", + "name": "maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1438:30:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2583, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1438:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1fd8088d", + "id": 2586, + "mutability": "mutable", + "name": "minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1555:23:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1555:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "16c76c27", + "id": 2588, + "mutability": "mutable", + "name": "prevLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1675:28:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2587, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1675:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "f7385f76", + "id": 2590, + "mutability": "mutable", + "name": "prevReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1767:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1767:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "72f43d19", + "id": 2592, + "mutability": "mutable", + "name": "limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1862:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2591, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1862:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1aff29eb", + "id": 2594, + "mutability": "mutable", + "name": "prevLockBlockNumber", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "1949:34:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1949:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "4b3e475c", + "id": 2596, + "mutability": "mutable", + "name": "prevReleaseBlockNumber", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2043:37:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2043:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "ca27e011", + "id": 2598, + "mutability": "mutable", + "name": "minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2140:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2597, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2140:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 3530 + ], + "constant": false, + "functionSelector": "fc0c546a", + "id": 2601, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 2600, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2262:8:3" + }, + "scope": 3447, + "src": "2243:33:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2599, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2243:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "fbb24692", + "id": 2604, + "mutability": "mutable", + "name": "xTransfersEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2305:36:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2602, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2305:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2337:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9390701c", + "id": 2607, + "mutability": "mutable", + "name": "reportingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2399:35:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2605, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2399:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2430:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9ace38c2", + "id": 2611, + "mutability": "mutable", + "name": "transactions", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2520:52:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction)" + }, + "typeName": { + "id": 2610, + "keyType": { + "id": 2608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2529:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2520:32:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction)" + }, + "valueType": { + "contractScope": null, + "id": 2609, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "2540:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e36f8dc5", + "id": 2615, + "mutability": "mutable", + "name": "transactionIds", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2609:50:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 2614, + "keyType": { + "id": 2612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2618:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2609:28:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 2613, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2629:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8544c52d", + "id": 2621, + "mutability": "mutable", + "name": "reportedTxs", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2735:65:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + }, + "typeName": { + "id": 2620, + "keyType": { + "id": 2616, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2744:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2735:46:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + }, + "valueType": { + "id": 2619, + "keyType": { + "id": 2617, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2764:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2755:25:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2618, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2775:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "2cc1cd9e", + "id": 2625, + "mutability": "mutable", + "name": "reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3447, + "src": "2856:42:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 2624, + "keyType": { + "id": 2622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2865:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2856:25:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 2623, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2876:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 2626, + "nodeType": "StructuredDocumentation", + "src": "2907:196:3", + "text": " @dev triggered when tokens are locked in smart contract\n @param _from wallet address that the tokens are locked from\n @param _amount amount locked" + }, + "id": 2632, + "name": "TokensLock", + "nodeType": "EventDefinition", + "parameters": { + "id": 2631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2632, + "src": "3136:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2627, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2630, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2632, + "src": "3168:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3168:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3125:65:3" + }, + "src": "3109:82:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2633, + "nodeType": "StructuredDocumentation", + "src": "3199:204:3", + "text": " @dev triggered when tokens are released by the smart contract\n @param _to wallet address that the tokens are released to\n @param _amount amount released" + }, + "id": 2639, + "name": "TokensRelease", + "nodeType": "EventDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2635, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2639, + "src": "3439:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3439:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2637, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2639, + "src": "3469:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2636, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3469:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3428:63:3" + }, + "src": "3409:83:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2640, + "nodeType": "StructuredDocumentation", + "src": "3500:352:3", + "text": " @dev triggered when xTransfer is successfully called\n @param _from wallet address that initiated the xtransfer\n @param _toBlockchain target blockchain\n @param _to target wallet\n @param _amount transfer amount\n @param _id xtransfer id" + }, + "id": 2652, + "name": "XTransfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 2651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2642, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3884:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2641, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3884:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2644, + "indexed": false, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3916:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3916:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2646, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3948:19:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2645, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3948:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2648, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "3978:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2647, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3978:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2650, + "indexed": false, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2652, + "src": "4004:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4004:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3873:149:3" + }, + "src": "3858:165:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2653, + "nodeType": "StructuredDocumentation", + "src": "4031:388:3", + "text": " @dev triggered when report is successfully submitted\n @param _reporter reporter wallet\n @param _fromBlockchain source blockchain\n @param _txId tx id on the source blockchain\n @param _to target wallet\n @param _amount transfer amount\n @param _xTransferId xtransfer id" + }, + "id": 2667, + "name": "TxReport", + "nodeType": "EventDefinition", + "parameters": { + "id": 2666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2655, + "indexed": true, + "mutability": "mutable", + "name": "_reporter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4450:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4450:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2657, + "indexed": false, + "mutability": "mutable", + "name": "_fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4486:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2656, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4486:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2659, + "indexed": false, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4520:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4520:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2661, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4544:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2660, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4544:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2663, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4566:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4566:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2665, + "indexed": false, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2667, + "src": "4592:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4592:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4439:180:3" + }, + "src": "4425:195:3" + }, + { + "anonymous": false, + "documentation": { + "id": 2668, + "nodeType": "StructuredDocumentation", + "src": "4628:157:3", + "text": " @dev triggered when final report is successfully submitted\n @param _to target wallet\n @param _id xtransfer id" + }, + "id": 2674, + "name": "XTransferComplete", + "nodeType": "EventDefinition", + "parameters": { + "id": 2673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2674, + "src": "4825:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4825:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2672, + "indexed": false, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2674, + "src": "4847:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4847:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4814:51:3" + }, + "src": "4791:75:3" + }, + { + "body": { + "id": 2775, + "nodeType": "Block", + "src": "6171:729:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2723, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6217:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2724, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6230:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6217:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2726, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6247:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2727, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6260:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6247:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6217:59:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4d494e5f4c494d4954", + "id": 2730, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6278:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + }, + "value": "ERR_INVALID_MIN_LIMIT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + } + ], + "id": 2722, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6209:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6209:93:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2732, + "nodeType": "ExpressionStatement", + "src": "6209:93:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2733, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "6391:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2734, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6406:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6391:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2736, + "nodeType": "ExpressionStatement", + "src": "6391:28:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2737, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "6430:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2738, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6448:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6430:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2740, + "nodeType": "ExpressionStatement", + "src": "6430:34:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2741, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "6475:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2742, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "6486:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6475:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2744, + "nodeType": "ExpressionStatement", + "src": "6475:20:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2745, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "6506:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2746, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2683, + "src": "6525:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6506:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2748, + "nodeType": "ExpressionStatement", + "src": "6506:36:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2749, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "6553:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2750, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2685, + "src": "6574:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6553:40:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2752, + "nodeType": "ExpressionStatement", + "src": "6553:40:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2753, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "6697:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2754, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "6713:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6697:29:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2756, + "nodeType": "ExpressionStatement", + "src": "6697:29:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2757, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "6737:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2758, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "6756:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6737:35:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2760, + "nodeType": "ExpressionStatement", + "src": "6737:35:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2761, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "6783:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2762, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6805:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6805:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6783:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2765, + "nodeType": "ExpressionStatement", + "src": "6783:34:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2766, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "6828:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2767, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6853:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6853:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6828:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2770, + "nodeType": "ExpressionStatement", + "src": "6828:37:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2771, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "6878:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2772, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6886:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6878:14:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 2774, + "nodeType": "ExpressionStatement", + "src": "6878:14:3" + } + ] + }, + "documentation": { + "id": 2675, + "nodeType": "StructuredDocumentation", + "src": "4874:699:3", + "text": " @dev initializes a new BancorX instance\n @param _maxLockLimit maximum amount of tokens that can be locked in one transaction\n @param _maxReleaseLimit maximum amount of tokens that can be released in one transaction\n @param _minLimit minimum amount of tokens that can be transferred in one transaction\n @param _limitIncPerBlock how much the limit increases per block\n @param _minRequiredReports minimum number of reporters to report transaction before tokens can be released\n @param _registry address of contract registry\n @param _token erc20 token" + }, + "id": 2776, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 2692, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2687, + "src": "5857:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 2693, + "modifierName": { + "argumentTypes": null, + "id": 2691, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "5834:22:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5834:33:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2695, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2677, + "src": "5909:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2696, + "modifierName": { + "argumentTypes": null, + "id": 2694, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5893:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5893:30:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2698, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2679, + "src": "5949:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2699, + "modifierName": { + "argumentTypes": null, + "id": 2697, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5933:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5933:33:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2701, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2681, + "src": "5992:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2702, + "modifierName": { + "argumentTypes": null, + "id": 2700, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "5976:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5976:26:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2704, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2683, + "src": "6028:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2705, + "modifierName": { + "argumentTypes": null, + "id": 2703, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "6012:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6012:34:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2707, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2685, + "src": "6072:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2708, + "modifierName": { + "argumentTypes": null, + "id": 2706, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "6056:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6056:36:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2712, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6123:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6115:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2710, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6115:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6115:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 2714, + "modifierName": { + "argumentTypes": null, + "id": 2709, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "6102:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6102:29:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2718, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2689, + "src": "6157:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6149:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2716, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6149:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6149:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 2720, + "modifierName": { + "argumentTypes": null, + "id": 2715, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "6141:7:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6141:24:3" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2690, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2677, + "mutability": "mutable", + "name": "_maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5601:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5601:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2679, + "mutability": "mutable", + "name": "_maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5633:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2678, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5633:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "_minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5668:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2680, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5668:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2683, + "mutability": "mutable", + "name": "_limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5696:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5696:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2685, + "mutability": "mutable", + "name": "_minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5732:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2684, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5732:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2687, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5768:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2686, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "5768:17:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2689, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2776, + "src": "5806:18:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2688, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5806:11:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5590:241:3" + }, + "returnParameters": { + "id": 2721, + "nodeType": "ParameterList", + "parameters": [], + "src": "6171:0:3" + }, + "scope": 3447, + "src": "5579:1321:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2782, + "nodeType": "Block", + "src": "6978:46:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2778, + "name": "_reporterOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2795, + "src": "6989:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6989:15:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2780, + "nodeType": "ExpressionStatement", + "src": "6989:15:3" + }, + { + "id": 2781, + "nodeType": "PlaceholderStatement", + "src": "7015:1:3" + } + ] + }, + "documentation": null, + "id": 2783, + "name": "reporterOnly", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2777, + "nodeType": "ParameterList", + "parameters": [], + "src": "6978:0:3" + }, + "src": "6956:68:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2794, + "nodeType": "Block", + "src": "7118:70:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2787, + "name": "reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2625, + "src": "7137:9:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2790, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2788, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7147:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7147:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7137:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 2791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7160:19:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 2786, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7129:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7129:51:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2793, + "nodeType": "ExpressionStatement", + "src": "7129:51:3" + } + ] + }, + "documentation": null, + "id": 2795, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reporterOnly", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "7101:2:3" + }, + "returnParameters": { + "id": 2785, + "nodeType": "ParameterList", + "parameters": [], + "src": "7118:0:3" + }, + "scope": 3447, + "src": "7079:109:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2801, + "nodeType": "Block", + "src": "7282:51:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2797, + "name": "_xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2811, + "src": "7293:18:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7293:20:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2799, + "nodeType": "ExpressionStatement", + "src": "7293:20:3" + }, + { + "id": 2800, + "nodeType": "PlaceholderStatement", + "src": "7324:1:3" + } + ] + }, + "documentation": null, + "id": 2802, + "name": "xTransfersAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2796, + "nodeType": "ParameterList", + "parameters": [], + "src": "7282:0:3" + }, + "src": "7255:78:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2810, + "nodeType": "Block", + "src": "7432:61:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2806, + "name": "xTransfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "7451:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7470:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 2805, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7443:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7443:42:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2809, + "nodeType": "ExpressionStatement", + "src": "7443:42:3" + } + ] + }, + "documentation": null, + "id": 2811, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_xTransfersAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2803, + "nodeType": "ParameterList", + "parameters": [], + "src": "7415:2:3" + }, + "returnParameters": { + "id": 2804, + "nodeType": "ParameterList", + "parameters": [], + "src": "7432:0:3" + }, + "scope": 3447, + "src": "7388:105:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2817, + "nodeType": "Block", + "src": "7583:50:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2813, + "name": "_reportingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2827, + "src": "7594:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7594:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2815, + "nodeType": "ExpressionStatement", + "src": "7594:19:3" + }, + { + "id": 2816, + "nodeType": "PlaceholderStatement", + "src": "7624:1:3" + } + ] + }, + "documentation": null, + "id": 2818, + "name": "reportingAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 2812, + "nodeType": "ParameterList", + "parameters": [], + "src": "7583:0:3" + }, + "src": "7557:76:3", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2826, + "nodeType": "Block", + "src": "7731:60:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2822, + "name": "reportingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "7750:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 2823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7768:14:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 2821, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7742:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7742:41:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2825, + "nodeType": "ExpressionStatement", + "src": "7742:41:3" + } + ] + }, + "documentation": null, + "id": 2827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reportingAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2819, + "nodeType": "ParameterList", + "parameters": [], + "src": "7714:2:3" + }, + "returnParameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [], + "src": "7731:0:3" + }, + "scope": 3447, + "src": "7688:103:3", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2842, + "nodeType": "Block", + "src": "7993:47:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2838, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "8004:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2839, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "8019:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8004:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2841, + "nodeType": "ExpressionStatement", + "src": "8004:28:3" + } + ] + }, + "documentation": { + "id": 2828, + "nodeType": "StructuredDocumentation", + "src": "7799:92:3", + "text": " @dev setter\n @param _maxLockLimit new maxLockLimit" + }, + "functionSelector": "af2b9618", + "id": 2843, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2833, + "modifierName": { + "argumentTypes": null, + "id": 2832, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "7952:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7952:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2835, + "name": "_maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "7978:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2836, + "modifierName": { + "argumentTypes": null, + "id": 2834, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "7962:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7962:30:3" + } + ], + "name": "setMaxLockLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2830, + "mutability": "mutable", + "name": "_maxLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2843, + "src": "7922:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2829, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7922:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7921:23:3" + }, + "returnParameters": { + "id": 2837, + "nodeType": "ParameterList", + "parameters": [], + "src": "7993:0:3" + }, + "scope": 3447, + "src": "7897:143:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2858, + "nodeType": "Block", + "src": "8257:53:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2854, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "8268:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2855, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "8286:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8268:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2857, + "nodeType": "ExpressionStatement", + "src": "8268:34:3" + } + ] + }, + "documentation": { + "id": 2844, + "nodeType": "StructuredDocumentation", + "src": "8048:98:3", + "text": " @dev setter\n @param _maxReleaseLimit new maxReleaseLimit" + }, + "functionSelector": "bf28ece4", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2849, + "modifierName": { + "argumentTypes": null, + "id": 2848, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8213:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8213:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2851, + "name": "_maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2846, + "src": "8239:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2852, + "modifierName": { + "argumentTypes": null, + "id": 2850, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8223:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8223:33:3" + } + ], + "name": "setMaxReleaseLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2847, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2846, + "mutability": "mutable", + "name": "_maxReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2859, + "src": "8180:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8180:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8179:26:3" + }, + "returnParameters": { + "id": 2853, + "nodeType": "ParameterList", + "parameters": [], + "src": "8257:0:3" + }, + "scope": 3447, + "src": "8152:158:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2885, + "nodeType": "Block", + "src": "8492:170:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2871, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8538:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2872, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "8551:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8538:25:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2874, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8567:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2875, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "8580:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8567:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8538:57:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4d494e5f4c494d4954", + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8597:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + }, + "value": "ERR_INVALID_MIN_LIMIT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e8863683e853f5e973d186a95524b4cc24f1541517387abe8d8f6488ce1e0dc9", + "typeString": "literal_string \"ERR_INVALID_MIN_LIMIT\"" + } + ], + "id": 2870, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8530:7:3", + "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": "8530:91:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2880, + "nodeType": "ExpressionStatement", + "src": "8530:91:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 2883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2881, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "8634:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2882, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8645:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8634:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2884, + "nodeType": "ExpressionStatement", + "src": "8634:20:3" + } + ] + }, + "documentation": { + "id": 2860, + "nodeType": "StructuredDocumentation", + "src": "8318:84:3", + "text": " @dev setter\n @param _minLimit new minLimit" + }, + "functionSelector": "6ec6d4a6", + "id": 2886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2865, + "modifierName": { + "argumentTypes": null, + "id": 2864, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8455:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8455:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2867, + "name": "_minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2862, + "src": "8481:9:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2868, + "modifierName": { + "argumentTypes": null, + "id": 2866, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8465:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8465:26:3" + } + ], + "name": "setMinLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2862, + "mutability": "mutable", + "name": "_minLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2886, + "src": "8429:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8429:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8428:19:3" + }, + "returnParameters": { + "id": 2869, + "nodeType": "ParameterList", + "parameters": [], + "src": "8492:0:3" + }, + "scope": 3447, + "src": "8408:254:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2901, + "nodeType": "Block", + "src": "8884:55:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2897, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "8895:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2898, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "8914:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8895:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2900, + "nodeType": "ExpressionStatement", + "src": "8895:36:3" + } + ] + }, + "documentation": { + "id": 2887, + "nodeType": "StructuredDocumentation", + "src": "8670:100:3", + "text": " @dev setter\n @param _limitIncPerBlock new limitIncPerBlock" + }, + "functionSelector": "a50c326c", + "id": 2902, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2892, + "modifierName": { + "argumentTypes": null, + "id": 2891, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "8839:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8839:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2894, + "name": "_limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2889, + "src": "8865:17:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2895, + "modifierName": { + "argumentTypes": null, + "id": 2893, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "8849:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8849:34:3" + } + ], + "name": "setLimitIncPerBlock", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2889, + "mutability": "mutable", + "name": "_limitIncPerBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2902, + "src": "8805:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8805:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8804:27:3" + }, + "returnParameters": { + "id": 2896, + "nodeType": "ParameterList", + "parameters": [], + "src": "8884:0:3" + }, + "scope": 3447, + "src": "8776:163:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2917, + "nodeType": "Block", + "src": "9169:59:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2913, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "9180:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2914, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2905, + "src": "9201:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "9180:40:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2916, + "nodeType": "ExpressionStatement", + "src": "9180:40:3" + } + ] + }, + "documentation": { + "id": 2903, + "nodeType": "StructuredDocumentation", + "src": "8947:104:3", + "text": " @dev setter\n @param _minRequiredReports new minRequiredReports" + }, + "functionSelector": "7b15879c", + "id": 2918, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2908, + "modifierName": { + "argumentTypes": null, + "id": 2907, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9122:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9122:9:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 2910, + "name": "_minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2905, + "src": "9148:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 2911, + "modifierName": { + "argumentTypes": null, + "id": 2909, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9132:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9132:36:3" + } + ], + "name": "setMinRequiredReports", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2905, + "mutability": "mutable", + "name": "_minRequiredReports", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2918, + "src": "9088:25:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2904, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "9088:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9087:27:3" + }, + "returnParameters": { + "id": 2912, + "nodeType": "ParameterList", + "parameters": [], + "src": "9169:0:3" + }, + "scope": 3447, + "src": "9057:171:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2934, + "nodeType": "Block", + "src": "9531:49:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2928, + "name": "reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2625, + "src": "9542:9:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 2930, + "indexExpression": { + "argumentTypes": null, + "id": 2929, + "name": "_reporter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2921, + "src": "9552:9:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9542:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2931, + "name": "_active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2923, + "src": "9565:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9542:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2933, + "nodeType": "ExpressionStatement", + "src": "9542:30:3" + } + ] + }, + "documentation": { + "id": 2919, + "nodeType": "StructuredDocumentation", + "src": "9236:218:3", + "text": " @dev allows the owner to set/remove reporters\n @param _reporter reporter whos status is to be set\n @param _active true if the reporter is approved, false otherwise" + }, + "functionSelector": "e1bb5133", + "id": 2935, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2926, + "modifierName": { + "argumentTypes": null, + "id": 2925, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9521:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9521:9:3" + } + ], + "name": "setReporter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "_reporter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2935, + "src": "9481:17:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9481:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2923, + "mutability": "mutable", + "name": "_active", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2935, + "src": "9500:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2922, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9500:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9480:33:3" + }, + "returnParameters": { + "id": 2927, + "nodeType": "ParameterList", + "parameters": [], + "src": "9531:0:3" + }, + "scope": 3447, + "src": "9460:120:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2947, + "nodeType": "Block", + "src": "9800:46:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2943, + "name": "xTransfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "9811:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2944, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "9831:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9811:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2946, + "nodeType": "ExpressionStatement", + "src": "9811:27:3" + } + ] + }, + "documentation": { + "id": 2936, + "nodeType": "StructuredDocumentation", + "src": "9588:149:3", + "text": " @dev allows the owner enable/disable the xTransfer method\n @param _enable true to enable, false to disable" + }, + "functionSelector": "a5c670ca", + "id": 2948, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2941, + "modifierName": { + "argumentTypes": null, + "id": 2940, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9790:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9790:9:3" + } + ], + "name": "enableXTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2948, + "src": "9769:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2937, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9769:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9768:14:3" + }, + "returnParameters": { + "id": 2942, + "nodeType": "ParameterList", + "parameters": [], + "src": "9800:0:3" + }, + "scope": 3447, + "src": "9743:103:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2960, + "nodeType": "Block", + "src": "10073:45:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2956, + "name": "reportingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2607, + "src": "10084:16:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2957, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2951, + "src": "10103:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10084:26:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2959, + "nodeType": "ExpressionStatement", + "src": "10084:26:3" + } + ] + }, + "documentation": { + "id": 2949, + "nodeType": "StructuredDocumentation", + "src": "9854:157:3", + "text": " @dev allows the owner enable/disable the reportTransaction method\n @param _enable true to enable, false to disable" + }, + "functionSelector": "ed1d73a6", + "id": 2961, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2954, + "modifierName": { + "argumentTypes": null, + "id": 2953, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10063:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10063:9:3" + } + ], + "name": "enableReporting", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2951, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2961, + "src": "10042:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2950, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10042:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10041:14:3" + }, + "returnParameters": { + "id": 2955, + "nodeType": "ParameterList", + "parameters": [], + "src": "10073:0:3" + }, + "scope": 3447, + "src": "10017:101:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2995, + "nodeType": "Block", + "src": "10463:239:3", + "statements": [ + { + "assignments": [ + 2971 + ], + "declarations": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "bancorXUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2995, + "src": "10474:32:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + }, + "typeName": { + "contractScope": null, + "id": 2970, + "name": "IBancorXUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3562, + "src": "10474:16:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2977, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2974, + "name": "BANCOR_X_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21557, + "src": "10536:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2973, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10526:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 2975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10526:28:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2972, + "name": "IBancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3562, + "src": "10509:16:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorXUpgrader_$3562_$", + "typeString": "type(contract IBancorXUpgrader)" + } + }, + "id": 2976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10509:46:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10474:81:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2981, + "name": "bancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "10594:15:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + ], + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10586:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2979, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10586:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10586:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2978, + "name": "transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21787, + "src": "10568:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10568:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2984, + "nodeType": "ExpressionStatement", + "src": "10568:43:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2988, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "10646:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 2989, + "name": "_reporters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2965, + "src": "10655:10:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 2985, + "name": "bancorXUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "10622:15:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorXUpgrader_$3562", + "typeString": "contract IBancorXUpgrader" + } + }, + "id": 2987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 3561, + "src": "10622:23:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_array$_t_address_$dyn_memory_ptr_$returns$__$", + "typeString": "function (uint16,address[] memory) external" + } + }, + "id": 2990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10622:44:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2991, + "nodeType": "ExpressionStatement", + "src": "10622:44:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2992, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21817, + "src": "10677:15:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 2993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10677:17:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2994, + "nodeType": "ExpressionStatement", + "src": "10677:17:3" + } + ] + }, + "documentation": { + "id": 2962, + "nodeType": "StructuredDocumentation", + "src": "10126:268:3", + "text": " @dev upgrades the contract to the latest version\n can only be called by the owner\n note that the owner needs to call acceptOwnership on the new contract after the upgrade\n @param _reporters new list of reporters" + }, + "functionSelector": "0183592b", + "id": 2996, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2968, + "modifierName": { + "argumentTypes": null, + "id": 2967, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10453:9:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10453:9:3" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2965, + "mutability": "mutable", + "name": "_reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2996, + "src": "10417:27:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10417:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2964, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10417:9:3", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10416:29:3" + }, + "returnParameters": { + "id": 2969, + "nodeType": "ParameterList", + "parameters": [], + "src": "10463:0:3" + }, + "scope": 3447, + "src": "10400:302:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3049, + "nodeType": "Block", + "src": "11130:540:3", + "statements": [ + { + "assignments": [ + 3009 + ], + "declarations": [ + { + "constant": false, + "id": 3009, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3049, + "src": "11180:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11180:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3012, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3010, + "name": "getCurrentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "11207:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11207:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11180:48:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3014, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11279:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3015, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "11290:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11279:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3017, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11302:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3018, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3009, + "src": "11313:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11302:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11279:50:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11331:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3013, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11271:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11271:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3023, + "nodeType": "ExpressionStatement", + "src": "11271:82:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3025, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11377:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3024, + "name": "lockTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "11366:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11366:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3027, + "nodeType": "ExpressionStatement", + "src": "11366:19:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3028, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "11455:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3031, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11492:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3029, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3009, + "src": "11471:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "11471:20:3", + "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": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11471:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11455:45:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3034, + "nodeType": "ExpressionStatement", + "src": "11455:45:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3035, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "11511:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3036, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "11533:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11533:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11511:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3039, + "nodeType": "ExpressionStatement", + "src": "11511:34:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3041, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11619:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11619:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3043, + "name": "_toBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2999, + "src": "11631:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3044, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3001, + "src": "11646:3:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3045, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3003, + "src": "11651:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 3046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11660:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3040, + "name": "XTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "11609:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,bytes32,uint256,uint256)" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11609:53:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3048, + "nodeType": "EmitStatement", + "src": "11604:58:3" + } + ] + }, + "documentation": { + "id": 2997, + "nodeType": "StructuredDocumentation", + "src": "10710:317:3", + "text": " @dev claims tokens from msg.sender to be converted to tokens on another blockchain\n @param _toBlockchain blockchain on which tokens will be issued\n @param _to address to send the tokens to\n @param _amount the amount of tokens to transfer" + }, + "functionSelector": "49282538", + "id": 3050, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3006, + "modifierName": { + "argumentTypes": null, + "id": 3005, + "name": "xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "11112:17:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11112:17:3" + } + ], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2999, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11052:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2998, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11052:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3001, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11075:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11075:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3003, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3050, + "src": "11088:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11088:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11051:53:3" + }, + "returnParameters": { + "id": 3007, + "nodeType": "ParameterList", + "parameters": [], + "src": "11130:0:3" + }, + "scope": 3447, + "src": "11033:637:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 3541 + ], + "body": { + "id": 3106, + "nodeType": "Block", + "src": "12225:565:3", + "statements": [ + { + "assignments": [ + 3066 + ], + "declarations": [ + { + "constant": false, + "id": 3066, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3106, + "src": "12275:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12275:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3069, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3067, + "name": "getCurrentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3343, + "src": "12302:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12302:21:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12275:48:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3071, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12410:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3072, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "12421:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12410:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3074, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12433:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3075, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "12444:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12433:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12410:50:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12462:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3070, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12402:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12402:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3080, + "nodeType": "ExpressionStatement", + "src": "12402:82:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3082, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12508:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3081, + "name": "lockTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3398, + "src": "12497:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12497:19:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3084, + "nodeType": "ExpressionStatement", + "src": "12497:19:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3085, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "12586:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3088, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12623:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3086, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "12602:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "12602:20:3", + "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": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12602:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12586:45:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3091, + "nodeType": "ExpressionStatement", + "src": "12586:45:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3092, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "12642:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3093, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "12664:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12664:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12642:34:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3096, + "nodeType": "ExpressionStatement", + "src": "12642:34:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3098, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12737:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12737:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3100, + "name": "_toBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3053, + "src": "12749:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3101, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3055, + "src": "12764:3:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3057, + "src": "12769:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3103, + "name": "_id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3059, + "src": "12778:3:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3097, + "name": "XTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2652, + "src": "12727:9:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,bytes32,uint256,uint256)" + } + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12727:55:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3105, + "nodeType": "EmitStatement", + "src": "12722:60:3" + } + ] + }, + "documentation": { + "id": 3051, + "nodeType": "StructuredDocumentation", + "src": "11678:422:3", + "text": " @dev claims tokens from msg.sender to be converted to tokens on another blockchain\n @param _toBlockchain blockchain on which tokens will be issued\n @param _to address to send the tokens to\n @param _amount the amount of tokens to transfer\n @param _id pre-determined unique (if non zero) id which refers to this transaction" + }, + "functionSelector": "427c0374", + "id": 3107, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3063, + "modifierName": { + "argumentTypes": null, + "id": 3062, + "name": "xTransfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2802, + "src": "12207:17:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12207:17:3" + } + ], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3061, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12198:8:3" + }, + "parameters": { + "id": 3060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3053, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12125:21:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3052, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12125:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3055, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12148:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3054, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12148:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3057, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12161:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12161:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3059, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3107, + "src": "12178:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12178:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12124:66:3" + }, + "returnParameters": { + "id": 3064, + "nodeType": "ParameterList", + "parameters": [], + "src": "12225:0:3" + }, + "scope": 3447, + "src": "12106:684:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3280, + "nodeType": "Block", + "src": "13645:1731:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13747:31:3", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3132, + "name": "reportedTxs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "13748:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + } + }, + "id": 3134, + "indexExpression": { + "argumentTypes": null, + "id": 3133, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13760:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13748:18:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3137, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3135, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13767:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13767:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13748:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414c52454144595f5245504f52544544", + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13780:22:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eacdf1b09650a9214fcd03c8cca153c1ef5430f33502fe3fc1e6f73a52233e56", + "typeString": "literal_string \"ERR_ALREADY_REPORTED\"" + }, + "value": "ERR_ALREADY_REPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eacdf1b09650a9214fcd03c8cca153c1ef5430f33502fe3fc1e6f73a52233e56", + "typeString": "literal_string \"ERR_ALREADY_REPORTED\"" + } + ], + "id": 3131, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13739:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13739:64:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3141, + "nodeType": "ExpressionStatement", + "src": "13739:64:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3142, + "name": "reportedTxs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2621, + "src": "13849:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(uint256 => mapping(address => bool))" + } + }, + "id": 3146, + "indexExpression": { + "argumentTypes": null, + "id": 3143, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13861:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13849:18:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 3147, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3144, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13868:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13868:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13849:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13882:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "13849:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "13849:37:3" + }, + { + "assignments": [ + 3152 + ], + "declarations": [ + { + "constant": false, + "id": 3152, + "mutability": "mutable", + "name": "txn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3280, + "src": "13899:23:3", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + }, + "typeName": { + "contractScope": null, + "id": 3151, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "13899:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3156, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3153, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "13925:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3155, + "indexExpression": { + "argumentTypes": null, + "id": 3154, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "13938:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13925:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13899:45:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3157, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14038:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3158, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "14038:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14058:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14038:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3231, + "nodeType": "Block", + "src": "14474:316:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3201, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14551:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3202, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "14551:6:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3203, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14561:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "14551:13:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3205, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14568:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "14568:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3207, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14582:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14568:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14551:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3210, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14593:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3211, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fromBlockchain", + "nodeType": "MemberAccess", + "referencedDeclaration": 2570, + "src": "14593:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3212, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14615:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14593:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14551:79:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f4d49534d41544348", + "id": 3215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14632:17:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + }, + "value": "ERR_TX_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + } + ], + "id": 3200, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14543:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14543:107:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3217, + "nodeType": "ExpressionStatement", + "src": "14543:107:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3218, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14671:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14687:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14671:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3230, + "nodeType": "IfStatement", + "src": "14667:111:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3222, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14715:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3224, + "indexExpression": { + "argumentTypes": null, + "id": 3223, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14730:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14715:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3225, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14747:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14715:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f455849535453", + "id": 3227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14754:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + }, + "value": "ERR_TX_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + } + ], + "id": 3221, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14707:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14707:71:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3229, + "nodeType": "ExpressionStatement", + "src": "14707:71:3" + } + } + ] + }, + "id": 3232, + "nodeType": "IfStatement", + "src": "14034:756:3", + "trueBody": { + "id": 3199, + "nodeType": "Block", + "src": "14061:398:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3161, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14076:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "14076:6:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3164, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14085:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "14076:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3166, + "nodeType": "ExpressionStatement", + "src": "14076:12:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3167, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14103:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "14103:10:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3170, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14116:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14103:20:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3172, + "nodeType": "ExpressionStatement", + "src": "14103:20:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3173, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14138:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "fromBlockchain", + "nodeType": "MemberAccess", + "referencedDeclaration": 2570, + "src": "14138:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3176, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14159:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14138:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3178, + "nodeType": "ExpressionStatement", + "src": "14138:36:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3179, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14195:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14211:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14195:17:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3198, + "nodeType": "IfStatement", + "src": "14191:257:3", + "trueBody": { + "id": 3197, + "nodeType": "Block", + "src": "14214:234:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3183, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14318:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3185, + "indexExpression": { + "argumentTypes": null, + "id": 3184, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14333:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14318:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14350:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14318:33:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f455849535453", + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14353:23:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + }, + "value": "ERR_TX_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6957b87c54e7d0624ff8a3f0dab58c7c7ceeac939294153268df0f24ee23a0a9", + "typeString": "literal_string \"ERR_TX_ALREADY_EXISTS\"" + } + ], + "id": 3182, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14310:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14310:67:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3190, + "nodeType": "ExpressionStatement", + "src": "14310:67:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3191, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "14396:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3193, + "indexExpression": { + "argumentTypes": null, + "id": 3192, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14411:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14396:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3194, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14427:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14396:36:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3196, + "nodeType": "ExpressionStatement", + "src": "14396:36:3" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14846:18:3", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3233, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "14846:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "14846:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3237, + "nodeType": "ExpressionStatement", + "src": "14846:18:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3239, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14891:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14891:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3241, + "name": "_fromBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3110, + "src": "14903:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3242, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "14920:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "14927:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3244, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "14932:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3245, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "14941:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3238, + "name": "TxReport", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2667, + "src": "14882:8:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,address,uint256,uint256)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14882:72:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3247, + "nodeType": "EmitStatement", + "src": "14877:77:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3248, + "name": "txn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3152, + "src": "15031:3:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction storage pointer" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numOfReports", + "nodeType": "MemberAccess", + "referencedDeclaration": 2574, + "src": "15031:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3250, + "name": "minRequiredReports", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2598, + "src": "15051:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "15031:38:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3279, + "nodeType": "IfStatement", + "src": "15027:342:3", + "trueBody": { + "id": 3278, + "nodeType": "Block", + "src": "15071:298:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15094:30:3", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3253, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15095:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3255, + "indexExpression": { + "argumentTypes": null, + "id": 3254, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "15108:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15095:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "id": 3256, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "completed", + "nodeType": "MemberAccess", + "referencedDeclaration": 2576, + "src": "15095:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f414c52454144595f434f4d504c45544544", + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15126:26:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8458c6336176452534d737fe1d081580bd6710b63bb64c5c00fe229feb3ce8c8", + "typeString": "literal_string \"ERR_TX_ALREADY_COMPLETED\"" + }, + "value": "ERR_TX_ALREADY_COMPLETED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8458c6336176452534d737fe1d081580bd6710b63bb64c5c00fe229feb3ce8c8", + "typeString": "literal_string \"ERR_TX_ALREADY_COMPLETED\"" + } + ], + "id": 3252, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15086:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15086:67:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3260, + "nodeType": "ExpressionStatement", + "src": "15086:67:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3261, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15219:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3263, + "indexExpression": { + "argumentTypes": null, + "id": 3262, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3112, + "src": "15232:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15219:19:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "id": 3264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "completed", + "nodeType": "MemberAccess", + "referencedDeclaration": 2576, + "src": "15219:29:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15251:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "15219:36:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3267, + "nodeType": "ExpressionStatement", + "src": "15219:36:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3269, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "15295:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3270, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3118, + "src": "15300:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3268, + "name": "XTransferComplete", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2674, + "src": "15277:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15277:36:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3272, + "nodeType": "EmitStatement", + "src": "15272:41:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3274, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "15344:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3275, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "15349:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3273, + "name": "releaseTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3446, + "src": "15330:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15330:27:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3277, + "nodeType": "ExpressionStatement", + "src": "15330:27:3" + } + ] + } + } + ] + }, + "documentation": { + "id": 3108, + "nodeType": "StructuredDocumentation", + "src": "12798:549:3", + "text": " @dev allows reporter to report transaction which occured on another blockchain\n @param _fromBlockchain blockchain in which tokens were destroyed\n @param _txId transactionId of transaction thats being reported\n @param _to address to receive tokens\n @param _amount amount of tokens destroyed on another blockchain\n @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been mined)" + }, + "functionSelector": "6dc6a01b", + "id": 3281, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3121, + "modifierName": { + "argumentTypes": null, + "id": 3120, + "name": "reporterOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2783, + "src": "13540:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:12:3" + }, + { + "arguments": null, + "id": 3123, + "modifierName": { + "argumentTypes": null, + "id": 3122, + "name": "reportingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2818, + "src": "13562:16:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13562:16:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 3125, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3114, + "src": "13601:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 3126, + "modifierName": { + "argumentTypes": null, + "id": 3124, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "13588:12:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13588:17:3" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 3128, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3116, + "src": "13631:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3129, + "modifierName": { + "argumentTypes": null, + "id": 3127, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "13615:15:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13615:24:3" + } + ], + "name": "reportTx", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3110, + "mutability": "mutable", + "name": "_fromBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13381:23:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3109, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13381:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3112, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13415:13:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13415:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3114, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13439:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3113, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13439:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13461:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13461:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3118, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3281, + "src": "13487:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13487:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13370:144:3" + }, + "returnParameters": { + "id": 3130, + "nodeType": "ParameterList", + "parameters": [], + "src": "13645:0:3" + }, + "scope": 3447, + "src": "13353:2023:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 3550 + ], + "body": { + "id": 3311, + "nodeType": "Block", + "src": "15881:294:3", + "statements": [ + { + "assignments": [ + 3293 + ], + "declarations": [ + { + "constant": false, + "id": 3293, + "mutability": "mutable", + "name": "transaction", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3311, + "src": "15939:30:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction" + }, + "typeName": { + "contractScope": null, + "id": 3292, + "name": "Transaction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2577, + "src": "15939:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage_ptr", + "typeString": "struct BancorX.Transaction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3299, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3294, + "name": "transactions", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2611, + "src": "15972:12:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Transaction_$2577_storage_$", + "typeString": "mapping(uint256 => struct BancorX.Transaction storage ref)" + } + }, + "id": 3298, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3295, + "name": "transactionIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2615, + "src": "15985:14:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 3297, + "indexExpression": { + "argumentTypes": null, + "id": 3296, + "name": "_xTransferId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3284, + "src": "16000:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15985:28:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15972:42:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_storage", + "typeString": "struct BancorX.Transaction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15939:75:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3301, + "name": "transaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "16087:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction memory" + } + }, + "id": 3302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 2572, + "src": "16087:14:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3303, + "name": "_for", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3286, + "src": "16105:4:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16087:22:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f54585f4d49534d41544348", + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16111:17:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + }, + "value": "ERR_TX_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39731edd6d4c0fd2309c14f2b1a935ba30b8a0693da1b0353a3c6694ebcdb4a7", + "typeString": "literal_string \"ERR_TX_MISMATCH\"" + } + ], + "id": 3300, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16079:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16079:50:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3307, + "nodeType": "ExpressionStatement", + "src": "16079:50:3" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3308, + "name": "transaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3293, + "src": "16149:11:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Transaction_$2577_memory_ptr", + "typeString": "struct BancorX.Transaction memory" + } + }, + "id": 3309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 2568, + "src": "16149:18:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3291, + "id": 3310, + "nodeType": "Return", + "src": "16142:25:3" + } + ] + }, + "documentation": { + "id": 3282, + "nodeType": "StructuredDocumentation", + "src": "15384:388:3", + "text": " @dev gets x transfer amount by xTransferId (not txId)\n @param _xTransferId unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been broadcasted)\n @param _for address corresponding to xTransferId\n @return amount that was sent in xTransfer corresponding to _xTransferId" + }, + "functionSelector": "aafd6b76", + "id": 3312, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getXTransferAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3288, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15854:8:3" + }, + "parameters": { + "id": 3287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3284, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15806:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3283, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15806:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3286, + "mutability": "mutable", + "name": "_for", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15828:12:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3285, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15828:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15805:36:3" + }, + "returnParameters": { + "id": 3291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3290, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3312, + "src": "15872:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15872:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15871:9:3" + }, + "scope": 3447, + "src": "15778:397:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3342, + "nodeType": "Block", + "src": "16399:331:3", + "statements": [ + { + "assignments": [ + 3319 + ], + "declarations": [ + { + "constant": false, + "id": 3319, + "mutability": "mutable", + "name": "currentLockLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3342, + "src": "16499:24:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3318, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16499:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3333, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3330, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "16590:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3326, + "name": "prevLockBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2594, + "src": "16564:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3322, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "16546:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16546:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3324, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16545:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "16545:18:3", + "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": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16545:39:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3328, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "16544:41:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "16544:45:3", + "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": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16544:63:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3320, + "name": "prevLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2588, + "src": "16526:13:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "16526:17:3", + "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": 3332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16526:82:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16499:109:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3334, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3319, + "src": "16623:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 3335, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "16642:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16623:31:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3339, + "nodeType": "IfStatement", + "src": "16619:69:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 3337, + "name": "maxLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2582, + "src": "16676:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3317, + "id": 3338, + "nodeType": "Return", + "src": "16669:19:3" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3340, + "name": "currentLockLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3319, + "src": "16706:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3317, + "id": 3341, + "nodeType": "Return", + "src": "16699:23:3" + } + ] + }, + "documentation": { + "id": 3313, + "nodeType": "StructuredDocumentation", + "src": "16183:149:3", + "text": " @dev method for calculating current lock limit\n @return the current maximum limit of tokens that can be locked" + }, + "functionSelector": "19967439", + "id": 3343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentLockLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3314, + "nodeType": "ParameterList", + "parameters": [], + "src": "16366:2:3" + }, + "returnParameters": { + "id": 3317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3316, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3343, + "src": "16390:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16390:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16389:9:3" + }, + "scope": 3447, + "src": "16338:392:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3373, + "nodeType": "Block", + "src": "16962:358:3", + "statements": [ + { + "assignments": [ + 3350 + ], + "declarations": [ + { + "constant": false, + "id": 3350, + "mutability": "mutable", + "name": "currentReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3373, + "src": "17068:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3349, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17068:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3364, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3361, + "name": "limitIncPerBlock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2592, + "src": "17168:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3357, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "17139:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3353, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "17121:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17121:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3355, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17120:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "17120:18:3", + "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": 3358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17120:42:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3359, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17119:44:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "17119:48:3", + "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": "17119:66:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3351, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "17098:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "17098:20:3", + "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": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17098:88:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17068:118:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3365, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3350, + "src": "17201:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 3366, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "17223:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17201:37:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3370, + "nodeType": "IfStatement", + "src": "17197:78:3", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 3368, + "name": "maxReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2584, + "src": "17260:15:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3348, + "id": 3369, + "nodeType": "Return", + "src": "17253:22:3" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 3371, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3350, + "src": "17293:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3348, + "id": 3372, + "nodeType": "Return", + "src": "17286:26:3" + } + ] + }, + "documentation": { + "id": 3344, + "nodeType": "StructuredDocumentation", + "src": "16738:154:3", + "text": " @dev method for calculating current release limit\n @return the current maximum limit of tokens that can be released" + }, + "functionSelector": "1e04a593", + "id": 3374, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentReleaseLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3345, + "nodeType": "ParameterList", + "parameters": [], + "src": "16929:2:3" + }, + "returnParameters": { + "id": 3348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3347, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3374, + "src": "16953:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16953:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16952:9:3" + }, + "scope": 3447, + "src": "16898:422:3", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3397, + "nodeType": "Block", + "src": "17556:125:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3381, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "17584:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3382, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17591:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17591:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3386, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17611:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorX_$3447", + "typeString": "contract BancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorX_$3447", + "typeString": "contract BancorX" + } + ], + "id": 3385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17603:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17603:7:3", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17603:13:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3388, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3377, + "src": "17618:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3380, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "17567:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17567:59:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "ExpressionStatement", + "src": "17567:59:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3392, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17653:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17653:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3394, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3377, + "src": "17665:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3391, + "name": "TokensLock", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2632, + "src": "17642:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17642:31:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3396, + "nodeType": "EmitStatement", + "src": "17637:36:3" + } + ] + }, + "documentation": { + "id": 3375, + "nodeType": "StructuredDocumentation", + "src": "17328:177:3", + "text": " @dev claims and locks tokens from msg.sender to be converted to tokens on another blockchain\n @param _amount the amount of tokens to lock" + }, + "id": 3398, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lockTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3377, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3398, + "src": "17531:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17531:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17530:17:3" + }, + "returnParameters": { + "id": 3379, + "nodeType": "ParameterList", + "parameters": [], + "src": "17556:0:3" + }, + "scope": 3447, + "src": "17511:170:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3445, + "nodeType": "Block", + "src": "17960:530:3", + "statements": [ + { + "assignments": [ + 3407 + ], + "declarations": [ + { + "constant": false, + "id": 3407, + "mutability": "mutable", + "name": "currentReleaseLimit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3445, + "src": "18013:27:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18013:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3410, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3408, + "name": "getCurrentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "18043:22:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18043:24:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18013:54:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3412, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18088:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3413, + "name": "minLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2586, + "src": "18099:8:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18088:19:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3415, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18111:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 3416, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "18122:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18111:30:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18088:53:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414d4f554e545f544f4f5f48494748", + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18143:21:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + }, + "value": "ERR_AMOUNT_TOO_HIGH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea546d9a31e2cdf5ff54bd756b604340a9be1b0f1b5565f1667d358efb53a459", + "typeString": "literal_string \"ERR_AMOUNT_TOO_HIGH\"" + } + ], + "id": 3411, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18080:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18080:85:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3421, + "nodeType": "ExpressionStatement", + "src": "18080:85:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3422, + "name": "prevReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "18241:16:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3425, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18284:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3423, + "name": "currentReleaseLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3407, + "src": "18260:19:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "18260:23:3", + "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": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18260:32:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18241:51:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3428, + "nodeType": "ExpressionStatement", + "src": "18241:51:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3429, + "name": "prevReleaseBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2596, + "src": "18303:22:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3430, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "18328:5:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18328:12:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18303:37:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3433, + "nodeType": "ExpressionStatement", + "src": "18303:37:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3435, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2601, + "src": "18417:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 3436, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "18424:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3437, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18429:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3434, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "18404:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18404:33:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3439, + "nodeType": "ExpressionStatement", + "src": "18404:33:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3441, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3401, + "src": "18469:3:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3442, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3403, + "src": "18474:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3440, + "name": "TokensRelease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2639, + "src": "18455:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18455:27:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3444, + "nodeType": "EmitStatement", + "src": "18450:32:3" + } + ] + }, + "documentation": { + "id": 3399, + "nodeType": "StructuredDocumentation", + "src": "17689:204:3", + "text": " @dev private method to release tokens held by the contract\n @param _to the address to release tokens to\n @param _amount the amount of tokens to release" + }, + "id": 3446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releaseTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3401, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3446, + "src": "17922:11:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17922:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3403, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3446, + "src": "17935:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3402, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17935:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17921:30:3" + }, + "returnParameters": { + "id": 3405, + "nodeType": "ParameterList", + "parameters": [], + "src": "17960:0:3" + }, + "scope": 3447, + "src": "17899:591:3", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3448, + "src": "900:17593:3" + } + ], + "src": "52:18443:3" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.662Z", + "devdoc": { + "details": "The BancorX contract allows cross chain token transfers. There are two processes that take place in the contract - - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum) - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum) Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple callers are required to report a transfer before tokens are released to the target account.", + "events": { + "TokensLock(address,uint256)": { + "details": "triggered when tokens are locked in smart contract", + "params": { + "_amount": "amount locked", + "_from": "wallet address that the tokens are locked from" + } + }, + "TokensRelease(address,uint256)": { + "details": "triggered when tokens are released by the smart contract", + "params": { + "_amount": "amount released", + "_to": "wallet address that the tokens are released to" + } + }, + "TxReport(address,bytes32,uint256,address,uint256,uint256)": { + "details": "triggered when report is successfully submitted", + "params": { + "_amount": "transfer amount", + "_fromBlockchain": "source blockchain", + "_reporter": "reporter wallet", + "_to": "target wallet", + "_txId": "tx id on the source blockchain", + "_xTransferId": "xtransfer id" + } + }, + "XTransfer(address,bytes32,bytes32,uint256,uint256)": { + "details": "triggered when xTransfer is successfully called", + "params": { + "_amount": "transfer amount", + "_from": "wallet address that initiated the xtransfer", + "_id": "xtransfer id", + "_to": "target wallet", + "_toBlockchain": "target blockchain" + } + }, + "XTransferComplete(address,uint256)": { + "details": "triggered when final report is successfully submitted", + "params": { + "_id": "xtransfer id", + "_to": "target wallet" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new BancorX instance", + "params": { + "_limitIncPerBlock": "how much the limit increases per block", + "_maxLockLimit": "maximum amount of tokens that can be locked in one transaction", + "_maxReleaseLimit": "maximum amount of tokens that can be released in one transaction", + "_minLimit": "minimum amount of tokens that can be transferred in one transaction", + "_minRequiredReports": "minimum number of reporters to report transaction before tokens can be released", + "_registry": "address of contract registry", + "_token": "erc20 token" + } + }, + "enableReporting(bool)": { + "details": "allows the owner enable/disable the reportTransaction method", + "params": { + "_enable": "true to enable, false to disable" + } + }, + "enableXTransfers(bool)": { + "details": "allows the owner enable/disable the xTransfer method", + "params": { + "_enable": "true to enable, false to disable" + } + }, + "getCurrentLockLimit()": { + "details": "method for calculating current lock limit", + "returns": { + "_0": "the current maximum limit of tokens that can be locked" + } + }, + "getCurrentReleaseLimit()": { + "details": "method for calculating current release limit", + "returns": { + "_0": "the current maximum limit of tokens that can be released" + } + }, + "getXTransferAmount(uint256,address)": { + "details": "gets x transfer amount by xTransferId (not txId)", + "params": { + "_for": "address corresponding to xTransferId", + "_xTransferId": "unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been broadcasted)" + }, + "returns": { + "_0": "amount that was sent in xTransfer corresponding to _xTransferId" + } + }, + "reportTx(bytes32,uint256,address,uint256,uint256)": { + "details": "allows reporter to report transaction which occured on another blockchain", + "params": { + "_amount": "amount of tokens destroyed on another blockchain", + "_fromBlockchain": "blockchain in which tokens were destroyed", + "_to": "address to receive tokens", + "_txId": "transactionId of transaction thats being reported", + "_xTransferId": "unique (if non zero) pre-determined id (unlike _txId which is determined after the transactions been mined)" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setLimitIncPerBlock(uint256)": { + "details": "setter", + "params": { + "_limitIncPerBlock": "new limitIncPerBlock" + } + }, + "setMaxLockLimit(uint256)": { + "details": "setter", + "params": { + "_maxLockLimit": "new maxLockLimit" + } + }, + "setMaxReleaseLimit(uint256)": { + "details": "setter", + "params": { + "_maxReleaseLimit": "new maxReleaseLimit" + } + }, + "setMinLimit(uint256)": { + "details": "setter", + "params": { + "_minLimit": "new minLimit" + } + }, + "setMinRequiredReports(uint8)": { + "details": "setter", + "params": { + "_minRequiredReports": "new minRequiredReports" + } + }, + "setReporter(address,bool)": { + "details": "allows the owner to set/remove reporters", + "params": { + "_active": "true if the reporter is approved, false otherwise", + "_reporter": "reporter whos status is to be set" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade(address[])": { + "details": "upgrades the contract to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new contract after the upgrade", + "params": { + "_reporters": "new list of reporters" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "xTransfer(bytes32,bytes32,uint256)": { + "details": "claims tokens from msg.sender to be converted to tokens on another blockchain", + "params": { + "_amount": "the amount of tokens to transfer", + "_to": "address to send the tokens to", + "_toBlockchain": "blockchain on which tokens will be issued" + } + }, + "xTransfer(bytes32,bytes32,uint256,uint256)": { + "details": "claims tokens from msg.sender to be converted to tokens on another blockchain", + "params": { + "_amount": "the amount of tokens to transfer", + "_id": "pre-determined unique (if non zero) id which refers to this transaction", + "_to": "address to send the tokens to", + "_toBlockchain": "blockchain on which tokens will be issued" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ChainlinkETHToETHOracle.json b/apps/cic-eth/tests/testdata/bancor/ChainlinkETHToETHOracle.json new file mode 100644 index 00000000..c5467f75 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ChainlinkETHToETHOracle.json @@ -0,0 +1,704 @@ +{ + "contractName": "ChainlinkETHToETHOracle", + "abi": [ + { + "inputs": [], + "name": "latestAnswer", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates\",\"kind\":\"dev\",\"methods\":{\"latestAnswer()\":{\"details\":\"returns the trivial ETH/ETH rate.\",\"returns\":{\"_0\":\"always returns the trivial rate of 1\"}},\"latestTimestamp()\":{\"details\":\"returns the trivial ETH/ETH update time.\",\"returns\":{\"_0\":\"always returns current block's timestamp\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol\":\"ChainlinkETHToETHOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol\":{\"keccak256\":\"0x4e0c0568103a535f522cf43833e3632ce9a79c6e6d62b2e116b83f21afbe2d78\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b656f1c4c522b77bd73347d9857fedb0dc72306b50d6e3879222b9ca6fc6a75e\",\"dweb:/ipfs/Qmeqp6RQV5RciQCWkFE4DiYb5ZybhJyXqif3n5bkVrd4BA\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b5060948061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806350d25bcd1460375780638205bf6a14604f575b600080fd5b603d6055565b60408051918252519081900360200190f35b603d605a565b600190565b429056fea2646970667358221220c822ae6afcb353631cf38e35b68885314d174a60445c8b6f4e095de2c2451b7164736f6c634300060c0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806350d25bcd1460375780638205bf6a14604f575b600080fd5b603d6055565b60408051918252519081900360200190f35b603d605a565b600190565b429056fea2646970667358221220c822ae6afcb353631cf38e35b68885314d174a60445c8b6f4e095de2c2451b7164736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "212:563:54:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "212:563:54:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;442:96;;;:::i;:::-;;;;;;;;;;;;;;;;678:95;;;:::i;442:96::-;311:1;442:96;:::o;678:95::-;763:3;678:95;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\nimport \"./interfaces/IChainlinkPriceOracle.sol\";\n\n/**\n * @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates\n*/\ncontract ChainlinkETHToETHOracle is IChainlinkPriceOracle {\n int256 private constant ETH_RATE = 1;\n\n /**\n * @dev returns the trivial ETH/ETH rate.\n *\n * @return always returns the trivial rate of 1\n */\n function latestAnswer() external view override returns (int256) {\n return ETH_RATE;\n }\n\n /**\n * @dev returns the trivial ETH/ETH update time.\n *\n * @return always returns current block's timestamp\n */\n function latestTimestamp() external view override returns (uint256) {\n return now;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol", + "exportedSymbols": { + "ChainlinkETHToETHOracle": [ + 21212 + ] + }, + "id": 21213, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21184, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:54" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./interfaces/IChainlinkPriceOracle.sol", + "id": 21185, + "nodeType": "ImportDirective", + "scope": 21213, + "sourceUnit": 22822, + "src": "76:48:54", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21187, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "248:21:54", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21188, + "nodeType": "InheritanceSpecifier", + "src": "248:21:54" + } + ], + "contractDependencies": [ + 22821 + ], + "contractKind": "contract", + "documentation": { + "id": 21186, + "nodeType": "StructuredDocumentation", + "src": "126:85:54", + "text": " @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates" + }, + "fullyImplemented": true, + "id": 21212, + "linearizedBaseContracts": [ + 21212, + 22821 + ], + "name": "ChainlinkETHToETHOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 21191, + "mutability": "constant", + "name": "ETH_RATE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21212, + "src": "276:36:54", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 21189, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "276:6:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 21190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "311:1:54", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "baseFunctions": [ + 22815 + ], + "body": { + "id": 21200, + "nodeType": "Block", + "src": "506:32:54", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21198, + "name": "ETH_RATE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21191, + "src": "523:8:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 21197, + "id": 21199, + "nodeType": "Return", + "src": "516:15:54" + } + ] + }, + "documentation": { + "id": 21192, + "nodeType": "StructuredDocumentation", + "src": "319:118:54", + "text": " @dev returns the trivial ETH/ETH rate.\n @return always returns the trivial rate of 1" + }, + "functionSelector": "50d25bcd", + "id": 21201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21194, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "480:8:54" + }, + "parameters": { + "id": 21193, + "nodeType": "ParameterList", + "parameters": [], + "src": "463:2:54" + }, + "returnParameters": { + "id": 21197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21196, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21201, + "src": "498:6:54", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 21195, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "498:6:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:8:54" + }, + "scope": 21212, + "src": "442:96:54", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 22820 + ], + "body": { + "id": 21210, + "nodeType": "Block", + "src": "746:27:54", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21208, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "763:3:54", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 21207, + "id": 21209, + "nodeType": "Return", + "src": "756:10:54" + } + ] + }, + "documentation": { + "id": 21202, + "nodeType": "StructuredDocumentation", + "src": "544:129:54", + "text": " @dev returns the trivial ETH/ETH update time.\n @return always returns current block's timestamp" + }, + "functionSelector": "8205bf6a", + "id": 21211, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21204, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "719:8:54" + }, + "parameters": { + "id": 21203, + "nodeType": "ParameterList", + "parameters": [], + "src": "702:2:54" + }, + "returnParameters": { + "id": 21207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21206, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21211, + "src": "737:7:54", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "737:7:54", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "736:9:54" + }, + "scope": 21212, + "src": "678:95:54", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21213, + "src": "212:563:54" + } + ], + "src": "51:725:54" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol", + "exportedSymbols": { + "ChainlinkETHToETHOracle": [ + 21212 + ] + }, + "id": 21213, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21184, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:54" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./interfaces/IChainlinkPriceOracle.sol", + "id": 21185, + "nodeType": "ImportDirective", + "scope": 21213, + "sourceUnit": 22822, + "src": "76:48:54", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21187, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "248:21:54", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21188, + "nodeType": "InheritanceSpecifier", + "src": "248:21:54" + } + ], + "contractDependencies": [ + 22821 + ], + "contractKind": "contract", + "documentation": { + "id": 21186, + "nodeType": "StructuredDocumentation", + "src": "126:85:54", + "text": " @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates" + }, + "fullyImplemented": true, + "id": 21212, + "linearizedBaseContracts": [ + 21212, + 22821 + ], + "name": "ChainlinkETHToETHOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 21191, + "mutability": "constant", + "name": "ETH_RATE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21212, + "src": "276:36:54", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 21189, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "276:6:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 21190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "311:1:54", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "baseFunctions": [ + 22815 + ], + "body": { + "id": 21200, + "nodeType": "Block", + "src": "506:32:54", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21198, + "name": "ETH_RATE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21191, + "src": "523:8:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 21197, + "id": 21199, + "nodeType": "Return", + "src": "516:15:54" + } + ] + }, + "documentation": { + "id": 21192, + "nodeType": "StructuredDocumentation", + "src": "319:118:54", + "text": " @dev returns the trivial ETH/ETH rate.\n @return always returns the trivial rate of 1" + }, + "functionSelector": "50d25bcd", + "id": 21201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21194, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "480:8:54" + }, + "parameters": { + "id": 21193, + "nodeType": "ParameterList", + "parameters": [], + "src": "463:2:54" + }, + "returnParameters": { + "id": 21197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21196, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21201, + "src": "498:6:54", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 21195, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "498:6:54", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:8:54" + }, + "scope": 21212, + "src": "442:96:54", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 22820 + ], + "body": { + "id": 21210, + "nodeType": "Block", + "src": "746:27:54", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21208, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "763:3:54", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 21207, + "id": 21209, + "nodeType": "Return", + "src": "756:10:54" + } + ] + }, + "documentation": { + "id": 21202, + "nodeType": "StructuredDocumentation", + "src": "544:129:54", + "text": " @dev returns the trivial ETH/ETH update time.\n @return always returns current block's timestamp" + }, + "functionSelector": "8205bf6a", + "id": 21211, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21204, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "719:8:54" + }, + "parameters": { + "id": 21203, + "nodeType": "ParameterList", + "parameters": [], + "src": "702:2:54" + }, + "returnParameters": { + "id": 21207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21206, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21211, + "src": "737:7:54", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "737:7:54", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "736:9:54" + }, + "scope": 21212, + "src": "678:95:54", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21213, + "src": "212:563:54" + } + ], + "src": "51:725:54" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.837Z", + "devdoc": { + "details": "Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates", + "kind": "dev", + "methods": { + "latestAnswer()": { + "details": "returns the trivial ETH/ETH rate.", + "returns": { + "_0": "always returns the trivial rate of 1" + } + }, + "latestTimestamp()": { + "details": "returns the trivial ETH/ETH update time.", + "returns": { + "_0": "always returns current block's timestamp" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ContractRegistry.json b/apps/cic-eth/tests/testdata/bancor/ContractRegistry.json new file mode 100644 index 00000000..3b465013 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ContractRegistry.json @@ -0,0 +1,8533 @@ +{ + "contractName": "ContractRegistry", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "contractNames", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "itemCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + } + ], + "name": "addressOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "registerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + } + ], + "name": "unregisterAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + } + ], + "name": "getAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_contractAddress\",\"type\":\"address\"}],\"name\":\"AddressUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"addressOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"contractNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"itemCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_contractAddress\",\"type\":\"address\"}],\"name\":\"registerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"unregisterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract Registry The contract registry keeps contract addresses by name. The owner can update contract addresses so that a contract name always points to the latest version of the given contract. Other contracts can query the registry to get updated addresses instead of depending on specific addresses. Note that contract names are limited to 32 bytes UTF8 encoded ASCII strings to optimize gas costs\",\"events\":{\"AddressUpdate(bytes32,address)\":{\"details\":\"triggered when an address pointed to by a contract name is modified\",\"params\":{\"_contractAddress\":\"new contract address\",\"_contractName\":\"contract name\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addressOf(bytes32)\":{\"details\":\"returns the address associated with the given contract name\",\"params\":{\"_contractName\":\"contract name\"},\"returns\":{\"_0\":\"contract address\"}},\"getAddress(bytes32)\":{\"details\":\"deprecated, backward compatibility\"},\"itemCount()\":{\"details\":\"returns the number of items in the registry\",\"returns\":{\"_0\":\"number of items\"}},\"registerAddress(bytes32,address)\":{\"details\":\"registers a new address for the contract name in the registry\",\"params\":{\"_contractAddress\":\"contract address\",\"_contractName\":\"contract name\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"unregisterAddress(bytes32)\":{\"details\":\"removes an existing contract address from the registry\",\"params\":{\"_contractName\":\"contract name\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistry.sol\":\"ContractRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistry.sol\":{\"keccak256\":\"0x2c528338138def339adcf2cff6003747add2baec544025f9e00e8ac7ca3ae9a5\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3bf4a4cd09bf05a9c83a7255989bddf55afe82e201e83492ca7d5dc3bb95eb22\",\"dweb:/ipfs/QmUBkzUfk5x8sAW4Xm9krmBkQCYx9nziKNdhMehbCCtoWT\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561098f806100326000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba5097146101d35780638da5cb5b146101db578063bb34534c146101e3578063d4ee1d9014610200578063f2fde38b146102085761009e565b806321f8a721146100a35780632bbd9530146100dc5780633ca6bb92146100fb578063662de3791461018d5780636bfb0d01146101b9575b600080fd5b6100c0600480360360208110156100b957600080fd5b503561022e565b604080516001600160a01b039092168252519081900360200190f35b6100f9600480360360208110156100f257600080fd5b503561023f565b005b6101186004803603602081101561011157600080fd5b5035610453565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015257818101518382015260200161013a565b50505050905090810190601f16801561017f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f9600480360360408110156101a357600080fd5b50803590602001356001600160a01b03166104f9565b6101c16105f0565b60408051918252519081900360200190f35b6100f96105f6565b6100c06106ad565b6100c0600480360360208110156101f957600080fd5b50356106bc565b6100c06106d7565b6100f96004803603602081101561021e57600080fd5b50356001600160a01b03166106e6565b6000610239826106bc565b92915050565b610247610764565b6000818152600260205260409020546001600160a01b03166102a3576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600081815260026020526040902080546001600160a01b0319169055600354600110156103df57600380546060919060001981019081106102e057fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b50505050509050600060026000848152602001908152602001600020600101549050816003828154811061039e57fe5b9060005260206000200190805190602001906103bb929190610886565b5060006103c7836107b9565b60009081526002602052604090206001019190915550505b60038054806103ea57fe5b6001900381819060005260206000200160006104069190610904565b9055600081815260026020908152604080832060010183905580519283525183927ffc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f2991892908290030190a250565b6003818154811061046057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156104f15780601f106104c6576101008083540402835291602001916104f1565b820191906000526020600020905b8154815290600101906020018083116104d457829003601f168201915b505050505081565b610501610764565b8061050b816107c0565b6000838152600260205260409020546001600160a01b0390811690831681141561053557506105eb565b6001600160a01b038116610589576003805460008681526002602052604090206001015561056285610814565b8154600181018355600092835260209283902082516105879491909201920190610886565b505b60008481526002602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251908152915186927ffc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f2991892908290030190a2505b505050565b60035490565b6001546001600160a01b03163314610649576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6000908152600260205260409020546001600160a01b031690565b6001546001600160a01b031681565b6106ee610764565b6000546001600160a01b0382811691161415610742576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107b7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6020015190565b6001600160a01b038116610811576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60408051602080825281830190925260609182919060208201818036833701905050905060005b602081101561087f5783816020811061085057fe5b1a60f81b82828151811061086057fe5b60200101906001600160f81b031916908160001a90535060010161083b565b5092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106108c757805160ff19168380011785556108f4565b828001600101855582156108f4579182015b828111156108f45782518255916020019190600101906108d9565b50610900929150610944565b5090565b50805460018160011615610100020316600290046000825580601f1061092a5750610811565b601f01602090049060005260206000209081019061081191905b5b80821115610900576000815560010161094556fea2646970667358221220c1ee460acf4574042f65f6a745c4d45779297f7f10559449a9fb7e99752852a864736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806379ba50971161006657806379ba5097146101d35780638da5cb5b146101db578063bb34534c146101e3578063d4ee1d9014610200578063f2fde38b146102085761009e565b806321f8a721146100a35780632bbd9530146100dc5780633ca6bb92146100fb578063662de3791461018d5780636bfb0d01146101b9575b600080fd5b6100c0600480360360208110156100b957600080fd5b503561022e565b604080516001600160a01b039092168252519081900360200190f35b6100f9600480360360208110156100f257600080fd5b503561023f565b005b6101186004803603602081101561011157600080fd5b5035610453565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015257818101518382015260200161013a565b50505050905090810190601f16801561017f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f9600480360360408110156101a357600080fd5b50803590602001356001600160a01b03166104f9565b6101c16105f0565b60408051918252519081900360200190f35b6100f96105f6565b6100c06106ad565b6100c0600480360360208110156101f957600080fd5b50356106bc565b6100c06106d7565b6100f96004803603602081101561021e57600080fd5b50356001600160a01b03166106e6565b6000610239826106bc565b92915050565b610247610764565b6000818152600260205260409020546001600160a01b03166102a3576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600081815260026020526040902080546001600160a01b0319169055600354600110156103df57600380546060919060001981019081106102e057fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b50505050509050600060026000848152602001908152602001600020600101549050816003828154811061039e57fe5b9060005260206000200190805190602001906103bb929190610886565b5060006103c7836107b9565b60009081526002602052604090206001019190915550505b60038054806103ea57fe5b6001900381819060005260206000200160006104069190610904565b9055600081815260026020908152604080832060010183905580519283525183927ffc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f2991892908290030190a250565b6003818154811061046057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156104f15780601f106104c6576101008083540402835291602001916104f1565b820191906000526020600020905b8154815290600101906020018083116104d457829003601f168201915b505050505081565b610501610764565b8061050b816107c0565b6000838152600260205260409020546001600160a01b0390811690831681141561053557506105eb565b6001600160a01b038116610589576003805460008681526002602052604090206001015561056285610814565b8154600181018355600092835260209283902082516105879491909201920190610886565b505b60008481526002602090815260409182902080546001600160a01b0319166001600160a01b0387169081179091558251908152915186927ffc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f2991892908290030190a2505b505050565b60035490565b6001546001600160a01b03163314610649576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6000908152600260205260409020546001600160a01b031690565b6001546001600160a01b031681565b6106ee610764565b6000546001600160a01b0382811691161415610742576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107b7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6020015190565b6001600160a01b038116610811576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60408051602080825281830190925260609182919060208201818036833701905050905060005b602081101561087f5783816020811061085057fe5b1a60f81b82828151811061086057fe5b60200101906001600160f81b031916908160001a90535060010161083b565b5092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106108c757805160ff19168380011785556108f4565b828001600101855582156108f4579182015b828111156108f45782518255916020019190600101906108d9565b50610900929150610944565b5090565b50805460018160011615610100020316600290046000825580601f1061092a5750610811565b601f01602090049060005260206000209081019061081191905b5b80821115610900576000815560010161094556fea2646970667358221220c1ee460acf4574042f65f6a745c4d45779297f7f10559449a9fb7e99752852a864736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "633:5154:55:-:0;;;;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;633:5154:55;;;;;;", + "deployedSourceMap": "633:5154:55:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5661:123;;;;;;;;;;;;;;;;-1:-1:-1;5661:123:55;;:::i;:::-;;;;-1:-1:-1;;;;;5661:123:55;;;;;;;;;;;;;;3240:1394;;;;;;;;;;;;;;;;-1:-1:-1;3240:1394:55;;:::i;:::-;;971:29;;;;;;;;;;;;;;;;-1:-1:-1;971:29:55;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2129:964;;;;;;;;;;;;;;;;-1:-1:-1;2129:964:55;;;;;;-1:-1:-1;;;;;2129:964:55;;:::i;1482:97::-;;;:::i;:::-;;;;;;;;;;;;;;;;1422:217:57;;;:::i;219:29::-;;;:::i;1777:143:55:-;;;;;;;;;;;;;;;;-1:-1:-1;1777:143:55;;:::i;255:23:57:-;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;5661:123:55:-;5725:7;5752:24;5762:13;5752:9;:24::i;:::-;5745:31;5661:123;-1:-1:-1;;5661:123:55:o;3240:1394::-;726:12:57;:10;:12::i;:::-;3465:1:55::1;3417:20:::0;;;:5:::1;:20;::::0;;;;:36;-1:-1:-1;;;;;3417:36:55::1;3409:79;;;::::0;;-1:-1:-1;;;3409:79:55;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3409:79:55;;;;;;;;;;;;;::::1;;3597:1;3550:20:::0;;;:5:::1;:20;::::0;;;;:49;;-1:-1:-1;;;;;;3550:49:55::1;::::0;;3862:13:::1;:20:::0;3550:49;-1:-1:-1;3858:488:55::1;;;3942:13;3956:20:::0;;3903:36:::1;::::0;3942:13;-1:-1:-1;;3956:24:55;;;3942:39;::::1;;;;;;::::0;;;::::1;::::0;;;;::::1;3903:78:::0;;::::1;::::0;;::::1;;-1:-1:-1::0;;3903:78:55::1;;::::0;::::1;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;::::1;3942:39:::0;3903:78;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3996:23;4022:5;:20;4028:13;4022:20;;;;;;;;;;;:30;;;3996:56;;4102:22;4069:13;4083:15;4069:30;;;;;;;;;;;;;;;:55;;;;;;;;;;;;:::i;:::-;;4139:24;4166:39;4182:22;4166:15;:39::i;:::-;4220:33;4256:23:::0;;;:5:::1;:23;::::0;;;;4294:22:::1;;:40:::0;;;;-1:-1:-1;;3858:488:55::1;4413:13;:19;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;::::0;;4521:1:::1;4488:20:::0;;;:5:::1;:20;::::0;;;;;;;:30:::1;;:34:::0;;;4586:40;;;;;;4494:13;;4586:40:::1;::::0;;;;;;;::::1;3240:1394:::0;:::o;971:29::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;971:29:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;971:29:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2129:964::-;726:12:57;:10;:12::i;:::-;2260:16:55::1;594:23:64;608:8;594:13;:23::i;:::-;2429:22:55::2;2454:20:::0;;;:5:::2;:20;::::0;;;;:36;-1:-1:-1;;;;;2454:36:55;;::::2;::::0;2505:34;::::2;::::0;::::2;2501:60;;;2554:7;;;2501:60;-1:-1:-1::0;;;;;2577:28:55;::::2;2573:288;;2707:13;:20:::0;;2674::::2;::::0;;;:5:::2;:20;::::0;;;;:30:::2;;:53:::0;2818:30:::2;2680:13:::0;2818:15:::2;:30::i;:::-;2799:50:::0;;::::2;::::0;::::2;::::0;;-1:-1:-1;2799:50:55;;;::::2;::::0;;;;;;::::2;::::0;;;;::::2;::::0;::::2;::::0;::::2;:::i;:::-;;2573:288;2920:20;::::0;;;:5:::2;:20;::::0;;;;;;;;:55;;-1:-1:-1;;;;;;2920:55:55::2;-1:-1:-1::0;;;;;2920:55:55;::::2;::::0;;::::2;::::0;;;3039:46;;;;;;;2920:20;;3039:46:::2;::::0;;;;;;;::::2;628:1:64;;749::57::1;2129:964:55::0;;:::o;1482:97::-;1551:13;:20;1482:97;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;1777:143:55:-;1849:7;1876:20;;;:5;:20;;;;;:36;-1:-1:-1;;;;;1876:36:55;;1777:143::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;5374:213:55:-;5541:2;5529:15;5523:22;;5374:213::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;4872:266:55:-;4986:13;;;4996:2;4986:13;;;;;;;;;4935;;;;4986;;;;;;;;;;;-1:-1:-1;4986:13:55;4961:38;;5015:9;5010:84;5034:2;5030:1;:6;5010:84;;;5073:6;5080:1;5073:9;;;;;;;;;;5058;5068:1;5058:12;;;;;;;;;;;:24;-1:-1:-1;;;;;5058:24:55;;;;;;;;-1:-1:-1;5038:3:55;;5010:84;;;-1:-1:-1;5120:9:55;4872:266;-1:-1:-1;;4872:266:55:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./interfaces/IContractRegistry.sol\";\r\n\r\n/**\r\n * @dev Contract Registry\r\n *\r\n * The contract registry keeps contract addresses by name.\r\n * The owner can update contract addresses so that a contract name always points to the latest version\r\n * of the given contract.\r\n * Other contracts can query the registry to get updated addresses instead of depending on specific\r\n * addresses.\r\n *\r\n * Note that contract names are limited to 32 bytes UTF8 encoded ASCII strings to optimize gas costs\r\n*/\r\ncontract ContractRegistry is IContractRegistry, Owned, Utils {\r\n struct RegistryItem {\r\n address contractAddress; // contract address\r\n uint256 nameIndex; // index of the item in the list of contract names\r\n }\r\n\r\n mapping (bytes32 => RegistryItem) private items; // name -> RegistryItem mapping\r\n string[] public contractNames; // list of all registered contract names\r\n\r\n /**\r\n * @dev triggered when an address pointed to by a contract name is modified\r\n *\r\n * @param _contractName contract name\r\n * @param _contractAddress new contract address\r\n */\r\n event AddressUpdate(bytes32 indexed _contractName, address _contractAddress);\r\n\r\n /**\r\n * @dev returns the number of items in the registry\r\n *\r\n * @return number of items\r\n */\r\n function itemCount() public view returns (uint256) {\r\n return contractNames.length;\r\n }\r\n\r\n /**\r\n * @dev returns the address associated with the given contract name\r\n *\r\n * @param _contractName contract name\r\n *\r\n * @return contract address\r\n */\r\n function addressOf(bytes32 _contractName) public view override returns (address) {\r\n return items[_contractName].contractAddress;\r\n }\r\n\r\n /**\r\n * @dev registers a new address for the contract name in the registry\r\n *\r\n * @param _contractName contract name\r\n * @param _contractAddress contract address\r\n */\r\n function registerAddress(bytes32 _contractName, address _contractAddress)\r\n public\r\n ownerOnly\r\n validAddress(_contractAddress)\r\n {\r\n // validate input\r\n require(_contractName.length > 0, \"ERR_INVALID_NAME\");\r\n\r\n // check if any change is needed\r\n address currentAddress = items[_contractName].contractAddress;\r\n if (_contractAddress == currentAddress)\r\n return;\r\n\r\n if (currentAddress == address(0)) {\r\n // update the item's index in the list\r\n items[_contractName].nameIndex = contractNames.length;\r\n\r\n // add the contract name to the name list\r\n contractNames.push(bytes32ToString(_contractName));\r\n }\r\n\r\n // update the address in the registry\r\n items[_contractName].contractAddress = _contractAddress;\r\n\r\n // dispatch the address update event\r\n emit AddressUpdate(_contractName, _contractAddress);\r\n }\r\n\r\n /**\r\n * @dev removes an existing contract address from the registry\r\n *\r\n * @param _contractName contract name\r\n */\r\n function unregisterAddress(bytes32 _contractName) public ownerOnly {\r\n // validate input\r\n require(_contractName.length > 0, \"ERR_INVALID_NAME\");\r\n require(items[_contractName].contractAddress != address(0), \"ERR_INVALID_NAME\");\r\n\r\n // remove the address from the registry\r\n items[_contractName].contractAddress = address(0);\r\n\r\n // if there are multiple items in the registry, move the last element to the deleted element's position\r\n // and modify last element's registryItem.nameIndex in the items collection to point to the right position in contractNames\r\n if (contractNames.length > 1) {\r\n string memory lastContractNameString = contractNames[contractNames.length - 1];\r\n uint256 unregisterIndex = items[_contractName].nameIndex;\r\n\r\n contractNames[unregisterIndex] = lastContractNameString;\r\n bytes32 lastContractName = stringToBytes32(lastContractNameString);\r\n RegistryItem storage registryItem = items[lastContractName];\r\n registryItem.nameIndex = unregisterIndex;\r\n }\r\n\r\n // remove the last element from the name list\r\n contractNames.pop();\r\n // zero the deleted element's index\r\n items[_contractName].nameIndex = 0;\r\n\r\n // dispatch the address update event\r\n emit AddressUpdate(_contractName, address(0));\r\n }\r\n\r\n /**\r\n * @dev utility, converts bytes32 to a string\r\n * note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\r\n *\r\n * @return string representation of the given bytes32 argument\r\n */\r\n function bytes32ToString(bytes32 _bytes) private pure returns (string memory) {\r\n bytes memory byteArray = new bytes(32);\r\n for (uint256 i = 0; i < 32; i++) {\r\n byteArray[i] = _bytes[i];\r\n }\r\n\r\n return string(byteArray);\r\n }\r\n\r\n /**\r\n * @dev utility, converts string to bytes32\r\n * note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\r\n *\r\n * @return string representation of the given bytes32 argument\r\n */\r\n function stringToBytes32(string memory _string) private pure returns (bytes32) {\r\n bytes32 result;\r\n assembly {\r\n result := mload(add(_string,32))\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function getAddress(bytes32 _contractName) public view returns (address) {\r\n return addressOf(_contractName);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistry.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistry.sol", + "exportedSymbols": { + "ContractRegistry": [ + 21514 + ] + }, + "id": 21515, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21214, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:55" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 21215, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 21819, + "src": "77:21:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21216, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 22662, + "src": "100:21:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "./interfaces/IContractRegistry.sol", + "id": 21217, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 22832, + "src": "123:44:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21219, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "662:17:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21220, + "nodeType": "InheritanceSpecifier", + "src": "662:17:55" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21221, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "681:5:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 21222, + "nodeType": "InheritanceSpecifier", + "src": "681:5:55" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21223, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "688:5:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21224, + "nodeType": "InheritanceSpecifier", + "src": "688:5:55" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22831, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21218, + "nodeType": "StructuredDocumentation", + "src": "171:460:55", + "text": " @dev Contract Registry\n The contract registry keeps contract addresses by name.\n The owner can update contract addresses so that a contract name always points to the latest version\n of the given contract.\n Other contracts can query the registry to get updated addresses instead of depending on specific\n addresses.\n Note that contract names are limited to 32 bytes UTF8 encoded ASCII strings to optimize gas costs" + }, + "fullyImplemented": true, + "id": 21514, + "linearizedBaseContracts": [ + 21514, + 22661, + 21818, + 22847, + 22831 + ], + "name": "ContractRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ContractRegistry.RegistryItem", + "id": 21229, + "members": [ + { + "constant": false, + "id": 21226, + "mutability": "mutable", + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21229, + "src": "732:23:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "732:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21228, + "mutability": "mutable", + "name": "nameIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21229, + "src": "789:17:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21227, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "789:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "RegistryItem", + "nodeType": "StructDefinition", + "scope": 21514, + "src": "701:173:55", + "visibility": "public" + }, + { + "constant": false, + "id": 21233, + "mutability": "mutable", + "name": "items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21514, + "src": "882:47:55", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem)" + }, + "typeName": { + "id": 21232, + "keyType": { + "id": 21230, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "891:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "882:33:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem)" + }, + "valueType": { + "contractScope": null, + "id": 21231, + "name": "RegistryItem", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21229, + "src": "902:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "3ca6bb92", + "id": 21236, + "mutability": "mutable", + "name": "contractNames", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21514, + "src": "971:29:55", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 21234, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "971:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 21235, + "length": null, + "nodeType": "ArrayTypeName", + "src": "971:8:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21237, + "nodeType": "StructuredDocumentation", + "src": "1071:203:55", + "text": " @dev triggered when an address pointed to by a contract name is modified\n @param _contractName contract name\n @param _contractAddress new contract address" + }, + "id": 21243, + "name": "AddressUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 21242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21239, + "indexed": true, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21243, + "src": "1300:29:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21238, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1300:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21241, + "indexed": false, + "mutability": "mutable", + "name": "_contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21243, + "src": "1331:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1331:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1299:57:55" + }, + "src": "1280:77:55" + }, + { + "body": { + "id": 21252, + "nodeType": "Block", + "src": "1533:46:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21249, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "1551:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1551:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 21248, + "id": 21251, + "nodeType": "Return", + "src": "1544:27:55" + } + ] + }, + "documentation": { + "id": 21244, + "nodeType": "StructuredDocumentation", + "src": "1365:111:55", + "text": " @dev returns the number of items in the registry\n @return number of items" + }, + "functionSelector": "6bfb0d01", + "id": 21253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "itemCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21245, + "nodeType": "ParameterList", + "parameters": [], + "src": "1500:2:55" + }, + "returnParameters": { + "id": 21248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21247, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21253, + "src": "1524:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1524:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1523:9:55" + }, + "scope": 21514, + "src": "1482:97:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22830 + ], + "body": { + "id": 21267, + "nodeType": "Block", + "src": "1858:62:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21262, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "1876:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21264, + "indexExpression": { + "argumentTypes": null, + "id": 21263, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21256, + "src": "1882:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1876:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21265, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "1876:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21261, + "id": 21266, + "nodeType": "Return", + "src": "1869:43:55" + } + ] + }, + "documentation": { + "id": 21254, + "nodeType": "StructuredDocumentation", + "src": "1587:184:55", + "text": " @dev returns the address associated with the given contract name\n @param _contractName contract name\n @return contract address" + }, + "functionSelector": "bb34534c", + "id": 21268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21258, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1831:8:55" + }, + "parameters": { + "id": 21257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21256, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21268, + "src": "1796:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21255, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1796:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1795:23:55" + }, + "returnParameters": { + "id": 21261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21260, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21268, + "src": "1849:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1849:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1848:9:55" + }, + "scope": 21514, + "src": "1777:143:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21337, + "nodeType": "Block", + "src": "2283:810:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 21285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21282, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2329:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2329:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2352:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2329:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2355:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21281, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2321:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:53:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21288, + "nodeType": "ExpressionStatement", + "src": "2321:53:55" + }, + { + "assignments": [ + 21290 + ], + "declarations": [ + { + "constant": false, + "id": 21290, + "mutability": "mutable", + "name": "currentAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21337, + "src": "2429:22:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21289, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2429:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21295, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21291, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2454:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21293, + "indexExpression": { + "argumentTypes": null, + "id": 21292, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2460:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2454:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21294, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "2454:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2429:61:55" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21296, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2505:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21297, + "name": "currentAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21290, + "src": "2525:14:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2505:34:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21300, + "nodeType": "IfStatement", + "src": "2501:60:55", + "trueBody": { + "expression": null, + "functionReturnParameters": 21280, + "id": 21299, + "nodeType": "Return", + "src": "2554:7:55" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21301, + "name": "currentAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21290, + "src": "2577:14:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2603:1:55", + "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": 21303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2595:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2595:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2595:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2577:28:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21324, + "nodeType": "IfStatement", + "src": "2573:288:55", + "trueBody": { + "id": 21323, + "nodeType": "Block", + "src": "2607:254:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21307, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2674:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21309, + "indexExpression": { + "argumentTypes": null, + "id": 21308, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2680:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2674:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21310, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "2674:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21311, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "2707:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2707:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2674:53:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21314, + "nodeType": "ExpressionStatement", + "src": "2674:53:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21319, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2834:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21318, + "name": "bytes32ToString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21485, + "src": "2818:15:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) pure returns (string memory)" + } + }, + "id": 21320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2818:30:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 21315, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "2799:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2799:18:55", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 21321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2799:50:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21322, + "nodeType": "ExpressionStatement", + "src": "2799:50:55" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 21330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21325, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2920:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21327, + "indexExpression": { + "argumentTypes": null, + "id": 21326, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2926:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2920:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "2920:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21329, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2959:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2920:55:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21331, + "nodeType": "ExpressionStatement", + "src": "2920:55:55" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21333, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "3053:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 21334, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "3068:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21332, + "name": "AddressUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21243, + "src": "3039:13:55", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:46:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21336, + "nodeType": "EmitStatement", + "src": "3034:51:55" + } + ] + }, + "documentation": { + "id": 21269, + "nodeType": "StructuredDocumentation", + "src": "1928:195:55", + "text": " @dev registers a new address for the contract name in the registry\n @param _contractName contract name\n @param _contractAddress contract address" + }, + "functionSelector": "662de379", + "id": 21338, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21276, + "modifierName": { + "argumentTypes": null, + "id": 21275, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2228:9:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2228:9:55" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21278, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2260:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21279, + "modifierName": { + "argumentTypes": null, + "id": 21277, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2247:12:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2247:30:55" + } + ], + "name": "registerAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21271, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21338, + "src": "2154:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21270, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2154:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21273, + "mutability": "mutable", + "name": "_contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21338, + "src": "2177:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2177:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2153:49:55" + }, + "returnParameters": { + "id": 21280, + "nodeType": "ParameterList", + "parameters": [], + "src": "2283:0:55" + }, + "scope": 21514, + "src": "2129:964:55", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21443, + "nodeType": "Block", + "src": "3307:1327:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 21350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21347, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3353:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3353:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3376:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3353:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3379:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21346, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3345:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3345:53:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21353, + "nodeType": "ExpressionStatement", + "src": "3345:53:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21355, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "3417:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21357, + "indexExpression": { + "argumentTypes": null, + "id": 21356, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3423:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3417:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "3417:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3465:1:55", + "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": 21360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3457:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21359, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3457:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3417:50:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3469:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21354, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3409:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3409:79:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21366, + "nodeType": "ExpressionStatement", + "src": "3409:79:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21367, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "3550:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21369, + "indexExpression": { + "argumentTypes": null, + "id": 21368, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3556:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3550:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "3550:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3597:1:55", + "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": 21372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3589:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21371, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3589:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21374, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3589:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3550:49:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21376, + "nodeType": "ExpressionStatement", + "src": "3550:49:55" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21377, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3862:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3862:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 21379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3885:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3862:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21422, + "nodeType": "IfStatement", + "src": "3858:488:55", + "trueBody": { + "id": 21421, + "nodeType": "Block", + "src": "3888:458:55", + "statements": [ + { + "assignments": [ + 21382 + ], + "declarations": [ + { + "constant": false, + "id": 21382, + "mutability": "mutable", + "name": "lastContractNameString", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "3903:36:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3903:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21389, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21383, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3942:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21388, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21384, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3956:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3956:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 21386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3979:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3956:24:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3942:39:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3903:78:55" + }, + { + "assignments": [ + 21391 + ], + "declarations": [ + { + "constant": false, + "id": 21391, + "mutability": "mutable", + "name": "unregisterIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "3996:23:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3996:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21396, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21392, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4022:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21394, + "indexExpression": { + "argumentTypes": null, + "id": 21393, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4028:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4022:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21395, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4022:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3996:56:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21397, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "4069:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21399, + "indexExpression": { + "argumentTypes": null, + "id": 21398, + "name": "unregisterIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21391, + "src": "4083:15:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4069:30:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21400, + "name": "lastContractNameString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21382, + "src": "4102:22:55", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4069:55:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 21402, + "nodeType": "ExpressionStatement", + "src": "4069:55:55" + }, + { + "assignments": [ + 21404 + ], + "declarations": [ + { + "constant": false, + "id": 21404, + "mutability": "mutable", + "name": "lastContractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "4139:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4139:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21408, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21406, + "name": "lastContractNameString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21382, + "src": "4182:22:55", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 21405, + "name": "stringToBytes32", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21500, + "src": "4166:15:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 21407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4166:39:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4139:66:55" + }, + { + "assignments": [ + 21410 + ], + "declarations": [ + { + "constant": false, + "id": 21410, + "mutability": "mutable", + "name": "registryItem", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "4220:33:55", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + }, + "typeName": { + "contractScope": null, + "id": 21409, + "name": "RegistryItem", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21229, + "src": "4220:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21414, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21411, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4256:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21413, + "indexExpression": { + "argumentTypes": null, + "id": 21412, + "name": "lastContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21404, + "src": "4262:16:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4256:23:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4220:59:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21415, + "name": "registryItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21410, + "src": "4294:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem storage pointer" + } + }, + "id": 21417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4294:22:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21418, + "name": "unregisterIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21391, + "src": "4319:15:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4294:40:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21420, + "nodeType": "ExpressionStatement", + "src": "4294:40:55" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 21423, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "4413:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:17:55", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:19:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21427, + "nodeType": "ExpressionStatement", + "src": "4413:19:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21428, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4488:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21430, + "indexExpression": { + "argumentTypes": null, + "id": 21429, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4494:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4488:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4488:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 21432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4521:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4488:34:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21434, + "nodeType": "ExpressionStatement", + "src": "4488:34:55" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21436, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4600:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4623:1:55", + "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": 21438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4615:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4615:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4615:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 21435, + "name": "AddressUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21243, + "src": "4586:13:55", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4586:40:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21442, + "nodeType": "EmitStatement", + "src": "4581:45:55" + } + ] + }, + "documentation": { + "id": 21339, + "nodeType": "StructuredDocumentation", + "src": "3101:133:55", + "text": " @dev removes an existing contract address from the registry\n @param _contractName contract name" + }, + "functionSelector": "2bbd9530", + "id": 21444, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21344, + "modifierName": { + "argumentTypes": null, + "id": 21343, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3297:9:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3297:9:55" + } + ], + "name": "unregisterAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21342, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21341, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21444, + "src": "3267:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21340, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3267:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3266:23:55" + }, + "returnParameters": { + "id": 21345, + "nodeType": "ParameterList", + "parameters": [], + "src": "3307:0:55" + }, + "scope": 21514, + "src": "3240:1394:55", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21484, + "nodeType": "Block", + "src": "4950:188:55", + "statements": [ + { + "assignments": [ + 21453 + ], + "declarations": [ + { + "constant": false, + "id": 21453, + "mutability": "mutable", + "name": "byteArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21484, + "src": "4961:22:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 21452, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4961:5:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21458, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3332", + "id": 21456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4996:2:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + } + ], + "id": 21455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4986:9:55", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 21454, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4990:5:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 21457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4986:13:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4961:38:55" + }, + { + "body": { + "id": 21477, + "nodeType": "Block", + "src": "5043:51:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21469, + "name": "byteArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21453, + "src": "5058:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 21471, + "indexExpression": { + "argumentTypes": null, + "id": 21470, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5068:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5058:12:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21472, + "name": "_bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21447, + "src": "5073:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21474, + "indexExpression": { + "argumentTypes": null, + "id": 21473, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5080:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5073:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "5058:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 21476, + "nodeType": "ExpressionStatement", + "src": "5058:24:55" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21463, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5030:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 21464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5034:2:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "5030:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21478, + "initializationExpression": { + "assignments": [ + 21460 + ], + "declarations": [ + { + "constant": false, + "id": 21460, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21478, + "src": "5015:9:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5015:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21462, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 21461, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5027:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5015:13:55" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 21467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5038:3:55", + "subExpression": { + "argumentTypes": null, + "id": 21466, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5038:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21468, + "nodeType": "ExpressionStatement", + "src": "5038:3:55" + }, + "nodeType": "ForStatement", + "src": "5010:84:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21481, + "name": "byteArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21453, + "src": "5120:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 21480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5113:6:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 21479, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5113:6:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5113:17:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 21451, + "id": 21483, + "nodeType": "Return", + "src": "5106:24:55" + } + ] + }, + "documentation": { + "id": 21445, + "nodeType": "StructuredDocumentation", + "src": "4642:224:55", + "text": " @dev utility, converts bytes32 to a string\n note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\n @return string representation of the given bytes32 argument" + }, + "id": 21485, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bytes32ToString", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21447, + "mutability": "mutable", + "name": "_bytes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21485, + "src": "4897:14:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21446, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4897:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4896:16:55" + }, + "returnParameters": { + "id": 21451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21450, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21485, + "src": "4935:13:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4935:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4934:15:55" + }, + "scope": 21514, + "src": "4872:266:55", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 21499, + "nodeType": "Block", + "src": "5453:134:55", + "statements": [ + { + "assignments": [ + 21494 + ], + "declarations": [ + { + "constant": false, + "id": 21494, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21499, + "src": "5464:14:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21493, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5464:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21495, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5464:14:55" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "5498:58:55", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5513:32:55", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_string", + "nodeType": "YulIdentifier", + "src": "5533:7:55" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5541:2:55", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5529:3:55" + }, + "nodeType": "YulFunctionCall", + "src": "5529:15:55" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "5523:5:55" + }, + "nodeType": "YulFunctionCall", + "src": "5523:22:55" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5513:6:55" + } + ] + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 21488, + "isOffset": false, + "isSlot": false, + "src": "5533:7:55", + "valueSize": 1 + }, + { + "declaration": 21494, + "isOffset": false, + "isSlot": false, + "src": "5513:6:55", + "valueSize": 1 + } + ], + "id": 21496, + "nodeType": "InlineAssembly", + "src": "5489:67:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21497, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21494, + "src": "5573:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 21492, + "id": 21498, + "nodeType": "Return", + "src": "5566:13:55" + } + ] + }, + "documentation": { + "id": 21486, + "nodeType": "StructuredDocumentation", + "src": "5146:222:55", + "text": " @dev utility, converts string to bytes32\n note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\n @return string representation of the given bytes32 argument" + }, + "id": 21500, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "stringToBytes32", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21488, + "mutability": "mutable", + "name": "_string", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21500, + "src": "5399:21:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21487, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5399:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5398:23:55" + }, + "returnParameters": { + "id": 21492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21491, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21500, + "src": "5444:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21490, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5444:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5443:9:55" + }, + "scope": 21514, + "src": "5374:213:55", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 21512, + "nodeType": "Block", + "src": "5734:50:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21509, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21503, + "src": "5762:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21508, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21268, + "src": "5752:9:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5752:24:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21507, + "id": 21511, + "nodeType": "Return", + "src": "5745:31:55" + } + ] + }, + "documentation": { + "id": 21501, + "nodeType": "StructuredDocumentation", + "src": "5595:60:55", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "21f8a721", + "id": 21513, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21503, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21513, + "src": "5681:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21502, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5681:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5680:23:55" + }, + "returnParameters": { + "id": 21507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21506, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21513, + "src": "5725:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21505, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5725:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5724:9:55" + }, + "scope": 21514, + "src": "5661:123:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21515, + "src": "633:5154:55" + } + ], + "src": "52:5737:55" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistry.sol", + "exportedSymbols": { + "ContractRegistry": [ + 21514 + ] + }, + "id": 21515, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21214, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:55" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 21215, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 21819, + "src": "77:21:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21216, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 22662, + "src": "100:21:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "./interfaces/IContractRegistry.sol", + "id": 21217, + "nodeType": "ImportDirective", + "scope": 21515, + "sourceUnit": 22832, + "src": "123:44:55", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21219, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "662:17:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21220, + "nodeType": "InheritanceSpecifier", + "src": "662:17:55" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21221, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "681:5:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 21222, + "nodeType": "InheritanceSpecifier", + "src": "681:5:55" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21223, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "688:5:55", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21224, + "nodeType": "InheritanceSpecifier", + "src": "688:5:55" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22831, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21218, + "nodeType": "StructuredDocumentation", + "src": "171:460:55", + "text": " @dev Contract Registry\n The contract registry keeps contract addresses by name.\n The owner can update contract addresses so that a contract name always points to the latest version\n of the given contract.\n Other contracts can query the registry to get updated addresses instead of depending on specific\n addresses.\n Note that contract names are limited to 32 bytes UTF8 encoded ASCII strings to optimize gas costs" + }, + "fullyImplemented": true, + "id": 21514, + "linearizedBaseContracts": [ + 21514, + 22661, + 21818, + 22847, + 22831 + ], + "name": "ContractRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ContractRegistry.RegistryItem", + "id": 21229, + "members": [ + { + "constant": false, + "id": 21226, + "mutability": "mutable", + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21229, + "src": "732:23:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "732:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21228, + "mutability": "mutable", + "name": "nameIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21229, + "src": "789:17:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21227, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "789:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "RegistryItem", + "nodeType": "StructDefinition", + "scope": 21514, + "src": "701:173:55", + "visibility": "public" + }, + { + "constant": false, + "id": 21233, + "mutability": "mutable", + "name": "items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21514, + "src": "882:47:55", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem)" + }, + "typeName": { + "id": 21232, + "keyType": { + "id": 21230, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "891:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "882:33:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem)" + }, + "valueType": { + "contractScope": null, + "id": 21231, + "name": "RegistryItem", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21229, + "src": "902:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "3ca6bb92", + "id": 21236, + "mutability": "mutable", + "name": "contractNames", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21514, + "src": "971:29:55", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string[]" + }, + "typeName": { + "baseType": { + "id": 21234, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "971:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "id": 21235, + "length": null, + "nodeType": "ArrayTypeName", + "src": "971:8:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", + "typeString": "string[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21237, + "nodeType": "StructuredDocumentation", + "src": "1071:203:55", + "text": " @dev triggered when an address pointed to by a contract name is modified\n @param _contractName contract name\n @param _contractAddress new contract address" + }, + "id": 21243, + "name": "AddressUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 21242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21239, + "indexed": true, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21243, + "src": "1300:29:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21238, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1300:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21241, + "indexed": false, + "mutability": "mutable", + "name": "_contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21243, + "src": "1331:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1331:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1299:57:55" + }, + "src": "1280:77:55" + }, + { + "body": { + "id": 21252, + "nodeType": "Block", + "src": "1533:46:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21249, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "1551:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1551:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 21248, + "id": 21251, + "nodeType": "Return", + "src": "1544:27:55" + } + ] + }, + "documentation": { + "id": 21244, + "nodeType": "StructuredDocumentation", + "src": "1365:111:55", + "text": " @dev returns the number of items in the registry\n @return number of items" + }, + "functionSelector": "6bfb0d01", + "id": 21253, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "itemCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21245, + "nodeType": "ParameterList", + "parameters": [], + "src": "1500:2:55" + }, + "returnParameters": { + "id": 21248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21247, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21253, + "src": "1524:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1524:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1523:9:55" + }, + "scope": 21514, + "src": "1482:97:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22830 + ], + "body": { + "id": 21267, + "nodeType": "Block", + "src": "1858:62:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21262, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "1876:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21264, + "indexExpression": { + "argumentTypes": null, + "id": 21263, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21256, + "src": "1882:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1876:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21265, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "1876:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21261, + "id": 21266, + "nodeType": "Return", + "src": "1869:43:55" + } + ] + }, + "documentation": { + "id": 21254, + "nodeType": "StructuredDocumentation", + "src": "1587:184:55", + "text": " @dev returns the address associated with the given contract name\n @param _contractName contract name\n @return contract address" + }, + "functionSelector": "bb34534c", + "id": 21268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21258, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1831:8:55" + }, + "parameters": { + "id": 21257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21256, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21268, + "src": "1796:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21255, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1796:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1795:23:55" + }, + "returnParameters": { + "id": 21261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21260, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21268, + "src": "1849:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1849:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1848:9:55" + }, + "scope": 21514, + "src": "1777:143:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21337, + "nodeType": "Block", + "src": "2283:810:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 21285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21282, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2329:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2329:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2352:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2329:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2355:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21281, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2321:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:53:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21288, + "nodeType": "ExpressionStatement", + "src": "2321:53:55" + }, + { + "assignments": [ + 21290 + ], + "declarations": [ + { + "constant": false, + "id": 21290, + "mutability": "mutable", + "name": "currentAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21337, + "src": "2429:22:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21289, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2429:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21295, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21291, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2454:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21293, + "indexExpression": { + "argumentTypes": null, + "id": 21292, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2460:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2454:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21294, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "2454:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2429:61:55" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21296, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2505:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21297, + "name": "currentAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21290, + "src": "2525:14:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2505:34:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21300, + "nodeType": "IfStatement", + "src": "2501:60:55", + "trueBody": { + "expression": null, + "functionReturnParameters": 21280, + "id": 21299, + "nodeType": "Return", + "src": "2554:7:55" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21301, + "name": "currentAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21290, + "src": "2577:14:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2603:1:55", + "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": 21303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2595:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2595:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2595:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2577:28:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21324, + "nodeType": "IfStatement", + "src": "2573:288:55", + "trueBody": { + "id": 21323, + "nodeType": "Block", + "src": "2607:254:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21307, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2674:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21309, + "indexExpression": { + "argumentTypes": null, + "id": 21308, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2680:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2674:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21310, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "2674:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21311, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "2707:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2707:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2674:53:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21314, + "nodeType": "ExpressionStatement", + "src": "2674:53:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21319, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2834:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21318, + "name": "bytes32ToString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21485, + "src": "2818:15:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes32) pure returns (string memory)" + } + }, + "id": 21320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2818:30:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 21315, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "2799:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2799:18:55", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_string_storage_$returns$__$", + "typeString": "function (string storage ref)" + } + }, + "id": 21321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2799:50:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21322, + "nodeType": "ExpressionStatement", + "src": "2799:50:55" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 21330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21325, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "2920:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21327, + "indexExpression": { + "argumentTypes": null, + "id": 21326, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "2926:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2920:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "2920:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21329, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2959:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2920:55:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21331, + "nodeType": "ExpressionStatement", + "src": "2920:55:55" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21333, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21271, + "src": "3053:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 21334, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "3068:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21332, + "name": "AddressUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21243, + "src": "3039:13:55", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:46:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21336, + "nodeType": "EmitStatement", + "src": "3034:51:55" + } + ] + }, + "documentation": { + "id": 21269, + "nodeType": "StructuredDocumentation", + "src": "1928:195:55", + "text": " @dev registers a new address for the contract name in the registry\n @param _contractName contract name\n @param _contractAddress contract address" + }, + "functionSelector": "662de379", + "id": 21338, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21276, + "modifierName": { + "argumentTypes": null, + "id": 21275, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2228:9:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2228:9:55" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21278, + "name": "_contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21273, + "src": "2260:16:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21279, + "modifierName": { + "argumentTypes": null, + "id": 21277, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2247:12:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2247:30:55" + } + ], + "name": "registerAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21271, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21338, + "src": "2154:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21270, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2154:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21273, + "mutability": "mutable", + "name": "_contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21338, + "src": "2177:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2177:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2153:49:55" + }, + "returnParameters": { + "id": 21280, + "nodeType": "ParameterList", + "parameters": [], + "src": "2283:0:55" + }, + "scope": 21514, + "src": "2129:964:55", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21443, + "nodeType": "Block", + "src": "3307:1327:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 21350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21347, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3353:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3353:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3376:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3353:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3379:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21346, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3345:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3345:53:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21353, + "nodeType": "ExpressionStatement", + "src": "3345:53:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21355, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "3417:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21357, + "indexExpression": { + "argumentTypes": null, + "id": 21356, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3423:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3417:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "3417:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3465:1:55", + "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": 21360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3457:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21359, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3457:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3417:50:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 21364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3469:18:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 21354, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3409:7:55", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3409:79:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21366, + "nodeType": "ExpressionStatement", + "src": "3409:79:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21367, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "3550:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21369, + "indexExpression": { + "argumentTypes": null, + "id": 21368, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "3556:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3550:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "contractAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 21226, + "src": "3550:36:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21373, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3597:1:55", + "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": 21372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3589:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21371, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3589:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21374, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3589:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3550:49:55", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21376, + "nodeType": "ExpressionStatement", + "src": "3550:49:55" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21377, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3862:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3862:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 21379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3885:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3862:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 21422, + "nodeType": "IfStatement", + "src": "3858:488:55", + "trueBody": { + "id": 21421, + "nodeType": "Block", + "src": "3888:458:55", + "statements": [ + { + "assignments": [ + 21382 + ], + "declarations": [ + { + "constant": false, + "id": 21382, + "mutability": "mutable", + "name": "lastContractNameString", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "3903:36:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3903:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21389, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21383, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3942:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21388, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21384, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "3956:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3956:20:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 21386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3979:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3956:24:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3942:39:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3903:78:55" + }, + { + "assignments": [ + 21391 + ], + "declarations": [ + { + "constant": false, + "id": 21391, + "mutability": "mutable", + "name": "unregisterIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "3996:23:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3996:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21396, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21392, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4022:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21394, + "indexExpression": { + "argumentTypes": null, + "id": 21393, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4028:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4022:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21395, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4022:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3996:56:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21397, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "4069:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21399, + "indexExpression": { + "argumentTypes": null, + "id": 21398, + "name": "unregisterIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21391, + "src": "4083:15:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4069:30:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21400, + "name": "lastContractNameString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21382, + "src": "4102:22:55", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4069:55:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 21402, + "nodeType": "ExpressionStatement", + "src": "4069:55:55" + }, + { + "assignments": [ + 21404 + ], + "declarations": [ + { + "constant": false, + "id": 21404, + "mutability": "mutable", + "name": "lastContractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "4139:24:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4139:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21408, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21406, + "name": "lastContractNameString", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21382, + "src": "4182:22:55", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 21405, + "name": "stringToBytes32", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21500, + "src": "4166:15:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (string memory) pure returns (bytes32)" + } + }, + "id": 21407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4166:39:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4139:66:55" + }, + { + "assignments": [ + 21410 + ], + "declarations": [ + { + "constant": false, + "id": 21410, + "mutability": "mutable", + "name": "registryItem", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21421, + "src": "4220:33:55", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + }, + "typeName": { + "contractScope": null, + "id": 21409, + "name": "RegistryItem", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21229, + "src": "4220:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21414, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21411, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4256:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21413, + "indexExpression": { + "argumentTypes": null, + "id": 21412, + "name": "lastContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21404, + "src": "4262:16:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4256:23:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4220:59:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21415, + "name": "registryItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21410, + "src": "4294:12:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage_ptr", + "typeString": "struct ContractRegistry.RegistryItem storage pointer" + } + }, + "id": 21417, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4294:22:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21418, + "name": "unregisterIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21391, + "src": "4319:15:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4294:40:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21420, + "nodeType": "ExpressionStatement", + "src": "4294:40:55" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 21423, + "name": "contractNames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21236, + "src": "4413:13:55", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", + "typeString": "string storage ref[] storage ref" + } + }, + "id": 21425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:17:55", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:19:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21427, + "nodeType": "ExpressionStatement", + "src": "4413:19:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21428, + "name": "items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21233, + "src": "4488:5:55", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_RegistryItem_$21229_storage_$", + "typeString": "mapping(bytes32 => struct ContractRegistry.RegistryItem storage ref)" + } + }, + "id": 21430, + "indexExpression": { + "argumentTypes": null, + "id": 21429, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4494:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4488:20:55", + "typeDescriptions": { + "typeIdentifier": "t_struct$_RegistryItem_$21229_storage", + "typeString": "struct ContractRegistry.RegistryItem storage ref" + } + }, + "id": 21431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nameIndex", + "nodeType": "MemberAccess", + "referencedDeclaration": 21228, + "src": "4488:30:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 21432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4521:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4488:34:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21434, + "nodeType": "ExpressionStatement", + "src": "4488:34:55" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21436, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21341, + "src": "4600:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4623:1:55", + "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": 21438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4615:7:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4615:7:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4615:10:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 21435, + "name": "AddressUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21243, + "src": "4586:13:55", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 21441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4586:40:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21442, + "nodeType": "EmitStatement", + "src": "4581:45:55" + } + ] + }, + "documentation": { + "id": 21339, + "nodeType": "StructuredDocumentation", + "src": "3101:133:55", + "text": " @dev removes an existing contract address from the registry\n @param _contractName contract name" + }, + "functionSelector": "2bbd9530", + "id": 21444, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21344, + "modifierName": { + "argumentTypes": null, + "id": 21343, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3297:9:55", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3297:9:55" + } + ], + "name": "unregisterAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21342, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21341, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21444, + "src": "3267:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21340, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3267:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3266:23:55" + }, + "returnParameters": { + "id": 21345, + "nodeType": "ParameterList", + "parameters": [], + "src": "3307:0:55" + }, + "scope": 21514, + "src": "3240:1394:55", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21484, + "nodeType": "Block", + "src": "4950:188:55", + "statements": [ + { + "assignments": [ + 21453 + ], + "declarations": [ + { + "constant": false, + "id": 21453, + "mutability": "mutable", + "name": "byteArray", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21484, + "src": "4961:22:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 21452, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4961:5:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21458, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3332", + "id": 21456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4996:2:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + } + ], + "id": 21455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4986:9:55", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 21454, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4990:5:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 21457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4986:13:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4961:38:55" + }, + { + "body": { + "id": 21477, + "nodeType": "Block", + "src": "5043:51:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21469, + "name": "byteArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21453, + "src": "5058:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 21471, + "indexExpression": { + "argumentTypes": null, + "id": 21470, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5068:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5058:12:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21472, + "name": "_bytes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21447, + "src": "5073:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 21474, + "indexExpression": { + "argumentTypes": null, + "id": 21473, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5080:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5073:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "5058:24:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 21476, + "nodeType": "ExpressionStatement", + "src": "5058:24:55" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21463, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5030:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 21464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5034:2:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "5030:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21478, + "initializationExpression": { + "assignments": [ + 21460 + ], + "declarations": [ + { + "constant": false, + "id": 21460, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21478, + "src": "5015:9:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21459, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5015:7:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21462, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 21461, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5027:1:55", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5015:13:55" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 21467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5038:3:55", + "subExpression": { + "argumentTypes": null, + "id": 21466, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21460, + "src": "5038:1:55", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21468, + "nodeType": "ExpressionStatement", + "src": "5038:3:55" + }, + "nodeType": "ForStatement", + "src": "5010:84:55" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21481, + "name": "byteArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21453, + "src": "5120:9:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 21480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5113:6:55", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 21479, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5113:6:55", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5113:17:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 21451, + "id": 21483, + "nodeType": "Return", + "src": "5106:24:55" + } + ] + }, + "documentation": { + "id": 21445, + "nodeType": "StructuredDocumentation", + "src": "4642:224:55", + "text": " @dev utility, converts bytes32 to a string\n note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\n @return string representation of the given bytes32 argument" + }, + "id": 21485, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "bytes32ToString", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21447, + "mutability": "mutable", + "name": "_bytes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21485, + "src": "4897:14:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21446, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4897:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4896:16:55" + }, + "returnParameters": { + "id": 21451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21450, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21485, + "src": "4935:13:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21449, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4935:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4934:15:55" + }, + "scope": 21514, + "src": "4872:266:55", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 21499, + "nodeType": "Block", + "src": "5453:134:55", + "statements": [ + { + "assignments": [ + 21494 + ], + "declarations": [ + { + "constant": false, + "id": 21494, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21499, + "src": "5464:14:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21493, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5464:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21495, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5464:14:55" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "5498:58:55", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5513:32:55", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "_string", + "nodeType": "YulIdentifier", + "src": "5533:7:55" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5541:2:55", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5529:3:55" + }, + "nodeType": "YulFunctionCall", + "src": "5529:15:55" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "5523:5:55" + }, + "nodeType": "YulFunctionCall", + "src": "5523:22:55" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5513:6:55" + } + ] + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 21488, + "isOffset": false, + "isSlot": false, + "src": "5533:7:55", + "valueSize": 1 + }, + { + "declaration": 21494, + "isOffset": false, + "isSlot": false, + "src": "5513:6:55", + "valueSize": 1 + } + ], + "id": 21496, + "nodeType": "InlineAssembly", + "src": "5489:67:55" + }, + { + "expression": { + "argumentTypes": null, + "id": 21497, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21494, + "src": "5573:6:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 21492, + "id": 21498, + "nodeType": "Return", + "src": "5566:13:55" + } + ] + }, + "documentation": { + "id": 21486, + "nodeType": "StructuredDocumentation", + "src": "5146:222:55", + "text": " @dev utility, converts string to bytes32\n note that the bytes32 argument is assumed to be UTF8 encoded ASCII string\n @return string representation of the given bytes32 argument" + }, + "id": 21500, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "stringToBytes32", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21488, + "mutability": "mutable", + "name": "_string", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21500, + "src": "5399:21:55", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21487, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5399:6:55", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5398:23:55" + }, + "returnParameters": { + "id": 21492, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21491, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21500, + "src": "5444:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21490, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5444:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5443:9:55" + }, + "scope": 21514, + "src": "5374:213:55", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 21512, + "nodeType": "Block", + "src": "5734:50:55", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21509, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21503, + "src": "5762:13:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21508, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21268, + "src": "5752:9:55", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5752:24:55", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21507, + "id": 21511, + "nodeType": "Return", + "src": "5745:31:55" + } + ] + }, + "documentation": { + "id": 21501, + "nodeType": "StructuredDocumentation", + "src": "5595:60:55", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "21f8a721", + "id": 21513, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21503, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21513, + "src": "5681:21:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21502, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5681:7:55", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5680:23:55" + }, + "returnParameters": { + "id": 21507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21506, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21513, + "src": "5725:7:55", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21505, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5725:7:55", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5724:9:55" + }, + "scope": 21514, + "src": "5661:123:55", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21515, + "src": "633:5154:55" + } + ], + "src": "52:5737:55" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xb708175e3f6Cd850643aAF7B32212AFad50e2549", + "transactionHash": "0x7bfc81b1fc45e33d018be4e91281ebc6bc7a4ac8a9b497afcc752f5630e2261c" + }, + "8995": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xb708175e3f6Cd850643aAF7B32212AFad50e2549", + "transactionHash": "0x7bfc81b1fc45e33d018be4e91281ebc6bc7a4ac8a9b497afcc752f5630e2261c" + }, + "1604964387852": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xc02Bb59ae88eb23a23BadC0B9E5206Dcdc88C02f", + "transactionHash": "0xdbff2a9f16cb2962b0c8c078daa2bcad8b67e4995d1fc9dd5f09648a0dabfd4b" + }, + "1604964469407": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x4d0C2eA383F8dDbfAFea0FB92c3fE49BdE5d9725", + "transactionHash": "0x86bd2cd8b9b3d3cc5c3766e9e7724d3b6adf84d8e0e48a85c22fb9e8181c9cd4" + }, + "1604965528035": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xba5D674F1bF01d7125a840220B0A86a5D7556705", + "transactionHash": "0xdcd69e9e046456adeb407f3dedfb8bcfe1961703f4fa3c020a492ffb3c2647a9" + }, + "1604965645554": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x2DE84749B53AA2237994AF994f22efaE23Bf59d9", + "transactionHash": "0x4573c86c34cd809a0128f51e100e3691d1f28e0f8be050cca73536ed65b4fb79" + }, + "1604965679541": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xbb43041Ae115e5f0362E807Cb42C44a4ce61F5d3", + "transactionHash": "0x1f993195a776168143b5cb56e533e3305f2b918487a279c77aa4514f9202c46d" + }, + "1604965719492": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xd52Fb83Cf4f03b8D844F29E1C6F795ca0AA58fEC", + "transactionHash": "0xc317e282d0029b1d40b173ac4649df78ad4a520665808d23e490f3ee5f0d7c1c" + }, + "1604965760834": { + "events": { + "0xfc08d1253c81bcd5444fc7056ef1f5a5df4c9220b6fd70d7449267f1f0f29918": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "_contractAddress", + "type": "address" + } + ], + "name": "AddressUpdate", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xd316Dd5DA5F7C63D2173a392caB18973813daF13", + "transactionHash": "0x20d414c1f386f14abd52d0e8d495cc65b4469b31bd7b10b0f64b0e0cda0b389b" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.715Z", + "networkType": "ethereum", + "devdoc": { + "details": "Contract Registry The contract registry keeps contract addresses by name. The owner can update contract addresses so that a contract name always points to the latest version of the given contract. Other contracts can query the registry to get updated addresses instead of depending on specific addresses. Note that contract names are limited to 32 bytes UTF8 encoded ASCII strings to optimize gas costs", + "events": { + "AddressUpdate(bytes32,address)": { + "details": "triggered when an address pointed to by a contract name is modified", + "params": { + "_contractAddress": "new contract address", + "_contractName": "contract name" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "addressOf(bytes32)": { + "details": "returns the address associated with the given contract name", + "params": { + "_contractName": "contract name" + }, + "returns": { + "_0": "contract address" + } + }, + "getAddress(bytes32)": { + "details": "deprecated, backward compatibility" + }, + "itemCount()": { + "details": "returns the number of items in the registry", + "returns": { + "_0": "number of items" + } + }, + "registerAddress(bytes32,address)": { + "details": "registers a new address for the contract name in the registry", + "params": { + "_contractAddress": "contract address", + "_contractName": "contract name" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "unregisterAddress(bytes32)": { + "details": "removes an existing contract address from the registry", + "params": { + "_contractName": "contract name" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ContractRegistryClient.json b/apps/cic-eth/tests/testdata/bancor/ContractRegistryClient.json new file mode 100644 index 00000000..1dac7d56 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ContractRegistryClient.json @@ -0,0 +1,5708 @@ +{ + "contractName": "ContractRegistryClient", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base contract for ContractRegistry clients\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new ContractRegistryClient instance\",\"params\":{\"_registry\":\"address of a contract-registry contract\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":\"ContractRegistryClient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./interfaces/IContractRegistry.sol\";\r\n\r\n/**\r\n * @dev Base contract for ContractRegistry clients\r\n*/\r\ncontract ContractRegistryClient is Owned, Utils {\r\n bytes32 internal constant CONTRACT_REGISTRY = \"ContractRegistry\";\r\n bytes32 internal constant BANCOR_NETWORK = \"BancorNetwork\";\r\n bytes32 internal constant BANCOR_FORMULA = \"BancorFormula\";\r\n bytes32 internal constant CONVERTER_FACTORY = \"ConverterFactory\";\r\n bytes32 internal constant CONVERSION_PATH_FINDER = \"ConversionPathFinder\";\r\n bytes32 internal constant CONVERTER_UPGRADER = \"BancorConverterUpgrader\";\r\n bytes32 internal constant CONVERTER_REGISTRY = \"BancorConverterRegistry\";\r\n bytes32 internal constant CONVERTER_REGISTRY_DATA = \"BancorConverterRegistryData\";\r\n bytes32 internal constant BNT_TOKEN = \"BNTToken\";\r\n bytes32 internal constant BANCOR_X = \"BancorX\";\r\n bytes32 internal constant BANCOR_X_UPGRADER = \"BancorXUpgrader\";\r\n bytes32 internal constant CHAINLINK_ORACLE_WHITELIST = \"ChainlinkOracleWhitelist\";\r\n\r\n IContractRegistry public registry; // address of the current contract-registry\r\n IContractRegistry public prevRegistry; // address of the previous contract-registry\r\n bool public onlyOwnerCanUpdateRegistry; // only an owner can update the contract-registry\r\n\r\n /**\r\n * @dev verifies that the caller is mapped to the given contract name\r\n *\r\n * @param _contractName contract name\r\n */\r\n modifier only(bytes32 _contractName) {\r\n _only(_contractName);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _only(bytes32 _contractName) internal view {\r\n require(msg.sender == addressOf(_contractName), \"ERR_ACCESS_DENIED\");\r\n }\r\n\r\n /**\r\n * @dev initializes a new ContractRegistryClient instance\r\n *\r\n * @param _registry address of a contract-registry contract\r\n */\r\n constructor(IContractRegistry _registry) internal validAddress(address(_registry)) {\r\n registry = IContractRegistry(_registry);\r\n prevRegistry = IContractRegistry(_registry);\r\n }\r\n\r\n /**\r\n * @dev updates to the new contract-registry\r\n */\r\n function updateRegistry() public {\r\n // verify that this function is permitted\r\n require(msg.sender == owner || !onlyOwnerCanUpdateRegistry, \"ERR_ACCESS_DENIED\");\r\n\r\n // get the new contract-registry\r\n IContractRegistry newRegistry = IContractRegistry(addressOf(CONTRACT_REGISTRY));\r\n\r\n // verify that the new contract-registry is different and not zero\r\n require(newRegistry != registry && address(newRegistry) != address(0), \"ERR_INVALID_REGISTRY\");\r\n\r\n // verify that the new contract-registry is pointing to a non-zero contract-registry\r\n require(newRegistry.addressOf(CONTRACT_REGISTRY) != address(0), \"ERR_INVALID_REGISTRY\");\r\n\r\n // save a backup of the current contract-registry before replacing it\r\n prevRegistry = registry;\r\n\r\n // replace the current contract-registry with the new contract-registry\r\n registry = newRegistry;\r\n }\r\n\r\n /**\r\n * @dev restores the previous contract-registry\r\n */\r\n function restoreRegistry() public ownerOnly {\r\n // restore the previous contract-registry\r\n registry = prevRegistry;\r\n }\r\n\r\n /**\r\n * @dev restricts the permission to update the contract-registry\r\n *\r\n * @param _onlyOwnerCanUpdateRegistry indicates whether or not permission is restricted to owner only\r\n */\r\n function restrictRegistryUpdate(bool _onlyOwnerCanUpdateRegistry) public ownerOnly {\r\n // change the permission to update the contract-registry\r\n onlyOwnerCanUpdateRegistry = _onlyOwnerCanUpdateRegistry;\r\n }\r\n\r\n /**\r\n * @dev returns the address associated with the given contract name\r\n *\r\n * @param _contractName contract name\r\n *\r\n * @return contract address\r\n */\r\n function addressOf(bytes32 _contractName) internal view returns (address) {\r\n return registry.addressOf(_contractName);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "exportedSymbols": { + "ContractRegistryClient": [ + 21719 + ] + }, + "id": 21720, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21516, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:56" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 21517, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 21819, + "src": "77:21:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21518, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 22662, + "src": "100:21:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "./interfaces/IContractRegistry.sol", + "id": 21519, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 22832, + "src": "123:44:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21521, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "268:5:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 21522, + "nodeType": "InheritanceSpecifier", + "src": "268:5:56" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21523, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "275:5:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21524, + "nodeType": "InheritanceSpecifier", + "src": "275:5:56" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21520, + "nodeType": "StructuredDocumentation", + "src": "171:60:56", + "text": " @dev Base contract for ContractRegistry clients" + }, + "fullyImplemented": true, + "id": 21719, + "linearizedBaseContracts": [ + 21719, + 22661, + 21818, + 22847 + ], + "name": "ContractRegistryClient", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 21527, + "mutability": "constant", + "name": "CONTRACT_REGISTRY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "288:64:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21525, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "288:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e74726163745265676973747279", + "id": 21526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "334:18:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_014cc675742635098f3843c56f86f2875ab1c0e8ccd166d07159a5036b798b15", + "typeString": "literal_string \"ContractRegistry\"" + }, + "value": "ContractRegistry" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21530, + "mutability": "constant", + "name": "BANCOR_NETWORK", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "359:58:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21528, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "359:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f724e6574776f726b", + "id": 21529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "402:15:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e13073a1961b7477f917c9e8fc77a7d64eb68a6e4f8820f41bc0991c65d90aea", + "typeString": "literal_string \"BancorNetwork\"" + }, + "value": "BancorNetwork" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21533, + "mutability": "constant", + "name": "BANCOR_FORMULA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "424:58:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "424:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72466f726d756c61", + "id": 21532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "467:15:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f9aac19de3c8e04eb4d0548047a1cd61c5aaafde7cf99ed9c7ed906ce4dddf38", + "typeString": "literal_string \"BancorFormula\"" + }, + "value": "BancorFormula" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21536, + "mutability": "constant", + "name": "CONVERTER_FACTORY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "489:64:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21534, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "489:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e766572746572466163746f7279", + "id": 21535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "535:18:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_01f892de917bf09cf6fd04f57ff78c6ca006205a8809769abbeb39a039d3d768", + "typeString": "literal_string \"ConverterFactory\"" + }, + "value": "ConverterFactory" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21539, + "mutability": "constant", + "name": "CONVERSION_PATH_FINDER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "560:73:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21537, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "560:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e76657273696f6e5061746846696e646572", + "id": 21538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "611:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d55bb14cf5551b26acee2cc099a4125a85ce113cb3306082cd15a1b4785376f1", + "typeString": "literal_string \"ConversionPathFinder\"" + }, + "value": "ConversionPathFinder" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21542, + "mutability": "constant", + "name": "CONVERTER_UPGRADER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "640:72:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21540, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "640:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e7665727465725570677261646572", + "id": 21541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "687:25:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8cccdfec0e08322695b48c2ff60a2acb1243c72e02ec3a238fe40eefe726c01", + "typeString": "literal_string \"BancorConverterUpgrader\"" + }, + "value": "BancorConverterUpgrader" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21545, + "mutability": "constant", + "name": "CONVERTER_REGISTRY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "719:72:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21543, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "719:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e7665727465725265676973747279", + "id": 21544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "766:25:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_be29ba855de63e3aeb1afb9aed4122f6a4ac386581ea1b32773e72966a3749e7", + "typeString": "literal_string \"BancorConverterRegistry\"" + }, + "value": "BancorConverterRegistry" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21548, + "mutability": "constant", + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "798:81:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21546, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "798:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e766572746572526567697374727944617461", + "id": 21547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "850:29:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f47ef61fa81526eefb8475acf271ff419a87423535a77af3ef98ebc7b31c640c", + "typeString": "literal_string \"BancorConverterRegistryData\"" + }, + "value": "BancorConverterRegistryData" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21551, + "mutability": "constant", + "name": "BNT_TOKEN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "886:48:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21549, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "886:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "424e54546f6b656e", + "id": 21550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "924:10:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4686149f7058d2454e334cfa4ea1a3482469c64fd3d4f50dfc69716086aee66f", + "typeString": "literal_string \"BNTToken\"" + }, + "value": "BNTToken" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21554, + "mutability": "constant", + "name": "BANCOR_X", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "941:46:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21552, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "941:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f7258", + "id": 21553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "978:9:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86ea4d05259b04f0f72cb84c9671b182b8bbe45a219bbea86edd67f80c414eb4", + "typeString": "literal_string \"BancorX\"" + }, + "value": "BancorX" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21557, + "mutability": "constant", + "name": "BANCOR_X_UPGRADER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "994:63:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21555, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "994:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72585570677261646572", + "id": 21556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1040:17:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5e7e6eba8567517cf1f8f313379e5a6dbd5dcff956b158cf65a32e6b2bb5fd8", + "typeString": "literal_string \"BancorXUpgrader\"" + }, + "value": "BancorXUpgrader" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21560, + "mutability": "constant", + "name": "CHAINLINK_ORACLE_WHITELIST", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1064:81:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21558, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1064:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436861696e6c696e6b4f7261636c6557686974656c697374", + "id": 21559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1119:26:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f1d302dc7d7d6451424d658039558f1ea7e3cbf7255a10240557f430d300feb3", + "typeString": "literal_string \"ChainlinkOracleWhitelist\"" + }, + "value": "ChainlinkOracleWhitelist" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "7b103999", + "id": 21562, + "mutability": "mutable", + "name": "registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1154:33:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21561, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1154:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "61cd756e", + "id": 21564, + "mutability": "mutable", + "name": "prevRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1243:37:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21563, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1243:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "2fe8a6ad", + "id": 21566, + "mutability": "mutable", + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1333:38:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21565, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1333:4:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 21576, + "nodeType": "Block", + "src": "1616:51:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21572, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21569, + "src": "1633:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21571, + "name": "_only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21593, + "src": "1627:5:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$", + "typeString": "function (bytes32) view" + } + }, + "id": 21573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:20:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21574, + "nodeType": "ExpressionStatement", + "src": "1627:20:56" + }, + { + "id": 21575, + "nodeType": "PlaceholderStatement", + "src": "1658:1:56" + } + ] + }, + "documentation": { + "id": 21567, + "nodeType": "StructuredDocumentation", + "src": "1430:143:56", + "text": " @dev verifies that the caller is mapped to the given contract name\n @param _contractName contract name" + }, + "id": 21577, + "name": "only", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21569, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21577, + "src": "1593:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21568, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1593:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:23:56" + }, + "src": "1579:88:56", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21592, + "nodeType": "Block", + "src": "1774:87:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21583, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1793:3:56", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1793:10:56", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21586, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21579, + "src": "1817:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21585, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "1807:9:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1807:24:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1793:38:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1833:19:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21582, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1785:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1785:68:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21591, + "nodeType": "ExpressionStatement", + "src": "1785:68:56" + } + ] + }, + "documentation": null, + "id": 21593, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_only", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21579, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21593, + "src": "1737:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21578, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1737:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1736:23:56" + }, + "returnParameters": { + "id": 21581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:0:56" + }, + "scope": 21719, + "src": "1722:139:56", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21617, + "nodeType": "Block", + "src": "2111:112:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21605, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "2122:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21607, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2151:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21606, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2133:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2122:39:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21610, + "nodeType": "ExpressionStatement", + "src": "2122:39:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21611, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "2172:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21613, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2205:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21612, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2187:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2187:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2172:43:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21616, + "nodeType": "ExpressionStatement", + "src": "2172:43:56" + } + ] + }, + "documentation": { + "id": 21594, + "nodeType": "StructuredDocumentation", + "src": "1869:153:56", + "text": " @dev initializes a new ContractRegistryClient instance\n @param _registry address of a contract-registry contract" + }, + "id": 21618, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21601, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2099:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2091:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21599, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2091:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2091:18:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21603, + "modifierName": { + "argumentTypes": null, + "id": 21598, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2078:12:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2078:32:56" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21596, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21618, + "src": "2040:27:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21595, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2040:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2039:29:56" + }, + "returnParameters": { + "id": 21604, + "nodeType": "ParameterList", + "parameters": [], + "src": "2111:0:56" + }, + "scope": 21719, + "src": "2028:195:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21679, + "nodeType": "Block", + "src": "2333:892:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21623, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2403:3:56", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2403:10:56", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21625, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "2417:5:56", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2403:19:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 21628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2426:27:56", + "subExpression": { + "argumentTypes": null, + "id": 21627, + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21566, + "src": "2427:26:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2403:50:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2455:19:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21622, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2395:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2395:80:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21632, + "nodeType": "ExpressionStatement", + "src": "2395:80:56" + }, + { + "assignments": [ + 21634 + ], + "declarations": [ + { + "constant": false, + "id": 21634, + "mutability": "mutable", + "name": "newRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21679, + "src": "2530:29:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21633, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2530:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21640, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21637, + "name": "CONTRACT_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21527, + "src": "2590:17:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21636, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "2580:9:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2580:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21635, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2562:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2562:47:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2530:79:56" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "id": 21644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21642, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2706:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21643, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "2721:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2706:23:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21647, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2741:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2733:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2733:20:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2765:1:56", + "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": 21650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2757:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2757:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:10:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2733:34:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2706:61:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245474953545259", + "id": 21655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2769:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + }, + "value": "ERR_INVALID_REGISTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + } + ], + "id": 21641, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2698:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2698:94:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21657, + "nodeType": "ExpressionStatement", + "src": "2698:94:56" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21661, + "name": "CONTRACT_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21527, + "src": "2929:17:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 21659, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2907:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addressOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 22830, + "src": "2907:21:56", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 21662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2907:40:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2959:1:56", + "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": 21664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2951:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2951:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2951:10:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2907:54:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245474953545259", + "id": 21668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + }, + "value": "ERR_INVALID_REGISTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + } + ], + "id": 21658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2899:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2899:87:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21670, + "nodeType": "ExpressionStatement", + "src": "2899:87:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21671, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "3078:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21672, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3093:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3078:23:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21674, + "nodeType": "ExpressionStatement", + "src": "3078:23:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21675, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3195:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21676, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "3206:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3195:22:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21678, + "nodeType": "ExpressionStatement", + "src": "3195:22:56" + } + ] + }, + "documentation": { + "id": 21619, + "nodeType": "StructuredDocumentation", + "src": "2231:63:56", + "text": " @dev updates to the new contract-registry" + }, + "functionSelector": "49d10b64", + "id": 21680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateRegistry", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21620, + "nodeType": "ParameterList", + "parameters": [], + "src": "2323:2:56" + }, + "returnParameters": { + "id": 21621, + "nodeType": "ParameterList", + "parameters": [], + "src": "2333:0:56" + }, + "scope": 21719, + "src": "2300:925:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21690, + "nodeType": "Block", + "src": "3348:93:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21686, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3410:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21687, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "3421:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3410:23:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21689, + "nodeType": "ExpressionStatement", + "src": "3410:23:56" + } + ] + }, + "documentation": { + "id": 21681, + "nodeType": "StructuredDocumentation", + "src": "3233:65:56", + "text": " @dev restores the previous contract-registry" + }, + "functionSelector": "b4a176d3", + "id": 21691, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21684, + "modifierName": { + "argumentTypes": null, + "id": 21683, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3338:9:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3338:9:56" + } + ], + "name": "restoreRegistry", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21682, + "nodeType": "ParameterList", + "parameters": [], + "src": "3328:2:56" + }, + "returnParameters": { + "id": 21685, + "nodeType": "ParameterList", + "parameters": [], + "src": "3348:0:56" + }, + "scope": 21719, + "src": "3304:137:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21703, + "nodeType": "Block", + "src": "3738:141:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21699, + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21566, + "src": "3815:26:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21700, + "name": "_onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21694, + "src": "3844:27:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3815:56:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21702, + "nodeType": "ExpressionStatement", + "src": "3815:56:56" + } + ] + }, + "documentation": { + "id": 21692, + "nodeType": "StructuredDocumentation", + "src": "3449:200:56", + "text": " @dev restricts the permission to update the contract-registry\n @param _onlyOwnerCanUpdateRegistry indicates whether or not permission is restricted to owner only" + }, + "functionSelector": "024c7ec7", + "id": 21704, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21697, + "modifierName": { + "argumentTypes": null, + "id": 21696, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3728:9:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3728:9:56" + } + ], + "name": "restrictRegistryUpdate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21694, + "mutability": "mutable", + "name": "_onlyOwnerCanUpdateRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21704, + "src": "3687:32:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21693, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3687:4:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3686:34:56" + }, + "returnParameters": { + "id": 21698, + "nodeType": "ParameterList", + "parameters": [], + "src": "3738:0:56" + }, + "scope": 21719, + "src": "3655:224:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21717, + "nodeType": "Block", + "src": "4151:59:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21714, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21707, + "src": "4188:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 21712, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "4169:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addressOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 22830, + "src": "4169:18:56", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 21715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4169:33:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21711, + "id": 21716, + "nodeType": "Return", + "src": "4162:40:56" + } + ] + }, + "documentation": { + "id": 21705, + "nodeType": "StructuredDocumentation", + "src": "3887:184:56", + "text": " @dev returns the address associated with the given contract name\n @param _contractName contract name\n @return contract address" + }, + "id": 21718, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21707, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21718, + "src": "4096:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21706, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4096:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4095:23:56" + }, + "returnParameters": { + "id": 21711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21710, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21718, + "src": "4142:7:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21709, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4142:7:56", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4141:9:56" + }, + "scope": 21719, + "src": "4077:133:56", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 21720, + "src": "233:3980:56" + } + ], + "src": "52:4163:56" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "exportedSymbols": { + "ContractRegistryClient": [ + 21719 + ] + }, + "id": 21720, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21516, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:56" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 21517, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 21819, + "src": "77:21:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21518, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 22662, + "src": "100:21:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "./interfaces/IContractRegistry.sol", + "id": 21519, + "nodeType": "ImportDirective", + "scope": 21720, + "sourceUnit": 22832, + "src": "123:44:56", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21521, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "268:5:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 21522, + "nodeType": "InheritanceSpecifier", + "src": "268:5:56" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21523, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "275:5:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21524, + "nodeType": "InheritanceSpecifier", + "src": "275:5:56" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21520, + "nodeType": "StructuredDocumentation", + "src": "171:60:56", + "text": " @dev Base contract for ContractRegistry clients" + }, + "fullyImplemented": true, + "id": 21719, + "linearizedBaseContracts": [ + 21719, + 22661, + 21818, + 22847 + ], + "name": "ContractRegistryClient", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 21527, + "mutability": "constant", + "name": "CONTRACT_REGISTRY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "288:64:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21525, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "288:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e74726163745265676973747279", + "id": 21526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "334:18:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_014cc675742635098f3843c56f86f2875ab1c0e8ccd166d07159a5036b798b15", + "typeString": "literal_string \"ContractRegistry\"" + }, + "value": "ContractRegistry" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21530, + "mutability": "constant", + "name": "BANCOR_NETWORK", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "359:58:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21528, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "359:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f724e6574776f726b", + "id": 21529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "402:15:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e13073a1961b7477f917c9e8fc77a7d64eb68a6e4f8820f41bc0991c65d90aea", + "typeString": "literal_string \"BancorNetwork\"" + }, + "value": "BancorNetwork" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21533, + "mutability": "constant", + "name": "BANCOR_FORMULA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "424:58:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "424:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72466f726d756c61", + "id": 21532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "467:15:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f9aac19de3c8e04eb4d0548047a1cd61c5aaafde7cf99ed9c7ed906ce4dddf38", + "typeString": "literal_string \"BancorFormula\"" + }, + "value": "BancorFormula" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21536, + "mutability": "constant", + "name": "CONVERTER_FACTORY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "489:64:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21534, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "489:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e766572746572466163746f7279", + "id": 21535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "535:18:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_01f892de917bf09cf6fd04f57ff78c6ca006205a8809769abbeb39a039d3d768", + "typeString": "literal_string \"ConverterFactory\"" + }, + "value": "ConverterFactory" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21539, + "mutability": "constant", + "name": "CONVERSION_PATH_FINDER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "560:73:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21537, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "560:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436f6e76657273696f6e5061746846696e646572", + "id": 21538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "611:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d55bb14cf5551b26acee2cc099a4125a85ce113cb3306082cd15a1b4785376f1", + "typeString": "literal_string \"ConversionPathFinder\"" + }, + "value": "ConversionPathFinder" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21542, + "mutability": "constant", + "name": "CONVERTER_UPGRADER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "640:72:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21540, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "640:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e7665727465725570677261646572", + "id": 21541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "687:25:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e8cccdfec0e08322695b48c2ff60a2acb1243c72e02ec3a238fe40eefe726c01", + "typeString": "literal_string \"BancorConverterUpgrader\"" + }, + "value": "BancorConverterUpgrader" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21545, + "mutability": "constant", + "name": "CONVERTER_REGISTRY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "719:72:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21543, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "719:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e7665727465725265676973747279", + "id": 21544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "766:25:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_be29ba855de63e3aeb1afb9aed4122f6a4ac386581ea1b32773e72966a3749e7", + "typeString": "literal_string \"BancorConverterRegistry\"" + }, + "value": "BancorConverterRegistry" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21548, + "mutability": "constant", + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "798:81:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21546, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "798:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72436f6e766572746572526567697374727944617461", + "id": 21547, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "850:29:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f47ef61fa81526eefb8475acf271ff419a87423535a77af3ef98ebc7b31c640c", + "typeString": "literal_string \"BancorConverterRegistryData\"" + }, + "value": "BancorConverterRegistryData" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21551, + "mutability": "constant", + "name": "BNT_TOKEN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "886:48:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21549, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "886:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "424e54546f6b656e", + "id": 21550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "924:10:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4686149f7058d2454e334cfa4ea1a3482469c64fd3d4f50dfc69716086aee66f", + "typeString": "literal_string \"BNTToken\"" + }, + "value": "BNTToken" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21554, + "mutability": "constant", + "name": "BANCOR_X", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "941:46:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21552, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "941:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f7258", + "id": 21553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "978:9:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_86ea4d05259b04f0f72cb84c9671b182b8bbe45a219bbea86edd67f80c414eb4", + "typeString": "literal_string \"BancorX\"" + }, + "value": "BancorX" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21557, + "mutability": "constant", + "name": "BANCOR_X_UPGRADER", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "994:63:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21555, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "994:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "42616e636f72585570677261646572", + "id": 21556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1040:17:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d5e7e6eba8567517cf1f8f313379e5a6dbd5dcff956b158cf65a32e6b2bb5fd8", + "typeString": "literal_string \"BancorXUpgrader\"" + }, + "value": "BancorXUpgrader" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 21560, + "mutability": "constant", + "name": "CHAINLINK_ORACLE_WHITELIST", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1064:81:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21558, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1064:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "436861696e6c696e6b4f7261636c6557686974656c697374", + "id": 21559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1119:26:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f1d302dc7d7d6451424d658039558f1ea7e3cbf7255a10240557f430d300feb3", + "typeString": "literal_string \"ChainlinkOracleWhitelist\"" + }, + "value": "ChainlinkOracleWhitelist" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "7b103999", + "id": 21562, + "mutability": "mutable", + "name": "registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1154:33:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21561, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1154:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "61cd756e", + "id": 21564, + "mutability": "mutable", + "name": "prevRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1243:37:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21563, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1243:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "2fe8a6ad", + "id": 21566, + "mutability": "mutable", + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21719, + "src": "1333:38:56", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21565, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1333:4:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 21576, + "nodeType": "Block", + "src": "1616:51:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21572, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21569, + "src": "1633:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21571, + "name": "_only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21593, + "src": "1627:5:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$__$", + "typeString": "function (bytes32) view" + } + }, + "id": 21573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:20:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21574, + "nodeType": "ExpressionStatement", + "src": "1627:20:56" + }, + { + "id": 21575, + "nodeType": "PlaceholderStatement", + "src": "1658:1:56" + } + ] + }, + "documentation": { + "id": 21567, + "nodeType": "StructuredDocumentation", + "src": "1430:143:56", + "text": " @dev verifies that the caller is mapped to the given contract name\n @param _contractName contract name" + }, + "id": 21577, + "name": "only", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21569, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21577, + "src": "1593:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21568, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1593:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:23:56" + }, + "src": "1579:88:56", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21592, + "nodeType": "Block", + "src": "1774:87:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21583, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1793:3:56", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1793:10:56", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21586, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21579, + "src": "1817:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21585, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "1807:9:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1807:24:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1793:38:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1833:19:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21582, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1785:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1785:68:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21591, + "nodeType": "ExpressionStatement", + "src": "1785:68:56" + } + ] + }, + "documentation": null, + "id": 21593, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_only", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21579, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21593, + "src": "1737:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21578, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1737:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1736:23:56" + }, + "returnParameters": { + "id": 21581, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:0:56" + }, + "scope": 21719, + "src": "1722:139:56", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21617, + "nodeType": "Block", + "src": "2111:112:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21605, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "2122:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21607, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2151:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21606, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2133:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2122:39:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21610, + "nodeType": "ExpressionStatement", + "src": "2122:39:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21611, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "2172:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21613, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2205:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21612, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2187:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2187:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2172:43:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21616, + "nodeType": "ExpressionStatement", + "src": "2172:43:56" + } + ] + }, + "documentation": { + "id": 21594, + "nodeType": "StructuredDocumentation", + "src": "1869:153:56", + "text": " @dev initializes a new ContractRegistryClient instance\n @param _registry address of a contract-registry contract" + }, + "id": 21618, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21601, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21596, + "src": "2099:9:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2091:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21599, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2091:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2091:18:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21603, + "modifierName": { + "argumentTypes": null, + "id": 21598, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2078:12:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2078:32:56" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21596, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21618, + "src": "2040:27:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21595, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2040:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2039:29:56" + }, + "returnParameters": { + "id": 21604, + "nodeType": "ParameterList", + "parameters": [], + "src": "2111:0:56" + }, + "scope": 21719, + "src": "2028:195:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21679, + "nodeType": "Block", + "src": "2333:892:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21623, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2403:3:56", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2403:10:56", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21625, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "2417:5:56", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2403:19:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 21628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2426:27:56", + "subExpression": { + "argumentTypes": null, + "id": 21627, + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21566, + "src": "2427:26:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2403:50:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2455:19:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21622, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2395:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2395:80:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21632, + "nodeType": "ExpressionStatement", + "src": "2395:80:56" + }, + { + "assignments": [ + 21634 + ], + "declarations": [ + { + "constant": false, + "id": 21634, + "mutability": "mutable", + "name": "newRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21679, + "src": "2530:29:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 21633, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2530:17:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 21640, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21637, + "name": "CONTRACT_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21527, + "src": "2590:17:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 21636, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "2580:9:56", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 21638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2580:28:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21635, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "2562:17:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 21639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2562:47:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2530:79:56" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "id": 21644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21642, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2706:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21643, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "2721:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "2706:23:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21647, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2741:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + ], + "id": 21646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2733:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2733:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2733:20:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2765:1:56", + "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": 21650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2757:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2757:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2757:10:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2733:34:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2706:61:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245474953545259", + "id": 21655, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2769:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + }, + "value": "ERR_INVALID_REGISTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + } + ], + "id": 21641, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2698:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2698:94:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21657, + "nodeType": "ExpressionStatement", + "src": "2698:94:56" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21661, + "name": "CONTRACT_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21527, + "src": "2929:17:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 21659, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "2907:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addressOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 22830, + "src": "2907:21:56", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 21662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2907:40:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2959:1:56", + "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": 21664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2951:7:56", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2951:7:56", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2951:10:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2907:54:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245474953545259", + "id": 21668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2963:22:56", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + }, + "value": "ERR_INVALID_REGISTRY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_75b9212739e68843904752f41fb54f1609594bc4b84683da2a4384aeff5c191d", + "typeString": "literal_string \"ERR_INVALID_REGISTRY\"" + } + ], + "id": 21658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2899:7:56", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2899:87:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21670, + "nodeType": "ExpressionStatement", + "src": "2899:87:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21671, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "3078:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21672, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3093:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3078:23:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21674, + "nodeType": "ExpressionStatement", + "src": "3078:23:56" + }, + { + "expression": { + "argumentTypes": null, + "id": 21677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21675, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3195:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21676, + "name": "newRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21634, + "src": "3206:11:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3195:22:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21678, + "nodeType": "ExpressionStatement", + "src": "3195:22:56" + } + ] + }, + "documentation": { + "id": 21619, + "nodeType": "StructuredDocumentation", + "src": "2231:63:56", + "text": " @dev updates to the new contract-registry" + }, + "functionSelector": "49d10b64", + "id": 21680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateRegistry", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21620, + "nodeType": "ParameterList", + "parameters": [], + "src": "2323:2:56" + }, + "returnParameters": { + "id": 21621, + "nodeType": "ParameterList", + "parameters": [], + "src": "2333:0:56" + }, + "scope": 21719, + "src": "2300:925:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21690, + "nodeType": "Block", + "src": "3348:93:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21686, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "3410:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21687, + "name": "prevRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21564, + "src": "3421:12:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "src": "3410:23:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21689, + "nodeType": "ExpressionStatement", + "src": "3410:23:56" + } + ] + }, + "documentation": { + "id": 21681, + "nodeType": "StructuredDocumentation", + "src": "3233:65:56", + "text": " @dev restores the previous contract-registry" + }, + "functionSelector": "b4a176d3", + "id": 21691, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21684, + "modifierName": { + "argumentTypes": null, + "id": 21683, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3338:9:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3338:9:56" + } + ], + "name": "restoreRegistry", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21682, + "nodeType": "ParameterList", + "parameters": [], + "src": "3328:2:56" + }, + "returnParameters": { + "id": 21685, + "nodeType": "ParameterList", + "parameters": [], + "src": "3348:0:56" + }, + "scope": 21719, + "src": "3304:137:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21703, + "nodeType": "Block", + "src": "3738:141:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21699, + "name": "onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21566, + "src": "3815:26:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21700, + "name": "_onlyOwnerCanUpdateRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21694, + "src": "3844:27:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3815:56:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21702, + "nodeType": "ExpressionStatement", + "src": "3815:56:56" + } + ] + }, + "documentation": { + "id": 21692, + "nodeType": "StructuredDocumentation", + "src": "3449:200:56", + "text": " @dev restricts the permission to update the contract-registry\n @param _onlyOwnerCanUpdateRegistry indicates whether or not permission is restricted to owner only" + }, + "functionSelector": "024c7ec7", + "id": 21704, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21697, + "modifierName": { + "argumentTypes": null, + "id": 21696, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3728:9:56", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3728:9:56" + } + ], + "name": "restrictRegistryUpdate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21694, + "mutability": "mutable", + "name": "_onlyOwnerCanUpdateRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21704, + "src": "3687:32:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21693, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3687:4:56", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3686:34:56" + }, + "returnParameters": { + "id": 21698, + "nodeType": "ParameterList", + "parameters": [], + "src": "3738:0:56" + }, + "scope": 21719, + "src": "3655:224:56", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21717, + "nodeType": "Block", + "src": "4151:59:56", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21714, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21707, + "src": "4188:13:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "argumentTypes": null, + "id": 21712, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "4169:8:56", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "id": 21713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addressOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 22830, + "src": "4169:18:56", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view external returns (address)" + } + }, + "id": 21715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4169:33:56", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 21711, + "id": 21716, + "nodeType": "Return", + "src": "4162:40:56" + } + ] + }, + "documentation": { + "id": 21705, + "nodeType": "StructuredDocumentation", + "src": "3887:184:56", + "text": " @dev returns the address associated with the given contract name\n @param _contractName contract name\n @return contract address" + }, + "id": 21718, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21707, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21718, + "src": "4096:21:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 21706, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4096:7:56", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4095:23:56" + }, + "returnParameters": { + "id": 21711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21710, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21718, + "src": "4142:7:56", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21709, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4142:7:56", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4141:9:56" + }, + "scope": 21719, + "src": "4077:133:56", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 21720, + "src": "233:3980:56" + } + ], + "src": "52:4163:56" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.839Z", + "devdoc": { + "details": "Base contract for ContractRegistry clients", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new ContractRegistryClient instance", + "params": { + "_registry": "address of a contract-registry contract" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json b/apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json new file mode 100644 index 00000000..6ce22832 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json @@ -0,0 +1,14790 @@ +{ + "contractName": "ConversionPathFinder", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchorToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_anchorToken", + "type": "address" + } + ], + "name": "setAnchorToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + } + ], + "name": "findPath", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchorToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"}],\"name\":\"findPath\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_anchorToken\",\"type\":\"address\"}],\"name\":\"setAnchorToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The ConversionPathFinder contract allows generating a conversion path between any token pair in the Bancor Network. The path can then be used in various functions in the BancorNetwork contract. See the BancorNetwork contract for conversion path format.\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new ConversionPathFinder instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"findPath(address,address)\":{\"details\":\"generates a conversion path between a given pair of tokens in the Bancor Network\",\"params\":{\"_sourceToken\":\"address of the source token\",\"_targetToken\":\"address of the target token\"},\"returns\":{\"_0\":\"a path from the source token to the target token\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setAnchorToken(address)\":{\"details\":\"updates the anchor token\",\"params\":{\"_anchorToken\":\"address of the anchor token\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/ConversionPathFinder.sol\":\"ConversionPathFinder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/ConversionPathFinder.sol\":{\"keccak256\":\"0x871b9cdd5219e84cdbb34d3c6ce58f7debed7d352bf1d10c34491512a4823817\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9b041bd28c964c898204a6a59423335db04d13428edff9eed584d180e43f54e9\",\"dweb:/ipfs/QmetR7aSeGYHsUUhrHB6yZV5aRcuwUvN4EmcZzDoAPSLtQ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol\":{\"keccak256\":\"0x827d22d6c52b3e5128595090a3694847e9c54a760abf0e47a8870a7235537723\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://edae6c2f9f6fde390032189dda1b7f720521a31df5eb98e001d04bbf44dcfa02\",\"dweb:/ipfs/QmRz2EG3tcKeKXwHizciEr19ZEH2SidtQ9rkprKc6iR5Tz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516110a73803806110a78339818101604052602081101561003357600080fd5b5051600080546001600160a01b03191633179055808061005281610083565b50600280546001600160a01b039092166001600160a01b0319928316811790915560038054909216179055506100e1565b6001600160a01b0381166100de576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b610fb7806100f06000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80637b1039991161008c578063b4a176d311610066578063b4a176d3146101f9578063d4ee1d9014610201578063e1c4c96614610209578063f2fde38b14610211576100cf565b80637b1039991461016b5780638da5cb5b14610173578063a1c421cd1461017b576100cf565b8063024c7ec7146100d45780632f167f05146100f55780632fe8a6ad1461011b57806349d10b641461013757806361cd756e1461013f57806379ba509714610163575b600080fd5b6100f3600480360360208110156100ea57600080fd5b50351515610237565b005b6100f36004803603602081101561010b57600080fd5b50356001600160a01b031661025d565b610123610287565b604080519115158252519081900360200190f35b6100f3610297565b61014761049f565b604080516001600160a01b039092168252519081900360200190f35b6100f36104ae565b610147610565565b610147610574565b6101a96004803603604081101561019157600080fd5b506001600160a01b0381358116916020013516610583565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101e55781810151838201526020016101cd565b505050509050019250505060405180910390f35b6100f36105e4565b610147610610565b61014761061f565b6100f36004803603602081101561022757600080fd5b50356001600160a01b031661062e565b61023f6106ac565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6102656106ac565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102ba5750600354600160a01b900460ff16155b6102ff576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600061031d6f436f6e7472616374526567697374727960801b610701565b6002549091506001600160a01b0380831691161480159061034657506001600160a01b03811615155b61038e576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103f057600080fd5b505afa158015610404573d6000803e3d6000fd5b505050506040513d602081101561041a57600080fd5b50516001600160a01b0316141561046f576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b03163314610501576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b606060006105b07f42616e636f72436f6e7665727465725265676973747279000000000000000000610701565b905060606105be858361077f565b905060606105cc858461077f565b90506105d88282610b55565b93505050505b92915050565b6105ec6106ac565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6004546001600160a01b031681565b6106366106ac565b6000546001600160a01b038281169116141561068a576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106ff576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561074d57600080fd5b505afa158015610761573d6000803e3d6000fd5b505050506040513d602081101561077757600080fd5b505192915050565b6004546060906001600160a01b03848116911614156107a8576107a183610da7565b90506105de565b6060826001600160a01b031663d8cced2a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156107f757600080fd5b505afa15801561080b573d6000803e3d6000fd5b505050506040513d602081101561082157600080fd5b5051156108385761083184610da7565b9050610951565b826001600160a01b03166311839064856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561088557600080fd5b505afa158015610899573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108c257600080fd5b81019080805160405193929190846401000000008211156108e257600080fd5b9083019060208201858111156108f757600080fd5b825186602082028301116401000000008211171561091457600080fd5b82525081516020918201928201910280838360005b83811015610941578181015183820152602001610929565b5050505090500160405250505090505b60005b8151811015610b3957600082828151811061096b57fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ab57600080fd5b505afa1580156109bf573d6000803e3d6000fd5b505050506040513d60208110156109d557600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038416916371f52bf3916004808301926020929190829003018186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d6020811015610a4757600080fd5b505161ffff16905060005b81811015610b2e576000836001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610aa057600080fd5b505afa158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b505190506001600160a01b03808216908a1614610b25576060610aed828a61077f565b805190915015610b2357610b158a888881518110610b0757fe5b602002602001015183610df9565b9750505050505050506105de565b505b50600101610a52565b505050600101610954565b5060408051600080825260208201909252905b50949350505050565b606060008351118015610b69575060008251115b15610d8d57825182515b600082118015610b835750600081115b8015610bcc5750836001820381518110610b9957fe5b60200260200101516001600160a01b0316856001840381518110610bb957fe5b60200260200101516001600160a01b0316145b15610bde576000199182019101610b73565b606081830160010167ffffffffffffffff81118015610bfc57600080fd5b50604051908082528060200260200182016040528015610c26578160200160208202803683370190505b50905060005b838111610c7357868181518110610c3f57fe5b6020026020010151828281518110610c5357fe5b6001600160a01b0390921660209283029190910190910152600101610c2c565b50815b8015610cc357856001820381518110610c8b57fe5b6020026020010151828284510381518110610ca257fe5b6001600160a01b039092166020928302919091019091015260001901610c76565b506000805b8251811015610d7757600281015b60028206845103811015610d3057838181518110610cf057fe5b60200260200101516001600160a01b0316848381518110610d0d57fe5b60200260200101516001600160a01b03161415610d28578091505b600201610cd6565b50828181518110610d3d57fe5b6020026020010151838380600101945081518110610d5757fe5b6001600160a01b0390921660209283029190910190910152600101610cc8565b50610d828282610eef565b9450505050506105de565b60408051600080825260208201909252905b509392505050565b604080516001808252818301909252606091829190602080830190803683370190505090508281600081518110610dda57fe5b6001600160a01b03909216602092830291909101909101529050919050565b606080825160020167ffffffffffffffff81118015610e1757600080fd5b50604051908082528060200260200182016040528015610e41578160200160208202803683370190505b5090508481600081518110610e5257fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508381600181518110610e8057fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060005b8351811015610b4c57838181518110610eb857fe5b6020026020010151828260020181518110610ecf57fe5b6001600160a01b0390921660209283029190910190910152600101610ea3565b6060808267ffffffffffffffff81118015610f0957600080fd5b50604051908082528060200260200182016040528015610f33578160200160208202803683370190505b50905060005b83811015610d9f57848181518110610f4d57fe5b6020026020010151828281518110610f6157fe5b6001600160a01b0390921660209283029190910190910152600101610f3956fea26469706673582212208fc8a7bf8ce24f6ed7d1157da9bddf90b3c16820044c0c7e2b3cf0fe7c8e533b64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80637b1039991161008c578063b4a176d311610066578063b4a176d3146101f9578063d4ee1d9014610201578063e1c4c96614610209578063f2fde38b14610211576100cf565b80637b1039991461016b5780638da5cb5b14610173578063a1c421cd1461017b576100cf565b8063024c7ec7146100d45780632f167f05146100f55780632fe8a6ad1461011b57806349d10b641461013757806361cd756e1461013f57806379ba509714610163575b600080fd5b6100f3600480360360208110156100ea57600080fd5b50351515610237565b005b6100f36004803603602081101561010b57600080fd5b50356001600160a01b031661025d565b610123610287565b604080519115158252519081900360200190f35b6100f3610297565b61014761049f565b604080516001600160a01b039092168252519081900360200190f35b6100f36104ae565b610147610565565b610147610574565b6101a96004803603604081101561019157600080fd5b506001600160a01b0381358116916020013516610583565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101e55781810151838201526020016101cd565b505050509050019250505060405180910390f35b6100f36105e4565b610147610610565b61014761061f565b6100f36004803603602081101561022757600080fd5b50356001600160a01b031661062e565b61023f6106ac565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6102656106ac565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102ba5750600354600160a01b900460ff16155b6102ff576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600061031d6f436f6e7472616374526567697374727960801b610701565b6002549091506001600160a01b0380831691161480159061034657506001600160a01b03811615155b61038e576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103f057600080fd5b505afa158015610404573d6000803e3d6000fd5b505050506040513d602081101561041a57600080fd5b50516001600160a01b0316141561046f576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b03163314610501576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b606060006105b07f42616e636f72436f6e7665727465725265676973747279000000000000000000610701565b905060606105be858361077f565b905060606105cc858461077f565b90506105d88282610b55565b93505050505b92915050565b6105ec6106ac565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6004546001600160a01b031681565b6106366106ac565b6000546001600160a01b038281169116141561068a576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106ff576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561074d57600080fd5b505afa158015610761573d6000803e3d6000fd5b505050506040513d602081101561077757600080fd5b505192915050565b6004546060906001600160a01b03848116911614156107a8576107a183610da7565b90506105de565b6060826001600160a01b031663d8cced2a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156107f757600080fd5b505afa15801561080b573d6000803e3d6000fd5b505050506040513d602081101561082157600080fd5b5051156108385761083184610da7565b9050610951565b826001600160a01b03166311839064856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561088557600080fd5b505afa158015610899573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108c257600080fd5b81019080805160405193929190846401000000008211156108e257600080fd5b9083019060208201858111156108f757600080fd5b825186602082028301116401000000008211171561091457600080fd5b82525081516020918201928201910280838360005b83811015610941578181015183820152602001610929565b5050505090500160405250505090505b60005b8151811015610b3957600082828151811061096b57fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ab57600080fd5b505afa1580156109bf573d6000803e3d6000fd5b505050506040513d60208110156109d557600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038416916371f52bf3916004808301926020929190829003018186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d6020811015610a4757600080fd5b505161ffff16905060005b81811015610b2e576000836001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610aa057600080fd5b505afa158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b505190506001600160a01b03808216908a1614610b25576060610aed828a61077f565b805190915015610b2357610b158a888881518110610b0757fe5b602002602001015183610df9565b9750505050505050506105de565b505b50600101610a52565b505050600101610954565b5060408051600080825260208201909252905b50949350505050565b606060008351118015610b69575060008251115b15610d8d57825182515b600082118015610b835750600081115b8015610bcc5750836001820381518110610b9957fe5b60200260200101516001600160a01b0316856001840381518110610bb957fe5b60200260200101516001600160a01b0316145b15610bde576000199182019101610b73565b606081830160010167ffffffffffffffff81118015610bfc57600080fd5b50604051908082528060200260200182016040528015610c26578160200160208202803683370190505b50905060005b838111610c7357868181518110610c3f57fe5b6020026020010151828281518110610c5357fe5b6001600160a01b0390921660209283029190910190910152600101610c2c565b50815b8015610cc357856001820381518110610c8b57fe5b6020026020010151828284510381518110610ca257fe5b6001600160a01b039092166020928302919091019091015260001901610c76565b506000805b8251811015610d7757600281015b60028206845103811015610d3057838181518110610cf057fe5b60200260200101516001600160a01b0316848381518110610d0d57fe5b60200260200101516001600160a01b03161415610d28578091505b600201610cd6565b50828181518110610d3d57fe5b6020026020010151838380600101945081518110610d5757fe5b6001600160a01b0390921660209283029190910190910152600101610cc8565b50610d828282610eef565b9450505050506105de565b60408051600080825260208201909252905b509392505050565b604080516001808252818301909252606091829190602080830190803683370190505090508281600081518110610dda57fe5b6001600160a01b03909216602092830291909101909101529050919050565b606080825160020167ffffffffffffffff81118015610e1757600080fd5b50604051908082528060200260200182016040528015610e41578160200160208202803683370190505b5090508481600081518110610e5257fe5b60200260200101906001600160a01b031690816001600160a01b0316815250508381600181518110610e8057fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060005b8351811015610b4c57838181518110610eb857fe5b6020026020010151828260020181518110610ecf57fe5b6001600160a01b0390921660209283029190910190910152600101610ea3565b6060808267ffffffffffffffff81118015610f0957600080fd5b50604051908082528060200260200182016040528015610f33578160200160208202803683370190505b50905060005b83811015610d9f57848181518110610f4d57fe5b6020026020010151828281518110610f6157fe5b6001600160a01b0390921660209283029190910190910152600101610f3956fea26469706673582212208fc8a7bf8ce24f6ed7d1157da9bddf90b3c16820044c0c7e2b3cf0fe7c8e533b64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "614:5672:1:-:0;;;893:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;893:90:1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;893:90:1;;594:23:64;893:90:1;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;614:5672:1;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;614:5672:1:-;;;;;;;", + "deployedSourceMap": "614:5672:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;1113:112:1;;;;;;;;;;;;;;;;-1:-1:-1;1113:112:1;-1:-1:-1;;;;;1113:112:1;;:::i;1333:38:56:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;2300:925;;;:::i;1243:37::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;1422:217:57;;;:::i;1154:33:56:-;;;:::i;219:29:57:-;;;:::i;1543:446:1:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1543:446:1;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3304:137:56;;;:::i;255:23:57:-;;;:::i;700:30:1:-;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;1113:112:1:-;726:12:57;:10;:12::i;:::-;1191:11:1::1;:26:::0;;-1:-1:-1;;;;;;1191:26:1::1;-1:-1:-1::0;;;;;1191:26:1;;;::::1;::::0;;;::::1;::::0;;1113:112::o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;1243:37::-;;;-1:-1:-1;;;;;1243:37:56;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;1543:446:1:-;1645:16;1674:36;1732:29;1742:18;1732:9;:29::i;:::-;1674:88;;1773:27;1803:40;1811:12;1825:17;1803:7;:40::i;:::-;1773:70;;1854:27;1884:40;1892:12;1906:17;1884:7;:40::i;:::-;1854:70;;1942:39;1958:10;1970;1942:15;:39::i;:::-;1935:46;;;;;1543:446;;;;;:::o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;700:30:1:-;;;-1:-1:-1;;;;;700:30:1;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o;2311:1176:1:-;2452:11;;2409:16;;-1:-1:-1;;;;;2442:21:1;;;2452:11;;2442:21;2438:79;;;2485:32;2509:6;2485:15;:32::i;:::-;2478:39;;;;2438:79;2530:24;2569:18;-1:-1:-1;;;;;2569:27:1;;2605:6;2569:44;;;;;;;;;;;;;-1:-1:-1;;;;;2569:44:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2569:44:1;2565:197;;;2638:32;2662:6;2638:15;:32::i;:::-;2628:42;;2565:197;;;2709:18;-1:-1:-1;;;;;2709:45:1;;2755:6;2709:53;;;;;;;;;;;;;-1:-1:-1;;;;;2709:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2709:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2709:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2699:63;;2565:197;2780:9;2775:669;2799:7;:14;2795:1;:18;2775:669;;;2835:20;2894:7;2902:1;2894:10;;;;;;;;;;;;;;-1:-1:-1;;;;;2877:34:1;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2877:36:1;2960:31;;;-1:-1:-1;;;2960:31:1;;;;2877:36;;-1:-1:-1;2930:27:1;;-1:-1:-1;;;;;2960:29:1;;;;;:31;;;;;2877:36;;2960:31;;;;;;;:29;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2960:31:1;2930:61;;;-1:-1:-1;3011:9:1;3006:427;3030:19;3026:1;:23;3006:427;;;3075:26;3104:9;-1:-1:-1;;;;;3104:25:1;;3130:1;3104:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3104:28:1;;-1:-1:-1;;;;;;3155:24:1;;;;;;;3151:267;;3204:21;3228:43;3236:14;3252:18;3228:7;:43::i;:::-;3298:11;;3204:67;;-1:-1:-1;3298:15:1;3294:104;;3347:51;3372:6;3381:7;3389:1;3381:10;;;;;;;;;;;;;;3393:4;3347:16;:51::i;:::-;3340:58;;;;;;;;;;;3294:104;3151:267;;-1:-1:-1;3051:3:1;;3006:427;;;-1:-1:-1;;;2815:3:1;;2775:669;;;-1:-1:-1;3463:16:1;;;3477:1;3463:16;;;;;;;;;;;-1:-1:-1;3456:23:1;2311:1176;-1:-1:-1;;;;2311:1176:1:o;3730:1114::-;3837:16;3891:1;3870:11;:18;:22;:48;;;;;3917:1;3896:11;:18;:22;3870:48;3866:935;;;3947:18;;3992;;4025:127;4036:1;4032;:5;:14;;;;;4045:1;4041;:5;4032:14;:58;;;;;4072:11;4088:1;4084;:5;4072:18;;;;;;;;;;;;;;-1:-1:-1;;;;;4050:40:1;:11;4066:1;4062;:5;4050:18;;;;;;;;;;;;;;-1:-1:-1;;;;;4050:40:1;;4032:58;4025:127;;;-1:-1:-1;;4111:3:1;;;;4133;4025:127;;;4168:21;4210:1;4206;:5;4214:1;4206:9;4192:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4192:24:1;;4168:48;;4236:9;4231:74;4256:1;4251;:6;4231:74;;4291:11;4303:1;4291:14;;;;;;;;;;;;;;4281:4;4286:1;4281:7;;;;;;;;-1:-1:-1;;;;;4281:24:1;;;:7;;;;;;;;;;;:24;4259:3;;4231:74;;;-1:-1:-1;4337:1:1;4320:91;4340:5;;4320:91;;4393:11;4409:1;4405;:5;4393:18;;;;;;;;;;;;;;4369:4;4388:1;4374:4;:11;:15;4369:21;;;;;;;;-1:-1:-1;;;;;4369:42:1;;;:21;;;;;;;;;;;:42;-1:-1:-1;;4347:3:1;4320:91;;;;4428:14;4466:9;4461:276;4485:4;:11;4481:1;:15;4461:276;;;4546:1;4542:5;;4525:154;4571:1;4567;:5;4553:4;:11;:19;4549:1;:23;4525:154;;;4620:4;4625:1;4620:7;;;;;;;;;;;;;;-1:-1:-1;;;;;4609:18:1;:4;4614:1;4609:7;;;;;;;;;;;;;;-1:-1:-1;;;;;4609:18:1;;4605:54;;;4658:1;4654:5;;4605:54;4579:1;4574:6;4525:154;;;;4714:4;4719:1;4714:7;;;;;;;;;;;;;;4697:4;4702:8;;;;;;4697:14;;;;;;;;-1:-1:-1;;;;;4697:24:1;;;:14;;;;;;;;;;;:24;4503:1;4498:6;4461:276;;;;4760:29;4776:4;4782:6;4760:15;:29::i;:::-;4753:36;;;;;;;;3866:935;4820:16;;;4834:1;4820:16;;;;;;;;;;;-1:-1:-1;4813:23:1;3730:1114;-1:-1:-1;;;3730:1114:1:o;5004:190::-;5120:16;;;5134:1;5120:16;;;;;;;;;5066;;;;5120;;;;;;;;;;;;-1:-1:-1;5120:16:1;5095:41;;5158:5;5147;5153:1;5147:8;;;;;;;;-1:-1:-1;;;;;5147:16:1;;;:8;;;;;;;;;;;:16;5181:5;-1:-1:-1;5004:190:1;;;:::o;5437:370::-;5542:16;5571:22;5614:6;:13;5610:1;:17;5596:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5596:32:1;;5571:57;;5650:6;5639:5;5645:1;5639:8;;;;;;;;;;;;;:17;-1:-1:-1;;;;;5639:17:1;;;-1:-1:-1;;;;;5639:17:1;;;;;5678:6;5667:5;5673:1;5667:8;;;;;;;;;;;;;:17;-1:-1:-1;;;;;5667:17:1;;;-1:-1:-1;;;;;5667:17:1;;;;;5700:9;5695:81;5719:6;:13;5715:1;:17;5695:81;;;5767:6;5774:1;5767:9;;;;;;;;;;;;;;5752:5;5762:1;5758;:5;5752:12;;;;;;;;-1:-1:-1;;;;;5752:24:1;;;:12;;;;;;;;;;;:24;5734:3;;5695:81;;6005:278;6094:16;6123:22;6162:7;6148:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6148:22:1;;6123:47;;6186:9;6181:71;6205:7;6201:1;:11;6181:71;;;6243:6;6250:1;6243:9;;;;;;;;;;;;;;6232:5;6238:1;6232:8;;;;;;;;-1:-1:-1;;;;;6232:20:1;;;:8;;;;;;;;;;;:20;6214:3;;6181:71;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./IConversionPathFinder.sol\";\r\nimport \"./utility/ContractRegistryClient.sol\";\r\nimport \"./converter/interfaces/IConverter.sol\";\r\nimport \"./converter/interfaces/IConverterAnchor.sol\";\r\nimport \"./converter/interfaces/IConverterRegistry.sol\";\r\n\r\n/**\r\n * @dev The ConversionPathFinder contract allows generating a conversion path between any token pair in the Bancor Network.\r\n * The path can then be used in various functions in the BancorNetwork contract.\r\n *\r\n * See the BancorNetwork contract for conversion path format.\r\n*/\r\ncontract ConversionPathFinder is IConversionPathFinder, ContractRegistryClient {\r\n IERC20Token public anchorToken;\r\n\r\n /**\r\n * @dev initializes a new ConversionPathFinder instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {\r\n }\r\n\r\n /**\r\n * @dev updates the anchor token\r\n *\r\n * @param _anchorToken address of the anchor token\r\n */\r\n function setAnchorToken(IERC20Token _anchorToken) public ownerOnly {\r\n anchorToken = _anchorToken;\r\n }\r\n\r\n /**\r\n * @dev generates a conversion path between a given pair of tokens in the Bancor Network\r\n *\r\n * @param _sourceToken address of the source token\r\n * @param _targetToken address of the target token\r\n *\r\n * @return a path from the source token to the target token\r\n */\r\n function findPath(IERC20Token _sourceToken, IERC20Token _targetToken) external view override returns (address[] memory) {\r\n IConverterRegistry converterRegistry = IConverterRegistry(addressOf(CONVERTER_REGISTRY));\r\n address[] memory sourcePath = getPath(_sourceToken, converterRegistry);\r\n address[] memory targetPath = getPath(_targetToken, converterRegistry);\r\n return getShortestPath(sourcePath, targetPath);\r\n }\r\n\r\n /**\r\n * @dev generates a conversion path between a given token and the anchor token\r\n *\r\n * @param _token address of the token\r\n * @param _converterRegistry address of the converter registry\r\n *\r\n * @return a path from the input token to the anchor token\r\n */\r\n function getPath(IERC20Token _token, IConverterRegistry _converterRegistry) private view returns (address[] memory) {\r\n if (_token == anchorToken)\r\n return getInitialArray(address(_token));\r\n\r\n address[] memory anchors;\r\n if (_converterRegistry.isAnchor(address(_token)))\r\n anchors = getInitialArray(address(_token));\r\n else\r\n anchors = _converterRegistry.getConvertibleTokenAnchors(_token);\r\n\r\n for (uint256 n = 0; n < anchors.length; n++) {\r\n IConverter converter = IConverter(payable(IConverterAnchor(anchors[n]).owner()));\r\n uint256 connectorTokenCount = converter.connectorTokenCount();\r\n for (uint256 i = 0; i < connectorTokenCount; i++) {\r\n IERC20Token connectorToken = converter.connectorTokens(i);\r\n if (connectorToken != _token) {\r\n address[] memory path = getPath(connectorToken, _converterRegistry);\r\n if (path.length > 0)\r\n return getExtendedArray(address(_token), anchors[n], path);\r\n }\r\n }\r\n }\r\n\r\n return new address[](0);\r\n }\r\n\r\n /**\r\n * @dev merges two paths with a common suffix into one\r\n *\r\n * @param _sourcePath address of the source path\r\n * @param _targetPath address of the target path\r\n *\r\n * @return merged path\r\n */\r\n function getShortestPath(address[] memory _sourcePath, address[] memory _targetPath) private pure returns (address[] memory) {\r\n if (_sourcePath.length > 0 && _targetPath.length > 0) {\r\n uint256 i = _sourcePath.length;\r\n uint256 j = _targetPath.length;\r\n while (i > 0 && j > 0 && _sourcePath[i - 1] == _targetPath[j - 1]) {\r\n i--;\r\n j--;\r\n }\r\n\r\n address[] memory path = new address[](i + j + 1);\r\n for (uint256 m = 0; m <= i; m++)\r\n path[m] = _sourcePath[m];\r\n for (uint256 n = j; n > 0; n--)\r\n path[path.length - n] = _targetPath[n - 1];\r\n\r\n uint256 length = 0;\r\n for (uint256 p = 0; p < path.length; p += 1) {\r\n for (uint256 q = p + 2; q < path.length - p % 2; q += 2) {\r\n if (path[p] == path[q])\r\n p = q;\r\n }\r\n path[length++] = path[p];\r\n }\r\n\r\n return getPartialArray(path, length);\r\n }\r\n\r\n return new address[](0);\r\n }\r\n\r\n /**\r\n * @dev creates a new array containing a single item\r\n *\r\n * @param _item item\r\n *\r\n * @return initial array\r\n */\r\n function getInitialArray(address _item) private pure returns (address[] memory) {\r\n address[] memory array = new address[](1);\r\n array[0] = _item;\r\n return array;\r\n }\r\n\r\n /**\r\n * @dev prepends two items to the beginning of an array\r\n *\r\n * @param _item0 first item\r\n * @param _item1 second item\r\n * @param _array initial array\r\n *\r\n * @return extended array\r\n */\r\n function getExtendedArray(address _item0, address _item1, address[] memory _array) private pure returns (address[] memory) {\r\n address[] memory array = new address[](2 + _array.length);\r\n array[0] = _item0;\r\n array[1] = _item1;\r\n for (uint256 i = 0; i < _array.length; i++)\r\n array[2 + i] = _array[i];\r\n return array;\r\n }\r\n\r\n /**\r\n * @dev extracts the prefix of a given array\r\n *\r\n * @param _array given array\r\n * @param _length prefix length\r\n *\r\n * @return partial array\r\n */\r\n function getPartialArray(address[] memory _array, uint256 _length) private pure returns (address[] memory) {\r\n address[] memory array = new address[](_length);\r\n for (uint256 i = 0; i < _length; i++)\r\n array[i] = _array[i];\r\n return array;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/ConversionPathFinder.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/ConversionPathFinder.sol", + "exportedSymbols": { + "ConversionPathFinder": [ + 2532 + ] + }, + "id": 2533, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1978, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:1" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 1979, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 2547, + "src": "77:37:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 1980, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 21720, + "src": "116:46:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 1981, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13341, + "src": "164:47:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 1982, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13350, + "src": "213:53:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "file": "./converter/interfaces/IConverterRegistry.sol", + "id": 1983, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13502, + "src": "268:55:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1985, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "647:21:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 1986, + "nodeType": "InheritanceSpecifier", + "src": "647:21:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1987, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "670:22:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 1988, + "nodeType": "InheritanceSpecifier", + "src": "670:22:1" + } + ], + "contractDependencies": [ + 2546, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 1984, + "nodeType": "StructuredDocumentation", + "src": "327:285:1", + "text": " @dev The ConversionPathFinder contract allows generating a conversion path between any token pair in the Bancor Network.\n The path can then be used in various functions in the BancorNetwork contract.\n See the BancorNetwork contract for conversion path format." + }, + "fullyImplemented": true, + "id": 2532, + "linearizedBaseContracts": [ + 2532, + 21719, + 22661, + 21818, + 22847, + 2546 + ], + "name": "ConversionPathFinder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "e1c4c966", + "id": 1990, + "mutability": "mutable", + "name": "anchorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2532, + "src": "700:30:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1989, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "700:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 1999, + "nodeType": "Block", + "src": "975:8:1", + "statements": [] + }, + "documentation": { + "id": 1991, + "nodeType": "StructuredDocumentation", + "src": "739:148:1", + "text": " @dev initializes a new ConversionPathFinder instance\n @param _registry address of a contract registry contract" + }, + "id": 2000, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1996, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1993, + "src": "957:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 1997, + "modifierName": { + "argumentTypes": null, + "id": 1995, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "934:22:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "934:33:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1993, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2000, + "src": "905:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 1992, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "905:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "904:29:1" + }, + "returnParameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "975:0:1" + }, + "scope": 2532, + "src": "893:90:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2012, + "nodeType": "Block", + "src": "1180:45:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2008, + "name": "anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "1191:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2009, + "name": "_anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2003, + "src": "1205:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "1191:26:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 2011, + "nodeType": "ExpressionStatement", + "src": "1191:26:1" + } + ] + }, + "documentation": { + "id": 2001, + "nodeType": "StructuredDocumentation", + "src": "991:116:1", + "text": " @dev updates the anchor token\n @param _anchorToken address of the anchor token" + }, + "functionSelector": "2f167f05", + "id": 2013, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2006, + "modifierName": { + "argumentTypes": null, + "id": 2005, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1170:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1170:9:1" + } + ], + "name": "setAnchorToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2003, + "mutability": "mutable", + "name": "_anchorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2013, + "src": "1137:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2002, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1137:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1136:26:1" + }, + "returnParameters": { + "id": 2007, + "nodeType": "ParameterList", + "parameters": [], + "src": "1180:0:1" + }, + "scope": 2532, + "src": "1113:112:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2545 + ], + "body": { + "id": 2058, + "nodeType": "Block", + "src": "1663:326:1", + "statements": [ + { + "assignments": [ + 2026 + ], + "declarations": [ + { + "constant": false, + "id": 2026, + "mutability": "mutable", + "name": "converterRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1674:36:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2025, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "1674:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2032, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2029, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1742:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2028, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "1732:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1732:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2027, + "name": "IConverterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13501, + "src": "1713:18:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistry_$13501_$", + "typeString": "type(contract IConverterRegistry)" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1713:49:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1674:88:1" + }, + { + "assignments": [ + 2037 + ], + "declarations": [ + { + "constant": false, + "id": 2037, + "mutability": "mutable", + "name": "sourcePath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1773:27:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2036, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1773:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2042, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2039, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "1811:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2040, + "name": "converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2026, + "src": "1825:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2038, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "1803:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1803:40:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:70:1" + }, + { + "assignments": [ + 2047 + ], + "declarations": [ + { + "constant": false, + "id": 2047, + "mutability": "mutable", + "name": "targetPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1854:27:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2045, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1854:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2046, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1854:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2052, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2049, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2018, + "src": "1892:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2050, + "name": "converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2026, + "src": "1906:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2048, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "1884:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1884:40:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1854:70:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2054, + "name": "sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2037, + "src": "1958:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 2055, + "name": "targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2047, + "src": "1970:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 2053, + "name": "getShortestPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "1942:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address[] memory) pure returns (address[] memory)" + } + }, + "id": 2056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2024, + "id": 2057, + "nodeType": "Return", + "src": "1935:46:1" + } + ] + }, + "documentation": { + "id": 2014, + "nodeType": "StructuredDocumentation", + "src": "1233:304:1", + "text": " @dev generates a conversion path between a given pair of tokens in the Bancor Network\n @param _sourceToken address of the source token\n @param _targetToken address of the target token\n @return a path from the source token to the target token" + }, + "functionSelector": "a1c421cd", + "id": 2059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPath", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2020, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1627:8:1" + }, + "parameters": { + "id": 2019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2016, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1561:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2015, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1561:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2018, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1587:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2017, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1587:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1560:52:1" + }, + "returnParameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1645:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1645:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2022, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1645:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1644:18:1" + }, + "scope": 2532, + "src": "1543:446:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2201, + "nodeType": "Block", + "src": "2427:1060:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2070, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2442:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2071, + "name": "anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "2452:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "2442:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2080, + "nodeType": "IfStatement", + "src": "2438:79:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2076, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2509:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2501:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2501:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2501:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2073, + "name": "getInitialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2421, + "src": "2485:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address) pure returns (address[] memory)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2485:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2079, + "nodeType": "Return", + "src": "2478:39:1" + } + }, + { + "assignments": [ + 2085 + ], + "declarations": [ + { + "constant": false, + "id": 2085, + "mutability": "mutable", + "name": "anchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2201, + "src": "2530:24:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2083, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2530:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2084, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2530:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2086, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2530:24:1" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2091, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2605:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2597:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2089, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2597:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2597:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2087, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "2569:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 2088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13417, + "src": "2569:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2103, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2699:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2106, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2755:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 2104, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "2709:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 2105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenAnchors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13482, + "src": "2709:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2709:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "2699:63:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2109, + "nodeType": "ExpressionStatement", + "src": "2699:63:1" + }, + "id": 2110, + "nodeType": "IfStatement", + "src": "2565:197:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2094, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2628:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2098, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2662:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2654:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2654:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2654:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2095, + "name": "getInitialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2421, + "src": "2638:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address) pure returns (address[] memory)" + } + }, + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "2628:42:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2102, + "nodeType": "ExpressionStatement", + "src": "2628:42:1" + } + }, + { + "body": { + "id": 2193, + "nodeType": "Block", + "src": "2820:624:1", + "statements": [ + { + "assignments": [ + 2123 + ], + "declarations": [ + { + "constant": false, + "id": 2123, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2193, + "src": "2835:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 2122, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2835:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2128, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2894:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2130, + "indexExpression": { + "argumentTypes": null, + "id": 2129, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2902:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2894:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2127, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "2877:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2877:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 2132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "2877:34:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 2133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2877:36:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2869:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2869:8:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2869:45:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2124, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2858:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2835:80:1" + }, + { + "assignments": [ + 2138 + ], + "declarations": [ + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "connectorTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2193, + "src": "2930:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2930:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2142, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2139, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2123, + "src": "2960:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 2140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "2960:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 2141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2960:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2930:61:1" + }, + { + "body": { + "id": 2191, + "nodeType": "Block", + "src": "3056:377:1", + "statements": [ + { + "assignments": [ + 2154 + ], + "declarations": [ + { + "constant": false, + "id": 2154, + "mutability": "mutable", + "name": "connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2191, + "src": "3075:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2153, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3075:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2159, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2157, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3130:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2155, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2123, + "src": "3104:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 2156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "3104:25:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3104:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:57:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2160, + "name": "connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3155:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 2161, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "3173:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "3155:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2190, + "nodeType": "IfStatement", + "src": "3151:267:1", + "trueBody": { + "id": 2189, + "nodeType": "Block", + "src": "3181:237:1", + "statements": [ + { + "assignments": [ + 2167 + ], + "declarations": [ + { + "constant": false, + "id": 2167, + "mutability": "mutable", + "name": "path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2189, + "src": "3204:21:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2165, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3204:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2166, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3204:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2172, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2169, + "name": "connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3236:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2170, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "3252:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2168, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3228:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3228:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3204:67:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2173, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "3298:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3298:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3312:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3298:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2188, + "nodeType": "IfStatement", + "src": "3294:104:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2180, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "3372:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3364:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2178, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3364:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3364:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2182, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "3381:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2184, + "indexExpression": { + "argumentTypes": null, + "id": 2183, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "3389:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3381:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2185, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "3393:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 2177, + "name": "getExtendedArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2486, + "src": "3347:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,address,address[] memory) pure returns (address[] memory)" + } + }, + "id": 2186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3347:51:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2187, + "nodeType": "Return", + "src": "3340:58:1" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3026:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2148, + "name": "connectorTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "3030:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3026:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2192, + "initializationExpression": { + "assignments": [ + 2144 + ], + "declarations": [ + { + "constant": false, + "id": 2144, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2192, + "src": "3011:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3011:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2146, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3023:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3011:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3051:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2150, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3051:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2152, + "nodeType": "ExpressionStatement", + "src": "3051:3:1" + }, + "nodeType": "ForStatement", + "src": "3006:427:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2115, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2795:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2116, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2799:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2799:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2795:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2194, + "initializationExpression": { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2194, + "src": "2780:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2780:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2114, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2792:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2780:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2815:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2119, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2815:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2121, + "nodeType": "ExpressionStatement", + "src": "2815:3:1" + }, + "nodeType": "ForStatement", + "src": "2775:669:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3477: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": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3463:13:1", + "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": 2195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3467:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2196, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3467:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3463:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2200, + "nodeType": "Return", + "src": "3456:23:1" + } + ] + }, + "documentation": { + "id": 2060, + "nodeType": "StructuredDocumentation", + "src": "1997:308:1", + "text": " @dev generates a conversion path between a given token and the anchor token\n @param _token address of the token\n @param _converterRegistry address of the converter registry\n @return a path from the input token to the anchor token" + }, + "id": 2202, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2062, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2328:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2061, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2328:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2064, + "mutability": "mutable", + "name": "_converterRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2348:37:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2063, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "2348:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2327:59:1" + }, + "returnParameters": { + "id": 2069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2068, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2409:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2066, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2409:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2067, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2409:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2408:18:1" + }, + "scope": 2532, + "src": "2311:1176:1", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2391, + "nodeType": "Block", + "src": "3855:989:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2215, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "3870:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3870:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3891:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3870:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2219, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "3896:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3896:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3917:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3896:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3870:48:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2384, + "nodeType": "IfStatement", + "src": "3866:935:1", + "trueBody": { + "id": 2383, + "nodeType": "Block", + "src": "3920:881:1", + "statements": [ + { + "assignments": [ + 2225 + ], + "declarations": [ + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "3935:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3935:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2228, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2226, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "3947:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3947:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3935:30:1" + }, + { + "assignments": [ + 2230 + ], + "declarations": [ + { + "constant": false, + "id": 2230, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "3980:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3980:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2233, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2231, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "3992:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3992:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3980:30:1" + }, + { + "body": { + "id": 2259, + "nodeType": "Block", + "src": "4092:60:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4111:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4111:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2255, + "nodeType": "ExpressionStatement", + "src": "4111:3:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4133:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2256, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4133:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2258, + "nodeType": "ExpressionStatement", + "src": "4133:3:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4032:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4036:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4032:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2237, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4041:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4045:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4041:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4032:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2241, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "4050:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2245, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2242, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4062:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4066:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4062:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4050:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2246, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "4072:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2250, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2247, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4084:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4088:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4084:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4072:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4050:40:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4032:58:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2260, + "nodeType": "WhileStatement", + "src": "4025:127:1" + }, + { + "assignments": [ + 2265 + ], + "declarations": [ + { + "constant": false, + "id": 2265, + "mutability": "mutable", + "name": "path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "4168:21:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4168:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2264, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4168:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2275, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2269, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4206:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 2270, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4210:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4206:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4214:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4206:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4192:13:1", + "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": 2266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4196:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2267, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4196:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4168:48:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2286, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4281:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2288, + "indexExpression": { + "argumentTypes": null, + "id": 2287, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4286:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4281:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2289, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "4291:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2291, + "indexExpression": { + "argumentTypes": null, + "id": 2290, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4303:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4291:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4281:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2293, + "nodeType": "ExpressionStatement", + "src": "4281:24:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2280, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4251:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4256:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4251:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2294, + "initializationExpression": { + "assignments": [ + 2277 + ], + "declarations": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "m", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2294, + "src": "4236:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2276, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4236:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2279, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4248:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4236:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4259:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2283, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4259:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2285, + "nodeType": "ExpressionStatement", + "src": "4259:3:1" + }, + "nodeType": "ForStatement", + "src": "4231:74:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2305, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4369:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2310, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2306, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4374:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4374:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 2308, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4388:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4374:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4369:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2311, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "4393:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2315, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2312, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4405:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4409:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4405:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4369:42:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2317, + "nodeType": "ExpressionStatement", + "src": "4369:42:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2299, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4340:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4344:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4340:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2318, + "initializationExpression": { + "assignments": [ + 2296 + ], + "declarations": [ + { + "constant": false, + "id": 2296, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2318, + "src": "4325:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4325:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2298, + "initialValue": { + "argumentTypes": null, + "id": 2297, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4337:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4325:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4347:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2302, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4347:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2304, + "nodeType": "ExpressionStatement", + "src": "4347:3:1" + }, + "nodeType": "ForStatement", + "src": "4320:91:1" + }, + { + "assignments": [ + 2320 + ], + "declarations": [ + { + "constant": false, + "id": 2320, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "4428:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2319, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4428:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2322, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4445:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4428:18:1" + }, + { + "body": { + "id": 2376, + "nodeType": "Block", + "src": "4506:231:1", + "statements": [ + { + "body": { + "id": 2365, + "nodeType": "Block", + "src": "4582:97:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2353, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4609:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2355, + "indexExpression": { + "argumentTypes": null, + "id": 2354, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4614:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4609:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2356, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4620:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2358, + "indexExpression": { + "argumentTypes": null, + "id": 2357, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4625:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4620:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4609:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2364, + "nodeType": "IfStatement", + "src": "4605:54:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 2362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2360, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4654:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2361, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4658:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2363, + "nodeType": "ExpressionStatement", + "src": "4654:5:1" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2341, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4549:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2342, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4553:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4553:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2344, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4567:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4571:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4567:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4553:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4549:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2366, + "initializationExpression": { + "assignments": [ + 2336 + ], + "declarations": [ + { + "constant": false, + "id": 2336, + "mutability": "mutable", + "name": "q", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2366, + "src": "4530:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4530:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2337, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4542:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4546:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4542:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4530:17:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2349, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4574:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4579:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4574:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2352, + "nodeType": "ExpressionStatement", + "src": "4574:6:1" + }, + "nodeType": "ForStatement", + "src": "4525:154:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2367, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4697:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2370, + "indexExpression": { + "argumentTypes": null, + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4702:8:1", + "subExpression": { + "argumentTypes": null, + "id": 2368, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2320, + "src": "4702:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4697:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2371, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4714:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2373, + "indexExpression": { + "argumentTypes": null, + "id": 2372, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4719:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4714:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4697:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2375, + "nodeType": "ExpressionStatement", + "src": "4697:24:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2327, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4481:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2328, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4485:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4485:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4481:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2377, + "initializationExpression": { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "p", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2377, + "src": "4466:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4466:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2326, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4478:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4466:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2331, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4498:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4498:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2334, + "nodeType": "ExpressionStatement", + "src": "4498:6:1" + }, + "nodeType": "ForStatement", + "src": "4461:276:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2379, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4776:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 2380, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2320, + "src": "4782:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2378, + "name": "getPartialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2531, + "src": "4760:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,uint256) pure returns (address[] memory)" + } + }, + "id": 2381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4760:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2214, + "id": 2382, + "nodeType": "Return", + "src": "4753:36:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4834: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": 2387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4820:13:1", + "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": 2385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4824:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2386, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4824:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4820:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2214, + "id": 2390, + "nodeType": "Return", + "src": "4813:23:1" + } + ] + }, + "documentation": { + "id": 2203, + "nodeType": "StructuredDocumentation", + "src": "3495:229:1", + "text": " @dev merges two paths with a common suffix into one\n @param _sourcePath address of the source path\n @param _targetPath address of the target path\n @return merged path" + }, + "id": 2392, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShortestPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2206, + "mutability": "mutable", + "name": "_sourcePath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3755:28:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3755:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2205, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3755:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2209, + "mutability": "mutable", + "name": "_targetPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3785:28:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3785:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2208, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3785:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3754:60:1" + }, + "returnParameters": { + "id": 2214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2213, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3837:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3837:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2212, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3837:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3836:18:1" + }, + "scope": 2532, + "src": "3730:1114:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2420, + "nodeType": "Block", + "src": "5084:110:1", + "statements": [ + { + "assignments": [ + 2405 + ], + "declarations": [ + { + "constant": false, + "id": 2405, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2420, + "src": "5095:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5095:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2404, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5095:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2411, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 2409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5134:1:1", + "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" + } + ], + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5120:13:1", + "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": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5124:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2407, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5124:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5120:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5095:41:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2412, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2405, + "src": "5147:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2414, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5153:1:1", + "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": "5147:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2415, + "name": "_item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2395, + "src": "5158:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5147:16:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2417, + "nodeType": "ExpressionStatement", + "src": "5147:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2418, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2405, + "src": "5181:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2400, + "id": 2419, + "nodeType": "Return", + "src": "5174:12:1" + } + ] + }, + "documentation": { + "id": 2393, + "nodeType": "StructuredDocumentation", + "src": "4852:146:1", + "text": " @dev creates a new array containing a single item\n @param _item item\n @return initial array" + }, + "id": 2421, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getInitialArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2395, + "mutability": "mutable", + "name": "_item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2421, + "src": "5029:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5029:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5028:15:1" + }, + "returnParameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2421, + "src": "5066:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5066:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2398, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5066:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5065:18:1" + }, + "scope": 2532, + "src": "5004:190:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2485, + "nodeType": "Block", + "src": "5560:247:1", + "statements": [ + { + "assignments": [ + 2439 + ], + "declarations": [ + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2485, + "src": "5571:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5571:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2438, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5571:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2448, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5610:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2444, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5614:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5614:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5610:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5596:13:1", + "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": 2440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5600:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2441, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5600:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5596:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5571:57:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2449, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5639:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2451, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5645:1:1", + "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": "5639:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2452, + "name": "_item0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "5650:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5639:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2454, + "nodeType": "ExpressionStatement", + "src": "5639:17:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2455, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5667:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2457, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5673:1:1", + "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": "5667:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2458, + "name": "_item1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2426, + "src": "5678:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5667:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "5667:17:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2472, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5752:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2476, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5758:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 2474, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5762:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5758:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5752:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2477, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5767:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2479, + "indexExpression": { + "argumentTypes": null, + "id": 2478, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5774:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5767:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5752:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2481, + "nodeType": "ExpressionStatement", + "src": "5752:24:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2465, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5715:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2466, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5719:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5719:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5715:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "initializationExpression": { + "assignments": [ + 2462 + ], + "declarations": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2482, + "src": "5700:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2464, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5712:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5700:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5734:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2469, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5734:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2471, + "nodeType": "ExpressionStatement", + "src": "5734:3:1" + }, + "nodeType": "ForStatement", + "src": "5695:81:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2483, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5794:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2434, + "id": 2484, + "nodeType": "Return", + "src": "5787:12:1" + } + ] + }, + "documentation": { + "id": 2422, + "nodeType": "StructuredDocumentation", + "src": "5202:229:1", + "text": " @dev prepends two items to the beginning of an array\n @param _item0 first item\n @param _item1 second item\n @param _array initial array\n @return extended array" + }, + "id": 2486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getExtendedArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2430, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2424, + "mutability": "mutable", + "name": "_item0", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5463:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2423, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5463:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "_item1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5479:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5479:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2429, + "mutability": "mutable", + "name": "_array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5495:23:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5495:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2428, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5495:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5462:57:1" + }, + "returnParameters": { + "id": 2434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2433, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5542:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2431, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5542:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2432, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5542:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5541:18:1" + }, + "scope": 2532, + "src": "5437:370:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2530, + "nodeType": "Block", + "src": "6112:171:1", + "statements": [ + { + "assignments": [ + 2502 + ], + "declarations": [ + { + "constant": false, + "id": 2502, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2530, + "src": "6123:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2500, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6123:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2501, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6123:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2508, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2506, + "name": "_length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2492, + "src": "6162:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "6148:13:1", + "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": 2503, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6152:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2504, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6152:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6148:22:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6123:47:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2519, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2502, + "src": "6232:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2521, + "indexExpression": { + "argumentTypes": null, + "id": 2520, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6238:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6232:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2522, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2490, + "src": "6243:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2524, + "indexExpression": { + "argumentTypes": null, + "id": 2523, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6250:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6243:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6232:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2526, + "nodeType": "ExpressionStatement", + "src": "6232:20:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2513, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6201:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2514, + "name": "_length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2492, + "src": "6205:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6201:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2527, + "initializationExpression": { + "assignments": [ + 2510 + ], + "declarations": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2527, + "src": "6186:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2509, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2512, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6198:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6186:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6214:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2516, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6214:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2518, + "nodeType": "ExpressionStatement", + "src": "6214:3:1" + }, + "nodeType": "ForStatement", + "src": "6181:71:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2528, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2502, + "src": "6270:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2497, + "id": 2529, + "nodeType": "Return", + "src": "6263:12:1" + } + ] + }, + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "5815:184:1", + "text": " @dev extracts the prefix of a given array\n @param _array given array\n @param _length prefix length\n @return partial array" + }, + "id": 2531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPartialArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "_array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6030:23:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6030:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2489, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6030:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "_length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6055:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6055:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6029:42:1" + }, + "returnParameters": { + "id": 2497, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2496, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6094:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6094:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2495, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6094:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6093:18:1" + }, + "scope": 2532, + "src": "6005:278:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 2533, + "src": "614:5672:1" + } + ], + "src": "52:6236:1" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/ConversionPathFinder.sol", + "exportedSymbols": { + "ConversionPathFinder": [ + 2532 + ] + }, + "id": 2533, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1978, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:1" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 1979, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 2547, + "src": "77:37:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 1980, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 21720, + "src": "116:46:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 1981, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13341, + "src": "164:47:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 1982, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13350, + "src": "213:53:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "file": "./converter/interfaces/IConverterRegistry.sol", + "id": 1983, + "nodeType": "ImportDirective", + "scope": 2533, + "sourceUnit": 13502, + "src": "268:55:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1985, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "647:21:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 1986, + "nodeType": "InheritanceSpecifier", + "src": "647:21:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1987, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "670:22:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 1988, + "nodeType": "InheritanceSpecifier", + "src": "670:22:1" + } + ], + "contractDependencies": [ + 2546, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 1984, + "nodeType": "StructuredDocumentation", + "src": "327:285:1", + "text": " @dev The ConversionPathFinder contract allows generating a conversion path between any token pair in the Bancor Network.\n The path can then be used in various functions in the BancorNetwork contract.\n See the BancorNetwork contract for conversion path format." + }, + "fullyImplemented": true, + "id": 2532, + "linearizedBaseContracts": [ + 2532, + 21719, + 22661, + 21818, + 22847, + 2546 + ], + "name": "ConversionPathFinder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "e1c4c966", + "id": 1990, + "mutability": "mutable", + "name": "anchorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2532, + "src": "700:30:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1989, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "700:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 1999, + "nodeType": "Block", + "src": "975:8:1", + "statements": [] + }, + "documentation": { + "id": 1991, + "nodeType": "StructuredDocumentation", + "src": "739:148:1", + "text": " @dev initializes a new ConversionPathFinder instance\n @param _registry address of a contract registry contract" + }, + "id": 2000, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1996, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1993, + "src": "957:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 1997, + "modifierName": { + "argumentTypes": null, + "id": 1995, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "934:22:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "934:33:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1993, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2000, + "src": "905:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 1992, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "905:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "904:29:1" + }, + "returnParameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "975:0:1" + }, + "scope": 2532, + "src": "893:90:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2012, + "nodeType": "Block", + "src": "1180:45:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2008, + "name": "anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "1191:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2009, + "name": "_anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2003, + "src": "1205:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "1191:26:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 2011, + "nodeType": "ExpressionStatement", + "src": "1191:26:1" + } + ] + }, + "documentation": { + "id": 2001, + "nodeType": "StructuredDocumentation", + "src": "991:116:1", + "text": " @dev updates the anchor token\n @param _anchorToken address of the anchor token" + }, + "functionSelector": "2f167f05", + "id": 2013, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2006, + "modifierName": { + "argumentTypes": null, + "id": 2005, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1170:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1170:9:1" + } + ], + "name": "setAnchorToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2003, + "mutability": "mutable", + "name": "_anchorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2013, + "src": "1137:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2002, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1137:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1136:26:1" + }, + "returnParameters": { + "id": 2007, + "nodeType": "ParameterList", + "parameters": [], + "src": "1180:0:1" + }, + "scope": 2532, + "src": "1113:112:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2545 + ], + "body": { + "id": 2058, + "nodeType": "Block", + "src": "1663:326:1", + "statements": [ + { + "assignments": [ + 2026 + ], + "declarations": [ + { + "constant": false, + "id": 2026, + "mutability": "mutable", + "name": "converterRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1674:36:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2025, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "1674:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2032, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2029, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1742:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2028, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "1732:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1732:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2027, + "name": "IConverterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13501, + "src": "1713:18:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistry_$13501_$", + "typeString": "type(contract IConverterRegistry)" + } + }, + "id": 2031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1713:49:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1674:88:1" + }, + { + "assignments": [ + 2037 + ], + "declarations": [ + { + "constant": false, + "id": 2037, + "mutability": "mutable", + "name": "sourcePath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1773:27:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2036, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1773:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2042, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2039, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "1811:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2040, + "name": "converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2026, + "src": "1825:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2038, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "1803:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1803:40:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:70:1" + }, + { + "assignments": [ + 2047 + ], + "declarations": [ + { + "constant": false, + "id": 2047, + "mutability": "mutable", + "name": "targetPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2058, + "src": "1854:27:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2045, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1854:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2046, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1854:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2052, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2049, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2018, + "src": "1892:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2050, + "name": "converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2026, + "src": "1906:17:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2048, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "1884:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1884:40:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1854:70:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2054, + "name": "sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2037, + "src": "1958:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 2055, + "name": "targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2047, + "src": "1970:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 2053, + "name": "getShortestPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2392, + "src": "1942:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address[] memory) pure returns (address[] memory)" + } + }, + "id": 2056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2024, + "id": 2057, + "nodeType": "Return", + "src": "1935:46:1" + } + ] + }, + "documentation": { + "id": 2014, + "nodeType": "StructuredDocumentation", + "src": "1233:304:1", + "text": " @dev generates a conversion path between a given pair of tokens in the Bancor Network\n @param _sourceToken address of the source token\n @param _targetToken address of the target token\n @return a path from the source token to the target token" + }, + "functionSelector": "a1c421cd", + "id": 2059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPath", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2020, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1627:8:1" + }, + "parameters": { + "id": 2019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2016, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1561:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2015, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1561:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2018, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1587:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2017, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1587:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1560:52:1" + }, + "returnParameters": { + "id": 2024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2023, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2059, + "src": "1645:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2021, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1645:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2022, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1645:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1644:18:1" + }, + "scope": 2532, + "src": "1543:446:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2201, + "nodeType": "Block", + "src": "2427:1060:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 2072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2070, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2442:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 2071, + "name": "anchorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1990, + "src": "2452:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "2442:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2080, + "nodeType": "IfStatement", + "src": "2438:79:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2076, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2509:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2501:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2501:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2501:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2073, + "name": "getInitialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2421, + "src": "2485:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address) pure returns (address[] memory)" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2485:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2079, + "nodeType": "Return", + "src": "2478:39:1" + } + }, + { + "assignments": [ + 2085 + ], + "declarations": [ + { + "constant": false, + "id": 2085, + "mutability": "mutable", + "name": "anchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2201, + "src": "2530:24:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2083, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2530:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2084, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2530:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2086, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2530:24:1" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2091, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2605:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2597:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2089, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2597:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2597:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 2087, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "2569:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 2088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13417, + "src": "2569:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2103, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2699:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2106, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2755:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 2104, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "2709:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 2105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenAnchors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13482, + "src": "2709:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2709:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "2699:63:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2109, + "nodeType": "ExpressionStatement", + "src": "2699:63:1" + }, + "id": 2110, + "nodeType": "IfStatement", + "src": "2565:197:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 2101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2094, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2628:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2098, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "2662:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2654:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2654:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2654:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2095, + "name": "getInitialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2421, + "src": "2638:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address) pure returns (address[] memory)" + } + }, + "id": 2100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2638:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "2628:42:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2102, + "nodeType": "ExpressionStatement", + "src": "2628:42:1" + } + }, + { + "body": { + "id": 2193, + "nodeType": "Block", + "src": "2820:624:1", + "statements": [ + { + "assignments": [ + 2123 + ], + "declarations": [ + { + "constant": false, + "id": 2123, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2193, + "src": "2835:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 2122, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2835:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2136, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2128, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2894:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2130, + "indexExpression": { + "argumentTypes": null, + "id": 2129, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2902:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2894:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2127, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "2877:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2877:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 2132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "2877:34:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 2133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2877:36:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2869:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2869:8:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2869:45:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2124, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2858:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2835:80:1" + }, + { + "assignments": [ + 2138 + ], + "declarations": [ + { + "constant": false, + "id": 2138, + "mutability": "mutable", + "name": "connectorTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2193, + "src": "2930:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2930:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2142, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2139, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2123, + "src": "2960:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 2140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "2960:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 2141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2960:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2930:61:1" + }, + { + "body": { + "id": 2191, + "nodeType": "Block", + "src": "3056:377:1", + "statements": [ + { + "assignments": [ + 2154 + ], + "declarations": [ + { + "constant": false, + "id": 2154, + "mutability": "mutable", + "name": "connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2191, + "src": "3075:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2153, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3075:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2159, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2157, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3130:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2155, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2123, + "src": "3104:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 2156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "3104:25:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3104:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:57:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2160, + "name": "connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3155:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 2161, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "3173:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "3155:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2190, + "nodeType": "IfStatement", + "src": "3151:267:1", + "trueBody": { + "id": 2189, + "nodeType": "Block", + "src": "3181:237:1", + "statements": [ + { + "assignments": [ + 2167 + ], + "declarations": [ + { + "constant": false, + "id": 2167, + "mutability": "mutable", + "name": "path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2189, + "src": "3204:21:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2165, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3204:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2166, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3204:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2172, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2169, + "name": "connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2154, + "src": "3236:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 2170, + "name": "_converterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2064, + "src": "3252:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + ], + "id": 2168, + "name": "getPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3228:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterRegistry_$13501_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IConverterRegistry) view returns (address[] memory)" + } + }, + "id": 2171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3228:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3204:67:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2173, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "3298:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3298:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3312:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3298:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2188, + "nodeType": "IfStatement", + "src": "3294:104:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2180, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2062, + "src": "3372:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 2179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3364:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2178, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3364:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3364:15:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2182, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "3381:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2184, + "indexExpression": { + "argumentTypes": null, + "id": 2183, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "3389:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3381:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2185, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "3393:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 2177, + "name": "getExtendedArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2486, + "src": "3347:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address,address,address[] memory) pure returns (address[] memory)" + } + }, + "id": 2186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3347:51:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2187, + "nodeType": "Return", + "src": "3340:58:1" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3026:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2148, + "name": "connectorTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2138, + "src": "3030:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3026:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2192, + "initializationExpression": { + "assignments": [ + 2144 + ], + "declarations": [ + { + "constant": false, + "id": 2144, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2192, + "src": "3011:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3011:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2146, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3023:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3011:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3051:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2150, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2144, + "src": "3051:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2152, + "nodeType": "ExpressionStatement", + "src": "3051:3:1" + }, + "nodeType": "ForStatement", + "src": "3006:427:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2115, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2795:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2116, + "name": "anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2085, + "src": "2799:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2799:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2795:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2194, + "initializationExpression": { + "assignments": [ + 2112 + ], + "declarations": [ + { + "constant": false, + "id": 2112, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2194, + "src": "2780:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2780:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2114, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2792:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2780:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2815:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2119, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2112, + "src": "2815:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2121, + "nodeType": "ExpressionStatement", + "src": "2815:3:1" + }, + "nodeType": "ForStatement", + "src": "2775:669:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3477: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": 2197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3463:13:1", + "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": 2195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3467:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2196, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3467:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3463:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2069, + "id": 2200, + "nodeType": "Return", + "src": "3456:23:1" + } + ] + }, + "documentation": { + "id": 2060, + "nodeType": "StructuredDocumentation", + "src": "1997:308:1", + "text": " @dev generates a conversion path between a given token and the anchor token\n @param _token address of the token\n @param _converterRegistry address of the converter registry\n @return a path from the input token to the anchor token" + }, + "id": 2202, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2062, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2328:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2061, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2328:11:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2064, + "mutability": "mutable", + "name": "_converterRegistry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2348:37:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + }, + "typeName": { + "contractScope": null, + "id": 2063, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "2348:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2327:59:1" + }, + "returnParameters": { + "id": 2069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2068, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2202, + "src": "2409:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2066, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2409:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2067, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2409:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2408:18:1" + }, + "scope": 2532, + "src": "2311:1176:1", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2391, + "nodeType": "Block", + "src": "3855:989:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2215, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "3870:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3870:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3891:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3870:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2219, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "3896:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3896:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3917:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3896:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3870:48:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2384, + "nodeType": "IfStatement", + "src": "3866:935:1", + "trueBody": { + "id": 2383, + "nodeType": "Block", + "src": "3920:881:1", + "statements": [ + { + "assignments": [ + 2225 + ], + "declarations": [ + { + "constant": false, + "id": 2225, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "3935:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3935:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2228, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2226, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "3947:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3947:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3935:30:1" + }, + { + "assignments": [ + 2230 + ], + "declarations": [ + { + "constant": false, + "id": 2230, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "3980:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3980:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2233, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2231, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "3992:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3992:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3980:30:1" + }, + { + "body": { + "id": 2259, + "nodeType": "Block", + "src": "4092:60:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4111:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4111:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2255, + "nodeType": "ExpressionStatement", + "src": "4111:3:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4133:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2256, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4133:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2258, + "nodeType": "ExpressionStatement", + "src": "4133:3:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4032:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4036:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4032:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2237, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4041:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4045:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4041:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4032:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2241, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "4050:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2245, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2242, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4062:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4066:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4062:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4050:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2246, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "4072:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2250, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2247, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4084:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4088:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4084:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4072:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4050:40:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4032:58:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2260, + "nodeType": "WhileStatement", + "src": "4025:127:1" + }, + { + "assignments": [ + 2265 + ], + "declarations": [ + { + "constant": false, + "id": 2265, + "mutability": "mutable", + "name": "path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "4168:21:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4168:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2264, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4168:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2275, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2269, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4206:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 2270, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4210:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4206:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4214:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4206:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4192:13:1", + "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": 2266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4196:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2267, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4196:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4192:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4168:48:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2286, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4281:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2288, + "indexExpression": { + "argumentTypes": null, + "id": 2287, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4286:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4281:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2289, + "name": "_sourcePath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "4291:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2291, + "indexExpression": { + "argumentTypes": null, + "id": 2290, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4303:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4291:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4281:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2293, + "nodeType": "ExpressionStatement", + "src": "4281:24:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2280, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4251:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 2281, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2225, + "src": "4256:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4251:6:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2294, + "initializationExpression": { + "assignments": [ + 2277 + ], + "declarations": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "m", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2294, + "src": "4236:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2276, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4236:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2279, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4248:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4236:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4259:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2283, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4259:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2285, + "nodeType": "ExpressionStatement", + "src": "4259:3:1" + }, + "nodeType": "ForStatement", + "src": "4231:74:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2305, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4369:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2310, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2306, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4374:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4374:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 2308, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4388:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4374:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4369:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2311, + "name": "_targetPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2209, + "src": "4393:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2315, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2312, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4405:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4409:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4405:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4369:42:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2317, + "nodeType": "ExpressionStatement", + "src": "4369:42:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2299, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4340:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4344:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4340:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2318, + "initializationExpression": { + "assignments": [ + 2296 + ], + "declarations": [ + { + "constant": false, + "id": 2296, + "mutability": "mutable", + "name": "n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2318, + "src": "4325:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4325:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2298, + "initialValue": { + "argumentTypes": null, + "id": 2297, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2230, + "src": "4337:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4325:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "4347:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2302, + "name": "n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2296, + "src": "4347:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2304, + "nodeType": "ExpressionStatement", + "src": "4347:3:1" + }, + "nodeType": "ForStatement", + "src": "4320:91:1" + }, + { + "assignments": [ + 2320 + ], + "declarations": [ + { + "constant": false, + "id": 2320, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2383, + "src": "4428:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2319, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4428:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2322, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4445:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4428:18:1" + }, + { + "body": { + "id": 2376, + "nodeType": "Block", + "src": "4506:231:1", + "statements": [ + { + "body": { + "id": 2365, + "nodeType": "Block", + "src": "4582:97:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2353, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4609:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2355, + "indexExpression": { + "argumentTypes": null, + "id": 2354, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4614:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4609:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2356, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4620:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2358, + "indexExpression": { + "argumentTypes": null, + "id": 2357, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4625:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4620:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4609:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 2364, + "nodeType": "IfStatement", + "src": "4605:54:1", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 2362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2360, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4654:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2361, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4658:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4654:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2363, + "nodeType": "ExpressionStatement", + "src": "4654:5:1" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2341, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4549:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2342, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4553:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4553:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2344, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4567:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4571:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4567:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4553:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4549:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2366, + "initializationExpression": { + "assignments": [ + 2336 + ], + "declarations": [ + { + "constant": false, + "id": 2336, + "mutability": "mutable", + "name": "q", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2366, + "src": "4530:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4530:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2340, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2337, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4542:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4546:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4542:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4530:17:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2349, + "name": "q", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "4574:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4579:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4574:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2352, + "nodeType": "ExpressionStatement", + "src": "4574:6:1" + }, + "nodeType": "ForStatement", + "src": "4525:154:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2367, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4697:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2370, + "indexExpression": { + "argumentTypes": null, + "id": 2369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4702:8:1", + "subExpression": { + "argumentTypes": null, + "id": 2368, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2320, + "src": "4702:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4697:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2371, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4714:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2373, + "indexExpression": { + "argumentTypes": null, + "id": 2372, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4719:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4714:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4697:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2375, + "nodeType": "ExpressionStatement", + "src": "4697:24:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2327, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4481:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2328, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4485:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4485:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4481:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2377, + "initializationExpression": { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "p", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2377, + "src": "4466:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4466:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2326, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4478:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4466:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2331, + "name": "p", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "4498:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4503:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4498:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2334, + "nodeType": "ExpressionStatement", + "src": "4498:6:1" + }, + "nodeType": "ForStatement", + "src": "4461:276:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2379, + "name": "path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2265, + "src": "4776:4:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 2380, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2320, + "src": "4782:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2378, + "name": "getPartialArray", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2531, + "src": "4760:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,uint256) pure returns (address[] memory)" + } + }, + "id": 2381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4760:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2214, + "id": 2382, + "nodeType": "Return", + "src": "4753:36:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2388, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4834: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": 2387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "4820:13:1", + "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": 2385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4824:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2386, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4824:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4820:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2214, + "id": 2390, + "nodeType": "Return", + "src": "4813:23:1" + } + ] + }, + "documentation": { + "id": 2203, + "nodeType": "StructuredDocumentation", + "src": "3495:229:1", + "text": " @dev merges two paths with a common suffix into one\n @param _sourcePath address of the source path\n @param _targetPath address of the target path\n @return merged path" + }, + "id": 2392, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getShortestPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2206, + "mutability": "mutable", + "name": "_sourcePath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3755:28:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3755:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2205, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3755:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2209, + "mutability": "mutable", + "name": "_targetPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3785:28:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3785:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2208, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3785:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3754:60:1" + }, + "returnParameters": { + "id": 2214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2213, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2392, + "src": "3837:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3837:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2212, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3837:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3836:18:1" + }, + "scope": 2532, + "src": "3730:1114:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2420, + "nodeType": "Block", + "src": "5084:110:1", + "statements": [ + { + "assignments": [ + 2405 + ], + "declarations": [ + { + "constant": false, + "id": 2405, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2420, + "src": "5095:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5095:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2404, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5095:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2411, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 2409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5134:1:1", + "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" + } + ], + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5120:13:1", + "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": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5124:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2407, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5124:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5120:16:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5095:41:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2412, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2405, + "src": "5147:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2414, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5153:1:1", + "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": "5147:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2415, + "name": "_item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2395, + "src": "5158:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5147:16:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2417, + "nodeType": "ExpressionStatement", + "src": "5147:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2418, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2405, + "src": "5181:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2400, + "id": 2419, + "nodeType": "Return", + "src": "5174:12:1" + } + ] + }, + "documentation": { + "id": 2393, + "nodeType": "StructuredDocumentation", + "src": "4852:146:1", + "text": " @dev creates a new array containing a single item\n @param _item item\n @return initial array" + }, + "id": 2421, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getInitialArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2395, + "mutability": "mutable", + "name": "_item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2421, + "src": "5029:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5029:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5028:15:1" + }, + "returnParameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2421, + "src": "5066:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2397, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5066:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2398, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5066:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5065:18:1" + }, + "scope": 2532, + "src": "5004:190:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2485, + "nodeType": "Block", + "src": "5560:247:1", + "statements": [ + { + "assignments": [ + 2439 + ], + "declarations": [ + { + "constant": false, + "id": 2439, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2485, + "src": "5571:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5571:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2438, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5571:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2448, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5610:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2444, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5614:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5614:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5610:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "5596:13:1", + "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": 2440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5600:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2441, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5600:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5596:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5571:57:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2449, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5639:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2451, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5645:1:1", + "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": "5639:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2452, + "name": "_item0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "5650:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5639:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2454, + "nodeType": "ExpressionStatement", + "src": "5639:17:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2455, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5667:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2457, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 2456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5673:1:1", + "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": "5667:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2458, + "name": "_item1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2426, + "src": "5678:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5667:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "5667:17:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2472, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5752:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2476, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 2473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5758:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 2474, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5762:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5758:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5752:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2477, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5767:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2479, + "indexExpression": { + "argumentTypes": null, + "id": 2478, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5774:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5767:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5752:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2481, + "nodeType": "ExpressionStatement", + "src": "5752:24:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2465, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5715:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2466, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2429, + "src": "5719:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5719:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5715:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2482, + "initializationExpression": { + "assignments": [ + 2462 + ], + "declarations": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2482, + "src": "5700:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5700:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2464, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5712:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5700:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5734:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2469, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2462, + "src": "5734:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2471, + "nodeType": "ExpressionStatement", + "src": "5734:3:1" + }, + "nodeType": "ForStatement", + "src": "5695:81:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2483, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2439, + "src": "5794:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2434, + "id": 2484, + "nodeType": "Return", + "src": "5787:12:1" + } + ] + }, + "documentation": { + "id": 2422, + "nodeType": "StructuredDocumentation", + "src": "5202:229:1", + "text": " @dev prepends two items to the beginning of an array\n @param _item0 first item\n @param _item1 second item\n @param _array initial array\n @return extended array" + }, + "id": 2486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getExtendedArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2430, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2424, + "mutability": "mutable", + "name": "_item0", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5463:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2423, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5463:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "_item1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5479:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5479:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2429, + "mutability": "mutable", + "name": "_array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5495:23:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5495:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2428, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5495:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5462:57:1" + }, + "returnParameters": { + "id": 2434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2433, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2486, + "src": "5542:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2431, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5542:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2432, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5542:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5541:18:1" + }, + "scope": 2532, + "src": "5437:370:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 2530, + "nodeType": "Block", + "src": "6112:171:1", + "statements": [ + { + "assignments": [ + 2502 + ], + "declarations": [ + { + "constant": false, + "id": 2502, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2530, + "src": "6123:22:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2500, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6123:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2501, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6123:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2508, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2506, + "name": "_length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2492, + "src": "6162:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "6148:13:1", + "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": 2503, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6152:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2504, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6152:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 2507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6148:22:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6123:47:1" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 2525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2519, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2502, + "src": "6232:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2521, + "indexExpression": { + "argumentTypes": null, + "id": 2520, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6238:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6232:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2522, + "name": "_array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2490, + "src": "6243:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 2524, + "indexExpression": { + "argumentTypes": null, + "id": 2523, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6250:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6243:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6232:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2526, + "nodeType": "ExpressionStatement", + "src": "6232:20:1" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2513, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6201:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 2514, + "name": "_length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2492, + "src": "6205:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6201:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2527, + "initializationExpression": { + "assignments": [ + 2510 + ], + "declarations": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2527, + "src": "6186:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2509, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 2512, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 2511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6198:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6186:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6214:3:1", + "subExpression": { + "argumentTypes": null, + "id": 2516, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2510, + "src": "6214:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2518, + "nodeType": "ExpressionStatement", + "src": "6214:3:1" + }, + "nodeType": "ForStatement", + "src": "6181:71:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 2528, + "name": "array", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2502, + "src": "6270:5:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2497, + "id": 2529, + "nodeType": "Return", + "src": "6263:12:1" + } + ] + }, + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "5815:184:1", + "text": " @dev extracts the prefix of a given array\n @param _array given array\n @param _length prefix length\n @return partial array" + }, + "id": 2531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPartialArray", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "_array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6030:23:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6030:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2489, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6030:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "_length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6055:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6055:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6029:42:1" + }, + "returnParameters": { + "id": 2497, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2496, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "6094:16:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6094:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2495, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6094:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6093:18:1" + }, + "scope": 2532, + "src": "6005:278:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 2533, + "src": "614:5672:1" + } + ], + "src": "52:6236:1" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xf374d7B507767101a4bf3bA2a6B99AC737A44f6d", + "transactionHash": "0xfd01cc35dbe92ce4e385469a6034518ac7f5e8df1e39f8f58dcbc8082ded1045" + }, + "8995": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xf374d7B507767101a4bf3bA2a6B99AC737A44f6d", + "transactionHash": "0xfd01cc35dbe92ce4e385469a6034518ac7f5e8df1e39f8f58dcbc8082ded1045" + }, + "1604964387852": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x7F6dBD0D9f13EFBcF08FA7817cD6fACc68Fa2C49", + "transactionHash": "0x5c4a650021d6de7c3eb23bbeaed1a00c142e260e34108a499b9ba22aa25f5427" + }, + "1604964469407": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x89C7f9CB53F25405f7e98003E57C9f2A8b1a22B8", + "transactionHash": "0xe38b4943db6d6aefb250565743f7de101363bb9068fd2bf94e98c322ed568e2f" + }, + "1604965528035": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x7B34ee7EdE799854048b95433f5CB3fA4B82021E", + "transactionHash": "0x443ea5a694d1e7521a2b78711d8888e28f462b928d7237bb544fe92bdc3fba35" + }, + "1604965645554": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xa48Af9b8Fab73981F42BA65a33d6921EFee26753", + "transactionHash": "0x00585976e5e977df22b8061d10ec49eb9b5e898265c4c24442a612a6b7e9d1a5" + }, + "1604965679541": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x240cba6227Eb9c095a0f2161501d1BA090E9a7d2", + "transactionHash": "0x872281b0c43b09524e3ae6872560decf9d106cbf071aa4e72ca1175abdcb93b2" + }, + "1604965719492": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xd4Db57f3Af510F96bE3574EC2A4F70ED3022AC97", + "transactionHash": "0x57e43c279f5fab7e679e4c44fc9c6cb797477e31158d3b19de6e9c5cebe1ad6c" + }, + "1604965760834": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x63D123a3f926fa743008e41eC08Be37EFA28ec23", + "transactionHash": "0x6b2f52af7972b5c3dde1420abe6aacd2b30cde4157bdcb4ff93f503ef5f66c69" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:41.879Z", + "networkType": "ethereum", + "devdoc": { + "details": "The ConversionPathFinder contract allows generating a conversion path between any token pair in the Bancor Network. The path can then be used in various functions in the BancorNetwork contract. See the BancorNetwork contract for conversion path format.", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new ConversionPathFinder instance", + "params": { + "_registry": "address of a contract registry contract" + } + }, + "findPath(address,address)": { + "details": "generates a conversion path between a given pair of tokens in the Bancor Network", + "params": { + "_sourceToken": "address of the source token", + "_targetToken": "address of the target token" + }, + "returns": { + "_0": "a path from the source token to the target token" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setAnchorToken(address)": { + "details": "updates the anchor token", + "params": { + "_anchorToken": "address of the anchor token" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterBase.json b/apps/cic-eth/tests/testdata/bancor/ConverterBase.json new file mode 100644 index 00000000..6c6a3c8d --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterBase.json @@ -0,0 +1,28012 @@ +{ + "contractName": "ConverterBase", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"ConverterBase The converter contains the main logic for conversions between different ERC20 tokens. It is also the upgradable part of the mechanism (note that upgrades are opt-in). The anchor must be set on construction and cannot be changed afterwards. Wrappers are provided for some of the anchor's functions, for easier access. Once the converter accepts ownership of the anchor, it becomes the anchor's sole controller and can execute any of its functions. To upgrade the converter, anchor ownership must be transferred to a new converter, along with any relevant data. Note that the converter can transfer anchor ownership to a new converter that doesn't allow upgrades anymore, for finalizing the relationship between the converter and the anchor. Converter types (defined as uint16 type) - 0 = liquid token converter 1 = liquidity pool v1 converter 2 = liquidity pool v2 converter Note that converters don't currently support tokens with transfer fees.\",\"events\":{\"Activation(uint16,address,bool)\":{\"details\":\"triggered when the converter is activated\",\"params\":{\"_activated\":\"true if the converter was activated, false if it was deactivated\",\"_anchor\":\"converter anchor\",\"_type\":\"converter type\"}},\"Conversion(address,address,address,uint256,uint256,int256)\":{\"details\":\"triggered when a conversion between two tokens occurs\",\"params\":{\"_amount\":\"amount converted, in the source token\",\"_conversionFee\":\"conversion fee\",\"_fromToken\":\"source ERC20 token\",\"_return\":\"amount returned, minus conversion fee\",\"_toToken\":\"target ERC20 token\",\"_trader\":\"wallet that initiated the trade\"}},\"ConversionFeeUpdate(uint32,uint32)\":{\"details\":\"triggered when the conversion fee is updated\",\"params\":{\"_newFee\":\"new fee percentage, represented in ppm\",\"_prevFee\":\"previous fee percentage, represented in ppm\"}},\"TokenRateUpdate(address,address,uint256,uint256)\":{\"details\":\"triggered when the rate between two tokens in the converter changes note that the event might be dispatched for rate updates between any two tokens in the converter note that prior to version 28, you should use the 'PriceDataUpdate' event instead\",\"params\":{\"_rateD\":\"rate of 1 unit of `_token1` in `_token2` (denominator)\",\"_rateN\":\"rate of 1 unit of `_token1` in `_token2` (numerator)\",\"_token1\":\"address of the first token\",\"_token2\":\"address of the second token\"}}},\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer most converters are also activated as soon as they accept the anchor ownership can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"constructor\":{\"details\":\"used by sub-contracts to initialize a new converter\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\"}},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"stateVariables\":{\"version\":{\"details\":\"version number\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":\"ConverterBase\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IConverter.sol\";\r\nimport \"./interfaces/IConverterAnchor.sol\";\r\nimport \"./interfaces/IConverterUpgrader.sol\";\r\nimport \"./interfaces/IBancorFormula.sol\";\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"../utility/ReentrancyGuard.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\nimport \"../utility/TokenHandler.sol\";\r\nimport \"../utility/TokenHolder.sol\";\r\nimport \"../token/interfaces/IEtherToken.sol\";\r\nimport \"../bancorx/interfaces/IBancorX.sol\";\r\n\r\n/**\r\n * @dev ConverterBase\r\n *\r\n * The converter contains the main logic for conversions between different ERC20 tokens.\r\n *\r\n * It is also the upgradable part of the mechanism (note that upgrades are opt-in).\r\n *\r\n * The anchor must be set on construction and cannot be changed afterwards.\r\n * Wrappers are provided for some of the anchor's functions, for easier access.\r\n *\r\n * Once the converter accepts ownership of the anchor, it becomes the anchor's sole controller\r\n * and can execute any of its functions.\r\n *\r\n * To upgrade the converter, anchor ownership must be transferred to a new converter, along with\r\n * any relevant data.\r\n *\r\n * Note that the converter can transfer anchor ownership to a new converter that\r\n * doesn't allow upgrades anymore, for finalizing the relationship between the converter\r\n * and the anchor.\r\n *\r\n * Converter types (defined as uint16 type) -\r\n * 0 = liquid token converter\r\n * 1 = liquidity pool v1 converter\r\n * 2 = liquidity pool v2 converter\r\n *\r\n * Note that converters don't currently support tokens with transfer fees.\r\n*/\r\nabstract contract ConverterBase is IConverter, TokenHandler, TokenHolder, ContractRegistryClient, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n uint32 internal constant PPM_RESOLUTION = 1000000;\r\n IERC20Token internal constant ETH_RESERVE_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n\r\n struct Reserve {\r\n uint256 balance; // reserve balance\r\n uint32 weight; // reserve weight, represented in ppm, 1-1000000\r\n bool deprecated1; // deprecated\r\n bool deprecated2; // deprecated\r\n bool isSet; // true if the reserve is valid, false otherwise\r\n }\r\n\r\n /**\r\n * @dev version number\r\n */\r\n uint16 public constant version = 39;\r\n\r\n IConverterAnchor public override anchor; // converter anchor contract\r\n IWhitelist public override conversionWhitelist; // whitelist contract with list of addresses that are allowed to use the converter\r\n IERC20Token[] public reserveTokens; // ERC20 standard token addresses (prior version 17, use 'connectorTokens' instead)\r\n mapping (IERC20Token => Reserve) public reserves; // reserve token addresses -> reserve data (prior version 17, use 'connectors' instead)\r\n uint32 public reserveRatio = 0; // ratio between the reserves and the market cap, equal to the total reserve weights\r\n uint32 public override maxConversionFee = 0; // maximum conversion fee for the lifetime of the contract,\r\n // represented in ppm, 0...1000000 (0 = no fee, 100 = 0.01%, 1000000 = 100%)\r\n uint32 public override conversionFee = 0; // current conversion fee, represented in ppm, 0...maxConversionFee\r\n bool public constant conversionsEnabled = true; // deprecated, backward compatibility\r\n\r\n /**\r\n * @dev triggered when the converter is activated\r\n *\r\n * @param _type converter type\r\n * @param _anchor converter anchor\r\n * @param _activated true if the converter was activated, false if it was deactivated\r\n */\r\n event Activation(uint16 indexed _type, IConverterAnchor indexed _anchor, bool indexed _activated);\r\n\r\n /**\r\n * @dev triggered when a conversion between two tokens occurs\r\n *\r\n * @param _fromToken source ERC20 token\r\n * @param _toToken target ERC20 token\r\n * @param _trader wallet that initiated the trade\r\n * @param _amount amount converted, in the source token\r\n * @param _return amount returned, minus conversion fee\r\n * @param _conversionFee conversion fee\r\n */\r\n event Conversion(\r\n IERC20Token indexed _fromToken,\r\n IERC20Token indexed _toToken,\r\n address indexed _trader,\r\n uint256 _amount,\r\n uint256 _return,\r\n int256 _conversionFee\r\n );\r\n\r\n /**\r\n * @dev triggered when the rate between two tokens in the converter changes\r\n * note that the event might be dispatched for rate updates between any two tokens in the converter\r\n * note that prior to version 28, you should use the 'PriceDataUpdate' event instead\r\n *\r\n * @param _token1 address of the first token\r\n * @param _token2 address of the second token\r\n * @param _rateN rate of 1 unit of `_token1` in `_token2` (numerator)\r\n * @param _rateD rate of 1 unit of `_token1` in `_token2` (denominator)\r\n */\r\n event TokenRateUpdate(\r\n IERC20Token indexed _token1,\r\n IERC20Token indexed _token2,\r\n uint256 _rateN,\r\n uint256 _rateD\r\n );\r\n\r\n /**\r\n * @dev triggered when the conversion fee is updated\r\n *\r\n * @param _prevFee previous fee percentage, represented in ppm\r\n * @param _newFee new fee percentage, represented in ppm\r\n */\r\n event ConversionFeeUpdate(uint32 _prevFee, uint32 _newFee);\r\n\r\n /**\r\n * @dev used by sub-contracts to initialize a new converter\r\n *\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n */\r\n constructor(\r\n IConverterAnchor _anchor,\r\n IContractRegistry _registry,\r\n uint32 _maxConversionFee\r\n )\r\n validAddress(address(_anchor))\r\n ContractRegistryClient(_registry)\r\n internal\r\n validConversionFee(_maxConversionFee)\r\n {\r\n anchor = _anchor;\r\n maxConversionFee = _maxConversionFee;\r\n }\r\n\r\n // ensures that the converter is active\r\n modifier active() {\r\n _active();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _active() internal view {\r\n require(isActive(), \"ERR_INACTIVE\");\r\n }\r\n\r\n // ensures that the converter is not active\r\n modifier inactive() {\r\n _inactive();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _inactive() internal view {\r\n require(!isActive(), \"ERR_ACTIVE\");\r\n }\r\n\r\n // validates a reserve token address - verifies that the address belongs to one of the reserve tokens\r\n modifier validReserve(IERC20Token _address) {\r\n _validReserve(_address);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validReserve(IERC20Token _address) internal view {\r\n require(reserves[_address].isSet, \"ERR_INVALID_RESERVE\");\r\n }\r\n\r\n // validates conversion fee\r\n modifier validConversionFee(uint32 _conversionFee) {\r\n _validConversionFee(_conversionFee);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validConversionFee(uint32 _conversionFee) internal pure {\r\n require(_conversionFee <= PPM_RESOLUTION, \"ERR_INVALID_CONVERSION_FEE\");\r\n }\r\n\r\n // validates reserve weight\r\n modifier validReserveWeight(uint32 _weight) {\r\n _validReserveWeight(_weight);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validReserveWeight(uint32 _weight) internal pure {\r\n require(_weight > 0 && _weight <= PPM_RESOLUTION, \"ERR_INVALID_RESERVE_WEIGHT\");\r\n }\r\n\r\n // overrides interface declaration\r\n function converterType() public pure virtual override returns (uint16);\r\n\r\n // overrides interface declaration\r\n function targetAmountAndFee(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount)\r\n public\r\n view\r\n virtual\r\n override\r\n returns (uint256, uint256);\r\n\r\n /**\r\n * @dev deposits ether\r\n * can only be called if the converter has an ETH reserve\r\n */\r\n receive() external override payable {\r\n require(reserves[ETH_RESERVE_ADDRESS].isSet, \"ERR_INVALID_RESERVE\"); // require(hasETHReserve(), \"ERR_INVALID_RESERVE\");\r\n // a workaround for a problem when running solidity-coverage\r\n // see https://github.com/sc-forks/solidity-coverage/issues/487\r\n }\r\n\r\n /**\r\n * @dev withdraws ether\r\n * can only be called by the owner if the converter is inactive or by upgrader contract\r\n * can only be called after the upgrader contract has accepted the ownership of this contract\r\n * can only be called if the converter has an ETH reserve\r\n *\r\n * @param _to address to send the ETH to\r\n */\r\n function withdrawETH(address payable _to)\r\n public\r\n override\r\n protected\r\n ownerOnly\r\n validReserve(ETH_RESERVE_ADDRESS)\r\n {\r\n address converterUpgrader = addressOf(CONVERTER_UPGRADER);\r\n\r\n // verify that the converter is inactive or that the owner is the upgrader contract\r\n require(!isActive() || owner == converterUpgrader, \"ERR_ACCESS_DENIED\");\r\n _to.transfer(address(this).balance);\r\n\r\n // sync the ETH reserve balance\r\n syncReserveBalance(ETH_RESERVE_ADDRESS);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not the converter version is 28 or higher\r\n *\r\n * @return true, since the converter version is 28 or higher\r\n */\r\n function isV28OrHigher() public pure returns (bool) {\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to update & enable the conversion whitelist contract address\r\n * when set, only addresses that are whitelisted are actually allowed to use the converter\r\n * note that the whitelist check is actually done by the BancorNetwork contract\r\n *\r\n * @param _whitelist address of a whitelist contract\r\n */\r\n function setConversionWhitelist(IWhitelist _whitelist)\r\n public\r\n override\r\n ownerOnly\r\n notThis(address(_whitelist))\r\n {\r\n conversionWhitelist = _whitelist;\r\n }\r\n\r\n /**\r\n * @dev returns true if the converter is active, false otherwise\r\n *\r\n * @return true if the converter is active, false otherwise\r\n */\r\n function isActive() public view virtual override returns (bool) {\r\n return anchor.owner() == address(this);\r\n }\r\n\r\n /**\r\n * @dev transfers the anchor ownership\r\n * the new owner needs to accept the transfer\r\n * can only be called by the converter upgrder while the upgrader is the owner\r\n * note that prior to version 28, you should use 'transferAnchorOwnership' instead\r\n *\r\n * @param _newOwner new token owner\r\n */\r\n function transferAnchorOwnership(address _newOwner)\r\n public\r\n override\r\n ownerOnly\r\n only(CONVERTER_UPGRADER)\r\n {\r\n anchor.transferOwnership(_newOwner);\r\n }\r\n\r\n /**\r\n * @dev accepts ownership of the anchor after an ownership transfer\r\n * most converters are also activated as soon as they accept the anchor ownership\r\n * can only be called by the contract owner\r\n * note that prior to version 28, you should use 'acceptTokenOwnership' instead\r\n */\r\n function acceptAnchorOwnership() public virtual override ownerOnly {\r\n // verify the the converter has at least one reserve\r\n require(reserveTokenCount() > 0, \"ERR_INVALID_RESERVE_COUNT\");\r\n anchor.acceptOwnership();\r\n syncReserveBalances();\r\n }\r\n\r\n /**\r\n * @dev withdraws tokens held by the anchor and sends them to an account\r\n * can only be called by the owner\r\n *\r\n * @param _token ERC20 token contract address\r\n * @param _to account to receive the new amount\r\n * @param _amount amount to withdraw\r\n */\r\n function withdrawFromAnchor(IERC20Token _token, address _to, uint256 _amount) public ownerOnly {\r\n anchor.withdrawTokens(_token, _to, _amount);\r\n }\r\n\r\n /**\r\n * @dev updates the current conversion fee\r\n * can only be called by the contract owner\r\n *\r\n * @param _conversionFee new conversion fee, represented in ppm\r\n */\r\n function setConversionFee(uint32 _conversionFee) public override ownerOnly {\r\n require(_conversionFee <= maxConversionFee, \"ERR_INVALID_CONVERSION_FEE\");\r\n emit ConversionFeeUpdate(conversionFee, _conversionFee);\r\n conversionFee = _conversionFee;\r\n }\r\n\r\n /**\r\n * @dev withdraws tokens held by the converter and sends them to an account\r\n * can only be called by the owner\r\n * note that reserve tokens can only be withdrawn by the owner while the converter is inactive\r\n * unless the owner is the converter upgrader contract\r\n *\r\n * @param _token ERC20 token contract address\r\n * @param _to account to receive the new amount\r\n * @param _amount amount to withdraw\r\n */\r\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount)\r\n public\r\n override(IConverter, TokenHolder)\r\n protected\r\n ownerOnly\r\n {\r\n address converterUpgrader = addressOf(CONVERTER_UPGRADER);\r\n\r\n // if the token is not a reserve token, allow withdrawal\r\n // otherwise verify that the converter is inactive or that the owner is the upgrader contract\r\n require(!reserves[_token].isSet || !isActive() || owner == converterUpgrader, \"ERR_ACCESS_DENIED\");\r\n super.withdrawTokens(_token, _to, _amount);\r\n\r\n // if the token is a reserve token, sync the reserve balance\r\n if (reserves[_token].isSet)\r\n syncReserveBalance(_token);\r\n }\r\n\r\n /**\r\n * @dev upgrades the converter to the latest version\r\n * can only be called by the owner\r\n * note that the owner needs to call acceptOwnership on the new converter after the upgrade\r\n */\r\n function upgrade() public ownerOnly {\r\n IConverterUpgrader converterUpgrader = IConverterUpgrader(addressOf(CONVERTER_UPGRADER));\r\n\r\n // trigger de-activation event\r\n emit Activation(converterType(), anchor, false);\r\n\r\n transferOwnership(address(converterUpgrader));\r\n converterUpgrader.upgrade(version);\r\n acceptOwnership();\r\n }\r\n\r\n /**\r\n * @dev returns the number of reserve tokens defined\r\n * note that prior to version 17, you should use 'connectorTokenCount' instead\r\n *\r\n * @return number of reserve tokens\r\n */\r\n function reserveTokenCount() public view returns (uint16) {\r\n return uint16(reserveTokens.length);\r\n }\r\n\r\n /**\r\n * @dev defines a new reserve token for the converter\r\n * can only be called by the owner while the converter is inactive\r\n *\r\n * @param _token address of the reserve token\r\n * @param _weight reserve weight, represented in ppm, 1-1000000\r\n */\r\n function addReserve(IERC20Token _token, uint32 _weight)\r\n public\r\n virtual\r\n override\r\n ownerOnly\r\n inactive\r\n validAddress(address(_token))\r\n notThis(address(_token))\r\n validReserveWeight(_weight)\r\n {\r\n // validate input\r\n require(address(_token) != address(anchor) && !reserves[_token].isSet, \"ERR_INVALID_RESERVE\");\r\n require(_weight <= PPM_RESOLUTION - reserveRatio, \"ERR_INVALID_RESERVE_WEIGHT\");\r\n require(reserveTokenCount() < uint16(-1), \"ERR_INVALID_RESERVE_COUNT\");\r\n\r\n Reserve storage newReserve = reserves[_token];\r\n newReserve.balance = 0;\r\n newReserve.weight = _weight;\r\n newReserve.isSet = true;\r\n reserveTokens.push(_token);\r\n reserveRatio += _weight;\r\n }\r\n\r\n /**\r\n * @dev returns the reserve's weight\r\n * added in version 28\r\n *\r\n * @param _reserveToken reserve token contract address\r\n *\r\n * @return reserve weight\r\n */\r\n function reserveWeight(IERC20Token _reserveToken)\r\n public\r\n view\r\n validReserve(_reserveToken)\r\n returns (uint32)\r\n {\r\n return reserves[_reserveToken].weight;\r\n }\r\n\r\n /**\r\n * @dev returns the reserve's balance\r\n * note that prior to version 17, you should use 'getConnectorBalance' instead\r\n *\r\n * @param _reserveToken reserve token contract address\r\n *\r\n * @return reserve balance\r\n */\r\n function reserveBalance(IERC20Token _reserveToken)\r\n public\r\n override\r\n view\r\n validReserve(_reserveToken)\r\n returns (uint256)\r\n {\r\n return reserves[_reserveToken].balance;\r\n }\r\n\r\n /**\r\n * @dev checks whether or not the converter has an ETH reserve\r\n *\r\n * @return true if the converter has an ETH reserve, false otherwise\r\n */\r\n function hasETHReserve() public view returns (bool) {\r\n return reserves[ETH_RESERVE_ADDRESS].isSet;\r\n }\r\n\r\n /**\r\n * @dev converts a specific amount of source tokens to target tokens\r\n * can only be called by the bancor network contract\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _amount amount of tokens to convert (in units of the source token)\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received (in units of the target token)\r\n */\r\n function convert(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, address _trader, address payable _beneficiary)\r\n public\r\n override\r\n payable\r\n protected\r\n only(BANCOR_NETWORK)\r\n returns (uint256)\r\n {\r\n // validate input\r\n require(_sourceToken != _targetToken, \"ERR_SAME_SOURCE_TARGET\");\r\n\r\n // if a whitelist is set, verify that both and trader and the beneficiary are whitelisted\r\n require(address(conversionWhitelist) == address(0) ||\r\n (conversionWhitelist.isWhitelisted(_trader) && conversionWhitelist.isWhitelisted(_beneficiary)),\r\n \"ERR_NOT_WHITELISTED\");\r\n\r\n return doConvert(_sourceToken, _targetToken, _amount, _trader, _beneficiary);\r\n }\r\n\r\n /**\r\n * @dev converts a specific amount of source tokens to target tokens\r\n * called by ConverterBase and allows the inherited contracts to implement custom conversion logic\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _amount amount of tokens to convert (in units of the source token)\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received (in units of the target token)\r\n */\r\n function doConvert(\r\n IERC20Token _sourceToken,\r\n IERC20Token _targetToken,\r\n uint256 _amount,\r\n address _trader,\r\n address payable _beneficiary)\r\n internal\r\n virtual\r\n returns (uint256);\r\n\r\n /**\r\n * @dev returns the conversion fee for a given target amount\r\n *\r\n * @param _targetAmount target amount\r\n *\r\n * @return conversion fee\r\n */\r\n function calculateFee(uint256 _targetAmount) internal view returns (uint256) {\r\n return _targetAmount.mul(conversionFee).div(PPM_RESOLUTION);\r\n }\r\n\r\n /**\r\n * @dev syncs the stored reserve balance for a given reserve with the real reserve balance\r\n *\r\n * @param _reserveToken address of the reserve token\r\n */\r\n function syncReserveBalance(IERC20Token _reserveToken) internal validReserve(_reserveToken) {\r\n if (_reserveToken == ETH_RESERVE_ADDRESS)\r\n reserves[_reserveToken].balance = address(this).balance;\r\n else\r\n reserves[_reserveToken].balance = _reserveToken.balanceOf(address(this));\r\n }\r\n\r\n /**\r\n * @dev syncs all stored reserve balances\r\n */\r\n function syncReserveBalances() internal {\r\n uint256 reserveCount = reserveTokens.length;\r\n for (uint256 i = 0; i < reserveCount; i++)\r\n syncReserveBalance(reserveTokens[i]);\r\n }\r\n\r\n /**\r\n * @dev helper, dispatches the Conversion event\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _amount amount purchased/sold (in the source token)\r\n * @param _returnAmount amount returned (in the target token)\r\n */\r\n function dispatchConversionEvent(\r\n IERC20Token _sourceToken,\r\n IERC20Token _targetToken,\r\n address _trader,\r\n uint256 _amount,\r\n uint256 _returnAmount,\r\n uint256 _feeAmount)\r\n internal\r\n {\r\n // fee amount is converted to 255 bits -\r\n // negative amount means the fee is taken from the source token, positive amount means its taken from the target token\r\n // currently the fee is always taken from the target token\r\n // since we convert it to a signed number, we first ensure that it's capped at 255 bits to prevent overflow\r\n assert(_feeAmount < 2 ** 255);\r\n emit Conversion(_sourceToken, _targetToken, _trader, _amount, _returnAmount, int256(_feeAmount));\r\n }\r\n\r\n /**\r\n * @dev deprecated since version 28, backward compatibility - use only for earlier versions\r\n */\r\n function token() public view override returns (IConverterAnchor) {\r\n return anchor;\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function transferTokenOwnership(address _newOwner) public override ownerOnly {\r\n transferAnchorOwnership(_newOwner);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function acceptTokenOwnership() public override ownerOnly {\r\n acceptAnchorOwnership();\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function connectors(IERC20Token _address) public view override returns (uint256, uint32, bool, bool, bool) {\r\n Reserve memory reserve = reserves[_address];\r\n return(reserve.balance, reserve.weight, false, false, reserve.isSet);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function connectorTokens(uint256 _index) public view override returns (IERC20Token) {\r\n return ConverterBase.reserveTokens[_index];\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function connectorTokenCount() public view override returns (uint16) {\r\n return reserveTokenCount();\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function getConnectorBalance(IERC20Token _connectorToken) public view override returns (uint256) {\r\n return reserveBalance(_connectorToken);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) public view returns (uint256, uint256) {\r\n return targetAmountAndFee(_sourceToken, _targetToken, _amount);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "exportedSymbols": { + "ConverterBase": [ + 10039 + ] + }, + "id": 10040, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8979, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:8" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 8980, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13341, + "src": "77:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./interfaces/IConverterAnchor.sol", + "id": 8981, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13350, + "src": "116:43:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "file": "./interfaces/IConverterUpgrader.sol", + "id": 8982, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13661, + "src": "161:45:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./interfaces/IBancorFormula.sol", + "id": 8983, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13178, + "src": "208:41:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 8984, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 21720, + "src": "251:47:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 8985, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22243, + "src": "300:40:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 8986, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22355, + "src": "342:33:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 8987, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22527, + "src": "377:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 8988, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22576, + "src": "416:36:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "../token/interfaces/IEtherToken.sol", + "id": 8989, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 21154, + "src": "454:45:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "../bancorx/interfaces/IBancorX.sol", + "id": 8990, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 3552, + "src": "501:44:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8992, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1683:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 8993, + "nodeType": "InheritanceSpecifier", + "src": "1683:10:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8994, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "1695:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 8995, + "nodeType": "InheritanceSpecifier", + "src": "1695:12:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8996, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1709:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 8997, + "nodeType": "InheritanceSpecifier", + "src": "1709:11:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8998, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1722:22:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 8999, + "nodeType": "InheritanceSpecifier", + "src": "1722:22:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 9000, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "1746:15:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 9001, + "nodeType": "InheritanceSpecifier", + "src": "1746:15:8" + } + ], + "contractDependencies": [ + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 8991, + "nodeType": "StructuredDocumentation", + "src": "549:1097:8", + "text": " @dev ConverterBase\n The converter contains the main logic for conversions between different ERC20 tokens.\n It is also the upgradable part of the mechanism (note that upgrades are opt-in).\n The anchor must be set on construction and cannot be changed afterwards.\n Wrappers are provided for some of the anchor's functions, for easier access.\n Once the converter accepts ownership of the anchor, it becomes the anchor's sole controller\n and can execute any of its functions.\n To upgrade the converter, anchor ownership must be transferred to a new converter, along with\n any relevant data.\n Note that the converter can transfer anchor ownership to a new converter that\n doesn't allow upgrades anymore, for finalizing the relationship between the converter\n and the anchor.\n Converter types (defined as uint16 type) -\n 0 = liquid token converter\n 1 = liquidity pool v1 converter\n 2 = liquidity pool v2 converter\n Note that converters don't currently support tokens with transfer fees." + }, + "fullyImplemented": false, + "id": 10039, + "linearizedBaseContracts": [ + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "ConverterBase", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 9004, + "libraryName": { + "contractScope": null, + "id": 9002, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "1775:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1769:27:8", + "typeName": { + "id": 9003, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1788:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 9007, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "1804:49:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9005, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1804:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 9006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1846:7:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 9012, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "1860:107:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9008, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1860:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 9010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1924:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 9009, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1912:11:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 9011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1912:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "internal" + }, + { + "canonicalName": "ConverterBase.Reserve", + "id": 9023, + "members": [ + { + "constant": false, + "id": 9014, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2002:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2002:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9016, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2050:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9015, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2050:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9018, + "mutability": "mutable", + "name": "deprecated1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2128:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9017, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9020, + "mutability": "mutable", + "name": "deprecated2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2171:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2171:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9022, + "mutability": "mutable", + "name": "isSet", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2214:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9021, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2214:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Reserve", + "nodeType": "StructDefinition", + "scope": 10039, + "src": "1976:313:8", + "visibility": "public" + }, + { + "constant": true, + "documentation": { + "id": 9024, + "nodeType": "StructuredDocumentation", + "src": "2297:40:8", + "text": " @dev version number" + }, + "functionSelector": "54fd4d50", + "id": 9027, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2343:35:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9025, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2343:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3339", + "id": 9026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2376:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13195 + ], + "constant": false, + "functionSelector": "d3fb73b4", + "id": 9030, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9029, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2411:8:8" + }, + "scope": 10039, + "src": "2387:39:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9028, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2387:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 13233 + ], + "constant": false, + "functionSelector": "c45d3d92", + "id": 9033, + "mutability": "mutable", + "name": "conversionWhitelist", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9032, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2491:8:8" + }, + "scope": 10039, + "src": "2473:46:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 9031, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "2473:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d031370b", + "id": 9036, + "mutability": "mutable", + "name": "reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2613:34:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 9034, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2613:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 9035, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2613:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d66bd524", + "id": 9040, + "mutability": "mutable", + "name": "reserves", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2754:48:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve)" + }, + "typeName": { + "id": 9039, + "keyType": { + "contractScope": null, + "id": 9037, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2763:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2754:32:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve)" + }, + "valueType": { + "contractScope": null, + "id": 9038, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "2778:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0c7d5cd8", + "id": 9043, + "mutability": "mutable", + "name": "reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2899:30:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9041, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2899:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13243 + ], + "constant": false, + "functionSelector": "94c275ad", + "id": 9047, + "mutability": "mutable", + "name": "maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9045, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3055:8:8" + }, + "scope": 10039, + "src": "3041:43:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9044, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3041:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3083:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13238 + ], + "constant": false, + "functionSelector": "579cd3ca", + "id": 9051, + "mutability": "mutable", + "name": "conversionFee", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9049, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3306:8:8" + }, + "scope": 10039, + "src": "3292:40:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9048, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3292:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3331:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "bf754558", + "id": 9054, + "mutability": "constant", + "name": "conversionsEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "3417:46:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9052, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3417:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3459:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 9055, + "nodeType": "StructuredDocumentation", + "src": "3514:260:8", + "text": " @dev triggered when the converter is activated\n @param _type converter type\n @param _anchor converter anchor\n @param _activated true if the converter was activated, false if it was deactivated" + }, + "id": 9063, + "name": "Activation", + "nodeType": "EventDefinition", + "parameters": { + "id": 9062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9057, + "indexed": true, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3797:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9056, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3797:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9059, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3819:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9058, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3819:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9061, + "indexed": true, + "mutability": "mutable", + "name": "_activated", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3853:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9060, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3853:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3796:81:8" + }, + "src": "3780:98:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9064, + "nodeType": "StructuredDocumentation", + "src": "3886:447:8", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _trader wallet that initiated the trade\n @param _amount amount converted, in the source token\n @param _return amount returned, minus conversion fee\n @param _conversionFee conversion fee" + }, + "id": 9078, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 9077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9066, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4366:30:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9065, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4366:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9068, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4407:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9067, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4407:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9070, + "indexed": true, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4446:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9069, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4446:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9072, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4480:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4480:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9074, + "indexed": false, + "mutability": "mutable", + "name": "_return", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4506:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4506:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9076, + "indexed": false, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4532:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 9075, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "4532:6:8", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4355:205:8" + }, + "src": "4339:222:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9079, + "nodeType": "StructuredDocumentation", + "src": "4569:562:8", + "text": " @dev triggered when the rate between two tokens in the converter changes\n note that the event might be dispatched for rate updates between any two tokens in the converter\n note that prior to version 28, you should use the 'PriceDataUpdate' event instead\n @param _token1 address of the first token\n @param _token2 address of the second token\n @param _rateN rate of 1 unit of `_token1` in `_token2` (numerator)\n @param _rateD rate of 1 unit of `_token1` in `_token2` (denominator)" + }, + "id": 9089, + "name": "TokenRateUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 9088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9081, + "indexed": true, + "mutability": "mutable", + "name": "_token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5169:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9080, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5169:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9083, + "indexed": true, + "mutability": "mutable", + "name": "_token2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5207:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9082, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5207:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9085, + "indexed": false, + "mutability": "mutable", + "name": "_rateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5245:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5245:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9087, + "indexed": false, + "mutability": "mutable", + "name": "_rateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5270:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5158:133:8" + }, + "src": "5137:155:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9090, + "nodeType": "StructuredDocumentation", + "src": "5300:220:8", + "text": " @dev triggered when the conversion fee is updated\n @param _prevFee previous fee percentage, represented in ppm\n @param _newFee new fee percentage, represented in ppm" + }, + "id": 9096, + "name": "ConversionFeeUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 9095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9092, + "indexed": false, + "mutability": "mutable", + "name": "_prevFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9096, + "src": "5552:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9091, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5552:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9094, + "indexed": false, + "mutability": "mutable", + "name": "_newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9096, + "src": "5569:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9093, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5569:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5551:33:8" + }, + "src": "5526:59:8" + }, + { + "body": { + "id": 9126, + "nodeType": "Block", + "src": "6192:82:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9118, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "6203:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9119, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9099, + "src": "6212:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "6203:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9121, + "nodeType": "ExpressionStatement", + "src": "6203:16:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9122, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9047, + "src": "6230:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9123, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9103, + "src": "6249:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "6230:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9125, + "nodeType": "ExpressionStatement", + "src": "6230:36:8" + } + ] + }, + "documentation": { + "id": 9097, + "nodeType": "StructuredDocumentation", + "src": "5593:313:8", + "text": " @dev used by sub-contracts to initialize a new converter\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 9127, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9108, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9099, + "src": "6069:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 9107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6061:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6061:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6061:16:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9110, + "modifierName": { + "argumentTypes": null, + "id": 9105, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "6048:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6048:30:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9112, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9101, + "src": "6111:9:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 9113, + "modifierName": { + "argumentTypes": null, + "id": 9111, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "6088:22:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6088:33:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9115, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9103, + "src": "6168:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 9116, + "modifierName": { + "argumentTypes": null, + "id": 9114, + "name": "validConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9196, + "src": "6149:18:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint32_$", + "typeString": "modifier (uint32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6149:37:8" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9099, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "5934:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9098, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "5934:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9101, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "5969:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 9100, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "5969:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9103, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "6007:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9102, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "6007:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:115:8" + }, + "returnParameters": { + "id": 9117, + "nodeType": "ParameterList", + "parameters": [], + "src": "6192:0:8" + }, + "scope": 10039, + "src": "5912:362:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9133, + "nodeType": "Block", + "src": "6345:40:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9129, + "name": "_active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9144, + "src": "6356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 9130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6356:9:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9131, + "nodeType": "ExpressionStatement", + "src": "6356:9:8" + }, + { + "id": 9132, + "nodeType": "PlaceholderStatement", + "src": "6376:1:8" + } + ] + }, + "documentation": null, + "id": 9134, + "name": "active", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9128, + "nodeType": "ParameterList", + "parameters": [], + "src": "6342:2:8" + }, + "src": "6327:58:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9143, + "nodeType": "Block", + "src": "6473:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9138, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "6492:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6492:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e414354495645", + "id": 9140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6504:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a22dd8039fb80c8642cf17389b806c873aa9fbdbf3f2bd8746d8ce373ef50f9e", + "typeString": "literal_string \"ERR_INACTIVE\"" + }, + "value": "ERR_INACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a22dd8039fb80c8642cf17389b806c873aa9fbdbf3f2bd8746d8ce373ef50f9e", + "typeString": "literal_string \"ERR_INACTIVE\"" + } + ], + "id": 9137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6484:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6484:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9142, + "nodeType": "ExpressionStatement", + "src": "6484:35:8" + } + ] + }, + "documentation": null, + "id": 9144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_active", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9135, + "nodeType": "ParameterList", + "parameters": [], + "src": "6456:2:8" + }, + "returnParameters": { + "id": 9136, + "nodeType": "ParameterList", + "parameters": [], + "src": "6473:0:8" + }, + "scope": 10039, + "src": "6440:87:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9150, + "nodeType": "Block", + "src": "6604:42:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9146, + "name": "_inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9162, + "src": "6615:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 9147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6615:11:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9148, + "nodeType": "ExpressionStatement", + "src": "6615:11:8" + }, + { + "id": 9149, + "nodeType": "PlaceholderStatement", + "src": "6637:1:8" + } + ] + }, + "documentation": null, + "id": 9151, + "name": "inactive", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9145, + "nodeType": "ParameterList", + "parameters": [], + "src": "6601:2:8" + }, + "src": "6584:62:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9161, + "nodeType": "Block", + "src": "6736:53:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6755:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9155, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "6756:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6756:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414354495645", + "id": 9158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6768:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_181d3d32638945611c2cb46b623de141c5e74a32dcd850864f64837aa849ee3f", + "typeString": "literal_string \"ERR_ACTIVE\"" + }, + "value": "ERR_ACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_181d3d32638945611c2cb46b623de141c5e74a32dcd850864f64837aa849ee3f", + "typeString": "literal_string \"ERR_ACTIVE\"" + } + ], + "id": 9154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6747:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6747:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9160, + "nodeType": "ExpressionStatement", + "src": "6747:34:8" + } + ] + }, + "documentation": null, + "id": 9162, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_inactive", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9152, + "nodeType": "ParameterList", + "parameters": [], + "src": "6719:2:8" + }, + "returnParameters": { + "id": 9153, + "nodeType": "ParameterList", + "parameters": [], + "src": "6736:0:8" + }, + "scope": 10039, + "src": "6701:88:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9171, + "nodeType": "Block", + "src": "6948:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9167, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9164, + "src": "6973:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9166, + "name": "_validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9186, + "src": "6959:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token) view" + } + }, + "id": 9168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6959:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9169, + "nodeType": "ExpressionStatement", + "src": "6959:23:8" + }, + { + "id": 9170, + "nodeType": "PlaceholderStatement", + "src": "6993:1:8" + } + ] + }, + "documentation": null, + "id": 9172, + "name": "validReserve", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9165, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9164, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9172, + "src": "6926:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9163, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6926:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6925:22:8" + }, + "src": "6904:98:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9185, + "nodeType": "Block", + "src": "7116:75:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9178, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "7135:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9180, + "indexExpression": { + "argumentTypes": null, + "id": 9179, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9174, + "src": "7144:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7135:18:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "7135:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7161:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9177, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7127:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7127:56:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9184, + "nodeType": "ExpressionStatement", + "src": "7127:56:8" + } + ] + }, + "documentation": null, + "id": 9186, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9174, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9186, + "src": "7080:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9173, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7080:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7079:22:8" + }, + "returnParameters": { + "id": 9176, + "nodeType": "ParameterList", + "parameters": [], + "src": "7116:0:8" + }, + "scope": 10039, + "src": "7057:134:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9195, + "nodeType": "Block", + "src": "7283:66:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9191, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9188, + "src": "7314:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9190, + "name": "_validConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9209, + "src": "7294:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint32_$returns$__$", + "typeString": "function (uint32) pure" + } + }, + "id": 9192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7294:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9193, + "nodeType": "ExpressionStatement", + "src": "7294:35:8" + }, + { + "id": 9194, + "nodeType": "PlaceholderStatement", + "src": "7340:1:8" + } + ] + }, + "documentation": null, + "id": 9196, + "name": "validConversionFee", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9188, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9196, + "src": "7260:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9187, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7260:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7259:23:8" + }, + "src": "7232:117:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9208, + "nodeType": "Block", + "src": "7470:90:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9202, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9198, + "src": "7489:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9203, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7507:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7489:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e56455253494f4e5f464545", + "id": 9205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7523:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + }, + "value": "ERR_INVALID_CONVERSION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + } + ], + "id": 9201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7481:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7481:71:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9207, + "nodeType": "ExpressionStatement", + "src": "7481:71:8" + } + ] + }, + "documentation": null, + "id": 9209, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9198, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9209, + "src": "7433:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9197, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7433:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7432:23:8" + }, + "returnParameters": { + "id": 9200, + "nodeType": "ParameterList", + "parameters": [], + "src": "7470:0:8" + }, + "scope": 10039, + "src": "7404:156:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9218, + "nodeType": "Block", + "src": "7645:59:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9214, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9211, + "src": "7676:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9213, + "name": "_validReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9236, + "src": "7656:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint32_$returns$__$", + "typeString": "function (uint32) pure" + } + }, + "id": 9215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7656:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9216, + "nodeType": "ExpressionStatement", + "src": "7656:28:8" + }, + { + "id": 9217, + "nodeType": "PlaceholderStatement", + "src": "7695:1:8" + } + ] + }, + "documentation": null, + "id": 9219, + "name": "validReserveWeight", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9211, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9219, + "src": "7629:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9210, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7629:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7628:16:8" + }, + "src": "7601:103:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9235, + "nodeType": "Block", + "src": "7818:98:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9225, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9221, + "src": "7837:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 9226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7847:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7837:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9228, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9221, + "src": "7852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9229, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7863:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7852:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7837:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 9232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7879:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 9224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7829:79:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9234, + "nodeType": "ExpressionStatement", + "src": "7829:79:8" + } + ] + }, + "documentation": null, + "id": 9236, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9221, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9236, + "src": "7788:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9220, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7788:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7787:16:8" + }, + "returnParameters": { + "id": 9223, + "nodeType": "ParameterList", + "parameters": [], + "src": "7818:0:8" + }, + "scope": 10039, + "src": "7759:157:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 13190 + ], + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 9242, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8009:8:8" + }, + "parameters": { + "id": 9237, + "nodeType": "ParameterList", + "parameters": [], + "src": "7986:2:8" + }, + "returnParameters": { + "id": 9241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9242, + "src": "8027:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9239, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8027:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8026:8:8" + }, + "scope": 10039, + "src": "7964:71:8", + "stateMutability": "pure", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13213 + ], + "body": null, + "documentation": null, + "functionSelector": "af94b8d8", + "id": 9256, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9250, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8236:8:8" + }, + "parameters": { + "id": 9249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9244, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8111:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9243, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8111:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9246, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8137:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9245, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8137:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9248, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8163:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8163:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8110:69:8" + }, + "returnParameters": { + "id": 9255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9252, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8263:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8263:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9254, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8272:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8272:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8262:18:8" + }, + "scope": 10039, + "src": "8083:198:8", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13253 + ], + "body": { + "id": 9269, + "nodeType": "Block", + "src": "8435:281:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9262, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8454:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9264, + "indexExpression": { + "argumentTypes": null, + "id": 9263, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "8463:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8454:29:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9265, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "8454:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8491:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8446:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8446:67:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9268, + "nodeType": "ExpressionStatement", + "src": "8446:67:8" + } + ] + }, + "documentation": { + "id": 9257, + "nodeType": "StructuredDocumentation", + "src": "8289:104:8", + "text": " @dev deposits ether\n can only be called if the converter has an ETH reserve" + }, + "id": 9270, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9259, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8418:8:8" + }, + "parameters": { + "id": 9258, + "nodeType": "ParameterList", + "parameters": [], + "src": "8406:2:8" + }, + "returnParameters": { + "id": 9260, + "nodeType": "ParameterList", + "parameters": [], + "src": "8435:0:8" + }, + "scope": 10039, + "src": "8399:317:8", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13285 + ], + "body": { + "id": 9315, + "nodeType": "Block", + "src": "9248:392:8", + "statements": [ + { + "assignments": [ + 9285 + ], + "declarations": [ + { + "constant": false, + "id": 9285, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9315, + "src": "9259:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9259:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9289, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9287, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "9297:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9286, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9287:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9287:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9259:57:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9430:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9291, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "9431:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9431:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9294, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "9445:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9295, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9285, + "src": "9454:17:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9445:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9430:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 9298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9473:19:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 9290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9422:71:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9300, + "nodeType": "ExpressionStatement", + "src": "9422:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9306, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9525:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9304, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9517:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9517:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9517:21:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9301, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9273, + "src": "9504:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9504:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 9309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9504:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9310, + "nodeType": "ExpressionStatement", + "src": "9504:35:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9312, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "9612:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9311, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "9593:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9593:39:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9314, + "nodeType": "ExpressionStatement", + "src": "9593:39:8" + } + ] + }, + "documentation": { + "id": 9271, + "nodeType": "StructuredDocumentation", + "src": "8724:356:8", + "text": " @dev withdraws ether\n can only be called by the owner if the converter is inactive or by upgrader contract\n can only be called after the upgrader contract has accepted the ownership of this contract\n can only be called if the converter has an ETH reserve\n @param _to address to send the ETH to" + }, + "functionSelector": "690d8320", + "id": 9316, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9277, + "modifierName": { + "argumentTypes": null, + "id": 9276, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9171:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9171:9:8" + }, + { + "arguments": null, + "id": 9279, + "modifierName": { + "argumentTypes": null, + "id": 9278, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9190:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9190:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9281, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "9222:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9282, + "modifierName": { + "argumentTypes": null, + "id": 9280, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "9209:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9209:33:8" + } + ], + "name": "withdrawETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9275, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9153:8:8" + }, + "parameters": { + "id": 9274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9273, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9316, + "src": "9107:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9107:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9106:21:8" + }, + "returnParameters": { + "id": 9283, + "nodeType": "ParameterList", + "parameters": [], + "src": "9248:0:8" + }, + "scope": 10039, + "src": "9086:554:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9324, + "nodeType": "Block", + "src": "9867:30:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9885:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 9321, + "id": 9323, + "nodeType": "Return", + "src": "9878:11:8" + } + ] + }, + "documentation": { + "id": 9317, + "nodeType": "StructuredDocumentation", + "src": "9648:161:8", + "text": " @dev checks whether or not the converter version is 28 or higher\n @return true, since the converter version is 28 or higher" + }, + "functionSelector": "d260529c", + "id": 9325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9318, + "nodeType": "ParameterList", + "parameters": [], + "src": "9837:2:8" + }, + "returnParameters": { + "id": 9321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9320, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9325, + "src": "9861:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9861:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9860:6:8" + }, + "scope": 10039, + "src": "9815:82:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13271 + ], + "body": { + "id": 9344, + "nodeType": "Block", + "src": "10419:51:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9340, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "10430:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9341, + "name": "_whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9328, + "src": "10452:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "src": "10430:32:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9343, + "nodeType": "ExpressionStatement", + "src": "10430:32:8" + } + ] + }, + "documentation": { + "id": 9326, + "nodeType": "StructuredDocumentation", + "src": "9905:357:8", + "text": " @dev allows the owner to update & enable the conversion whitelist contract address\n when set, only addresses that are whitelisted are actually allowed to use the converter\n note that the whitelist check is actually done by the BancorNetwork contract\n @param _whitelist address of a whitelist contract" + }, + "functionSelector": "4af80f0e", + "id": 9345, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9332, + "modifierName": { + "argumentTypes": null, + "id": 9331, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10366:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10366:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9336, + "name": "_whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9328, + "src": "10401:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + ], + "id": 9335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10393:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10393:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10393:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9338, + "modifierName": { + "argumentTypes": null, + "id": 9333, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "10385:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10385:28:8" + } + ], + "name": "setConversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9330, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10348:8:8" + }, + "parameters": { + "id": 9329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9328, + "mutability": "mutable", + "name": "_whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9345, + "src": "10300:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 9327, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "10300:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10299:23:8" + }, + "returnParameters": { + "id": 9339, + "nodeType": "ParameterList", + "parameters": [], + "src": "10419:0:8" + }, + "scope": 10039, + "src": "10268:202:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13200 + ], + "body": { + "id": 9361, + "nodeType": "Block", + "src": "10705:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 9352, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10723:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "10723:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 9354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10723:14:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9357, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10749:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10741:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10741:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10741:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10723:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 9351, + "id": 9360, + "nodeType": "Return", + "src": "10716:38:8" + } + ] + }, + "documentation": { + "id": 9346, + "nodeType": "StructuredDocumentation", + "src": "10478:157:8", + "text": " @dev returns true if the converter is active, false otherwise\n @return true if the converter is active, false otherwise" + }, + "functionSelector": "22f3e2d4", + "id": 9362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10681:8:8" + }, + "parameters": { + "id": 9347, + "nodeType": "ParameterList", + "parameters": [], + "src": "10658:2:8" + }, + "returnParameters": { + "id": 9351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9362, + "src": "10699:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10699:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10698:6:8" + }, + "scope": 10039, + "src": "10641:121:8", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13258 + ], + "body": { + "id": 9380, + "nodeType": "Block", + "src": "11256:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9377, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9365, + "src": "11292:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 9374, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11267:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "11267:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 9378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11267:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9379, + "nodeType": "ExpressionStatement", + "src": "11267:35:8" + } + ] + }, + "documentation": { + "id": 9363, + "nodeType": "StructuredDocumentation", + "src": "10770:336:8", + "text": " @dev transfers the anchor ownership\n the new owner needs to accept the transfer\n can only be called by the converter upgrder while the upgrader is the owner\n note that prior to version 28, you should use 'transferAnchorOwnership' instead\n @param _newOwner new token owner" + }, + "functionSelector": "67b6d57c", + "id": 9381, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9369, + "modifierName": { + "argumentTypes": null, + "id": 9368, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "11207:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11207:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9371, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "11231:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 9372, + "modifierName": { + "argumentTypes": null, + "id": 9370, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "11226:4:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11226:24:8" + } + ], + "name": "transferAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9367, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11189:8:8" + }, + "parameters": { + "id": 9366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9365, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9381, + "src": "11145:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11145:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11144:19:8" + }, + "returnParameters": { + "id": 9373, + "nodeType": "ParameterList", + "parameters": [], + "src": "11256:0:8" + }, + "scope": 10039, + "src": "11112:198:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13261 + ], + "body": { + "id": 9404, + "nodeType": "Block", + "src": "11700:209:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 9392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9389, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "11781:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 9390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11781:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 9391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11803:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11781:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 9393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11806:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 9388, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11773:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11773:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9395, + "nodeType": "ExpressionStatement", + "src": "11773:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 9396, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11845:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "11845:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 9399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11845:24:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9400, + "nodeType": "ExpressionStatement", + "src": "11845:24:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9401, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "11880:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11880:21:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9403, + "nodeType": "ExpressionStatement", + "src": "11880:21:8" + } + ] + }, + "documentation": { + "id": 9382, + "nodeType": "StructuredDocumentation", + "src": "11318:309:8", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n most converters are also activated as soon as they accept the anchor ownership\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 9405, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9386, + "modifierName": { + "argumentTypes": null, + "id": 9385, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "11690:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11690:9:8" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9384, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11681:8:8" + }, + "parameters": { + "id": 9383, + "nodeType": "ParameterList", + "parameters": [], + "src": "11663:2:8" + }, + "returnParameters": { + "id": 9387, + "nodeType": "ParameterList", + "parameters": [], + "src": "11700:0:8" + }, + "scope": 10039, + "src": "11633:276:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 9425, + "nodeType": "Block", + "src": "12315:62:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9420, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9408, + "src": "12348:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9421, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9410, + "src": "12356:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9422, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9412, + "src": "12361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9417, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "12326:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 22906, + "src": "12326:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 9423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12326:43:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9424, + "nodeType": "ExpressionStatement", + "src": "12326:43:8" + } + ] + }, + "documentation": { + "id": 9406, + "nodeType": "StructuredDocumentation", + "src": "11917:297:8", + "text": " @dev withdraws tokens held by the anchor and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "395900d4", + "id": 9426, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9415, + "modifierName": { + "argumentTypes": null, + "id": 9414, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "12305:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12305:9:8" + } + ], + "name": "withdrawFromAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9408, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12248:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9407, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "12248:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9410, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12268:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9409, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12268:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9412, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12281:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12281:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12247:50:8" + }, + "returnParameters": { + "id": 9416, + "nodeType": "ParameterList", + "parameters": [], + "src": "12315:0:8" + }, + "scope": 10039, + "src": "12220:157:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13266 + ], + "body": { + "id": 9451, + "nodeType": "Block", + "src": "12655:199:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9436, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12674:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9437, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9047, + "src": "12692:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "12674:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e56455253494f4e5f464545", + "id": 9439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12710:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + }, + "value": "ERR_INVALID_CONVERSION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + } + ], + "id": 9435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12666:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12666:73:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9441, + "nodeType": "ExpressionStatement", + "src": "12666:73:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9443, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "12775:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 9444, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12790:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9442, + "name": "ConversionFeeUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9096, + "src": "12755:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (uint32,uint32)" + } + }, + "id": 9445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12755:50:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9446, + "nodeType": "EmitStatement", + "src": "12750:55:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9447, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "12816:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9448, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12832:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "12816:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9450, + "nodeType": "ExpressionStatement", + "src": "12816:30:8" + } + ] + }, + "documentation": { + "id": 9427, + "nodeType": "StructuredDocumentation", + "src": "12385:189:8", + "text": " @dev updates the current conversion fee\n can only be called by the contract owner\n @param _conversionFee new conversion fee, represented in ppm" + }, + "functionSelector": "ecbca55d", + "id": 9452, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9433, + "modifierName": { + "argumentTypes": null, + "id": 9432, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "12645:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12645:9:8" + } + ], + "name": "setConversionFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9431, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12636:8:8" + }, + "parameters": { + "id": 9430, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9429, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9452, + "src": "12606:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9428, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12605:23:8" + }, + "returnParameters": { + "id": 9434, + "nodeType": "ParameterList", + "parameters": [], + "src": "12655:0:8" + }, + "scope": 10039, + "src": "12580:274:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13280, + 22574 + ], + "body": { + "id": 9509, + "nodeType": "Block", + "src": "13506:559:8", + "statements": [ + { + "assignments": [ + 9470 + ], + "declarations": [ + { + "constant": false, + "id": 9470, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9509, + "src": "13517:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9469, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13517:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9474, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9472, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "13555:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9471, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "13545:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13545:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13517:57:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13764:23:8", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9476, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13765:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9478, + "indexExpression": { + "argumentTypes": null, + "id": 9477, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "13774:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13765:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "13765:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 9483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13791:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9481, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "13792:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13792:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13764:38:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9485, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "13806:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9486, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9470, + "src": "13815:17:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "13806:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13764:68:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 9489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13834:19:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 9475, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13756:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13756:98:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9491, + "nodeType": "ExpressionStatement", + "src": "13756:98:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9495, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "13886:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9496, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9457, + "src": "13894:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9497, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9459, + "src": "13899:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9492, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "13865:5:8", + "typeDescriptions": { + "typeIdentifier": "t_super$_ConverterBase_$10039", + "typeString": "contract super ConverterBase" + } + }, + "id": 9494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 22574, + "src": "13865:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 9498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13865:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9499, + "nodeType": "ExpressionStatement", + "src": "13865:42:8" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9500, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13994:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9502, + "indexExpression": { + "argumentTypes": null, + "id": 9501, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "14003:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13994:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9503, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "13994:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 9508, + "nodeType": "IfStatement", + "src": "13990:67:8", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9505, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "14050:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9504, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "14031:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14031:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9507, + "nodeType": "ExpressionStatement", + "src": "14031:26:8" + } + } + ] + }, + "documentation": { + "id": 9453, + "nodeType": "StructuredDocumentation", + "src": "12862:462:8", + "text": " @dev withdraws tokens held by the converter and sends them to an account\n can only be called by the owner\n note that reserve tokens can only be withdrawn by the owner while the converter is inactive\n unless the owner is the converter upgrader contract\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "5e35359e", + "id": 9510, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9465, + "modifierName": { + "argumentTypes": null, + "id": 9464, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "13472:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13472:9:8" + }, + { + "arguments": null, + "id": 9467, + "modifierName": { + "argumentTypes": null, + "id": 9466, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "13491:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13491:9:8" + } + ], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9463, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 9461, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13438:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "contractScope": null, + "id": 9462, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "13450:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + } + ], + "src": "13429:33:8" + }, + "parameters": { + "id": 9460, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9455, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13354:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9454, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "13354:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9457, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13374:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9456, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13374:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9459, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13387:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9458, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13387:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13353:50:8" + }, + "returnParameters": { + "id": 9468, + "nodeType": "ParameterList", + "parameters": [], + "src": "13506:0:8" + }, + "scope": 10039, + "src": "13330:735:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9547, + "nodeType": "Block", + "src": "14324:338:8", + "statements": [ + { + "assignments": [ + 9517 + ], + "declarations": [ + { + "constant": false, + "id": 9517, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9547, + "src": "14335:36:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + }, + "typeName": { + "contractScope": null, + "id": 9516, + "name": "IConverterUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13660, + "src": "14335:18:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9523, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9520, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "14403:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9519, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14393:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14393:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9518, + "name": "IConverterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "14374:18:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterUpgrader_$13660_$", + "typeString": "type(contract IConverterUpgrader)" + } + }, + "id": 9522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14374:49:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14335:88:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9525, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9242, + "src": "14492:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 9526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14492:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 9527, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "14509:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14517:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 9524, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "14481:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 9529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14481:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9530, + "nodeType": "EmitStatement", + "src": "14476:47:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9534, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9517, + "src": "14562:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + ], + "id": 9533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14554:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9532, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14554:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14554:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9531, + "name": "transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21787, + "src": "14536:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 9536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14536:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9537, + "nodeType": "ExpressionStatement", + "src": "14536:45:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9541, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9027, + "src": "14618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 9538, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9517, + "src": "14592:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "id": 9540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 13659, + "src": "14592:25:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$returns$__$", + "typeString": "function (uint16) external" + } + }, + "id": 9542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14592:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9543, + "nodeType": "ExpressionStatement", + "src": "14592:34:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9544, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21817, + "src": "14637:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14637:17:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9546, + "nodeType": "ExpressionStatement", + "src": "14637:17:8" + } + ] + }, + "documentation": { + "id": 9511, + "nodeType": "StructuredDocumentation", + "src": "14073:209:8", + "text": " @dev upgrades the converter to the latest version\n can only be called by the owner\n note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "functionSelector": "d55ec697", + "id": 9548, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9514, + "modifierName": { + "argumentTypes": null, + "id": 9513, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "14314:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14314:9:8" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9512, + "nodeType": "ParameterList", + "parameters": [], + "src": "14304:2:8" + }, + "returnParameters": { + "id": 9515, + "nodeType": "ParameterList", + "parameters": [], + "src": "14324:0:8" + }, + "scope": 10039, + "src": "14288:374:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9560, + "nodeType": "Block", + "src": "14940:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9556, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14965:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14965:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 9555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14958:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 9554, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "14958:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14958:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 9553, + "id": 9559, + "nodeType": "Return", + "src": "14951:35:8" + } + ] + }, + "documentation": { + "id": 9549, + "nodeType": "StructuredDocumentation", + "src": "14670:206:8", + "text": " @dev returns the number of reserve tokens defined\n note that prior to version 17, you should use 'connectorTokenCount' instead\n @return number of reserve tokens" + }, + "functionSelector": "9b99a8e2", + "id": 9561, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reserveTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9550, + "nodeType": "ParameterList", + "parameters": [], + "src": "14908:2:8" + }, + "returnParameters": { + "id": 9553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9552, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9561, + "src": "14932:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9551, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "14932:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14931:8:8" + }, + "scope": 10039, + "src": "14882:112:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13292 + ], + "body": { + "id": 9663, + "nodeType": "Block", + "src": "15545:544:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9592, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15599:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15591:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9596, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "15618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 9595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15610:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15610:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15610:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "15591:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 9603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15629:23:8", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9599, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15630:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9601, + "indexExpression": { + "argumentTypes": null, + "id": 9600, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15639:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15630:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "15630:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15591:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15654:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15583:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15583:93:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9607, + "nodeType": "ExpressionStatement", + "src": "15583:93:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9609, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15695:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9610, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "15706:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 9611, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "15723:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15706:29:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15695:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 9614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15737:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 9608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15687:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15687:79:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9616, + "nodeType": "ExpressionStatement", + "src": "15687:79:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 9625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9618, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "15785:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 9619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15785:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "15814:2:8", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 9622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15815:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 9621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15807:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 9620, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "15807:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15807:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "15785:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 9626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15819:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 9617, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15777:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15777:70:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9628, + "nodeType": "ExpressionStatement", + "src": "15777:70:8" + }, + { + "assignments": [ + 9630 + ], + "declarations": [ + { + "constant": false, + "id": 9630, + "mutability": "mutable", + "name": "newReserve", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9663, + "src": "15860:26:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + }, + "typeName": { + "contractScope": null, + "id": 9629, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "15860:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9634, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9631, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15889:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9633, + "indexExpression": { + "argumentTypes": null, + "id": 9632, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15898:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15889:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15860:45:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9635, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15916:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9637, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "15916:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 9638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15937:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15916:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9640, + "nodeType": "ExpressionStatement", + "src": "15916:22:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9641, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15949:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "15949:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9644, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15969:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15949:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9646, + "nodeType": "ExpressionStatement", + "src": "15949:27:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9647, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15987:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9649, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "15987:16:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16006:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "15987:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 9652, + "nodeType": "ExpressionStatement", + "src": "15987:23:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9656, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "16040:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 9653, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "16021:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16021:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16021:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9658, + "nodeType": "ExpressionStatement", + "src": "16021:26:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9659, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "16058:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 9660, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "16074:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "16058:23:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9662, + "nodeType": "ExpressionStatement", + "src": "16058:23:8" + } + ] + }, + "documentation": { + "id": 9562, + "nodeType": "StructuredDocumentation", + "src": "15002:278:8", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 9664, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9570, + "modifierName": { + "argumentTypes": null, + "id": 9569, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "15402:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15402:9:8" + }, + { + "arguments": null, + "id": 9572, + "modifierName": { + "argumentTypes": null, + "id": 9571, + "name": "inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9151, + "src": "15421:8:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15421:8:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9576, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15460:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15452:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15452:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15452:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9578, + "modifierName": { + "argumentTypes": null, + "id": 9573, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "15439:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15439:29:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9582, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15494:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15486:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15486:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15486:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9584, + "modifierName": { + "argumentTypes": null, + "id": 9579, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "15478:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15478:24:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9586, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15531:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 9587, + "modifierName": { + "argumentTypes": null, + "id": 9585, + "name": "validReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9219, + "src": "15512:18:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint32_$", + "typeString": "modifier (uint32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15512:27:8" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9568, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15384:8:8" + }, + "parameters": { + "id": 9567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9564, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9664, + "src": "15306:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9563, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "15306:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9566, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9664, + "src": "15326:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9565, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15326:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15305:36:8" + }, + "returnParameters": { + "id": 9588, + "nodeType": "ParameterList", + "parameters": [], + "src": "15545:0:8" + }, + "scope": 10039, + "src": "15286:803:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 9680, + "nodeType": "Block", + "src": "16448:56:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9675, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16466:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9677, + "indexExpression": { + "argumentTypes": null, + "id": 9676, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9667, + "src": "16475:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16466:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9678, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16466:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 9674, + "id": 9679, + "nodeType": "Return", + "src": "16459:37:8" + } + ] + }, + "documentation": { + "id": 9665, + "nodeType": "StructuredDocumentation", + "src": "16097:197:8", + "text": " @dev returns the reserve's weight\n added in version 28\n @param _reserveToken reserve token contract address\n @return reserve weight" + }, + "functionSelector": "1cfab290", + "id": 9681, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9670, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9667, + "src": "16402:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9671, + "modifierName": { + "argumentTypes": null, + "id": 9669, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "16389:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "16389:27:8" + } + ], + "name": "reserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9667, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9681, + "src": "16323:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "16323:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16322:27:8" + }, + "returnParameters": { + "id": 9674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9673, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9681, + "src": "16435:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9672, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "16435:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16434:8:8" + }, + "scope": 10039, + "src": "16300:204:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13250 + ], + "body": { + "id": 9698, + "nodeType": "Block", + "src": "16941:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9693, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16959:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9695, + "indexExpression": { + "argumentTypes": null, + "id": 9694, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9684, + "src": "16968:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16959:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9696, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "16959:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9692, + "id": 9697, + "nodeType": "Return", + "src": "16952:38:8" + } + ] + }, + "documentation": { + "id": 9682, + "nodeType": "StructuredDocumentation", + "src": "16512:255:8", + "text": " @dev returns the reserve's balance\n note that prior to version 17, you should use 'getConnectorBalance' instead\n @param _reserveToken reserve token contract address\n @return reserve balance" + }, + "functionSelector": "dc8de379", + "id": 9699, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9688, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9684, + "src": "16894:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9689, + "modifierName": { + "argumentTypes": null, + "id": 9687, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "16881:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "16881:27:8" + } + ], + "name": "reserveBalance", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9686, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "16849:8:8" + }, + "parameters": { + "id": 9685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9684, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9699, + "src": "16797:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9683, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "16797:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16796:27:8" + }, + "returnParameters": { + "id": 9692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9691, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9699, + "src": "16927:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9690, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16927:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16926:9:8" + }, + "scope": 10039, + "src": "16773:225:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9710, + "nodeType": "Block", + "src": "17228:61:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9705, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "17246:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9707, + "indexExpression": { + "argumentTypes": null, + "id": 9706, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "17255:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17246:29:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9708, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "17246:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 9704, + "id": 9709, + "nodeType": "Return", + "src": "17239:42:8" + } + ] + }, + "documentation": { + "id": 9700, + "nodeType": "StructuredDocumentation", + "src": "17006:164:8", + "text": " @dev checks whether or not the converter has an ETH reserve\n @return true if the converter has an ETH reserve, false otherwise" + }, + "functionSelector": "12c2aca4", + "id": 9711, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasETHReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9701, + "nodeType": "ParameterList", + "parameters": [], + "src": "17198:2:8" + }, + "returnParameters": { + "id": 9704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9703, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9711, + "src": "17222:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9702, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17222:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17221:6:8" + }, + "scope": 10039, + "src": "17176:113:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13228 + ], + "body": { + "id": 9772, + "nodeType": "Block", + "src": "18137:517:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 9736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9734, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9714, + "src": "18183:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 9735, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9716, + "src": "18199:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "18183:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 9737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18213:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 9733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18175:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18175:63:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9739, + "nodeType": "ExpressionStatement", + "src": "18175:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9743, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18366:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + ], + "id": 9742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9741, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18358:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18358:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 9747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18398:1:8", + "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": 9746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18390:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18390:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18390:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "18358:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9752, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9720, + "src": "18456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 9750, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18422:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 22916, + "src": "18422:33:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 9753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18422:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9756, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9722, + "src": "18502:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 9754, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18468:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 22916, + "src": "18468:33:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 9757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18468:47:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18422:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 9759, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18421:95:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18358:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f57484954454c4953544544", + "id": 9761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18535:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d03711a645ac13b3887baa10c28f347997e96617340d7ffae036e653d4c59185", + "typeString": "literal_string \"ERR_NOT_WHITELISTED\"" + }, + "value": "ERR_NOT_WHITELISTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d03711a645ac13b3887baa10c28f347997e96617340d7ffae036e653d4c59185", + "typeString": "literal_string \"ERR_NOT_WHITELISTED\"" + } + ], + "id": 9740, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18350:207:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9763, + "nodeType": "ExpressionStatement", + "src": "18350:207:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9765, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9714, + "src": "18587:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9766, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9716, + "src": "18601:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9767, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9718, + "src": "18615:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 9768, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9720, + "src": "18624:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9722, + "src": "18633:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 9764, + "name": "doConvert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9789, + "src": "18577:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) returns (uint256)" + } + }, + "id": 9770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18577:69:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9732, + "id": 9771, + "nodeType": "Return", + "src": "18570:76:8" + } + ] + }, + "documentation": { + "id": 9712, + "nodeType": "StructuredDocumentation", + "src": "17297:569:8", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "functionSelector": "e8dc12ff", + "id": 9773, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9726, + "modifierName": { + "argumentTypes": null, + "id": 9725, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "18065:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18065:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9728, + "name": "BANCOR_NETWORK", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21530, + "src": "18089:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 9729, + "modifierName": { + "argumentTypes": null, + "id": 9727, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "18084:4:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18084:20:8" + } + ], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9724, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "18030:8:8" + }, + "parameters": { + "id": 9723, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9714, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17889:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "17889:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9716, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17915:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9715, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "17915:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9718, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17941:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17941:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9720, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17958:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9719, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17958:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9722, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17975:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17975:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17888:116:8" + }, + "returnParameters": { + "id": 9732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9731, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "18123:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9730, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18123:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18122:9:8" + }, + "scope": 10039, + "src": "17872:782:8", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": null, + "documentation": { + "id": 9774, + "nodeType": "StructuredDocumentation", + "src": "18662:615:8", + "text": " @dev converts a specific amount of source tokens to target tokens\n called by ConverterBase and allows the inherited contracts to implement custom conversion logic\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 9789, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9776, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19312:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9775, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "19312:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9778, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19347:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9777, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "19347:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9780, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19382:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9779, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19382:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9782, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19408:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19408:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9784, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19434:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9783, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19434:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19301:162:8" + }, + "returnParameters": { + "id": 9788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9787, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19517:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19516:9:8" + }, + "scope": 10039, + "src": "19283:243:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 9805, + "nodeType": "Block", + "src": "19790:78:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9802, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "19845:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9799, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "19826:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 9797, + "name": "_targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9792, + "src": "19808:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19808:17:8", + "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": 9800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19808:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19808:36:8", + "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": 9803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19808:52:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9796, + "id": 9804, + "nodeType": "Return", + "src": "19801:59:8" + } + ] + }, + "documentation": { + "id": 9790, + "nodeType": "StructuredDocumentation", + "src": "19534:173:8", + "text": " @dev returns the conversion fee for a given target amount\n @param _targetAmount target amount\n @return conversion fee" + }, + "id": 9806, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9792, + "mutability": "mutable", + "name": "_targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9806, + "src": "19735:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19735:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19734:23:8" + }, + "returnParameters": { + "id": 9796, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9795, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9806, + "src": "19781:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9794, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19781:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19780:9:8" + }, + "scope": 10039, + "src": "19713:155:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9843, + "nodeType": "Block", + "src": "20153:230:8", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 9817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9815, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20168:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9816, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "20185:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "20168:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 9840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9829, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20303:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9831, + "indexExpression": { + "argumentTypes": null, + "id": 9830, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20312:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20303:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9832, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20303:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9837, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20369:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20361:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 9833, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20337:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 9834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "20337:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 9839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20337:38:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20303:72:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9841, + "nodeType": "ExpressionStatement", + "src": "20303:72:8" + }, + "id": 9842, + "nodeType": "IfStatement", + "src": "20164:211:8", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 9827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9818, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20219:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9820, + "indexExpression": { + "argumentTypes": null, + "id": 9819, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20228:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20219:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20219:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9824, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20261:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20253:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20253:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20253:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20253:21:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20219:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9828, + "nodeType": "ExpressionStatement", + "src": "20219:55:8" + } + } + ] + }, + "documentation": { + "id": 9807, + "nodeType": "StructuredDocumentation", + "src": "19876:179:8", + "text": " @dev syncs the stored reserve balance for a given reserve with the real reserve balance\n @param _reserveToken address of the reserve token" + }, + "id": 9844, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9812, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20138:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9813, + "modifierName": { + "argumentTypes": null, + "id": 9811, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "20125:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20125:27:8" + } + ], + "name": "syncReserveBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9809, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9844, + "src": "20089:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9808, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20089:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20088:27:8" + }, + "returnParameters": { + "id": 9814, + "nodeType": "ParameterList", + "parameters": [], + "src": "20153:0:8" + }, + "scope": 10039, + "src": "20061:322:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9870, + "nodeType": "Block", + "src": "20496:165:8", + "statements": [ + { + "assignments": [ + 9849 + ], + "declarations": [ + { + "constant": false, + "id": 9849, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9870, + "src": "20507:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9848, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20507:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9852, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9850, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "20530:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20530:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20507:43:8" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9864, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "20636:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9866, + "indexExpression": { + "argumentTypes": null, + "id": 9865, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20650:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20636:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9863, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "20617:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20617:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9868, + "nodeType": "ExpressionStatement", + "src": "20617:36:8" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 9859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9857, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20581:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 9858, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9849, + "src": "20585:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 9869, + "initializationExpression": { + "assignments": [ + 9854 + ], + "declarations": [ + { + "constant": false, + "id": 9854, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9869, + "src": "20566:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20566:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9856, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 9855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20578:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20566:13:8" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 9861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20599:3:8", + "subExpression": { + "argumentTypes": null, + "id": 9860, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20599:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9862, + "nodeType": "ExpressionStatement", + "src": "20599:3:8" + }, + "nodeType": "ForStatement", + "src": "20561:92:8" + } + ] + }, + "documentation": { + "id": 9845, + "nodeType": "StructuredDocumentation", + "src": "20391:59:8", + "text": " @dev syncs all stored reserve balances" + }, + "id": 9871, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "syncReserveBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9846, + "nodeType": "ParameterList", + "parameters": [], + "src": "20484:2:8" + }, + "returnParameters": { + "id": 9847, + "nodeType": "ParameterList", + "parameters": [], + "src": "20496:0:8" + }, + "scope": 10039, + "src": "20456:205:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9907, + "nodeType": "Block", + "src": "21324:518:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 9892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9888, + "name": "_feeAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9884, + "src": "21705:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 9891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 9889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21718:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323535", + "id": 9890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21723:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "21718:8:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "src": "21705:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 9887, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "21698:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 9893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21698:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9894, + "nodeType": "ExpressionStatement", + "src": "21698:29:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9896, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9874, + "src": "21754:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9897, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9876, + "src": "21768:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9898, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9878, + "src": "21782:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9899, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9880, + "src": "21791:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 9900, + "name": "_returnAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9882, + "src": "21800:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9903, + "name": "_feeAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9884, + "src": "21822:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 9902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21815:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 9901, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "21815:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21815:18:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 9895, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9078, + "src": "21743:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_int256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,int256)" + } + }, + "id": 9905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21743:91:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9906, + "nodeType": "EmitStatement", + "src": "21738:96:8" + } + ] + }, + "documentation": { + "id": 9872, + "nodeType": "StructuredDocumentation", + "src": "20669:409:8", + "text": " @dev helper, dispatches the Conversion event\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _trader address of the caller who executed the conversion\n @param _amount amount purchased/sold (in the source token)\n @param _returnAmount amount returned (in the target token)" + }, + "id": 9908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchConversionEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9874, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21127:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9873, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21127:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9876, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21162:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9875, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21162:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9878, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21197:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9877, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21197:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9880, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21223:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21223:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9882, + "mutability": "mutable", + "name": "_returnAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21249:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21249:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9884, + "mutability": "mutable", + "name": "_feeAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21281:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9883, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21281:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21116:184:8" + }, + "returnParameters": { + "id": 9886, + "nodeType": "ParameterList", + "parameters": [], + "src": "21324:0:8" + }, + "scope": 10039, + "src": "21084:758:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 13297 + ], + "body": { + "id": 9917, + "nodeType": "Block", + "src": "22030:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9915, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "22048:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 9914, + "id": 9916, + "nodeType": "Return", + "src": "22041:13:8" + } + ] + }, + "documentation": { + "id": 9909, + "nodeType": "StructuredDocumentation", + "src": "21850:109:8", + "text": " @dev deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "functionSelector": "fc0c546a", + "id": 9918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9911, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21994:8:8" + }, + "parameters": { + "id": 9910, + "nodeType": "ParameterList", + "parameters": [], + "src": "21979:2:8" + }, + "returnParameters": { + "id": 9914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9913, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9918, + "src": "22012:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9912, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "22012:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22011:18:8" + }, + "scope": 10039, + "src": "21965:97:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13302 + ], + "body": { + "id": 9931, + "nodeType": "Block", + "src": "22213:53:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9928, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9921, + "src": "22248:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9927, + "name": "transferAnchorOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9381, + "src": "22224:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 9929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22224:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9930, + "nodeType": "ExpressionStatement", + "src": "22224:34:8" + } + ] + }, + "documentation": { + "id": 9919, + "nodeType": "StructuredDocumentation", + "src": "22070:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "21e6b53d", + "id": 9932, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9925, + "modifierName": { + "argumentTypes": null, + "id": 9924, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "22203:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22203:9:8" + } + ], + "name": "transferTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9923, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22194:8:8" + }, + "parameters": { + "id": 9922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9921, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9932, + "src": "22168:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22168:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22167:19:8" + }, + "returnParameters": { + "id": 9926, + "nodeType": "ParameterList", + "parameters": [], + "src": "22213:0:8" + }, + "scope": 10039, + "src": "22136:130:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13305 + ], + "body": { + "id": 9942, + "nodeType": "Block", + "src": "22398:42:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9939, + "name": "acceptAnchorOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9405, + "src": "22409:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22409:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9941, + "nodeType": "ExpressionStatement", + "src": "22409:23:8" + } + ] + }, + "documentation": { + "id": 9933, + "nodeType": "StructuredDocumentation", + "src": "22274:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "38a5e016", + "id": 9943, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9937, + "modifierName": { + "argumentTypes": null, + "id": 9936, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "22388:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22388:9:8" + } + ], + "name": "acceptTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9935, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22379:8:8" + }, + "parameters": { + "id": 9934, + "nodeType": "ParameterList", + "parameters": [], + "src": "22369:2:8" + }, + "returnParameters": { + "id": 9938, + "nodeType": "ParameterList", + "parameters": [], + "src": "22398:0:8" + }, + "scope": 10039, + "src": "22340:100:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13320 + ], + "body": { + "id": 9976, + "nodeType": "Block", + "src": "22621:141:8", + "statements": [ + { + "assignments": [ + 9961 + ], + "declarations": [ + { + "constant": false, + "id": 9961, + "mutability": "mutable", + "name": "reserve", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9976, + "src": "22632:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve" + }, + "typeName": { + "contractScope": null, + "id": 9960, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "22632:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9965, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9962, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "22657:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9964, + "indexExpression": { + "argumentTypes": null, + "id": 9963, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9946, + "src": "22666:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22657:18:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22632:43:8" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9966, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22693:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9967, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "22693:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9968, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "22710:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22726:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22733:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9972, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22740:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "22740:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 9974, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22692:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "functionReturnParameters": 9959, + "id": 9975, + "nodeType": "Return", + "src": "22686:68:8" + } + ] + }, + "documentation": { + "id": 9944, + "nodeType": "StructuredDocumentation", + "src": "22448:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0e53aae9", + "id": 9977, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9948, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22568:8:8" + }, + "parameters": { + "id": 9947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9946, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22534:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9945, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22534:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22533:22:8" + }, + "returnParameters": { + "id": 9959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9950, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22586:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9949, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22586:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9952, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22595:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9951, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22595:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9954, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22603:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22603:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9956, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22609:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9955, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22609:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9958, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22615:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9957, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22615:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22585:35:8" + }, + "scope": 10039, + "src": "22514:248:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13334 + ], + "body": { + "id": 9991, + "nodeType": "Block", + "src": "22920:61:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9986, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "22938:13:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "id": 9987, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "reserveTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 9036, + "src": "22938:27:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9989, + "indexExpression": { + "argumentTypes": null, + "id": 9988, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9980, + "src": "22966:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22938:35:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 9985, + "id": 9990, + "nodeType": "Return", + "src": "22931:42:8" + } + ] + }, + "documentation": { + "id": 9978, + "nodeType": "StructuredDocumentation", + "src": "22770:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "19b64015", + "id": 9992, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectorTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9982, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22889:8:8" + }, + "parameters": { + "id": 9981, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9980, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9992, + "src": "22861:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9979, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22861:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22860:16:8" + }, + "returnParameters": { + "id": 9985, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9984, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9992, + "src": "22907:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9983, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22907:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22906:13:8" + }, + "scope": 10039, + "src": "22836:145:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13339 + ], + "body": { + "id": 10002, + "nodeType": "Block", + "src": "23124:45:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9999, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "23142:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 10000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23142:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 9998, + "id": 10001, + "nodeType": "Return", + "src": "23135:26:8" + } + ] + }, + "documentation": { + "id": 9993, + "nodeType": "StructuredDocumentation", + "src": "22989:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "71f52bf3", + "id": 10003, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectorTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9995, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23098:8:8" + }, + "parameters": { + "id": 9994, + "nodeType": "ParameterList", + "parameters": [], + "src": "23083:2:8" + }, + "returnParameters": { + "id": 9998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9997, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10003, + "src": "23116:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9996, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "23116:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23115:8:8" + }, + "scope": 10039, + "src": "23055:114:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13327 + ], + "body": { + "id": 10016, + "nodeType": "Block", + "src": "23340:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10013, + "name": "_connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10006, + "src": "23373:15:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 10012, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "23358:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 10014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23358:31:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10011, + "id": 10015, + "nodeType": "Return", + "src": "23351:38:8" + } + ] + }, + "documentation": { + "id": 10004, + "nodeType": "StructuredDocumentation", + "src": "23177:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "d8959512", + "id": 10017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConnectorBalance", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10008, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23313:8:8" + }, + "parameters": { + "id": 10007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10006, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10017, + "src": "23272:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10005, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23272:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23271:29:8" + }, + "returnParameters": { + "id": 10011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10010, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10017, + "src": "23331:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23330:9:8" + }, + "scope": 10039, + "src": "23243:154:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10037, + "nodeType": "Block", + "src": "23598:81:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10032, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10020, + "src": "23635:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10033, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10022, + "src": "23649:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10034, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10024, + "src": "23663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10031, + "name": "targetAmountAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9256, + "src": "23616:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 10035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23616:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 10030, + "id": 10036, + "nodeType": "Return", + "src": "23609:62:8" + } + ] + }, + "documentation": { + "id": 10018, + "nodeType": "StructuredDocumentation", + "src": "23405:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "1e1401f8", + "id": 10038, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10020, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23490:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23490:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10022, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23516:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10021, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23516:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10024, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23542:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23542:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23489:69:8" + }, + "returnParameters": { + "id": 10030, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10027, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23580:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23580:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10029, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23589:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10028, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23579:18:8" + }, + "scope": 10039, + "src": "23471:208:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 10040, + "src": "1648:22034:8" + } + ], + "src": "52:23632:8" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "exportedSymbols": { + "ConverterBase": [ + 10039 + ] + }, + "id": 10040, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8979, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:8" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 8980, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13341, + "src": "77:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./interfaces/IConverterAnchor.sol", + "id": 8981, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13350, + "src": "116:43:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "file": "./interfaces/IConverterUpgrader.sol", + "id": 8982, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13661, + "src": "161:45:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./interfaces/IBancorFormula.sol", + "id": 8983, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 13178, + "src": "208:41:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 8984, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 21720, + "src": "251:47:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 8985, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22243, + "src": "300:40:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 8986, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22355, + "src": "342:33:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 8987, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22527, + "src": "377:37:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 8988, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 22576, + "src": "416:36:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "../token/interfaces/IEtherToken.sol", + "id": 8989, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 21154, + "src": "454:45:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "../bancorx/interfaces/IBancorX.sol", + "id": 8990, + "nodeType": "ImportDirective", + "scope": 10040, + "sourceUnit": 3552, + "src": "501:44:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8992, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1683:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 8993, + "nodeType": "InheritanceSpecifier", + "src": "1683:10:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8994, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "1695:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 8995, + "nodeType": "InheritanceSpecifier", + "src": "1695:12:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8996, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1709:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 8997, + "nodeType": "InheritanceSpecifier", + "src": "1709:11:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8998, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1722:22:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 8999, + "nodeType": "InheritanceSpecifier", + "src": "1722:22:8" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 9000, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "1746:15:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 9001, + "nodeType": "InheritanceSpecifier", + "src": "1746:15:8" + } + ], + "contractDependencies": [ + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 8991, + "nodeType": "StructuredDocumentation", + "src": "549:1097:8", + "text": " @dev ConverterBase\n The converter contains the main logic for conversions between different ERC20 tokens.\n It is also the upgradable part of the mechanism (note that upgrades are opt-in).\n The anchor must be set on construction and cannot be changed afterwards.\n Wrappers are provided for some of the anchor's functions, for easier access.\n Once the converter accepts ownership of the anchor, it becomes the anchor's sole controller\n and can execute any of its functions.\n To upgrade the converter, anchor ownership must be transferred to a new converter, along with\n any relevant data.\n Note that the converter can transfer anchor ownership to a new converter that\n doesn't allow upgrades anymore, for finalizing the relationship between the converter\n and the anchor.\n Converter types (defined as uint16 type) -\n 0 = liquid token converter\n 1 = liquidity pool v1 converter\n 2 = liquidity pool v2 converter\n Note that converters don't currently support tokens with transfer fees." + }, + "fullyImplemented": false, + "id": 10039, + "linearizedBaseContracts": [ + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "ConverterBase", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 9004, + "libraryName": { + "contractScope": null, + "id": 9002, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "1775:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1769:27:8", + "typeName": { + "id": 9003, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1788:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 9007, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "1804:49:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9005, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1804:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 9006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1846:7:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 9012, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "1860:107:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9008, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1860:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 9010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1924:42:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 9009, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1912:11:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 9011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1912:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "internal" + }, + { + "canonicalName": "ConverterBase.Reserve", + "id": 9023, + "members": [ + { + "constant": false, + "id": 9014, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2002:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2002:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9016, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2050:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9015, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2050:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9018, + "mutability": "mutable", + "name": "deprecated1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2128:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9017, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2128:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9020, + "mutability": "mutable", + "name": "deprecated2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2171:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2171:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9022, + "mutability": "mutable", + "name": "isSet", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9023, + "src": "2214:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9021, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2214:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Reserve", + "nodeType": "StructDefinition", + "scope": 10039, + "src": "1976:313:8", + "visibility": "public" + }, + { + "constant": true, + "documentation": { + "id": 9024, + "nodeType": "StructuredDocumentation", + "src": "2297:40:8", + "text": " @dev version number" + }, + "functionSelector": "54fd4d50", + "id": 9027, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2343:35:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9025, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2343:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3339", + "id": 9026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2376:2:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13195 + ], + "constant": false, + "functionSelector": "d3fb73b4", + "id": 9030, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9029, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2411:8:8" + }, + "scope": 10039, + "src": "2387:39:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9028, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2387:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 13233 + ], + "constant": false, + "functionSelector": "c45d3d92", + "id": 9033, + "mutability": "mutable", + "name": "conversionWhitelist", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9032, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2491:8:8" + }, + "scope": 10039, + "src": "2473:46:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 9031, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "2473:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d031370b", + "id": 9036, + "mutability": "mutable", + "name": "reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2613:34:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 9034, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2613:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 9035, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2613:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d66bd524", + "id": 9040, + "mutability": "mutable", + "name": "reserves", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2754:48:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve)" + }, + "typeName": { + "id": 9039, + "keyType": { + "contractScope": null, + "id": 9037, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2763:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2754:32:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve)" + }, + "valueType": { + "contractScope": null, + "id": 9038, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "2778:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0c7d5cd8", + "id": 9043, + "mutability": "mutable", + "name": "reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "2899:30:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9041, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2899:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13243 + ], + "constant": false, + "functionSelector": "94c275ad", + "id": 9047, + "mutability": "mutable", + "name": "maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9045, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3055:8:8" + }, + "scope": 10039, + "src": "3041:43:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9044, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3041:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3083:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "baseFunctions": [ + 13238 + ], + "constant": false, + "functionSelector": "579cd3ca", + "id": 9051, + "mutability": "mutable", + "name": "conversionFee", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 9049, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3306:8:8" + }, + "scope": 10039, + "src": "3292:40:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9048, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3292:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 9050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3331:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "bf754558", + "id": 9054, + "mutability": "constant", + "name": "conversionsEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10039, + "src": "3417:46:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9052, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3417:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3459:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 9055, + "nodeType": "StructuredDocumentation", + "src": "3514:260:8", + "text": " @dev triggered when the converter is activated\n @param _type converter type\n @param _anchor converter anchor\n @param _activated true if the converter was activated, false if it was deactivated" + }, + "id": 9063, + "name": "Activation", + "nodeType": "EventDefinition", + "parameters": { + "id": 9062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9057, + "indexed": true, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3797:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9056, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3797:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9059, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3819:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9058, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3819:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9061, + "indexed": true, + "mutability": "mutable", + "name": "_activated", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9063, + "src": "3853:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9060, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3853:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3796:81:8" + }, + "src": "3780:98:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9064, + "nodeType": "StructuredDocumentation", + "src": "3886:447:8", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _trader wallet that initiated the trade\n @param _amount amount converted, in the source token\n @param _return amount returned, minus conversion fee\n @param _conversionFee conversion fee" + }, + "id": 9078, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 9077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9066, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4366:30:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9065, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4366:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9068, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4407:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9067, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4407:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9070, + "indexed": true, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4446:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9069, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4446:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9072, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4480:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4480:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9074, + "indexed": false, + "mutability": "mutable", + "name": "_return", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4506:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4506:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9076, + "indexed": false, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9078, + "src": "4532:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 9075, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "4532:6:8", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4355:205:8" + }, + "src": "4339:222:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9079, + "nodeType": "StructuredDocumentation", + "src": "4569:562:8", + "text": " @dev triggered when the rate between two tokens in the converter changes\n note that the event might be dispatched for rate updates between any two tokens in the converter\n note that prior to version 28, you should use the 'PriceDataUpdate' event instead\n @param _token1 address of the first token\n @param _token2 address of the second token\n @param _rateN rate of 1 unit of `_token1` in `_token2` (numerator)\n @param _rateD rate of 1 unit of `_token1` in `_token2` (denominator)" + }, + "id": 9089, + "name": "TokenRateUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 9088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9081, + "indexed": true, + "mutability": "mutable", + "name": "_token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5169:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9080, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5169:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9083, + "indexed": true, + "mutability": "mutable", + "name": "_token2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5207:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9082, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5207:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9085, + "indexed": false, + "mutability": "mutable", + "name": "_rateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5245:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5245:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9087, + "indexed": false, + "mutability": "mutable", + "name": "_rateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9089, + "src": "5270:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5270:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5158:133:8" + }, + "src": "5137:155:8" + }, + { + "anonymous": false, + "documentation": { + "id": 9090, + "nodeType": "StructuredDocumentation", + "src": "5300:220:8", + "text": " @dev triggered when the conversion fee is updated\n @param _prevFee previous fee percentage, represented in ppm\n @param _newFee new fee percentage, represented in ppm" + }, + "id": 9096, + "name": "ConversionFeeUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 9095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9092, + "indexed": false, + "mutability": "mutable", + "name": "_prevFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9096, + "src": "5552:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9091, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5552:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9094, + "indexed": false, + "mutability": "mutable", + "name": "_newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9096, + "src": "5569:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9093, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5569:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5551:33:8" + }, + "src": "5526:59:8" + }, + { + "body": { + "id": 9126, + "nodeType": "Block", + "src": "6192:82:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9118, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "6203:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9119, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9099, + "src": "6212:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "6203:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9121, + "nodeType": "ExpressionStatement", + "src": "6203:16:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9122, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9047, + "src": "6230:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9123, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9103, + "src": "6249:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "6230:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9125, + "nodeType": "ExpressionStatement", + "src": "6230:36:8" + } + ] + }, + "documentation": { + "id": 9097, + "nodeType": "StructuredDocumentation", + "src": "5593:313:8", + "text": " @dev used by sub-contracts to initialize a new converter\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 9127, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9108, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9099, + "src": "6069:7:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 9107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6061:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6061:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6061:16:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9110, + "modifierName": { + "argumentTypes": null, + "id": 9105, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "6048:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6048:30:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9112, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9101, + "src": "6111:9:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 9113, + "modifierName": { + "argumentTypes": null, + "id": 9111, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "6088:22:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6088:33:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9115, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9103, + "src": "6168:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 9116, + "modifierName": { + "argumentTypes": null, + "id": 9114, + "name": "validConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9196, + "src": "6149:18:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint32_$", + "typeString": "modifier (uint32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6149:37:8" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9099, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "5934:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9098, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "5934:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9101, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "5969:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 9100, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "5969:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9103, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9127, + "src": "6007:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9102, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "6007:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5923:115:8" + }, + "returnParameters": { + "id": 9117, + "nodeType": "ParameterList", + "parameters": [], + "src": "6192:0:8" + }, + "scope": 10039, + "src": "5912:362:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9133, + "nodeType": "Block", + "src": "6345:40:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9129, + "name": "_active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9144, + "src": "6356:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 9130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6356:9:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9131, + "nodeType": "ExpressionStatement", + "src": "6356:9:8" + }, + { + "id": 9132, + "nodeType": "PlaceholderStatement", + "src": "6376:1:8" + } + ] + }, + "documentation": null, + "id": 9134, + "name": "active", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9128, + "nodeType": "ParameterList", + "parameters": [], + "src": "6342:2:8" + }, + "src": "6327:58:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9143, + "nodeType": "Block", + "src": "6473:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9138, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "6492:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6492:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e414354495645", + "id": 9140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6504:14:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a22dd8039fb80c8642cf17389b806c873aa9fbdbf3f2bd8746d8ce373ef50f9e", + "typeString": "literal_string \"ERR_INACTIVE\"" + }, + "value": "ERR_INACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a22dd8039fb80c8642cf17389b806c873aa9fbdbf3f2bd8746d8ce373ef50f9e", + "typeString": "literal_string \"ERR_INACTIVE\"" + } + ], + "id": 9137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6484:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6484:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9142, + "nodeType": "ExpressionStatement", + "src": "6484:35:8" + } + ] + }, + "documentation": null, + "id": 9144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_active", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9135, + "nodeType": "ParameterList", + "parameters": [], + "src": "6456:2:8" + }, + "returnParameters": { + "id": 9136, + "nodeType": "ParameterList", + "parameters": [], + "src": "6473:0:8" + }, + "scope": 10039, + "src": "6440:87:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9150, + "nodeType": "Block", + "src": "6604:42:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9146, + "name": "_inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9162, + "src": "6615:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 9147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6615:11:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9148, + "nodeType": "ExpressionStatement", + "src": "6615:11:8" + }, + { + "id": 9149, + "nodeType": "PlaceholderStatement", + "src": "6637:1:8" + } + ] + }, + "documentation": null, + "id": 9151, + "name": "inactive", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9145, + "nodeType": "ParameterList", + "parameters": [], + "src": "6601:2:8" + }, + "src": "6584:62:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9161, + "nodeType": "Block", + "src": "6736:53:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6755:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9155, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "6756:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6756:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414354495645", + "id": 9158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6768:12:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_181d3d32638945611c2cb46b623de141c5e74a32dcd850864f64837aa849ee3f", + "typeString": "literal_string \"ERR_ACTIVE\"" + }, + "value": "ERR_ACTIVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_181d3d32638945611c2cb46b623de141c5e74a32dcd850864f64837aa849ee3f", + "typeString": "literal_string \"ERR_ACTIVE\"" + } + ], + "id": 9154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6747:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6747:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9160, + "nodeType": "ExpressionStatement", + "src": "6747:34:8" + } + ] + }, + "documentation": null, + "id": 9162, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_inactive", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9152, + "nodeType": "ParameterList", + "parameters": [], + "src": "6719:2:8" + }, + "returnParameters": { + "id": 9153, + "nodeType": "ParameterList", + "parameters": [], + "src": "6736:0:8" + }, + "scope": 10039, + "src": "6701:88:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9171, + "nodeType": "Block", + "src": "6948:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9167, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9164, + "src": "6973:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9166, + "name": "_validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9186, + "src": "6959:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token) view" + } + }, + "id": 9168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6959:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9169, + "nodeType": "ExpressionStatement", + "src": "6959:23:8" + }, + { + "id": 9170, + "nodeType": "PlaceholderStatement", + "src": "6993:1:8" + } + ] + }, + "documentation": null, + "id": 9172, + "name": "validReserve", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9165, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9164, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9172, + "src": "6926:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9163, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6926:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6925:22:8" + }, + "src": "6904:98:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9185, + "nodeType": "Block", + "src": "7116:75:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9178, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "7135:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9180, + "indexExpression": { + "argumentTypes": null, + "id": 9179, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9174, + "src": "7144:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7135:18:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "7135:24:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7161:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9177, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7127:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7127:56:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9184, + "nodeType": "ExpressionStatement", + "src": "7127:56:8" + } + ] + }, + "documentation": null, + "id": 9186, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9174, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9186, + "src": "7080:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9173, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7080:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7079:22:8" + }, + "returnParameters": { + "id": 9176, + "nodeType": "ParameterList", + "parameters": [], + "src": "7116:0:8" + }, + "scope": 10039, + "src": "7057:134:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9195, + "nodeType": "Block", + "src": "7283:66:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9191, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9188, + "src": "7314:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9190, + "name": "_validConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9209, + "src": "7294:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint32_$returns$__$", + "typeString": "function (uint32) pure" + } + }, + "id": 9192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7294:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9193, + "nodeType": "ExpressionStatement", + "src": "7294:35:8" + }, + { + "id": 9194, + "nodeType": "PlaceholderStatement", + "src": "7340:1:8" + } + ] + }, + "documentation": null, + "id": 9196, + "name": "validConversionFee", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9188, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9196, + "src": "7260:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9187, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7260:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7259:23:8" + }, + "src": "7232:117:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9208, + "nodeType": "Block", + "src": "7470:90:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9202, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9198, + "src": "7489:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9203, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7507:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7489:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e56455253494f4e5f464545", + "id": 9205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7523:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + }, + "value": "ERR_INVALID_CONVERSION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + } + ], + "id": 9201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7481:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7481:71:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9207, + "nodeType": "ExpressionStatement", + "src": "7481:71:8" + } + ] + }, + "documentation": null, + "id": 9209, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9198, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9209, + "src": "7433:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9197, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7433:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7432:23:8" + }, + "returnParameters": { + "id": 9200, + "nodeType": "ParameterList", + "parameters": [], + "src": "7470:0:8" + }, + "scope": 10039, + "src": "7404:156:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9218, + "nodeType": "Block", + "src": "7645:59:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9214, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9211, + "src": "7676:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9213, + "name": "_validReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9236, + "src": "7656:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint32_$returns$__$", + "typeString": "function (uint32) pure" + } + }, + "id": 9215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7656:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9216, + "nodeType": "ExpressionStatement", + "src": "7656:28:8" + }, + { + "id": 9217, + "nodeType": "PlaceholderStatement", + "src": "7695:1:8" + } + ] + }, + "documentation": null, + "id": 9219, + "name": "validReserveWeight", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 9212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9211, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9219, + "src": "7629:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9210, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7629:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7628:16:8" + }, + "src": "7601:103:8", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9235, + "nodeType": "Block", + "src": "7818:98:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9225, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9221, + "src": "7837:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 9226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7847:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7837:11:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9228, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9221, + "src": "7852:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9229, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7863:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7852:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7837:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 9232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7879:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 9224, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7829:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7829:79:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9234, + "nodeType": "ExpressionStatement", + "src": "7829:79:8" + } + ] + }, + "documentation": null, + "id": 9236, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9221, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9236, + "src": "7788:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9220, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7788:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7787:16:8" + }, + "returnParameters": { + "id": 9223, + "nodeType": "ParameterList", + "parameters": [], + "src": "7818:0:8" + }, + "scope": 10039, + "src": "7759:157:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 13190 + ], + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 9242, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8009:8:8" + }, + "parameters": { + "id": 9237, + "nodeType": "ParameterList", + "parameters": [], + "src": "7986:2:8" + }, + "returnParameters": { + "id": 9241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9242, + "src": "8027:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9239, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "8027:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8026:8:8" + }, + "scope": 10039, + "src": "7964:71:8", + "stateMutability": "pure", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13213 + ], + "body": null, + "documentation": null, + "functionSelector": "af94b8d8", + "id": 9256, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9250, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8236:8:8" + }, + "parameters": { + "id": 9249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9244, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8111:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9243, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8111:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9246, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8137:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9245, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8137:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9248, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8163:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8163:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8110:69:8" + }, + "returnParameters": { + "id": 9255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9252, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8263:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8263:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9254, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9256, + "src": "8272:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8272:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8262:18:8" + }, + "scope": 10039, + "src": "8083:198:8", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13253 + ], + "body": { + "id": 9269, + "nodeType": "Block", + "src": "8435:281:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9262, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8454:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9264, + "indexExpression": { + "argumentTypes": null, + "id": 9263, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "8463:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8454:29:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9265, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "8454:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8491:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8446:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8446:67:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9268, + "nodeType": "ExpressionStatement", + "src": "8446:67:8" + } + ] + }, + "documentation": { + "id": 9257, + "nodeType": "StructuredDocumentation", + "src": "8289:104:8", + "text": " @dev deposits ether\n can only be called if the converter has an ETH reserve" + }, + "id": 9270, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9259, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8418:8:8" + }, + "parameters": { + "id": 9258, + "nodeType": "ParameterList", + "parameters": [], + "src": "8406:2:8" + }, + "returnParameters": { + "id": 9260, + "nodeType": "ParameterList", + "parameters": [], + "src": "8435:0:8" + }, + "scope": 10039, + "src": "8399:317:8", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13285 + ], + "body": { + "id": 9315, + "nodeType": "Block", + "src": "9248:392:8", + "statements": [ + { + "assignments": [ + 9285 + ], + "declarations": [ + { + "constant": false, + "id": 9285, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9315, + "src": "9259:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9259:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9289, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9287, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "9297:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9286, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9287:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9287:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9259:57:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9430:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9291, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "9431:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9431:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9294, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "9445:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9295, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9285, + "src": "9454:17:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9445:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9430:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 9298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9473:19:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 9290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9422:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9422:71:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9300, + "nodeType": "ExpressionStatement", + "src": "9422:71:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9306, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9525:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9304, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9517:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9517:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9517:21:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9301, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9273, + "src": "9504:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9504:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 9309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9504:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9310, + "nodeType": "ExpressionStatement", + "src": "9504:35:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9312, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "9612:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9311, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "9593:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9593:39:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9314, + "nodeType": "ExpressionStatement", + "src": "9593:39:8" + } + ] + }, + "documentation": { + "id": 9271, + "nodeType": "StructuredDocumentation", + "src": "8724:356:8", + "text": " @dev withdraws ether\n can only be called by the owner if the converter is inactive or by upgrader contract\n can only be called after the upgrader contract has accepted the ownership of this contract\n can only be called if the converter has an ETH reserve\n @param _to address to send the ETH to" + }, + "functionSelector": "690d8320", + "id": 9316, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9277, + "modifierName": { + "argumentTypes": null, + "id": 9276, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9171:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9171:9:8" + }, + { + "arguments": null, + "id": 9279, + "modifierName": { + "argumentTypes": null, + "id": 9278, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "9190:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9190:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9281, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "9222:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9282, + "modifierName": { + "argumentTypes": null, + "id": 9280, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "9209:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9209:33:8" + } + ], + "name": "withdrawETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9275, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9153:8:8" + }, + "parameters": { + "id": 9274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9273, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9316, + "src": "9107:19:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9107:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9106:21:8" + }, + "returnParameters": { + "id": 9283, + "nodeType": "ParameterList", + "parameters": [], + "src": "9248:0:8" + }, + "scope": 10039, + "src": "9086:554:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9324, + "nodeType": "Block", + "src": "9867:30:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9885:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 9321, + "id": 9323, + "nodeType": "Return", + "src": "9878:11:8" + } + ] + }, + "documentation": { + "id": 9317, + "nodeType": "StructuredDocumentation", + "src": "9648:161:8", + "text": " @dev checks whether or not the converter version is 28 or higher\n @return true, since the converter version is 28 or higher" + }, + "functionSelector": "d260529c", + "id": 9325, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9318, + "nodeType": "ParameterList", + "parameters": [], + "src": "9837:2:8" + }, + "returnParameters": { + "id": 9321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9320, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9325, + "src": "9861:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9319, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9861:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9860:6:8" + }, + "scope": 10039, + "src": "9815:82:8", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13271 + ], + "body": { + "id": 9344, + "nodeType": "Block", + "src": "10419:51:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9340, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "10430:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9341, + "name": "_whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9328, + "src": "10452:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "src": "10430:32:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9343, + "nodeType": "ExpressionStatement", + "src": "10430:32:8" + } + ] + }, + "documentation": { + "id": 9326, + "nodeType": "StructuredDocumentation", + "src": "9905:357:8", + "text": " @dev allows the owner to update & enable the conversion whitelist contract address\n when set, only addresses that are whitelisted are actually allowed to use the converter\n note that the whitelist check is actually done by the BancorNetwork contract\n @param _whitelist address of a whitelist contract" + }, + "functionSelector": "4af80f0e", + "id": 9345, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9332, + "modifierName": { + "argumentTypes": null, + "id": 9331, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "10366:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10366:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9336, + "name": "_whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9328, + "src": "10401:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + ], + "id": 9335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10393:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10393:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10393:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9338, + "modifierName": { + "argumentTypes": null, + "id": 9333, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "10385:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10385:28:8" + } + ], + "name": "setConversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9330, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10348:8:8" + }, + "parameters": { + "id": 9329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9328, + "mutability": "mutable", + "name": "_whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9345, + "src": "10300:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 9327, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "10300:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10299:23:8" + }, + "returnParameters": { + "id": 9339, + "nodeType": "ParameterList", + "parameters": [], + "src": "10419:0:8" + }, + "scope": 10039, + "src": "10268:202:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13200 + ], + "body": { + "id": 9361, + "nodeType": "Block", + "src": "10705:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 9352, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10723:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "10723:12:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 9354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10723:14:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9357, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10749:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10741:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10741:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10741:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10723:31:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 9351, + "id": 9360, + "nodeType": "Return", + "src": "10716:38:8" + } + ] + }, + "documentation": { + "id": 9346, + "nodeType": "StructuredDocumentation", + "src": "10478:157:8", + "text": " @dev returns true if the converter is active, false otherwise\n @return true if the converter is active, false otherwise" + }, + "functionSelector": "22f3e2d4", + "id": 9362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10681:8:8" + }, + "parameters": { + "id": 9347, + "nodeType": "ParameterList", + "parameters": [], + "src": "10658:2:8" + }, + "returnParameters": { + "id": 9351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9362, + "src": "10699:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10699:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10698:6:8" + }, + "scope": 10039, + "src": "10641:121:8", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13258 + ], + "body": { + "id": 9380, + "nodeType": "Block", + "src": "11256:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9377, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9365, + "src": "11292:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 9374, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11267:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "11267:24:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 9378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11267:35:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9379, + "nodeType": "ExpressionStatement", + "src": "11267:35:8" + } + ] + }, + "documentation": { + "id": 9363, + "nodeType": "StructuredDocumentation", + "src": "10770:336:8", + "text": " @dev transfers the anchor ownership\n the new owner needs to accept the transfer\n can only be called by the converter upgrder while the upgrader is the owner\n note that prior to version 28, you should use 'transferAnchorOwnership' instead\n @param _newOwner new token owner" + }, + "functionSelector": "67b6d57c", + "id": 9381, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9369, + "modifierName": { + "argumentTypes": null, + "id": 9368, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "11207:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11207:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9371, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "11231:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 9372, + "modifierName": { + "argumentTypes": null, + "id": 9370, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "11226:4:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11226:24:8" + } + ], + "name": "transferAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9367, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11189:8:8" + }, + "parameters": { + "id": 9366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9365, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9381, + "src": "11145:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11145:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11144:19:8" + }, + "returnParameters": { + "id": 9373, + "nodeType": "ParameterList", + "parameters": [], + "src": "11256:0:8" + }, + "scope": 10039, + "src": "11112:198:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13261 + ], + "body": { + "id": 9404, + "nodeType": "Block", + "src": "11700:209:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 9392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9389, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "11781:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 9390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11781:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 9391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11803:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11781:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 9393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11806:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 9388, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11773:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11773:61:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9395, + "nodeType": "ExpressionStatement", + "src": "11773:61:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 9396, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11845:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "11845:22:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 9399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11845:24:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9400, + "nodeType": "ExpressionStatement", + "src": "11845:24:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9401, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "11880:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11880:21:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9403, + "nodeType": "ExpressionStatement", + "src": "11880:21:8" + } + ] + }, + "documentation": { + "id": 9382, + "nodeType": "StructuredDocumentation", + "src": "11318:309:8", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n most converters are also activated as soon as they accept the anchor ownership\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 9405, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9386, + "modifierName": { + "argumentTypes": null, + "id": 9385, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "11690:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11690:9:8" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9384, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11681:8:8" + }, + "parameters": { + "id": 9383, + "nodeType": "ParameterList", + "parameters": [], + "src": "11663:2:8" + }, + "returnParameters": { + "id": 9387, + "nodeType": "ParameterList", + "parameters": [], + "src": "11700:0:8" + }, + "scope": 10039, + "src": "11633:276:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 9425, + "nodeType": "Block", + "src": "12315:62:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9420, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9408, + "src": "12348:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9421, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9410, + "src": "12356:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9422, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9412, + "src": "12361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9417, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "12326:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 9419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 22906, + "src": "12326:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 9423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12326:43:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9424, + "nodeType": "ExpressionStatement", + "src": "12326:43:8" + } + ] + }, + "documentation": { + "id": 9406, + "nodeType": "StructuredDocumentation", + "src": "11917:297:8", + "text": " @dev withdraws tokens held by the anchor and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "395900d4", + "id": 9426, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9415, + "modifierName": { + "argumentTypes": null, + "id": 9414, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "12305:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12305:9:8" + } + ], + "name": "withdrawFromAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9408, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12248:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9407, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "12248:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9410, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12268:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9409, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12268:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9412, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9426, + "src": "12281:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12281:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12247:50:8" + }, + "returnParameters": { + "id": 9416, + "nodeType": "ParameterList", + "parameters": [], + "src": "12315:0:8" + }, + "scope": 10039, + "src": "12220:157:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13266 + ], + "body": { + "id": 9451, + "nodeType": "Block", + "src": "12655:199:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9436, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12674:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 9437, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9047, + "src": "12692:16:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "12674:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e56455253494f4e5f464545", + "id": 9439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12710:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + }, + "value": "ERR_INVALID_CONVERSION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ae729833ea0b2cfd1b35fa1d075ae330e76860b5ab276fa04bde88b85e5c4d00", + "typeString": "literal_string \"ERR_INVALID_CONVERSION_FEE\"" + } + ], + "id": 9435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12666:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12666:73:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9441, + "nodeType": "ExpressionStatement", + "src": "12666:73:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9443, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "12775:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 9444, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12790:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 9442, + "name": "ConversionFeeUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9096, + "src": "12755:19:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (uint32,uint32)" + } + }, + "id": 9445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12755:50:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9446, + "nodeType": "EmitStatement", + "src": "12750:55:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9447, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "12816:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9448, + "name": "_conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9429, + "src": "12832:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "12816:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9450, + "nodeType": "ExpressionStatement", + "src": "12816:30:8" + } + ] + }, + "documentation": { + "id": 9427, + "nodeType": "StructuredDocumentation", + "src": "12385:189:8", + "text": " @dev updates the current conversion fee\n can only be called by the contract owner\n @param _conversionFee new conversion fee, represented in ppm" + }, + "functionSelector": "ecbca55d", + "id": 9452, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9433, + "modifierName": { + "argumentTypes": null, + "id": 9432, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "12645:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12645:9:8" + } + ], + "name": "setConversionFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9431, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12636:8:8" + }, + "parameters": { + "id": 9430, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9429, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9452, + "src": "12606:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9428, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12606:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12605:23:8" + }, + "returnParameters": { + "id": 9434, + "nodeType": "ParameterList", + "parameters": [], + "src": "12655:0:8" + }, + "scope": 10039, + "src": "12580:274:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13280, + 22574 + ], + "body": { + "id": 9509, + "nodeType": "Block", + "src": "13506:559:8", + "statements": [ + { + "assignments": [ + 9470 + ], + "declarations": [ + { + "constant": false, + "id": 9470, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9509, + "src": "13517:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9469, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13517:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9474, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9472, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "13555:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9471, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "13545:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13545:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13517:57:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13764:23:8", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9476, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13765:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9478, + "indexExpression": { + "argumentTypes": null, + "id": 9477, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "13774:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13765:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "13765:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 9483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13791:11:8", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9481, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9362, + "src": "13792:8:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 9482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13792:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13764:38:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9485, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "13806:5:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9486, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9470, + "src": "13815:17:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "13806:26:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13764:68:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 9489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13834:19:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 9475, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13756:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13756:98:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9491, + "nodeType": "ExpressionStatement", + "src": "13756:98:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9495, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "13886:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9496, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9457, + "src": "13894:3:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9497, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9459, + "src": "13899:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 9492, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "13865:5:8", + "typeDescriptions": { + "typeIdentifier": "t_super$_ConverterBase_$10039", + "typeString": "contract super ConverterBase" + } + }, + "id": 9494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 22574, + "src": "13865:20:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 9498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13865:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9499, + "nodeType": "ExpressionStatement", + "src": "13865:42:8" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9500, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13994:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9502, + "indexExpression": { + "argumentTypes": null, + "id": 9501, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "14003:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13994:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9503, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "13994:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 9508, + "nodeType": "IfStatement", + "src": "13990:67:8", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9505, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9455, + "src": "14050:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9504, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "14031:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14031:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9507, + "nodeType": "ExpressionStatement", + "src": "14031:26:8" + } + } + ] + }, + "documentation": { + "id": 9453, + "nodeType": "StructuredDocumentation", + "src": "12862:462:8", + "text": " @dev withdraws tokens held by the converter and sends them to an account\n can only be called by the owner\n note that reserve tokens can only be withdrawn by the owner while the converter is inactive\n unless the owner is the converter upgrader contract\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "5e35359e", + "id": 9510, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9465, + "modifierName": { + "argumentTypes": null, + "id": 9464, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "13472:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13472:9:8" + }, + { + "arguments": null, + "id": 9467, + "modifierName": { + "argumentTypes": null, + "id": 9466, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "13491:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13491:9:8" + } + ], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9463, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 9461, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13438:10:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "contractScope": null, + "id": 9462, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "13450:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + } + ], + "src": "13429:33:8" + }, + "parameters": { + "id": 9460, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9455, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13354:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9454, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "13354:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9457, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13374:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9456, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13374:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9459, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9510, + "src": "13387:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9458, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13387:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13353:50:8" + }, + "returnParameters": { + "id": 9468, + "nodeType": "ParameterList", + "parameters": [], + "src": "13506:0:8" + }, + "scope": 10039, + "src": "13330:735:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9547, + "nodeType": "Block", + "src": "14324:338:8", + "statements": [ + { + "assignments": [ + 9517 + ], + "declarations": [ + { + "constant": false, + "id": 9517, + "mutability": "mutable", + "name": "converterUpgrader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9547, + "src": "14335:36:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + }, + "typeName": { + "contractScope": null, + "id": 9516, + "name": "IConverterUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13660, + "src": "14335:18:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9523, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9520, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21542, + "src": "14403:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 9519, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14393:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 9521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14393:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9518, + "name": "IConverterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "14374:18:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterUpgrader_$13660_$", + "typeString": "type(contract IConverterUpgrader)" + } + }, + "id": 9522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14374:49:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14335:88:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9525, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9242, + "src": "14492:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 9526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14492:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 9527, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "14509:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9528, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14517:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 9524, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "14481:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 9529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14481:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9530, + "nodeType": "EmitStatement", + "src": "14476:47:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9534, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9517, + "src": "14562:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + ], + "id": 9533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14554:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9532, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14554:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14554:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9531, + "name": "transferOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21787, + "src": "14536:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 9536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14536:45:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9537, + "nodeType": "ExpressionStatement", + "src": "14536:45:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9541, + "name": "version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9027, + "src": "14618:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 9538, + "name": "converterUpgrader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9517, + "src": "14592:17:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "id": 9540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 13659, + "src": "14592:25:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$returns$__$", + "typeString": "function (uint16) external" + } + }, + "id": 9542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14592:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9543, + "nodeType": "ExpressionStatement", + "src": "14592:34:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9544, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21817, + "src": "14637:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14637:17:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9546, + "nodeType": "ExpressionStatement", + "src": "14637:17:8" + } + ] + }, + "documentation": { + "id": 9511, + "nodeType": "StructuredDocumentation", + "src": "14073:209:8", + "text": " @dev upgrades the converter to the latest version\n can only be called by the owner\n note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "functionSelector": "d55ec697", + "id": 9548, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9514, + "modifierName": { + "argumentTypes": null, + "id": 9513, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "14314:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14314:9:8" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9512, + "nodeType": "ParameterList", + "parameters": [], + "src": "14304:2:8" + }, + "returnParameters": { + "id": 9515, + "nodeType": "ParameterList", + "parameters": [], + "src": "14324:0:8" + }, + "scope": 10039, + "src": "14288:374:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9560, + "nodeType": "Block", + "src": "14940:54:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9556, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14965:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14965:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 9555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14958:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 9554, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "14958:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14958:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 9553, + "id": 9559, + "nodeType": "Return", + "src": "14951:35:8" + } + ] + }, + "documentation": { + "id": 9549, + "nodeType": "StructuredDocumentation", + "src": "14670:206:8", + "text": " @dev returns the number of reserve tokens defined\n note that prior to version 17, you should use 'connectorTokenCount' instead\n @return number of reserve tokens" + }, + "functionSelector": "9b99a8e2", + "id": 9561, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reserveTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9550, + "nodeType": "ParameterList", + "parameters": [], + "src": "14908:2:8" + }, + "returnParameters": { + "id": 9553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9552, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9561, + "src": "14932:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9551, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "14932:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14931:8:8" + }, + "scope": 10039, + "src": "14882:112:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13292 + ], + "body": { + "id": 9663, + "nodeType": "Block", + "src": "15545:544:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9592, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15599:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15591:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15591:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9596, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "15618:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 9595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15610:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15610:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15610:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "15591:34:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 9603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "15629:23:8", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9599, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15630:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9601, + "indexExpression": { + "argumentTypes": null, + "id": 9600, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15639:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15630:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "15630:22:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15591:61:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 9605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15654:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 9589, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15583:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15583:93:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9607, + "nodeType": "ExpressionStatement", + "src": "15583:93:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9609, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15695:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 9612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9610, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "15706:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 9611, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "15723:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15706:29:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15695:40:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f574549474854", + "id": 9614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15737:28:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + }, + "value": "ERR_INVALID_RESERVE_WEIGHT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e4e4c57eb13b428a7fc031dc1f6f2c3e13b61f7d7b93994b2d17f8dc75658178", + "typeString": "literal_string \"ERR_INVALID_RESERVE_WEIGHT\"" + } + ], + "id": 9608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15687:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15687:79:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9616, + "nodeType": "ExpressionStatement", + "src": "15687:79:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 9625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9618, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "15785:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 9619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15785:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "15814:2:8", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 9622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15815:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 9621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15807:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 9620, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "15807:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15807:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "15785:32:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 9626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15819:27:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 9617, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15777:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15777:70:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9628, + "nodeType": "ExpressionStatement", + "src": "15777:70:8" + }, + { + "assignments": [ + 9630 + ], + "declarations": [ + { + "constant": false, + "id": 9630, + "mutability": "mutable", + "name": "newReserve", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9663, + "src": "15860:26:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + }, + "typeName": { + "contractScope": null, + "id": 9629, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "15860:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9634, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9631, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15889:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9633, + "indexExpression": { + "argumentTypes": null, + "id": 9632, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15898:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15889:16:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15860:45:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9635, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15916:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9637, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "15916:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 9638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15937:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15916:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9640, + "nodeType": "ExpressionStatement", + "src": "15916:22:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9641, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15949:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "15949:17:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 9644, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15969:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "15949:27:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9646, + "nodeType": "ExpressionStatement", + "src": "15949:27:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9647, + "name": "newReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9630, + "src": "15987:10:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve storage pointer" + } + }, + "id": 9649, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "15987:16:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 9650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16006:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "15987:23:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 9652, + "nodeType": "ExpressionStatement", + "src": "15987:23:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9656, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "16040:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 9653, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "16021:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16021:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16021:26:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9658, + "nodeType": "ExpressionStatement", + "src": "16021:26:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 9661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 9659, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "16058:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 9660, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "16074:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "16058:23:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 9662, + "nodeType": "ExpressionStatement", + "src": "16058:23:8" + } + ] + }, + "documentation": { + "id": 9562, + "nodeType": "StructuredDocumentation", + "src": "15002:278:8", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 9664, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9570, + "modifierName": { + "argumentTypes": null, + "id": 9569, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "15402:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15402:9:8" + }, + { + "arguments": null, + "id": 9572, + "modifierName": { + "argumentTypes": null, + "id": 9571, + "name": "inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9151, + "src": "15421:8:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15421:8:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9576, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15460:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15452:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15452:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15452:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9578, + "modifierName": { + "argumentTypes": null, + "id": 9573, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "15439:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15439:29:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9582, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9564, + "src": "15494:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9581, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15486:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15486:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15486:15:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 9584, + "modifierName": { + "argumentTypes": null, + "id": 9579, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "15478:7:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15478:24:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9586, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9566, + "src": "15531:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 9587, + "modifierName": { + "argumentTypes": null, + "id": 9585, + "name": "validReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9219, + "src": "15512:18:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint32_$", + "typeString": "modifier (uint32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15512:27:8" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9568, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15384:8:8" + }, + "parameters": { + "id": 9567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9564, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9664, + "src": "15306:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9563, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "15306:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9566, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9664, + "src": "15326:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9565, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15326:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15305:36:8" + }, + "returnParameters": { + "id": 9588, + "nodeType": "ParameterList", + "parameters": [], + "src": "15545:0:8" + }, + "scope": 10039, + "src": "15286:803:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 9680, + "nodeType": "Block", + "src": "16448:56:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9675, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16466:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9677, + "indexExpression": { + "argumentTypes": null, + "id": 9676, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9667, + "src": "16475:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16466:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9678, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16466:30:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 9674, + "id": 9679, + "nodeType": "Return", + "src": "16459:37:8" + } + ] + }, + "documentation": { + "id": 9665, + "nodeType": "StructuredDocumentation", + "src": "16097:197:8", + "text": " @dev returns the reserve's weight\n added in version 28\n @param _reserveToken reserve token contract address\n @return reserve weight" + }, + "functionSelector": "1cfab290", + "id": 9681, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9670, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9667, + "src": "16402:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9671, + "modifierName": { + "argumentTypes": null, + "id": 9669, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "16389:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "16389:27:8" + } + ], + "name": "reserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9667, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9681, + "src": "16323:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "16323:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16322:27:8" + }, + "returnParameters": { + "id": 9674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9673, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9681, + "src": "16435:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9672, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "16435:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16434:8:8" + }, + "scope": 10039, + "src": "16300:204:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13250 + ], + "body": { + "id": 9698, + "nodeType": "Block", + "src": "16941:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9693, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16959:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9695, + "indexExpression": { + "argumentTypes": null, + "id": 9694, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9684, + "src": "16968:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16959:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9696, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "16959:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9692, + "id": 9697, + "nodeType": "Return", + "src": "16952:38:8" + } + ] + }, + "documentation": { + "id": 9682, + "nodeType": "StructuredDocumentation", + "src": "16512:255:8", + "text": " @dev returns the reserve's balance\n note that prior to version 17, you should use 'getConnectorBalance' instead\n @param _reserveToken reserve token contract address\n @return reserve balance" + }, + "functionSelector": "dc8de379", + "id": 9699, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9688, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9684, + "src": "16894:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9689, + "modifierName": { + "argumentTypes": null, + "id": 9687, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "16881:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "16881:27:8" + } + ], + "name": "reserveBalance", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9686, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "16849:8:8" + }, + "parameters": { + "id": 9685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9684, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9699, + "src": "16797:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9683, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "16797:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16796:27:8" + }, + "returnParameters": { + "id": 9692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9691, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9699, + "src": "16927:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9690, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16927:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16926:9:8" + }, + "scope": 10039, + "src": "16773:225:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 9710, + "nodeType": "Block", + "src": "17228:61:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9705, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "17246:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9707, + "indexExpression": { + "argumentTypes": null, + "id": 9706, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "17255:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17246:29:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9708, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "17246:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 9704, + "id": 9709, + "nodeType": "Return", + "src": "17239:42:8" + } + ] + }, + "documentation": { + "id": 9700, + "nodeType": "StructuredDocumentation", + "src": "17006:164:8", + "text": " @dev checks whether or not the converter has an ETH reserve\n @return true if the converter has an ETH reserve, false otherwise" + }, + "functionSelector": "12c2aca4", + "id": 9711, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasETHReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9701, + "nodeType": "ParameterList", + "parameters": [], + "src": "17198:2:8" + }, + "returnParameters": { + "id": 9704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9703, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9711, + "src": "17222:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9702, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17222:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17221:6:8" + }, + "scope": 10039, + "src": "17176:113:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13228 + ], + "body": { + "id": 9772, + "nodeType": "Block", + "src": "18137:517:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 9736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9734, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9714, + "src": "18183:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 9735, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9716, + "src": "18199:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "18183:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 9737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18213:24:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 9733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18175:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18175:63:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9739, + "nodeType": "ExpressionStatement", + "src": "18175:63:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 9749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9743, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18366:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + ], + "id": 9742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18358:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9741, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18358:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18358:28:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 9747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18398:1:8", + "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": 9746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18390:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18390:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18390:10:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "18358:42:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 9758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9752, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9720, + "src": "18456:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 9750, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18422:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 22916, + "src": "18422:33:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 9753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18422:42:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9756, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9722, + "src": "18502:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 9754, + "name": "conversionWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9033, + "src": "18468:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 9755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 22916, + "src": "18468:33:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 9757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18468:47:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18422:93:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 9759, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18421:95:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18358:158:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f545f57484954454c4953544544", + "id": 9761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18535:21:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d03711a645ac13b3887baa10c28f347997e96617340d7ffae036e653d4c59185", + "typeString": "literal_string \"ERR_NOT_WHITELISTED\"" + }, + "value": "ERR_NOT_WHITELISTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d03711a645ac13b3887baa10c28f347997e96617340d7ffae036e653d4c59185", + "typeString": "literal_string \"ERR_NOT_WHITELISTED\"" + } + ], + "id": 9740, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 9762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18350:207:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9763, + "nodeType": "ExpressionStatement", + "src": "18350:207:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9765, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9714, + "src": "18587:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9766, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9716, + "src": "18601:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9767, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9718, + "src": "18615:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 9768, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9720, + "src": "18624:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9722, + "src": "18633:12:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 9764, + "name": "doConvert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9789, + "src": "18577:9:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) returns (uint256)" + } + }, + "id": 9770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18577:69:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9732, + "id": 9771, + "nodeType": "Return", + "src": "18570:76:8" + } + ] + }, + "documentation": { + "id": 9712, + "nodeType": "StructuredDocumentation", + "src": "17297:569:8", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "functionSelector": "e8dc12ff", + "id": 9773, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9726, + "modifierName": { + "argumentTypes": null, + "id": 9725, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "18065:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18065:9:8" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 9728, + "name": "BANCOR_NETWORK", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21530, + "src": "18089:14:8", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 9729, + "modifierName": { + "argumentTypes": null, + "id": 9727, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "18084:4:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18084:20:8" + } + ], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9724, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "18030:8:8" + }, + "parameters": { + "id": 9723, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9714, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17889:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "17889:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9716, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17915:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9715, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "17915:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9718, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17941:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17941:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9720, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17958:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9719, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17958:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9722, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "17975:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17975:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17888:116:8" + }, + "returnParameters": { + "id": 9732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9731, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9773, + "src": "18123:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9730, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18123:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18122:9:8" + }, + "scope": 10039, + "src": "17872:782:8", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": null, + "documentation": { + "id": 9774, + "nodeType": "StructuredDocumentation", + "src": "18662:615:8", + "text": " @dev converts a specific amount of source tokens to target tokens\n called by ConverterBase and allows the inherited contracts to implement custom conversion logic\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 9789, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9776, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19312:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9775, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "19312:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9778, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19347:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9777, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "19347:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9780, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19382:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9779, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19382:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9782, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19408:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19408:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9784, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19434:28:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 9783, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19434:15:8", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19301:162:8" + }, + "returnParameters": { + "id": 9788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9787, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9789, + "src": "19517:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19517:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19516:9:8" + }, + "scope": 10039, + "src": "19283:243:8", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 9805, + "nodeType": "Block", + "src": "19790:78:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9802, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "19845:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9799, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9051, + "src": "19826:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 9797, + "name": "_targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9792, + "src": "19808:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19808:17:8", + "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": 9800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19808:32:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19808:36:8", + "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": 9803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19808:52:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9796, + "id": 9804, + "nodeType": "Return", + "src": "19801:59:8" + } + ] + }, + "documentation": { + "id": 9790, + "nodeType": "StructuredDocumentation", + "src": "19534:173:8", + "text": " @dev returns the conversion fee for a given target amount\n @param _targetAmount target amount\n @return conversion fee" + }, + "id": 9806, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9792, + "mutability": "mutable", + "name": "_targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9806, + "src": "19735:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19735:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19734:23:8" + }, + "returnParameters": { + "id": 9796, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9795, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9806, + "src": "19781:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9794, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19781:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19780:9:8" + }, + "scope": 10039, + "src": "19713:155:8", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9843, + "nodeType": "Block", + "src": "20153:230:8", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 9817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9815, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20168:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 9816, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "20185:19:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "20168:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 9840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9829, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20303:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9831, + "indexExpression": { + "argumentTypes": null, + "id": 9830, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20312:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20303:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9832, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20303:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9837, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20369:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20361:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20361:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 9833, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20337:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 9834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "20337:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 9839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20337:38:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20303:72:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9841, + "nodeType": "ExpressionStatement", + "src": "20303:72:8" + }, + "id": 9842, + "nodeType": "IfStatement", + "src": "20164:211:8", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 9827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9818, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20219:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9820, + "indexExpression": { + "argumentTypes": null, + "id": 9819, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20228:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20219:23:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 9821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20219:31:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9824, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20261:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + ], + "id": 9823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20253:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 9822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20253:7:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20253:13:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 9826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20253:21:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20219:55:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9828, + "nodeType": "ExpressionStatement", + "src": "20219:55:8" + } + } + ] + }, + "documentation": { + "id": 9807, + "nodeType": "StructuredDocumentation", + "src": "19876:179:8", + "text": " @dev syncs the stored reserve balance for a given reserve with the real reserve balance\n @param _reserveToken address of the reserve token" + }, + "id": 9844, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 9812, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9809, + "src": "20138:13:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 9813, + "modifierName": { + "argumentTypes": null, + "id": 9811, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "20125:12:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20125:27:8" + } + ], + "name": "syncReserveBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9809, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9844, + "src": "20089:25:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9808, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20089:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20088:27:8" + }, + "returnParameters": { + "id": 9814, + "nodeType": "ParameterList", + "parameters": [], + "src": "20153:0:8" + }, + "scope": 10039, + "src": "20061:322:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9870, + "nodeType": "Block", + "src": "20496:165:8", + "statements": [ + { + "assignments": [ + 9849 + ], + "declarations": [ + { + "constant": false, + "id": 9849, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9870, + "src": "20507:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9848, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20507:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9852, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9850, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "20530:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20530:20:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20507:43:8" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9864, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "20636:13:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9866, + "indexExpression": { + "argumentTypes": null, + "id": 9865, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20650:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20636:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 9863, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "20617:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 9867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20617:36:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9868, + "nodeType": "ExpressionStatement", + "src": "20617:36:8" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 9859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9857, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20581:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 9858, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9849, + "src": "20585:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20581:16:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 9869, + "initializationExpression": { + "assignments": [ + 9854 + ], + "declarations": [ + { + "constant": false, + "id": 9854, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9869, + "src": "20566:9:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20566:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9856, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 9855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20578:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20566:13:8" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 9861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20599:3:8", + "subExpression": { + "argumentTypes": null, + "id": 9860, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9854, + "src": "20599:1:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 9862, + "nodeType": "ExpressionStatement", + "src": "20599:3:8" + }, + "nodeType": "ForStatement", + "src": "20561:92:8" + } + ] + }, + "documentation": { + "id": 9845, + "nodeType": "StructuredDocumentation", + "src": "20391:59:8", + "text": " @dev syncs all stored reserve balances" + }, + "id": 9871, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "syncReserveBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9846, + "nodeType": "ParameterList", + "parameters": [], + "src": "20484:2:8" + }, + "returnParameters": { + "id": 9847, + "nodeType": "ParameterList", + "parameters": [], + "src": "20496:0:8" + }, + "scope": 10039, + "src": "20456:205:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 9907, + "nodeType": "Block", + "src": "21324:518:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 9892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 9888, + "name": "_feeAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9884, + "src": "21705:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 9891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 9889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21718:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323535", + "id": 9890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21723:3:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "21718:8:8", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "src": "21705:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 9887, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "21698:6:8", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 9893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21698:29:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9894, + "nodeType": "ExpressionStatement", + "src": "21698:29:8" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9896, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9874, + "src": "21754:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9897, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9876, + "src": "21768:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 9898, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9878, + "src": "21782:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 9899, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9880, + "src": "21791:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 9900, + "name": "_returnAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9882, + "src": "21800:13:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9903, + "name": "_feeAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9884, + "src": "21822:10:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 9902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21815:6:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_int256_$", + "typeString": "type(int256)" + }, + "typeName": { + "id": 9901, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "21815:6:8", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 9904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21815:18:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 9895, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9078, + "src": "21743:10:8", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_int256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,int256)" + } + }, + "id": 9905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21743:91:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9906, + "nodeType": "EmitStatement", + "src": "21738:96:8" + } + ] + }, + "documentation": { + "id": 9872, + "nodeType": "StructuredDocumentation", + "src": "20669:409:8", + "text": " @dev helper, dispatches the Conversion event\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _trader address of the caller who executed the conversion\n @param _amount amount purchased/sold (in the source token)\n @param _returnAmount amount returned (in the target token)" + }, + "id": 9908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchConversionEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 9885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9874, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21127:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9873, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21127:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9876, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21162:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9875, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21162:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9878, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21197:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9877, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21197:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9880, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21223:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21223:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9882, + "mutability": "mutable", + "name": "_returnAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21249:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21249:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9884, + "mutability": "mutable", + "name": "_feeAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9908, + "src": "21281:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9883, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21281:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21116:184:8" + }, + "returnParameters": { + "id": 9886, + "nodeType": "ParameterList", + "parameters": [], + "src": "21324:0:8" + }, + "scope": 10039, + "src": "21084:758:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 13297 + ], + "body": { + "id": 9917, + "nodeType": "Block", + "src": "22030:32:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9915, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "22048:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 9914, + "id": 9916, + "nodeType": "Return", + "src": "22041:13:8" + } + ] + }, + "documentation": { + "id": 9909, + "nodeType": "StructuredDocumentation", + "src": "21850:109:8", + "text": " @dev deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "functionSelector": "fc0c546a", + "id": 9918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9911, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21994:8:8" + }, + "parameters": { + "id": 9910, + "nodeType": "ParameterList", + "parameters": [], + "src": "21979:2:8" + }, + "returnParameters": { + "id": 9914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9913, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9918, + "src": "22012:16:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 9912, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "22012:16:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22011:18:8" + }, + "scope": 10039, + "src": "21965:97:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13302 + ], + "body": { + "id": 9931, + "nodeType": "Block", + "src": "22213:53:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 9928, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9921, + "src": "22248:9:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 9927, + "name": "transferAnchorOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9381, + "src": "22224:23:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 9929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22224:34:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9930, + "nodeType": "ExpressionStatement", + "src": "22224:34:8" + } + ] + }, + "documentation": { + "id": 9919, + "nodeType": "StructuredDocumentation", + "src": "22070:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "21e6b53d", + "id": 9932, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9925, + "modifierName": { + "argumentTypes": null, + "id": 9924, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "22203:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22203:9:8" + } + ], + "name": "transferTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9923, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22194:8:8" + }, + "parameters": { + "id": 9922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9921, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9932, + "src": "22168:17:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22168:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22167:19:8" + }, + "returnParameters": { + "id": 9926, + "nodeType": "ParameterList", + "parameters": [], + "src": "22213:0:8" + }, + "scope": 10039, + "src": "22136:130:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13305 + ], + "body": { + "id": 9942, + "nodeType": "Block", + "src": "22398:42:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9939, + "name": "acceptAnchorOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9405, + "src": "22409:21:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 9940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22409:23:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 9941, + "nodeType": "ExpressionStatement", + "src": "22409:23:8" + } + ] + }, + "documentation": { + "id": 9933, + "nodeType": "StructuredDocumentation", + "src": "22274:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "38a5e016", + "id": 9943, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 9937, + "modifierName": { + "argumentTypes": null, + "id": 9936, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "22388:9:8", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22388:9:8" + } + ], + "name": "acceptTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9935, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22379:8:8" + }, + "parameters": { + "id": 9934, + "nodeType": "ParameterList", + "parameters": [], + "src": "22369:2:8" + }, + "returnParameters": { + "id": 9938, + "nodeType": "ParameterList", + "parameters": [], + "src": "22398:0:8" + }, + "scope": 10039, + "src": "22340:100:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13320 + ], + "body": { + "id": 9976, + "nodeType": "Block", + "src": "22621:141:8", + "statements": [ + { + "assignments": [ + 9961 + ], + "declarations": [ + { + "constant": false, + "id": 9961, + "mutability": "mutable", + "name": "reserve", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9976, + "src": "22632:22:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve" + }, + "typeName": { + "contractScope": null, + "id": 9960, + "name": "Reserve", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9023, + "src": "22632:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage_ptr", + "typeString": "struct ConverterBase.Reserve" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 9965, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 9962, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "22657:8:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 9964, + "indexExpression": { + "argumentTypes": null, + "id": 9963, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9946, + "src": "22666:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22657:18:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22632:43:8" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9966, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22693:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9967, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "22693:15:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9968, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22710:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "22710:14:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9970, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22726:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 9971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22733:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9972, + "name": "reserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9961, + "src": "22740:7:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_memory_ptr", + "typeString": "struct ConverterBase.Reserve memory" + } + }, + "id": 9973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "22740:13:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 9974, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "22692:62:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "functionReturnParameters": 9959, + "id": 9975, + "nodeType": "Return", + "src": "22686:68:8" + } + ] + }, + "documentation": { + "id": 9944, + "nodeType": "StructuredDocumentation", + "src": "22448:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0e53aae9", + "id": 9977, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9948, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22568:8:8" + }, + "parameters": { + "id": 9947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9946, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22534:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9945, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22534:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22533:22:8" + }, + "returnParameters": { + "id": 9959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9950, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22586:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9949, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22586:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9952, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22595:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 9951, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22595:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9954, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22603:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9953, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22603:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9956, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22609:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9955, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22609:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 9958, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9977, + "src": "22615:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 9957, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22615:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22585:35:8" + }, + "scope": 10039, + "src": "22514:248:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13334 + ], + "body": { + "id": 9991, + "nodeType": "Block", + "src": "22920:61:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 9986, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "22938:13:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "id": 9987, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "reserveTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 9036, + "src": "22938:27:8", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 9989, + "indexExpression": { + "argumentTypes": null, + "id": 9988, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9980, + "src": "22966:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22938:35:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 9985, + "id": 9990, + "nodeType": "Return", + "src": "22931:42:8" + } + ] + }, + "documentation": { + "id": 9978, + "nodeType": "StructuredDocumentation", + "src": "22770:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "19b64015", + "id": 9992, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectorTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9982, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22889:8:8" + }, + "parameters": { + "id": 9981, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9980, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9992, + "src": "22861:14:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9979, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22861:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22860:16:8" + }, + "returnParameters": { + "id": 9985, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9984, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 9992, + "src": "22907:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 9983, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22907:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22906:13:8" + }, + "scope": 10039, + "src": "22836:145:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13339 + ], + "body": { + "id": 10002, + "nodeType": "Block", + "src": "23124:45:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 9999, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "23142:17:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 10000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23142:19:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 9998, + "id": 10001, + "nodeType": "Return", + "src": "23135:26:8" + } + ] + }, + "documentation": { + "id": 9993, + "nodeType": "StructuredDocumentation", + "src": "22989:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "71f52bf3", + "id": 10003, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "connectorTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 9995, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23098:8:8" + }, + "parameters": { + "id": 9994, + "nodeType": "ParameterList", + "parameters": [], + "src": "23083:2:8" + }, + "returnParameters": { + "id": 9998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 9997, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10003, + "src": "23116:6:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 9996, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "23116:6:8", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23115:8:8" + }, + "scope": 10039, + "src": "23055:114:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13327 + ], + "body": { + "id": 10016, + "nodeType": "Block", + "src": "23340:57:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10013, + "name": "_connectorToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10006, + "src": "23373:15:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 10012, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "23358:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 10014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23358:31:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10011, + "id": 10015, + "nodeType": "Return", + "src": "23351:38:8" + } + ] + }, + "documentation": { + "id": 10004, + "nodeType": "StructuredDocumentation", + "src": "23177:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "d8959512", + "id": 10017, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConnectorBalance", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10008, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23313:8:8" + }, + "parameters": { + "id": 10007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10006, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10017, + "src": "23272:27:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10005, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23272:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23271:29:8" + }, + "returnParameters": { + "id": 10011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10010, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10017, + "src": "23331:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23331:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23330:9:8" + }, + "scope": 10039, + "src": "23243:154:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10037, + "nodeType": "Block", + "src": "23598:81:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10032, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10020, + "src": "23635:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10033, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10022, + "src": "23649:12:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10034, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10024, + "src": "23663:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10031, + "name": "targetAmountAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9256, + "src": "23616:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 10035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23616:55:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 10030, + "id": 10036, + "nodeType": "Return", + "src": "23609:62:8" + } + ] + }, + "documentation": { + "id": 10018, + "nodeType": "StructuredDocumentation", + "src": "23405:60:8", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "1e1401f8", + "id": 10038, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10020, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23490:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23490:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10022, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23516:24:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10021, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23516:11:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10024, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23542:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23542:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23489:69:8" + }, + "returnParameters": { + "id": 10030, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10027, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23580:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23580:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10029, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10038, + "src": "23589:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10028, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23579:18:8" + }, + "scope": 10039, + "src": "23471:208:8", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 10040, + "src": "1648:22034:8" + } + ], + "src": "52:23632:8" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.712Z", + "devdoc": { + "details": "ConverterBase The converter contains the main logic for conversions between different ERC20 tokens. It is also the upgradable part of the mechanism (note that upgrades are opt-in). The anchor must be set on construction and cannot be changed afterwards. Wrappers are provided for some of the anchor's functions, for easier access. Once the converter accepts ownership of the anchor, it becomes the anchor's sole controller and can execute any of its functions. To upgrade the converter, anchor ownership must be transferred to a new converter, along with any relevant data. Note that the converter can transfer anchor ownership to a new converter that doesn't allow upgrades anymore, for finalizing the relationship between the converter and the anchor. Converter types (defined as uint16 type) - 0 = liquid token converter 1 = liquidity pool v1 converter 2 = liquidity pool v2 converter Note that converters don't currently support tokens with transfer fees.", + "events": { + "Activation(uint16,address,bool)": { + "details": "triggered when the converter is activated", + "params": { + "_activated": "true if the converter was activated, false if it was deactivated", + "_anchor": "converter anchor", + "_type": "converter type" + } + }, + "Conversion(address,address,address,uint256,uint256,int256)": { + "details": "triggered when a conversion between two tokens occurs", + "params": { + "_amount": "amount converted, in the source token", + "_conversionFee": "conversion fee", + "_fromToken": "source ERC20 token", + "_return": "amount returned, minus conversion fee", + "_toToken": "target ERC20 token", + "_trader": "wallet that initiated the trade" + } + }, + "ConversionFeeUpdate(uint32,uint32)": { + "details": "triggered when the conversion fee is updated", + "params": { + "_newFee": "new fee percentage, represented in ppm", + "_prevFee": "previous fee percentage, represented in ppm" + } + }, + "TokenRateUpdate(address,address,uint256,uint256)": { + "details": "triggered when the rate between two tokens in the converter changes note that the event might be dispatched for rate updates between any two tokens in the converter note that prior to version 28, you should use the 'PriceDataUpdate' event instead", + "params": { + "_rateD": "rate of 1 unit of `_token1` in `_token2` (denominator)", + "_rateN": "rate of 1 unit of `_token1` in `_token2` (numerator)", + "_token1": "address of the first token", + "_token2": "address of the second token" + } + } + }, + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer most converters are also activated as soon as they accept the anchor ownership can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "constructor": { + "details": "used by sub-contracts to initialize a new converter", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract" + } + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "stateVariables": { + "version": { + "details": "version number" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/ConverterFactory.json new file mode 100644 index 00000000..fefe334a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterFactory.json @@ -0,0 +1,5936 @@ +{ + "contractName": "ConverterFactory", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "anchorFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterAnchorFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "converterFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "customFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterCustomFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterAnchorFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterAnchorFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterCustomFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterCustomFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_converterType", + "type": "uint16" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"NewConverter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"anchorFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterAnchorFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"converterFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_converterType\",\"type\":\"uint16\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"customFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterCustomFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterAnchorFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterAnchorFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterCustomFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterCustomFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"NewConverter(uint16,address,address)\":{\"details\":\"triggered when a new converter is created\",\"params\":{\"_converter\":\"new converter address\",\"_owner\":\"converter owner address\",\"_type\":\"converter type, see ConverterBase contract main doc\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"createAnchor(uint16,string,string,uint8)\":{\"details\":\"creates a new converter anchor with the given arguments and transfers the ownership to the caller\",\"params\":{\"_converterType\":\"converter type, see ConverterBase contract main doc\",\"_decimals\":\"decimals\",\"_name\":\"name\",\"_symbol\":\"symbol\"},\"returns\":{\"_0\":\"new converter anchor\"}},\"createConverter(uint16,address,address,uint32)\":{\"details\":\"creates a new converter with the given arguments and transfers the ownership to the caller\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"new converter\"}},\"registerTypedConverterAnchorFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter anchor factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter anchor factory\"}},\"registerTypedConverterCustomFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter custom factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter custom factory\"}},\"registerTypedConverterFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter factory\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol\":\"ConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol\":{\"keccak256\":\"0x41714dbd78e5e77c16aa74186a29e9dada20138e511e9fe0acea24b7184c3782\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://55420446cbabc53516b8ec7a77febbe3f9fc50af97ab97df208477c833f60edb\",\"dweb:/ipfs/QmPMCrQBhDLovSdUHushF2pK6sgjcQCGHNYpTCAPkeBiZB\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055611e53806100326000396000f3fe60806040523480156200001157600080fd5b5060043610620000c45760003560e01c80638cac5e29116200007b5780638cac5e2914620002f25780638da5cb5b146200031b578063c977aed21462000325578063d4ee1d901462000349578063e54b93ef1462000353578063f2fde38b146200037c57620000c4565b806312b4c6c114620000c957806315f64b6a14620000f45780632e9ab7b3146200015a578063327779a714620002a05780633a8fc52014620002c457806379ba509714620002e8575b600080fd5b620000f260048036036020811015620000e157600080fd5b50356001600160a01b0316620003a5565b005b6200013e600480360360808110156200010c57600080fd5b50803561ffff169060208101356001600160a01b03908116916040810135909116906060013563ffffffff1662000451565b604080516001600160a01b039092168252519081900360200190f35b6200013e600480360360808110156200017257600080fd5b61ffff82351691908101906040810160208201356401000000008111156200019957600080fd5b820183602082011115620001ac57600080fd5b80359060200191846001830284011164010000000083111715620001cf57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200022357600080fd5b8201836020820111156200023657600080fd5b803590602001918460018302840111640100000000831117156200025957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150620005f69050565b6200013e60048036036020811015620002b857600080fd5b503561ffff166200094c565b6200013e60048036036020811015620002dc57600080fd5b503561ffff1662000967565b620000f262000982565b620000f2600480360360208110156200030a57600080fd5b50356001600160a01b031662000a3a565b6200013e62000a83565b6200013e600480360360208110156200033d57600080fd5b503561ffff1662000a92565b6200013e62000aad565b620000f2600480360360208110156200036b57600080fd5b50356001600160a01b031662000abc565b620000f2600480360360208110156200039457600080fd5b50356001600160a01b031662000b05565b620003af62000b86565b8060026000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b505afa15801562000403573d6000803e3d6000fd5b505050506040513d60208110156200041a57600080fd5b505161ffff168152602081019190915260400160002080546001600160a01b0319166001600160a01b039290921691909117905550565b61ffff84166000908152600260209081526040808320548151630228272b60e31b81526001600160a01b038881166004830152878116602483015263ffffffff8716604483015292518594939092169263114139589260648084019382900301818787803b158015620004c357600080fd5b505af1158015620004d8573d6000803e3d6000fd5b505050506040513d6020811015620004ef57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b1580156200053757600080fd5b505af11580156200054c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b1580156200059857600080fd5b505af1158015620005ad573d6000803e3d6000fd5b50506040513392506001600160a01b038416915061ffff8916907fbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a390600090a495945050505050565b61ffff841660009081526003602052604081205481906001600160a01b03168062000731578585856040516200062c9062000bdc565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b838110156200067257818101518382015260200162000658565b50505050905090810190601f168015620006a05780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620006d5578181015183820152602001620006bb565b50505050905090810190601f168015620007035780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000728573d6000803e3d6000fd5b509150620008e0565b806001600160a01b031663a9fd4a2a8787876040518463ffffffff1660e01b81526004018080602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156200079e57818101518382015260200162000784565b50505050905090810190601f168015620007cc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000801578181015183820152602001620007e7565b50505050905090810190601f1680156200082f5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156200085257600080fd5b505af115801562000867573d6000803e3d6000fd5b505050506040513d60208110156200087e57600080fd5b5051604080516379ba509760e01b815290519193506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b158015620008c657600080fd5b505af1158015620008db573d6000803e3d6000fd5b505050505b6040805163f2fde38b60e01b815233600482015290516001600160a01b0384169163f2fde38b91602480830192600092919082900301818387803b1580156200092857600080fd5b505af11580156200093d573d6000803e3d6000fd5b50939998505050505050505050565b6002602052600090815260409020546001600160a01b031681565b6003602052600090815260409020546001600160a01b031681565b6001546001600160a01b03163314620009d6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b62000a4462000b86565b8060046000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b6000546001600160a01b031681565b6004602052600090815260409020546001600160a01b031681565b6001546001600160a01b031681565b62000ac662000b86565b8060036000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b62000b0f62000b86565b6000546001600160a01b038281169116141562000b64576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331462000bda576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6112338062000beb8339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a2646970667358221220fc5f6a99127d8d0071c0f2c4ac85b6fdbbf4eedbd35f596c64b06cf58ca8125d64736f6c634300060c0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000c45760003560e01c80638cac5e29116200007b5780638cac5e2914620002f25780638da5cb5b146200031b578063c977aed21462000325578063d4ee1d901462000349578063e54b93ef1462000353578063f2fde38b146200037c57620000c4565b806312b4c6c114620000c957806315f64b6a14620000f45780632e9ab7b3146200015a578063327779a714620002a05780633a8fc52014620002c457806379ba509714620002e8575b600080fd5b620000f260048036036020811015620000e157600080fd5b50356001600160a01b0316620003a5565b005b6200013e600480360360808110156200010c57600080fd5b50803561ffff169060208101356001600160a01b03908116916040810135909116906060013563ffffffff1662000451565b604080516001600160a01b039092168252519081900360200190f35b6200013e600480360360808110156200017257600080fd5b61ffff82351691908101906040810160208201356401000000008111156200019957600080fd5b820183602082011115620001ac57600080fd5b80359060200191846001830284011164010000000083111715620001cf57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200022357600080fd5b8201836020820111156200023657600080fd5b803590602001918460018302840111640100000000831117156200025957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150620005f69050565b6200013e60048036036020811015620002b857600080fd5b503561ffff166200094c565b6200013e60048036036020811015620002dc57600080fd5b503561ffff1662000967565b620000f262000982565b620000f2600480360360208110156200030a57600080fd5b50356001600160a01b031662000a3a565b6200013e62000a83565b6200013e600480360360208110156200033d57600080fd5b503561ffff1662000a92565b6200013e62000aad565b620000f2600480360360208110156200036b57600080fd5b50356001600160a01b031662000abc565b620000f2600480360360208110156200039457600080fd5b50356001600160a01b031662000b05565b620003af62000b86565b8060026000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b505afa15801562000403573d6000803e3d6000fd5b505050506040513d60208110156200041a57600080fd5b505161ffff168152602081019190915260400160002080546001600160a01b0319166001600160a01b039290921691909117905550565b61ffff84166000908152600260209081526040808320548151630228272b60e31b81526001600160a01b038881166004830152878116602483015263ffffffff8716604483015292518594939092169263114139589260648084019382900301818787803b158015620004c357600080fd5b505af1158015620004d8573d6000803e3d6000fd5b505050506040513d6020811015620004ef57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b1580156200053757600080fd5b505af11580156200054c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b1580156200059857600080fd5b505af1158015620005ad573d6000803e3d6000fd5b50506040513392506001600160a01b038416915061ffff8916907fbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a390600090a495945050505050565b61ffff841660009081526003602052604081205481906001600160a01b03168062000731578585856040516200062c9062000bdc565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b838110156200067257818101518382015260200162000658565b50505050905090810190601f168015620006a05780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620006d5578181015183820152602001620006bb565b50505050905090810190601f168015620007035780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000728573d6000803e3d6000fd5b509150620008e0565b806001600160a01b031663a9fd4a2a8787876040518463ffffffff1660e01b81526004018080602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156200079e57818101518382015260200162000784565b50505050905090810190601f168015620007cc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000801578181015183820152602001620007e7565b50505050905090810190601f1680156200082f5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156200085257600080fd5b505af115801562000867573d6000803e3d6000fd5b505050506040513d60208110156200087e57600080fd5b5051604080516379ba509760e01b815290519193506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b158015620008c657600080fd5b505af1158015620008db573d6000803e3d6000fd5b505050505b6040805163f2fde38b60e01b815233600482015290516001600160a01b0384169163f2fde38b91602480830192600092919082900301818387803b1580156200092857600080fd5b505af11580156200093d573d6000803e3d6000fd5b50939998505050505050505050565b6002602052600090815260409020546001600160a01b031681565b6003602052600090815260409020546001600160a01b031681565b6001546001600160a01b03163314620009d6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b62000a4462000b86565b8060046000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b6000546001600160a01b031681565b6004602052600090815260409020546001600160a01b031681565b6001546001600160a01b031681565b62000ac662000b86565b8060036000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015620003ee57600080fd5b62000b0f62000b86565b6000546001600160a01b038281169116141562000b64576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331462000bda576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6112338062000beb8339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a2646970667358221220fc5f6a99127d8d0071c0f2c4ac85b6fdbbf4eedbd35f596c64b06cf58ca8125d64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "482:3960:9:-:0;;;;;;;;;;;;-1:-1:-1;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;482:3960:9;;;;;;", + "deployedSourceMap": "482:3960:9:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1350:163;;;;;;;;;;;;;;;;-1:-1:-1;1350:163:9;-1:-1:-1;;;;;1350:163:9;;:::i;:::-;;3936:503;;;;;;;;;;;;;;;;-1:-1:-1;3936:503:9;;;;;;;;;-1:-1:-1;;;;;3936:503:9;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;3936:503:9;;;;;;;;;;;;;;2696:744;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2696:744:9;;;;;;;;-1:-1:-1;2696:744:9;;-1:-1:-1;;2696:744:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2696:744:9;;-1:-1:-1;;;2696:744:9;;;;;-1:-1:-1;2696:744:9;;-1:-1:-1;2696:744:9:i;914:68::-;;;;;;;;;;;;;;;;-1:-1:-1;914:68:9;;;;:::i;989:71::-;;;;;;;;;;;;;;;;-1:-1:-1;989:71:9;;;;:::i;1422:217:58:-;;;:::i;2117:172:9:-;;;;;;;;;;;;;;;;-1:-1:-1;2117:172:9;-1:-1:-1;;;;;2117:172:9;;:::i;219:29:58:-;;;:::i;1067:80:9:-;;;;;;;;;;;;;;;;-1:-1:-1;1067:80:9;;;;:::i;255:23:58:-;;;:::i;1729:172:9:-;;;;;;;;;;;;;;;;-1:-1:-1;1729:172:9;-1:-1:-1;;;;;1729:172:9;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;1350:163:9:-;726:12:58;:10;:12::i;:::-;1497:8:9::1;1450:18;:44;1469:8;-1:-1:-1::0;;;;;1469:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1469:24:9;1450:44:::1;;::::0;;1469:24:::1;1450:44:::0;::::1;::::0;;;;;;-1:-1:-1;1450:44:9;:55;;-1:-1:-1;;;;;;1450:55:9::1;-1:-1:-1::0;;;;;1450:55:9;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1350:163:9:o;3936:503::-;4176:25;;;4125:10;4176:25;;;:18;:25;;;;;;;;;:80;;-1:-1:-1;;;4176:80:9;;-1:-1:-1;;;;;4176:80:9;;;;;;;;;;;;;;;;;;;;;;;4125:10;;4176:25;;;;;:41;;:80;;;;;;;;;;4125:10;4176:25;:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4176:80:9;4267:27;;;-1:-1:-1;;;4267:27:9;;;;4176:80;;-1:-1:-1;;;;;;4267:25:9;;;;;:27;;;;;;;;;;;;;;;;:25;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4305:39:9;;;-1:-1:-1;;;4305:39:9;;4333:10;4305:39;;;;;;-1:-1:-1;;;;;4305:27:9;;;-1:-1:-1;4305:27:9;;-1:-1:-1;4305:39:9;;;;;-1:-1:-1;;4305:39:9;;;;;;;-1:-1:-1;4305:27:9;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4362:42:9;;4393:10;;-1:-1:-1;;;;;;4362:42:9;;;-1:-1:-1;4362:42:9;;;;;;;;;4422:9;3936:503;-1:-1:-1;;;;;3936:503:9:o;2696:744::-;2978:31;;;2871:16;2978:31;;;:15;:31;;;;;;2871:16;;-1:-1:-1;;;;;2978:31:9;3026:30;3022:338;;3148:5;3155:7;3164:9;3133:41;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3133:41:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3124:50;;3022:338;;;3262:7;-1:-1:-1;;;;;3262:20:9;;3283:5;3290:7;3299:9;3262:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3262:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3262:47:9;3324:24;;;-1:-1:-1;;;3324:24:9;;;;3262:47;;-1:-1:-1;;;;;;3324:22:9;;;;;:24;;;;;;;;;;;;;;;;:22;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3022:338;3372:36;;;-1:-1:-1;;;3372:36:9;;3397:10;3372:36;;;;;;-1:-1:-1;;;;;3372:24:9;;;;;:36;;;;;-1:-1:-1;;3372:36:9;;;;;;;-1:-1:-1;3372:24:9;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3426:6:9;;2696:744;-1:-1:-1;;;;;;;;;2696:744:9:o;914:68::-;;;;;;;;;;;;-1:-1:-1;;;;;914:68:9;;:::o;989:71::-;;;;;;;;;;;;-1:-1:-1;;;;;989:71:9;;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:58;;;-1:-1:-1;;;;;1591:8:58;;1583:16;;;;1610:21;;;1422:217::o;2117:172:9:-;726:12:58;:10;:12::i;:::-;2273:8:9::1;2229:15;:41;2245:8;-1:-1:-1::0;;;;;2245:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;219:29:58::0;;;-1:-1:-1;;;;;219:29:58;;:::o;1067:80:9:-;;;;;;;;;;;;-1:-1:-1;;;;;1067:80:9;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;1729:172:9:-;726:12:58;:10;:12::i;:::-;1885:8:9::1;1841:15;:41;1857:8;-1:-1:-1::0;;;;;1857:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;1164:167:58::0;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;;813:104::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IConverter.sol\";\r\nimport \"./interfaces/IConverterFactory.sol\";\r\nimport \"./interfaces/ITypedConverterFactory.sol\";\r\nimport \"./interfaces/ITypedConverterAnchorFactory.sol\";\r\nimport \"./interfaces/ITypedConverterCustomFactory.sol\";\r\nimport \"../utility/Owned.sol\";\r\nimport \"../utility/interfaces/IContractRegistry.sol\";\r\nimport \"../token/SmartToken.sol\";\r\n\r\n/*\r\n Converter Factory\r\n*/\r\ncontract ConverterFactory is IConverterFactory, Owned {\r\n /**\r\n * @dev triggered when a new converter is created\r\n *\r\n * @param _type converter type, see ConverterBase contract main doc\r\n * @param _converter new converter address\r\n * @param _owner converter owner address\r\n */\r\n event NewConverter(uint16 indexed _type, IConverter indexed _converter, address indexed _owner);\r\n\r\n mapping (uint16 => ITypedConverterFactory) public converterFactories;\r\n mapping (uint16 => ITypedConverterAnchorFactory) public anchorFactories;\r\n mapping (uint16 => ITypedConverterCustomFactory) public override customFactories;\r\n\r\n /**\r\n * @dev initializes the factory with a specific typed converter factory\r\n * can only be called by the owner\r\n *\r\n * @param _factory typed converter factory\r\n */\r\n function registerTypedConverterFactory(ITypedConverterFactory _factory) public ownerOnly {\r\n converterFactories[_factory.converterType()] = _factory;\r\n }\r\n\r\n /**\r\n * @dev initializes the factory with a specific typed converter anchor factory\r\n * can only be called by the owner\r\n *\r\n * @param _factory typed converter anchor factory\r\n */\r\n function registerTypedConverterAnchorFactory(ITypedConverterAnchorFactory _factory) public ownerOnly {\r\n anchorFactories[_factory.converterType()] = _factory;\r\n }\r\n\r\n /**\r\n * @dev initializes the factory with a specific typed converter custom factory\r\n * can only be called by the owner\r\n *\r\n * @param _factory typed converter custom factory\r\n */\r\n function registerTypedConverterCustomFactory(ITypedConverterCustomFactory _factory) public ownerOnly {\r\n customFactories[_factory.converterType()] = _factory;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter anchor with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _converterType converter type, see ConverterBase contract main doc\r\n * @param _name name\r\n * @param _symbol symbol\r\n * @param _decimals decimals\r\n *\r\n * @return new converter anchor\r\n */\r\n function createAnchor(uint16 _converterType, string memory _name, string memory _symbol, uint8 _decimals)\r\n public\r\n virtual\r\n override\r\n returns (IConverterAnchor)\r\n {\r\n IConverterAnchor anchor;\r\n ITypedConverterAnchorFactory factory = anchorFactories[_converterType];\r\n\r\n if (address(factory) == address(0)) {\r\n // create default anchor (SmartToken)\r\n anchor = new SmartToken(_name, _symbol, _decimals);\r\n }\r\n else {\r\n // create custom anchor\r\n anchor = factory.createAnchor(_name, _symbol, _decimals);\r\n anchor.acceptOwnership();\r\n }\r\n\r\n anchor.transferOwnership(msg.sender);\r\n return anchor;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _type converter type, see ConverterBase contract main doc\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n *\r\n * @return new converter\r\n */\r\n function createConverter(uint16 _type, IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee)\r\n public\r\n virtual\r\n override\r\n returns (IConverter)\r\n {\r\n IConverter converter = converterFactories[_type].createConverter(_anchor, _registry, _maxConversionFee);\r\n converter.acceptOwnership();\r\n converter.transferOwnership(msg.sender);\r\n\r\n emit NewConverter(_type, converter, msg.sender);\r\n return converter;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol", + "exportedSymbols": { + "ConverterFactory": [ + 10244 + ] + }, + "id": 10245, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 10041, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:9" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 10042, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13341, + "src": "77:37:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 10043, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13390, + "src": "116:44:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "./interfaces/ITypedConverterFactory.sol", + "id": 10044, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13711, + "src": "162:49:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "./interfaces/ITypedConverterAnchorFactory.sol", + "id": 10045, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13681, + "src": "213:55:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "./interfaces/ITypedConverterCustomFactory.sol", + "id": 10046, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13689, + "src": "270:55:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 10047, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 22154, + "src": "327:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../utility/interfaces/IContractRegistry.sol", + "id": 10048, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 23167, + "src": "359:53:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../token/SmartToken.sol", + "id": 10049, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 21395, + "src": "414:33:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10050, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "511:17:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10051, + "nodeType": "InheritanceSpecifier", + "src": "511:17:9" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10052, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "530:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 10053, + "nodeType": "InheritanceSpecifier", + "src": "530:5:9" + } + ], + "contractDependencies": [ + 13389, + 21394, + 22153, + 23182 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 10244, + "linearizedBaseContracts": [ + 10244, + 22153, + 23182, + 13389 + ], + "name": "ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 10054, + "nodeType": "StructuredDocumentation", + "src": "543:261:9", + "text": " @dev triggered when a new converter is created\n @param _type converter type, see ConverterBase contract main doc\n @param _converter new converter address\n @param _owner converter owner address" + }, + "id": 10062, + "name": "NewConverter", + "nodeType": "EventDefinition", + "parameters": { + "id": 10061, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10056, + "indexed": true, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "829:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10055, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "829:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10058, + "indexed": true, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "851:29:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10057, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "851:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10060, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "882:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "882:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "828:77:9" + }, + "src": "810:96:9" + }, + { + "constant": false, + "functionSelector": "327779a7", + "id": 10066, + "mutability": "mutable", + "name": "converterFactories", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10244, + "src": "914:68:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + }, + "typeName": { + "id": 10065, + "keyType": { + "id": 10063, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "923:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "914:42:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10064, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "933:22:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3a8fc520", + "id": 10070, + "mutability": "mutable", + "name": "anchorFactories", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10244, + "src": "989:71:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + }, + "typeName": { + "id": 10069, + "keyType": { + "id": 10067, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "998:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "989:48:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10068, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "1008:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 13388 + ], + "constant": false, + "functionSelector": "c977aed2", + "id": 10075, + "mutability": "mutable", + "name": "customFactories", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 10074, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1123:8:9" + }, + "scope": 10244, + "src": "1067:80:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + }, + "typeName": { + "id": 10073, + "keyType": { + "id": 10071, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1076:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "1067:48:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10072, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "1086:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 10091, + "nodeType": "Block", + "src": "1439:74:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10083, + "name": "converterFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10066, + "src": "1450:18:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + } + }, + "id": 10087, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10084, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10078, + "src": "1469:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13698, + "src": "1469:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1469:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1450:44:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10088, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10078, + "src": "1497:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "src": "1450:55:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10090, + "nodeType": "ExpressionStatement", + "src": "1450:55:9" + } + ] + }, + "documentation": { + "id": 10076, + "nodeType": "StructuredDocumentation", + "src": "1156:188:9", + "text": " @dev initializes the factory with a specific typed converter factory\n can only be called by the owner\n @param _factory typed converter factory" + }, + "functionSelector": "12b4c6c1", + "id": 10092, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10081, + "modifierName": { + "argumentTypes": null, + "id": 10080, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1429:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1429:9:9" + } + ], + "name": "registerTypedConverterFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10079, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10078, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10092, + "src": "1389:31:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 10077, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "1389:22:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1388:33:9" + }, + "returnParameters": { + "id": 10082, + "nodeType": "ParameterList", + "parameters": [], + "src": "1439:0:9" + }, + "scope": 10244, + "src": "1350:163:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10108, + "nodeType": "Block", + "src": "1830:71:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10100, + "name": "anchorFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10070, + "src": "1841:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + } + }, + "id": 10104, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10101, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10095, + "src": "1857:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13668, + "src": "1857:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1857:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1841:41:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10105, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10095, + "src": "1885:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "src": "1841:52:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10107, + "nodeType": "ExpressionStatement", + "src": "1841:52:9" + } + ] + }, + "documentation": { + "id": 10093, + "nodeType": "StructuredDocumentation", + "src": "1521:202:9", + "text": " @dev initializes the factory with a specific typed converter anchor factory\n can only be called by the owner\n @param _factory typed converter anchor factory" + }, + "functionSelector": "e54b93ef", + "id": 10109, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10098, + "modifierName": { + "argumentTypes": null, + "id": 10097, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1820:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1820:9:9" + } + ], + "name": "registerTypedConverterAnchorFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10095, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10109, + "src": "1774:37:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + }, + "typeName": { + "contractScope": null, + "id": 10094, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "1774:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1773:39:9" + }, + "returnParameters": { + "id": 10099, + "nodeType": "ParameterList", + "parameters": [], + "src": "1830:0:9" + }, + "scope": 10244, + "src": "1729:172:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10125, + "nodeType": "Block", + "src": "2218:71:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10117, + "name": "customFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10075, + "src": "2229:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + } + }, + "id": 10121, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10118, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10112, + "src": "2245:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 10119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13687, + "src": "2245:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2245:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2229:41:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10122, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10112, + "src": "2273:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "src": "2229:52:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 10124, + "nodeType": "ExpressionStatement", + "src": "2229:52:9" + } + ] + }, + "documentation": { + "id": 10110, + "nodeType": "StructuredDocumentation", + "src": "1909:202:9", + "text": " @dev initializes the factory with a specific typed converter custom factory\n can only be called by the owner\n @param _factory typed converter custom factory" + }, + "functionSelector": "8cac5e29", + "id": 10126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10115, + "modifierName": { + "argumentTypes": null, + "id": 10114, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2208:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2208:9:9" + } + ], + "name": "registerTypedConverterCustomFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10112, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10126, + "src": "2162:37:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 10111, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "2162:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2161:39:9" + }, + "returnParameters": { + "id": 10116, + "nodeType": "ParameterList", + "parameters": [], + "src": "2218:0:9" + }, + "scope": 10244, + "src": "2117:172:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13368 + ], + "body": { + "id": 10194, + "nodeType": "Block", + "src": "2894:546:9", + "statements": [ + { + "assignments": [ + 10142 + ], + "declarations": [ + { + "constant": false, + "id": 10142, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10194, + "src": "2905:23:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10141, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2905:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10143, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2905:23:9" + }, + { + "assignments": [ + 10145 + ], + "declarations": [ + { + "constant": false, + "id": 10145, + "mutability": "mutable", + "name": "factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10194, + "src": "2939:36:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + }, + "typeName": { + "contractScope": null, + "id": 10144, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "2939:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10149, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10146, + "name": "anchorFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10070, + "src": "2978:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + } + }, + "id": 10148, + "indexExpression": { + "argumentTypes": null, + "id": 10147, + "name": "_converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10129, + "src": "2994:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2978:31:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2939:70:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10152, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10145, + "src": "3034:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + ], + "id": 10151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3026:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3026:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3026:16:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3054: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": 10155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3046:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3046:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3046:10:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3026:30:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 10183, + "nodeType": "Block", + "src": "3201:159:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 10169, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3253:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10172, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10131, + "src": "3283:5:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10173, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10133, + "src": "3290:7:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10174, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10135, + "src": "3299:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 10170, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10145, + "src": "3262:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13679, + "src": "3262:20:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (string memory,string memory,uint8) external returns (contract IConverterAnchor)" + } + }, + "id": 10175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3262:47:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "3253:56:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10177, + "nodeType": "ExpressionStatement", + "src": "3253:56:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10178, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3324:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23181, + "src": "3324:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3324:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10182, + "nodeType": "ExpressionStatement", + "src": "3324:24:9" + } + ] + }, + "id": 10184, + "nodeType": "IfStatement", + "src": "3022:338:9", + "trueBody": { + "id": 10168, + "nodeType": "Block", + "src": "3058:128:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 10159, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3124:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10162, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10131, + "src": "3148:5:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10163, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10133, + "src": "3155:7:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10164, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10135, + "src": "3164:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 10161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3133:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 10160, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "3137:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 10165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3133:41:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "src": "3124:50:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10167, + "nodeType": "ExpressionStatement", + "src": "3124:50:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3397:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3397:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10185, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3372:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "3372:24:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3372:36:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10191, + "nodeType": "ExpressionStatement", + "src": "3372:36:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 10192, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3426:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10140, + "id": 10193, + "nodeType": "Return", + "src": "3419:13:9" + } + ] + }, + "documentation": { + "id": 10127, + "nodeType": "StructuredDocumentation", + "src": "2297:393:9", + "text": " @dev creates a new converter anchor with the given arguments and transfers\n the ownership to the caller\n @param _converterType converter type, see ConverterBase contract main doc\n @param _name name\n @param _symbol symbol\n @param _decimals decimals\n @return new converter anchor" + }, + "functionSelector": "2e9ab7b3", + "id": 10195, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10137, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2844:8:9" + }, + "parameters": { + "id": 10136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10129, + "mutability": "mutable", + "name": "_converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2718:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10128, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2718:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10131, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2741:19:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10130, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2741:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10133, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2762:21:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10132, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2762:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10135, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2785:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 10134, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2785:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2717:84:9" + }, + "returnParameters": { + "id": 10140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10139, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2871:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10138, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2871:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2870:18:9" + }, + "scope": 10244, + "src": "2696:744:9", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13381 + ], + "body": { + "id": 10242, + "nodeType": "Block", + "src": "4142:297:9", + "statements": [ + { + "assignments": [ + 10211 + ], + "declarations": [ + { + "constant": false, + "id": 10211, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10242, + "src": "4153:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10210, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4153:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10220, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10216, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10200, + "src": "4218:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 10217, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10202, + "src": "4227:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 10218, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10204, + "src": "4238:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10212, + "name": "converterFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10066, + "src": "4176:18:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + } + }, + "id": 10214, + "indexExpression": { + "argumentTypes": null, + "id": 10213, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10198, + "src": "4195:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4176:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13709, + "src": "4176:41:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$23166_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 10219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:80:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4153:103:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10221, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4267:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23181, + "src": "4267:25:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4267:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10225, + "nodeType": "ExpressionStatement", + "src": "4267:27:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10229, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4333:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4333:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10226, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4305:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "4305:27:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4305:39:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10232, + "nodeType": "ExpressionStatement", + "src": "4305:39:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10234, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10198, + "src": "4375:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10235, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4382:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10236, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4393:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4393:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 10233, + "name": "NewConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10062, + "src": "4362:12:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverter_$13340_$_t_address_$returns$__$", + "typeString": "function (uint16,contract IConverter,address)" + } + }, + "id": 10238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4362:42:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10239, + "nodeType": "EmitStatement", + "src": "4357:47:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 10240, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4422:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 10209, + "id": 10241, + "nodeType": "Return", + "src": "4415:16:9" + } + ] + }, + "documentation": { + "id": 10196, + "nodeType": "StructuredDocumentation", + "src": "3448:482:9", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _type converter type, see ConverterBase contract main doc\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return new converter" + }, + "functionSelector": "15f64b6a", + "id": 10243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10206, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4098:8:9" + }, + "parameters": { + "id": 10205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10198, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "3961:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10197, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3961:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10200, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "3975:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10199, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3975:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10202, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4001:27:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 10201, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23166, + "src": "4001:17:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10204, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4030:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 10203, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4030:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3960:95:9" + }, + "returnParameters": { + "id": 10209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10208, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4125:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10207, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4125:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4124:12:9" + }, + "scope": 10244, + "src": "3936:503:9", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 10245, + "src": "482:3960:9" + } + ], + "src": "52:4392:9" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol", + "exportedSymbols": { + "ConverterFactory": [ + 10244 + ] + }, + "id": 10245, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 10041, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:9" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 10042, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13341, + "src": "77:37:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 10043, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13390, + "src": "116:44:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "./interfaces/ITypedConverterFactory.sol", + "id": 10044, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13711, + "src": "162:49:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "./interfaces/ITypedConverterAnchorFactory.sol", + "id": 10045, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13681, + "src": "213:55:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "./interfaces/ITypedConverterCustomFactory.sol", + "id": 10046, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 13689, + "src": "270:55:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 10047, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 22154, + "src": "327:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../utility/interfaces/IContractRegistry.sol", + "id": 10048, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 23167, + "src": "359:53:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../token/SmartToken.sol", + "id": 10049, + "nodeType": "ImportDirective", + "scope": 10245, + "sourceUnit": 21395, + "src": "414:33:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10050, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "511:17:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10051, + "nodeType": "InheritanceSpecifier", + "src": "511:17:9" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10052, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "530:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 10053, + "nodeType": "InheritanceSpecifier", + "src": "530:5:9" + } + ], + "contractDependencies": [ + 13389, + 21394, + 22153, + 23182 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 10244, + "linearizedBaseContracts": [ + 10244, + 22153, + 23182, + 13389 + ], + "name": "ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 10054, + "nodeType": "StructuredDocumentation", + "src": "543:261:9", + "text": " @dev triggered when a new converter is created\n @param _type converter type, see ConverterBase contract main doc\n @param _converter new converter address\n @param _owner converter owner address" + }, + "id": 10062, + "name": "NewConverter", + "nodeType": "EventDefinition", + "parameters": { + "id": 10061, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10056, + "indexed": true, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "829:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10055, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "829:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10058, + "indexed": true, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "851:29:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10057, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "851:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10060, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10062, + "src": "882:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "882:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "828:77:9" + }, + "src": "810:96:9" + }, + { + "constant": false, + "functionSelector": "327779a7", + "id": 10066, + "mutability": "mutable", + "name": "converterFactories", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10244, + "src": "914:68:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + }, + "typeName": { + "id": 10065, + "keyType": { + "id": 10063, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "923:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "914:42:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10064, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "933:22:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3a8fc520", + "id": 10070, + "mutability": "mutable", + "name": "anchorFactories", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10244, + "src": "989:71:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + }, + "typeName": { + "id": 10069, + "keyType": { + "id": 10067, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "998:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "989:48:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10068, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "1008:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 13388 + ], + "constant": false, + "functionSelector": "c977aed2", + "id": 10075, + "mutability": "mutable", + "name": "customFactories", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 10074, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1123:8:9" + }, + "scope": 10244, + "src": "1067:80:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + }, + "typeName": { + "id": 10073, + "keyType": { + "id": 10071, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1076:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Mapping", + "src": "1067:48:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + }, + "valueType": { + "contractScope": null, + "id": 10072, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "1086:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 10091, + "nodeType": "Block", + "src": "1439:74:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10083, + "name": "converterFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10066, + "src": "1450:18:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + } + }, + "id": 10087, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10084, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10078, + "src": "1469:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13698, + "src": "1469:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1469:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1450:44:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10088, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10078, + "src": "1497:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "src": "1450:55:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10090, + "nodeType": "ExpressionStatement", + "src": "1450:55:9" + } + ] + }, + "documentation": { + "id": 10076, + "nodeType": "StructuredDocumentation", + "src": "1156:188:9", + "text": " @dev initializes the factory with a specific typed converter factory\n can only be called by the owner\n @param _factory typed converter factory" + }, + "functionSelector": "12b4c6c1", + "id": 10092, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10081, + "modifierName": { + "argumentTypes": null, + "id": 10080, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1429:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1429:9:9" + } + ], + "name": "registerTypedConverterFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10079, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10078, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10092, + "src": "1389:31:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 10077, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "1389:22:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1388:33:9" + }, + "returnParameters": { + "id": 10082, + "nodeType": "ParameterList", + "parameters": [], + "src": "1439:0:9" + }, + "scope": 10244, + "src": "1350:163:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10108, + "nodeType": "Block", + "src": "1830:71:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10100, + "name": "anchorFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10070, + "src": "1841:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + } + }, + "id": 10104, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10101, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10095, + "src": "1857:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13668, + "src": "1857:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1857:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1841:41:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10105, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10095, + "src": "1885:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "src": "1841:52:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10107, + "nodeType": "ExpressionStatement", + "src": "1841:52:9" + } + ] + }, + "documentation": { + "id": 10093, + "nodeType": "StructuredDocumentation", + "src": "1521:202:9", + "text": " @dev initializes the factory with a specific typed converter anchor factory\n can only be called by the owner\n @param _factory typed converter anchor factory" + }, + "functionSelector": "e54b93ef", + "id": 10109, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10098, + "modifierName": { + "argumentTypes": null, + "id": 10097, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1820:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1820:9:9" + } + ], + "name": "registerTypedConverterAnchorFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10095, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10109, + "src": "1774:37:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + }, + "typeName": { + "contractScope": null, + "id": 10094, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "1774:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1773:39:9" + }, + "returnParameters": { + "id": 10099, + "nodeType": "ParameterList", + "parameters": [], + "src": "1830:0:9" + }, + "scope": 10244, + "src": "1729:172:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10125, + "nodeType": "Block", + "src": "2218:71:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10117, + "name": "customFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10075, + "src": "2229:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "mapping(uint16 => contract ITypedConverterCustomFactory)" + } + }, + "id": 10121, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10118, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10112, + "src": "2245:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 10119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13687, + "src": "2245:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 10120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2245:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2229:41:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10122, + "name": "_factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10112, + "src": "2273:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "src": "2229:52:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 10124, + "nodeType": "ExpressionStatement", + "src": "2229:52:9" + } + ] + }, + "documentation": { + "id": 10110, + "nodeType": "StructuredDocumentation", + "src": "1909:202:9", + "text": " @dev initializes the factory with a specific typed converter custom factory\n can only be called by the owner\n @param _factory typed converter custom factory" + }, + "functionSelector": "8cac5e29", + "id": 10126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10115, + "modifierName": { + "argumentTypes": null, + "id": 10114, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2208:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2208:9:9" + } + ], + "name": "registerTypedConverterCustomFactory", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10112, + "mutability": "mutable", + "name": "_factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10126, + "src": "2162:37:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 10111, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "2162:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2161:39:9" + }, + "returnParameters": { + "id": 10116, + "nodeType": "ParameterList", + "parameters": [], + "src": "2218:0:9" + }, + "scope": 10244, + "src": "2117:172:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13368 + ], + "body": { + "id": 10194, + "nodeType": "Block", + "src": "2894:546:9", + "statements": [ + { + "assignments": [ + 10142 + ], + "declarations": [ + { + "constant": false, + "id": 10142, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10194, + "src": "2905:23:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10141, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2905:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10143, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2905:23:9" + }, + { + "assignments": [ + 10145 + ], + "declarations": [ + { + "constant": false, + "id": 10145, + "mutability": "mutable", + "name": "factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10194, + "src": "2939:36:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + }, + "typeName": { + "contractScope": null, + "id": 10144, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "2939:28:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10149, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10146, + "name": "anchorFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10070, + "src": "2978:15:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterAnchorFactory_$13680_$", + "typeString": "mapping(uint16 => contract ITypedConverterAnchorFactory)" + } + }, + "id": 10148, + "indexExpression": { + "argumentTypes": null, + "id": 10147, + "name": "_converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10129, + "src": "2994:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2978:31:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2939:70:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10152, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10145, + "src": "3034:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + ], + "id": 10151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3026:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3026:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3026:16:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3054: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": 10155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3046:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3046:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10157, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3046:10:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3026:30:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 10183, + "nodeType": "Block", + "src": "3201:159:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 10169, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3253:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10172, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10131, + "src": "3283:5:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10173, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10133, + "src": "3290:7:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10174, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10135, + "src": "3299:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 10170, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10145, + "src": "3262:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 10171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13679, + "src": "3262:20:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (string memory,string memory,uint8) external returns (contract IConverterAnchor)" + } + }, + "id": 10175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3262:47:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "3253:56:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10177, + "nodeType": "ExpressionStatement", + "src": "3253:56:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10178, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3324:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23181, + "src": "3324:22:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3324:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10182, + "nodeType": "ExpressionStatement", + "src": "3324:24:9" + } + ] + }, + "id": 10184, + "nodeType": "IfStatement", + "src": "3022:338:9", + "trueBody": { + "id": 10168, + "nodeType": "Block", + "src": "3058:128:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 10166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 10159, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3124:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10162, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10131, + "src": "3148:5:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10163, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10133, + "src": "3155:7:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10164, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10135, + "src": "3164:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 10161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3133:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 10160, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "3137:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 10165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3133:41:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "src": "3124:50:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10167, + "nodeType": "ExpressionStatement", + "src": "3124:50:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3397:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3397:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10185, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3372:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "3372:24:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3372:36:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10191, + "nodeType": "ExpressionStatement", + "src": "3372:36:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 10192, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10142, + "src": "3426:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10140, + "id": 10193, + "nodeType": "Return", + "src": "3419:13:9" + } + ] + }, + "documentation": { + "id": 10127, + "nodeType": "StructuredDocumentation", + "src": "2297:393:9", + "text": " @dev creates a new converter anchor with the given arguments and transfers\n the ownership to the caller\n @param _converterType converter type, see ConverterBase contract main doc\n @param _name name\n @param _symbol symbol\n @param _decimals decimals\n @return new converter anchor" + }, + "functionSelector": "2e9ab7b3", + "id": 10195, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10137, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2844:8:9" + }, + "parameters": { + "id": 10136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10129, + "mutability": "mutable", + "name": "_converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2718:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10128, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2718:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10131, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2741:19:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10130, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2741:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10133, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2762:21:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10132, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2762:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10135, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2785:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 10134, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2785:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2717:84:9" + }, + "returnParameters": { + "id": 10140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10139, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10195, + "src": "2871:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10138, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2871:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2870:18:9" + }, + "scope": 10244, + "src": "2696:744:9", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 13381 + ], + "body": { + "id": 10242, + "nodeType": "Block", + "src": "4142:297:9", + "statements": [ + { + "assignments": [ + 10211 + ], + "declarations": [ + { + "constant": false, + "id": 10211, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10242, + "src": "4153:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10210, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4153:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10220, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10216, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10200, + "src": "4218:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 10217, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10202, + "src": "4227:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 10218, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10204, + "src": "4238:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10212, + "name": "converterFactories", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10066, + "src": "4176:18:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint16_$_t_contract$_ITypedConverterFactory_$13710_$", + "typeString": "mapping(uint16 => contract ITypedConverterFactory)" + } + }, + "id": 10214, + "indexExpression": { + "argumentTypes": null, + "id": 10213, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10198, + "src": "4195:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4176:25:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 10215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13709, + "src": "4176:41:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$23166_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 10219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:80:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4153:103:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10221, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4267:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23181, + "src": "4267:25:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4267:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10225, + "nodeType": "ExpressionStatement", + "src": "4267:27:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10229, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4333:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4333:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10226, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4305:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "4305:27:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4305:39:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10232, + "nodeType": "ExpressionStatement", + "src": "4305:39:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10234, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10198, + "src": "4375:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10235, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4382:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10236, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4393:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4393:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 10233, + "name": "NewConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10062, + "src": "4362:12:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverter_$13340_$_t_address_$returns$__$", + "typeString": "function (uint16,contract IConverter,address)" + } + }, + "id": 10238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4362:42:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10239, + "nodeType": "EmitStatement", + "src": "4357:47:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 10240, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10211, + "src": "4422:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 10209, + "id": 10241, + "nodeType": "Return", + "src": "4415:16:9" + } + ] + }, + "documentation": { + "id": 10196, + "nodeType": "StructuredDocumentation", + "src": "3448:482:9", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _type converter type, see ConverterBase contract main doc\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return new converter" + }, + "functionSelector": "15f64b6a", + "id": 10243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10206, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4098:8:9" + }, + "parameters": { + "id": 10205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10198, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "3961:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10197, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3961:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10200, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "3975:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10199, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3975:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10202, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4001:27:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 10201, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23166, + "src": "4001:17:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10204, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4030:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 10203, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4030:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3960:95:9" + }, + "returnParameters": { + "id": 10209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10208, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10243, + "src": "4125:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10207, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4125:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4124:12:9" + }, + "scope": 10244, + "src": "3936:503:9", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 10245, + "src": "482:3960:9" + } + ], + "src": "52:4392:9" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xEa6225212005E86a4490018Ded4bf37F3E772161", + "transactionHash": "0x77ee228c82eb41f9067d6593a5600850479fe2334b7b476063f0277886f8238a" + }, + "8995": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xEa6225212005E86a4490018Ded4bf37F3E772161", + "transactionHash": "0x77ee228c82eb41f9067d6593a5600850479fe2334b7b476063f0277886f8238a" + }, + "1604964387852": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x44A45C77aB76A56294eEfC355e1fA58B1C9E7c34", + "transactionHash": "0x48570212bcd429bcb5d7f1e0ab6406b7ffc2fadff4d27b87aca8b339a7dced39" + }, + "1604964469407": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x73a88965c30303c0fbd9D15C6e3612761632d5c9", + "transactionHash": "0x1ae65e8d239e9857e2d508f2d3d25b8c503c80094cf24363dc7e8bc580197e0a" + }, + "1604965528035": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xE2A95E30AF264AD41494f694b98bfE4d235Ee6DB", + "transactionHash": "0x60428cf55dc3d4b36bb18757c443ede64aabd74b2867826339d4c147f06f2d3d" + }, + "1604965645554": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xB38D4140052d432979aa87D0735c554135759c99", + "transactionHash": "0x1071f836f55e51a071cda172f5ae328ad24e4a2c7a9ac5ba013f1dc8d74715b6" + }, + "1604965679541": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xa9Ddd71060DDE95244597aBB1D5f1611f620e118", + "transactionHash": "0xf91245e5bc93b291e8f7ebf55e9c49fe9a6bae457d021e011079b27c25749abc" + }, + "1604965719492": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x5DA38321dA6bd7A738d2EC65B3dB936448136f95", + "transactionHash": "0x1bd8f87a5f8f7d5b84ec8fe545776aaaf7d5cdbc5f3b52b10ff80c1977dff40f" + }, + "1604965760834": { + "events": { + "0xbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xFB7E8b35B1495bebd6B672CEFC4Bf241835F8865", + "transactionHash": "0x68b3cd938a76ea20d393a29752e07beb523cf085f7d69d8750fe920908529f51" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:45.557Z", + "networkType": "ethereum", + "devdoc": { + "events": { + "NewConverter(uint16,address,address)": { + "details": "triggered when a new converter is created", + "params": { + "_converter": "new converter address", + "_owner": "converter owner address", + "_type": "converter type, see ConverterBase contract main doc" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "createAnchor(uint16,string,string,uint8)": { + "details": "creates a new converter anchor with the given arguments and transfers the ownership to the caller", + "params": { + "_converterType": "converter type, see ConverterBase contract main doc", + "_decimals": "decimals", + "_name": "name", + "_symbol": "symbol" + }, + "returns": { + "_0": "new converter anchor" + } + }, + "createConverter(uint16,address,address,uint32)": { + "details": "creates a new converter with the given arguments and transfers the ownership to the caller", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "new converter" + } + }, + "registerTypedConverterAnchorFactory(address)": { + "details": "initializes the factory with a specific typed converter anchor factory can only be called by the owner", + "params": { + "_factory": "typed converter anchor factory" + } + }, + "registerTypedConverterCustomFactory(address)": { + "details": "initializes the factory with a specific typed converter custom factory can only be called by the owner", + "params": { + "_factory": "typed converter custom factory" + } + }, + "registerTypedConverterFactory(address)": { + "details": "initializes the factory with a specific typed converter factory can only be called by the owner", + "params": { + "_factory": "typed converter factory" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json b/apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json new file mode 100644 index 00000000..886e78c7 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json @@ -0,0 +1,40060 @@ +{ + "contractName": "ConverterRegistry", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "newConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "addConverter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "removeConverter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getLiquidityPoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getLiquidityPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isLiquidityPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getConvertibleTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getConvertibleTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_anchors", + "type": "address[]" + } + ], + "name": "getConvertersByAnchors", + "outputs": [ + { + "internalType": "contract IConverter[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "isConverterValid", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "isSimilarLiquidityPoolRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "getLiquidityPoolByConfig", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_smartTokens", + "type": "address[]" + } + ], + "name": "getConvertersBySmartTokens", + "outputs": [ + { + "internalType": "contract IConverter[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "getLiquidityPoolByReserveConfig", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"ConverterAnchorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"ConverterAnchorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"ConvertibleTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"ConvertibleTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPool\",\"type\":\"address\"}],\"name\":\"LiquidityPoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPool\",\"type\":\"address\"}],\"name\":\"LiquidityPoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"SmartTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"SmartTokenRemoved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"addConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_anchors\",\"type\":\"address[]\"}],\"name\":\"getConvertersByAnchors\",\"outputs\":[{\"internalType\":\"contract IConverter[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_smartTokens\",\"type\":\"address[]\"}],\"name\":\"getConvertersBySmartTokens\",\"outputs\":[{\"internalType\":\"contract IConverter[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"getLiquidityPoolByConfig\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"getLiquidityPoolByReserveConfig\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPoolCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"isConverterValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isLiquidityPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"isSimilarLiquidityPoolRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"newConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"removeConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The ConverterRegistry maintains a list of all active converters in the Bancor Network. Since converters can be upgraded and thus their address can change, the registry actually keeps converter anchors internally and not the converters themselves. The active converter for each anchor can be easily accessed by querying the anchor's owner. The registry exposes 3 differnet lists that can be accessed and iterated, based on the use-case of the caller: - Anchors - can be used to get all the latest / historical data in the network - Liquidity pools - can be used to get all liquidity pools for funding, liquidation etc. - Convertible tokens - can be used to get all tokens that can be converted in the network (excluding pool tokens), and for each one - all anchors that hold it in their reserves The contract fires events whenever one of the primitives is added to or removed from the registry The contract is upgradable.\",\"events\":{\"ConverterAnchorAdded(address)\":{\"details\":\"triggered when a converter anchor is added to the registry\",\"params\":{\"_anchor\":\"smart token\"}},\"ConverterAnchorRemoved(address)\":{\"details\":\"triggered when a converter anchor is removed from the registry\",\"params\":{\"_anchor\":\"smart token\"}},\"ConvertibleTokenAdded(address,address)\":{\"details\":\"triggered when a convertible token is added to the registry\",\"params\":{\"_convertibleToken\":\"convertible token\",\"_smartToken\":\"associated smart token\"}},\"ConvertibleTokenRemoved(address,address)\":{\"details\":\"triggered when a convertible token is removed from the registry\",\"params\":{\"_convertibleToken\":\"convertible token\",\"_smartToken\":\"associated smart token\"}},\"LiquidityPoolAdded(address)\":{\"details\":\"triggered when a liquidity pool is added to the registry\",\"params\":{\"_liquidityPool\":\"liquidity pool\"}},\"LiquidityPoolRemoved(address)\":{\"details\":\"triggered when a liquidity pool is removed from the registry\",\"params\":{\"_liquidityPool\":\"liquidity pool\"}},\"SmartTokenAdded(address)\":{\"details\":\"deprecated, backward compatibility, use `ConverterAnchorAdded`\"},\"SmartTokenRemoved(address)\":{\"details\":\"deprecated, backward compatibility, use `ConverterAnchorRemoved`\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addConverter(address)\":{\"details\":\"adds an existing converter to the registry can only be called by the owner\",\"params\":{\"_converter\":\"converter\"}},\"constructor\":{\"details\":\"initializes a new ConverterRegistry instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"getAnchor(uint256)\":{\"details\":\"returns the converter anchor at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"anchor at the given index\"}},\"getAnchorCount()\":{\"details\":\"returns the number of converter anchors in the registry\",\"returns\":{\"_0\":\"number of anchors\"}},\"getAnchors()\":{\"details\":\"returns the list of converter anchors in the registry\",\"returns\":{\"_0\":\"list of anchors\"}},\"getConvertersByAnchors(address[])\":{\"details\":\"returns a list of converters for a given list of anchors this is a utility function that can be used to reduce the number of calls to the contract\",\"params\":{\"_anchors\":\"list of converter anchors\"},\"returns\":{\"_0\":\"list of converters\"}},\"getConvertersBySmartTokens(address[])\":{\"details\":\"deprecated, backward compatibility, use `getConvertersByAnchors`\"},\"getConvertibleToken(uint256)\":{\"details\":\"returns the convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"convertible token at the given index\"}},\"getConvertibleTokenAnchor(address,uint256)\":{\"details\":\"returns the converter anchor associated with a given convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"anchor associated with the given convertible token at the given index\"}},\"getConvertibleTokenAnchorCount(address)\":{\"details\":\"returns the number of converter anchors associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"number of anchors associated with the given convertible token\"}},\"getConvertibleTokenAnchors(address)\":{\"details\":\"returns the list of aoncerter anchors associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"list of anchors associated with the given convertible token\"}},\"getConvertibleTokenCount()\":{\"details\":\"returns the number of convertible tokens in the registry\",\"returns\":{\"_0\":\"number of convertible tokens\"}},\"getConvertibleTokenSmartToken(address,uint256)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchor`\"},\"getConvertibleTokenSmartTokenCount(address)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`\"},\"getConvertibleTokenSmartTokens(address)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchors`\"},\"getConvertibleTokens()\":{\"details\":\"returns the list of convertible tokens in the registry\",\"returns\":{\"_0\":\"list of convertible tokens\"}},\"getLiquidityPool(uint256)\":{\"details\":\"returns the liquidity pool at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"liquidity pool at the given index\"}},\"getLiquidityPoolByConfig(uint16,address[],uint32[])\":{\"details\":\"searches for a liquidity pool with specific configuration\",\"params\":{\"_reserveTokens\":\"reserve tokens\",\"_reserveWeights\":\"reserve weights\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"the liquidity pool, or zero if no such liquidity pool exists\"}},\"getLiquidityPoolByReserveConfig(address[],uint32[])\":{\"details\":\"deprecated, backward compatibility, use `getLiquidityPoolByConfig`\"},\"getLiquidityPoolCount()\":{\"details\":\"returns the number of liquidity pools in the registry\",\"returns\":{\"_0\":\"number of liquidity pools\"}},\"getLiquidityPools()\":{\"details\":\"returns the list of liquidity pools in the registry\",\"returns\":{\"_0\":\"list of liquidity pools\"}},\"getSmartToken(uint256)\":{\"details\":\"deprecated, backward compatibility, use `getAnchor`\"},\"getSmartTokenCount()\":{\"details\":\"deprecated, backward compatibility, use `getAnchorCount`\"},\"getSmartTokens()\":{\"details\":\"deprecated, backward compatibility, use `getAnchors`\"},\"isAnchor(address)\":{\"details\":\"checks whether or not a given value is a converter anchor\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is an anchor, false if not\"}},\"isConverterValid(address)\":{\"details\":\"checks whether or not a given converter is valid\",\"params\":{\"_converter\":\"converter\"},\"returns\":{\"_0\":\"true if the given converter is valid, false if not\"}},\"isConvertibleToken(address)\":{\"details\":\"checks whether or not a given value is a convertible token\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a convertible token, false if not\"}},\"isConvertibleTokenAnchor(address,address)\":{\"details\":\"checks whether or not a given value is a converter anchor of a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\",\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is an anchor of the given convertible token, false if not\"}},\"isConvertibleTokenSmartToken(address,address)\":{\"details\":\"deprecated, backward compatibility, use `isConvertibleTokenAnchor`\"},\"isLiquidityPool(address)\":{\"details\":\"checks whether or not a given value is a liquidity pool\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a liquidity pool, false if not\"}},\"isSimilarLiquidityPoolRegistered(address)\":{\"details\":\"checks if a liquidity pool with given configuration is already registered\",\"params\":{\"_converter\":\"converter with specific configuration\"},\"returns\":{\"_0\":\"if a liquidity pool with the same configuration is already registered\"}},\"isSmartToken(address)\":{\"details\":\"deprecated, backward compatibility, use `isAnchor`\"},\"newConverter(uint16,string,string,uint8,uint32,address[],uint32[])\":{\"details\":\"creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry\",\"params\":{\"_decimals\":\"token / pool decimals\",\"_maxConversionFee\":\"maximum conversion-fee\",\"_name\":\"token / pool name\",\"_reserveTokens\":\"reserve tokens\",\"_reserveWeights\":\"reserve weights\",\"_symbol\":\"token / pool symbol\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"new converter\"}},\"removeConverter(address)\":{\"details\":\"removes a converter from the registry anyone can remove an existing converter from the registry, as long as the converter is invalid note that the owner can also remove valid converters\",\"params\":{\"_converter\":\"converter\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol\":\"ConverterRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol\":{\"keccak256\":\"0xee1e037bda67806cfe010a96d32b4cd56b7b1f9dbc2b13710e43aa376661096a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://31a779ae265721924fb94991483fe0f42ec74c3794e1cb5eef2163f0f288f527\",\"dweb:/ipfs/QmNUNuNqBZYEyj8ABB1Xrx3HDFukdM4awv3oszUXnDURUf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol\":{\"keccak256\":\"0x827d22d6c52b3e5128595090a3694847e9c54a760abf0e47a8870a7235537723\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://edae6c2f9f6fde390032189dda1b7f720521a31df5eb98e001d04bbf44dcfa02\",\"dweb:/ipfs/QmRz2EG3tcKeKXwHizciEr19ZEH2SidtQ9rkprKc6iR5Tz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol\":{\"keccak256\":\"0xc2b8e75bf4d69b34f9687d90d8eb31e8462bfcf25565f5ca399151648624c73a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e3825b1ccce31117c984a7605376ec2e6f18b15cdd61e9d5624667332a935dd7\",\"dweb:/ipfs/QmeRHtWU1oZJtL8UxJQMbwmTyMhf8Z3DJz6XubFxbP5xQx\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200331138038062003311833981810160405260208110156200003757600080fd5b5051600080546001600160a01b03191633179055808062000058816200008a565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905550620000e9565b6001600160a01b038116620000e6576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61321880620000f96000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80637b10399911610151578063b4c4197a116100c3578063d8cced2a11610087578063d8cced2a14610bef578063e571049b14610c15578063e85455d714610c1d578063effb3c6e14610c43578063f2fde38b14610c4b578063f4fb86c014610c7157610269565b8063b4c4197a14610a62578063c22b82f014610a90578063d3182bed14610bb3578063d4ee1d9014610bbb578063d6c4b5b214610bc357610269565b8063954254f511610115578063954254f5146109ae5780639e76a007146109d4578063a109d214146109fa578063a43d5e9414610a17578063a74498aa14610a3d578063b4a176d314610a5a57610269565b80637b103999146109535780637f45c4c31461095b578063865cf194146109635780638da5cb5b146109805780638f1d0e1a1461098857610269565b80634c7df18f116101ea57806361cd756e116101ae57806361cd756e146108df57806369be4784146108e75780636ce1c4dc146108ef578063725b87861461091557806379ba5097146109435780637a5f0ffd1461094b57610269565b80634c7df18f146105a05780635a0a6618146105bd5780635f1b50fe1461080a578063603f51e414610812578063610c0b051461083e57610269565b80632fe8a6ad116102315780632fe8a6ad146104f85780633ab8857c146105145780634123ef601461053a57806349c5f32b1461056057806349d10b641461059857610269565b8063024c7ec71461026e57806304ceaf411461028f57806311839064146102e75780631d3fccd51461030d5780631f8e262014610457575b600080fd5b61028d6004803603602081101561028457600080fd5b50351515610c97565b005b610297610cbd565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102d35781810151838201526020016102bb565b505050509050019250505060405180910390f35b610297600480360360208110156102fd57600080fd5b50356001600160a01b0316610ccc565b61043b6004803603606081101561032357600080fd5b61ffff8235169190810190604081016020820135600160201b81111561034857600080fd5b82018360208201111561035a57600080fd5b803590602001918460208302840111600160201b8311171561037b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103ca57600080fd5b8201836020820111156103dc57600080fd5b803590602001918460208302840111600160201b831117156103fd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610dff945050505050565b604080516001600160a01b039092168252519081900360200190f35b6102976004803603602081101561046d57600080fd5b810190602081018135600160201b81111561048757600080fd5b82018360208201111561049957600080fd5b803590602001918460208302840111600160201b831117156104ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ee6945050505050565b610500610ef7565b604080519115158252519081900360200190f35b6105006004803603602081101561052a57600080fd5b50356001600160a01b0316610f07565b6105006004803603602081101561055057600080fd5b50356001600160a01b0316610f9e565b6105866004803603602081101561057657600080fd5b50356001600160a01b0316610fa9565b60408051918252519081900360200190f35b61028d61100e565b61043b600480360360208110156105b657600080fd5b5035611216565b61043b600480360360e08110156105d357600080fd5b61ffff8235169190810190604081016020820135600160201b8111156105f857600080fd5b82018360208201111561060a57600080fd5b803590602001918460018302840111600160201b8311171561062b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067d57600080fd5b82018360208201111561068f57600080fd5b803590602001918460018302840111600160201b831117156106b057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff8535169563ffffffff60208701351695919450925060608101915060400135600160201b81111561071757600080fd5b82018360208201111561072957600080fd5b803590602001918460208302840111600160201b8311171561074a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561079957600080fd5b8201836020820111156107ab57600080fd5b803590602001918460208302840111600160201b831117156107cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611272945050505050565b6102976117c7565b61043b6004803603604081101561082857600080fd5b506001600160a01b0381351690602001356118e4565b6102976004803603602081101561085457600080fd5b810190602081018135600160201b81111561086e57600080fd5b82018360208201111561088057600080fd5b803590602001918460208302840111600160201b831117156108a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611984945050505050565b61043b611a85565b610586611a94565b61028d6004803603602081101561090557600080fd5b50356001600160a01b0316611b16565b6105006004803603604081101561092b57600080fd5b506001600160a01b0381358116916020013516611b7c565b61028d611b88565b610586611c3f565b61043b611c90565b610297611c9f565b61043b6004803603602081101561097957600080fd5b5035611cf0565b61043b611d4c565b6105006004803603602081101561099e57600080fd5b50356001600160a01b0316611d5b565b610500600480360360208110156109c457600080fd5b50356001600160a01b0316611f64565b61028d600480360360208110156109ea57600080fd5b50356001600160a01b0316612053565b61043b60048036036020811015610a1057600080fd5b50356120c0565b61058660048036036020811015610a2d57600080fd5b50356001600160a01b03166120cb565b61043b60048036036020811015610a5357600080fd5b50356120d6565b61028d612132565b61050060048036036040811015610a7857600080fd5b506001600160a01b038135811691602001351661215e565b61043b60048036036040811015610aa657600080fd5b810190602081018135600160201b811115610ac057600080fd5b820183602082011115610ad257600080fd5b803590602001918460208302840111600160201b83111715610af357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b4257600080fd5b820183602082011115610b5457600080fd5b803590602001918460208302840111600160201b83111715610b7557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506121d4945050505050565b6105866121f6565b61043b612247565b61043b60048036036040811015610bd957600080fd5b506001600160a01b038135169060200135612256565b61050060048036036020811015610c0557600080fd5b50356001600160a01b0316612262565b6105866122c7565b61050060048036036020811015610c3357600080fd5b50356001600160a01b03166122d1565b610297612336565b61028d60048036036020811015610c6157600080fd5b50356001600160a01b0316612387565b61029760048036036020811015610c8757600080fd5b50356001600160a01b0316612405565b610c9f612410565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060610cc7612336565b905090565b6060610ce56000805160206131c3833981519152612465565b6001600160a01b031663f4fb86c0836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d3157600080fd5b505afa158015610d45573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d6e57600080fd5b8101908080516040519392919084600160201b821115610d8d57600080fd5b908301906020820185811115610da257600080fd5b82518660208202830111600160201b82111715610dbe57600080fd5b82525081516020918201928201910280838360005b83811015610deb578181015183820152602001610dd3565b505050509050016040525050509050919050565b600081518351148015610e13575060018351115b15610edb576060610e23846124b1565b905060005b8151811015610ed8576000828281518110610e3f57fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8457600080fd5b505afa158015610e98573d6000803e3d6000fd5b505050506040513d6020811015610eae57600080fd5b50519050610ebe81898989612747565b15610ece57509250610edf915050565b5050600101610e28565b50505b5060005b9392505050565b6060610ef182611984565b92915050565b600354600160a01b900460ff1681565b6000610f206000805160206131c3833981519152612465565b6001600160a01b0316633ab8857c836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b505afa158015610f80573d6000803e3d6000fd5b505050506040513d6020811015610f9657600080fd5b505192915050565b6000610ef182612262565b6000610fc26000805160206131c3833981519152612465565b6001600160a01b031663a43d5e94836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b6000546001600160a01b03163314806110315750600354600160a01b900460ff16155b611076576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006110946f436f6e7472616374526567697374727960801b612465565b6002549091506001600160a01b038083169116148015906110bd57506001600160a01b03811615155b611105576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561116757600080fd5b505afa15801561117b573d6000803e3d6000fd5b505050506040513d602081101561119157600080fd5b50516001600160a01b031614156111e6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061122f6000805160206131c3833981519152612465565b6001600160a01b031663a109d214836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b815181516000919081146112c4576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524553455256455360601b604482015290519081900360640190fd5b60006112d18a8686610dff565b6001600160a01b031614611321576040805162461bcd60e51b81526020600482015260126024820152714552525f414c52454144595f45584953545360701b604482015290519081900360640190fd5b600061133f6f436f6e766572746572466163746f727960801b612465565b90506000816001600160a01b0316632e9ab7b38c8c8c8c6040518563ffffffff1660e01b8152600401808561ffff16815260200180602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156113b95781810151838201526020016113a1565b50505050905090810190601f1680156113e65780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611419578181015183820152602001611401565b50505050905090810190601f1680156114465780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561146957600080fd5b505af115801561147d573d6000803e3d6000fd5b505050506040513d602081101561149357600080fd5b505160025460408051630afb25b560e11b815261ffff8f1660048201526001600160a01b038085166024830152928316604482015263ffffffff8b1660648201529051929350600092918516916315f64b6a9160848082019260209290919082900301818787803b15801561150757600080fd5b505af115801561151b573d6000803e3d6000fd5b505050506040513d602081101561153157600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b50505050806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b5050505060005b8481101561169557816001600160a01b0316636a49d2c489838151811061160957fe5b602002602001015189848151811061161d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561167157600080fd5b505af1158015611685573d6000803e3d6000fd5b5050600190920191506115e69050565b50816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156116e557600080fd5b505af11580156116f9573d6000803e3d6000fd5b50505050806001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561173857600080fd5b505af115801561174c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561179757600080fd5b505af11580156117ab573d6000803e3d6000fd5b505050506117b881612859565b9b9a5050505050505050505050565b60606117e06000805160206131c3833981519152612465565b6001600160a01b0316635f1b50fe6040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b505afa15801561182c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561185557600080fd5b8101908080516040519392919084600160201b82111561187457600080fd5b90830190602082018581111561188957600080fd5b82518660208202830111600160201b821117156118a557600080fd5b82525081516020918201928201910280838360005b838110156118d25781810151838201526020016118ba565b50505050905001604052505050905090565b60006118fd6000805160206131c3833981519152612465565b6001600160a01b031663d6c4b5b284846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506040513d602081101561197b57600080fd5b50519392505050565b606080825167ffffffffffffffff8111801561199f57600080fd5b506040519080825280602002602001820160405280156119c9578160200160208202803683370190505b50905060005b8351811015611a7e578381815181106119e457fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a2457600080fd5b505afa158015611a38573d6000803e3d6000fd5b505050506040513d6020811015611a4e57600080fd5b50518251839083908110611a5e57fe5b6001600160a01b03909216602092830291909101909101526001016119cf565b5092915050565b6003546001600160a01b031681565b6000611aad6000805160206131c3833981519152612465565b6001600160a01b03166369be47846040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b505afa158015611af9573d6000803e3d6000fd5b505050506040513d6020811015611b0f57600080fd5b5051905090565b611b1e612410565b611b2781611f64565b611b70576040805162461bcd60e51b815260206004820152601560248201527422a9292fa4a72b20a624a22fa1a7a72b22a92a22a960591b604482015290519081900360640190fd5b611b7981612859565b50565b6000610edf838361215e565b6001546001600160a01b03163314611bdb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000611c586000805160206131c3833981519152612465565b6001600160a01b0316637a5f0ffd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b6002546001600160a01b031681565b6060611cb86000805160206131c3833981519152612465565b6001600160a01b0316637f45c4c36040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b6000611d096000805160206131c3833981519152612465565b6001600160a01b031663865cf194836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b6000546001600160a01b031681565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9757600080fd5b505afa158015611dab573d6000803e3d6000fd5b505050506040513d6020811015611dc157600080fd5b505161ffff16905060608167ffffffffffffffff81118015611de257600080fd5b50604051908082528060200260200182016040528015611e0c578160200160208202803683370190505b50905060608267ffffffffffffffff81118015611e2857600080fd5b50604051908082528060200260200182016040528015611e52578160200160208202803683370190505b50905060005b83811015611f39576000866001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ea657600080fd5b505afa158015611eba573d6000803e3d6000fd5b505050506040513d6020811015611ed057600080fd5b505184519091508190859084908110611ee557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611f0f8782612a14565b838381518110611f1b57fe5b63ffffffff9092166020928302919091019091015250600101611e58565b506000611f50611f498786612a9b565b8484610dff565b6001600160a01b0316141595945050505050565b6000816001600160a01b0316826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611fa957600080fd5b505afa158015611fbd573d6000803e3d6000fd5b505050506040513d6020811015611fd357600080fd5b505160408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b15801561201757600080fd5b505afa15801561202b573d6000803e3d6000fd5b505050506040513d602081101561204157600080fd5b50516001600160a01b03161492915050565b6000546001600160a01b0316331480612072575061207081611f64565b155b6120b7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611b7981612bc0565b6000610ef182611216565b6000610ef182610fa9565b60006120ef6000805160206131c3833981519152612465565b6001600160a01b031663a74498aa836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b61213a612410565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b60006121776000805160206131c3833981519152612465565b6001600160a01b031663725b878684846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561195157600080fd5b6000610edf60018451116121e95760006121ec565b60015b60ff168484610dff565b600061220f6000805160206131c3833981519152612465565b6001600160a01b031663e571049b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b6001546001600160a01b031681565b6000610edf83836118e4565b600061227b6000805160206131c3833981519152612465565b6001600160a01b0316634123ef60836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b6000610cc76121f6565b60006122ea6000805160206131c3833981519152612465565b6001600160a01b031663e85455d7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b606061234f6000805160206131c3833981519152612465565b6001600160a01b03166304ceaf416040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b61238f612410565b6000546001600160a01b03828116911614156123e3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6060610ef182610ccc565b6000546001600160a01b03163314612463576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610f6c57600080fd5b606060006124cc6000805160206131c3833981519152612465565b90506000816001600160a01b031663a43d5e94856000815181106124ec57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561253157600080fd5b505afa158015612545573d6000803e3d6000fd5b505050506040513d602081101561255b57600080fd5b50519050600060015b8551811015612615576000846001600160a01b031663a43d5e9488848151811061258a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156125cf57600080fd5b505afa1580156125e3573d6000803e3d6000fd5b505050506040513d60208110156125f957600080fd5b505190508084111561260c578093508192505b50600101612564565b50826001600160a01b031663f4fb86c086838151811061263157fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561267657600080fd5b505afa15801561268a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156126b357600080fd5b8101908080516040519392919084600160201b8211156126d257600080fd5b9083019060208201858111156126e757600080fd5b82518660208202830111600160201b8211171561270357600080fd5b82525081516020918201928201910280838360005b83811015612730578181015183820152602001612718565b505050509050016040525050509350505050919050565b600080856001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561278357600080fd5b505afa158015612797573d6000803e3d6000fd5b505050506040513d60208110156127ad57600080fd5b505161ffff1690506127bf8682612a9b565b61ffff168561ffff16146127d7576000915050612851565b808451146127e9576000915050612851565b60005b845181101561284a576128128786838151811061280557fe5b6020026020010151612a14565b63ffffffff1684828151811061282457fe5b602002602001015163ffffffff161461284257600092505050612851565b6001016127ec565b5060019150505b949350505050565b60006128726000805160206131c3833981519152612465565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128af57600080fd5b505afa1580156128c3573d6000803e3d6000fd5b505050506040513d60208110156128d957600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b15801561292157600080fd5b505afa158015612935573d6000803e3d6000fd5b505050506040513d602081101561294b57600080fd5b505161ffff16905061295d8383612d74565b6001811115612975576129708383612e47565b612980565b612980838384612ee6565b60005b81811015612a0d57612a0584866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156129d357600080fd5b505afa1580156129e7573d6000803e3d6000fd5b505050506040513d60208110156129fd57600080fd5b505185612ee6565b600101612983565b5050505050565b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015612a6457600080fd5b505afa158015612a78573d6000803e3d6000fd5b505050506040513d60a0811015612a8e57600080fd5b5060200151949350505050565b60408051600481526024810182526020810180516001600160e01b0316633e8ff43f60e01b1781529151815160009384936060936001600160a01b03891693919290918291908083835b60208310612b045780518252601f199092019160209182019101612ae5565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612b64576040519150601f19603f3d011682016040523d82523d6000602084013e612b69565b606091505b5091509150818015612b7c575080516020145b15612ba257808060200190516020811015612b9657600080fd5b50519250610ef1915050565b60018411612bb1576000612bb4565b60015b60ff1695945050505050565b6000612bd96000805160206131c3833981519152612465565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c1657600080fd5b505afa158015612c2a573d6000803e3d6000fd5b505050506040513d6020811015612c4057600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b158015612c8857600080fd5b505afa158015612c9c573d6000803e3d6000fd5b505050506040513d6020811015612cb257600080fd5b505161ffff169050612cc48383612f9b565b6001811115612cdc57612cd7838361306e565b612ce7565b612ce783838461310d565b60005b81811015612a0d57612d6c84866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612d3a57600080fd5b505afa158015612d4e573d6000803e3d6000fd5b505050506040513d6020811015612d6457600080fd5b50518561310d565b600101612cea565b816001600160a01b0316638de6c3eb826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612dc357600080fd5b505af1158015612dd7573d6000803e3d6000fd5b50506040516001600160a01b03841692507fc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd9150600090a26040516001600160a01b038216907f88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab90600090a25050565b816001600160a01b031663ee6a934c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612e9657600080fd5b505af1158015612eaa573d6000803e3d6000fd5b50506040516001600160a01b03841692507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d899150600090a25050565b826001600160a01b03166336900c1183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015612f4657600080fd5b505af1158015612f5a573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507ff2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a590600090a3505050565b816001600160a01b031663ceb9838c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612fea57600080fd5b505af1158015612ffe573d6000803e3d6000fd5b50506040516001600160a01b03841692507fbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d9150600090a26040516001600160a01b038216907f2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf90600090a25050565b816001600160a01b031663ae22107f826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156130bd57600080fd5b505af11580156130d1573d6000803e3d6000fd5b50506040516001600160a01b03841692507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee609150600090a25050565b826001600160a01b031663fba8f03183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561316d57600080fd5b505af1158015613181573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507f9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced4390600090a350505056fe42616e636f72436f6e7665727465725265676973747279446174610000000000a2646970667358221220b491ab47d6148b2936035db25856c9ea3d1cfe85370d66f48e7843610288478564736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102695760003560e01c80637b10399911610151578063b4c4197a116100c3578063d8cced2a11610087578063d8cced2a14610bef578063e571049b14610c15578063e85455d714610c1d578063effb3c6e14610c43578063f2fde38b14610c4b578063f4fb86c014610c7157610269565b8063b4c4197a14610a62578063c22b82f014610a90578063d3182bed14610bb3578063d4ee1d9014610bbb578063d6c4b5b214610bc357610269565b8063954254f511610115578063954254f5146109ae5780639e76a007146109d4578063a109d214146109fa578063a43d5e9414610a17578063a74498aa14610a3d578063b4a176d314610a5a57610269565b80637b103999146109535780637f45c4c31461095b578063865cf194146109635780638da5cb5b146109805780638f1d0e1a1461098857610269565b80634c7df18f116101ea57806361cd756e116101ae57806361cd756e146108df57806369be4784146108e75780636ce1c4dc146108ef578063725b87861461091557806379ba5097146109435780637a5f0ffd1461094b57610269565b80634c7df18f146105a05780635a0a6618146105bd5780635f1b50fe1461080a578063603f51e414610812578063610c0b051461083e57610269565b80632fe8a6ad116102315780632fe8a6ad146104f85780633ab8857c146105145780634123ef601461053a57806349c5f32b1461056057806349d10b641461059857610269565b8063024c7ec71461026e57806304ceaf411461028f57806311839064146102e75780631d3fccd51461030d5780631f8e262014610457575b600080fd5b61028d6004803603602081101561028457600080fd5b50351515610c97565b005b610297610cbd565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102d35781810151838201526020016102bb565b505050509050019250505060405180910390f35b610297600480360360208110156102fd57600080fd5b50356001600160a01b0316610ccc565b61043b6004803603606081101561032357600080fd5b61ffff8235169190810190604081016020820135600160201b81111561034857600080fd5b82018360208201111561035a57600080fd5b803590602001918460208302840111600160201b8311171561037b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103ca57600080fd5b8201836020820111156103dc57600080fd5b803590602001918460208302840111600160201b831117156103fd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610dff945050505050565b604080516001600160a01b039092168252519081900360200190f35b6102976004803603602081101561046d57600080fd5b810190602081018135600160201b81111561048757600080fd5b82018360208201111561049957600080fd5b803590602001918460208302840111600160201b831117156104ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ee6945050505050565b610500610ef7565b604080519115158252519081900360200190f35b6105006004803603602081101561052a57600080fd5b50356001600160a01b0316610f07565b6105006004803603602081101561055057600080fd5b50356001600160a01b0316610f9e565b6105866004803603602081101561057657600080fd5b50356001600160a01b0316610fa9565b60408051918252519081900360200190f35b61028d61100e565b61043b600480360360208110156105b657600080fd5b5035611216565b61043b600480360360e08110156105d357600080fd5b61ffff8235169190810190604081016020820135600160201b8111156105f857600080fd5b82018360208201111561060a57600080fd5b803590602001918460018302840111600160201b8311171561062b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067d57600080fd5b82018360208201111561068f57600080fd5b803590602001918460018302840111600160201b831117156106b057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff8535169563ffffffff60208701351695919450925060608101915060400135600160201b81111561071757600080fd5b82018360208201111561072957600080fd5b803590602001918460208302840111600160201b8311171561074a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561079957600080fd5b8201836020820111156107ab57600080fd5b803590602001918460208302840111600160201b831117156107cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611272945050505050565b6102976117c7565b61043b6004803603604081101561082857600080fd5b506001600160a01b0381351690602001356118e4565b6102976004803603602081101561085457600080fd5b810190602081018135600160201b81111561086e57600080fd5b82018360208201111561088057600080fd5b803590602001918460208302840111600160201b831117156108a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611984945050505050565b61043b611a85565b610586611a94565b61028d6004803603602081101561090557600080fd5b50356001600160a01b0316611b16565b6105006004803603604081101561092b57600080fd5b506001600160a01b0381358116916020013516611b7c565b61028d611b88565b610586611c3f565b61043b611c90565b610297611c9f565b61043b6004803603602081101561097957600080fd5b5035611cf0565b61043b611d4c565b6105006004803603602081101561099e57600080fd5b50356001600160a01b0316611d5b565b610500600480360360208110156109c457600080fd5b50356001600160a01b0316611f64565b61028d600480360360208110156109ea57600080fd5b50356001600160a01b0316612053565b61043b60048036036020811015610a1057600080fd5b50356120c0565b61058660048036036020811015610a2d57600080fd5b50356001600160a01b03166120cb565b61043b60048036036020811015610a5357600080fd5b50356120d6565b61028d612132565b61050060048036036040811015610a7857600080fd5b506001600160a01b038135811691602001351661215e565b61043b60048036036040811015610aa657600080fd5b810190602081018135600160201b811115610ac057600080fd5b820183602082011115610ad257600080fd5b803590602001918460208302840111600160201b83111715610af357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b4257600080fd5b820183602082011115610b5457600080fd5b803590602001918460208302840111600160201b83111715610b7557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506121d4945050505050565b6105866121f6565b61043b612247565b61043b60048036036040811015610bd957600080fd5b506001600160a01b038135169060200135612256565b61050060048036036020811015610c0557600080fd5b50356001600160a01b0316612262565b6105866122c7565b61050060048036036020811015610c3357600080fd5b50356001600160a01b03166122d1565b610297612336565b61028d60048036036020811015610c6157600080fd5b50356001600160a01b0316612387565b61029760048036036020811015610c8757600080fd5b50356001600160a01b0316612405565b610c9f612410565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060610cc7612336565b905090565b6060610ce56000805160206131c3833981519152612465565b6001600160a01b031663f4fb86c0836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d3157600080fd5b505afa158015610d45573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d6e57600080fd5b8101908080516040519392919084600160201b821115610d8d57600080fd5b908301906020820185811115610da257600080fd5b82518660208202830111600160201b82111715610dbe57600080fd5b82525081516020918201928201910280838360005b83811015610deb578181015183820152602001610dd3565b505050509050016040525050509050919050565b600081518351148015610e13575060018351115b15610edb576060610e23846124b1565b905060005b8151811015610ed8576000828281518110610e3f57fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8457600080fd5b505afa158015610e98573d6000803e3d6000fd5b505050506040513d6020811015610eae57600080fd5b50519050610ebe81898989612747565b15610ece57509250610edf915050565b5050600101610e28565b50505b5060005b9392505050565b6060610ef182611984565b92915050565b600354600160a01b900460ff1681565b6000610f206000805160206131c3833981519152612465565b6001600160a01b0316633ab8857c836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b505afa158015610f80573d6000803e3d6000fd5b505050506040513d6020811015610f9657600080fd5b505192915050565b6000610ef182612262565b6000610fc26000805160206131c3833981519152612465565b6001600160a01b031663a43d5e94836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b6000546001600160a01b03163314806110315750600354600160a01b900460ff16155b611076576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006110946f436f6e7472616374526567697374727960801b612465565b6002549091506001600160a01b038083169116148015906110bd57506001600160a01b03811615155b611105576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561116757600080fd5b505afa15801561117b573d6000803e3d6000fd5b505050506040513d602081101561119157600080fd5b50516001600160a01b031614156111e6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061122f6000805160206131c3833981519152612465565b6001600160a01b031663a109d214836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b815181516000919081146112c4576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524553455256455360601b604482015290519081900360640190fd5b60006112d18a8686610dff565b6001600160a01b031614611321576040805162461bcd60e51b81526020600482015260126024820152714552525f414c52454144595f45584953545360701b604482015290519081900360640190fd5b600061133f6f436f6e766572746572466163746f727960801b612465565b90506000816001600160a01b0316632e9ab7b38c8c8c8c6040518563ffffffff1660e01b8152600401808561ffff16815260200180602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156113b95781810151838201526020016113a1565b50505050905090810190601f1680156113e65780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611419578181015183820152602001611401565b50505050905090810190601f1680156114465780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561146957600080fd5b505af115801561147d573d6000803e3d6000fd5b505050506040513d602081101561149357600080fd5b505160025460408051630afb25b560e11b815261ffff8f1660048201526001600160a01b038085166024830152928316604482015263ffffffff8b1660648201529051929350600092918516916315f64b6a9160848082019260209290919082900301818787803b15801561150757600080fd5b505af115801561151b573d6000803e3d6000fd5b505050506040513d602081101561153157600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801561157857600080fd5b505af115801561158c573d6000803e3d6000fd5b50505050806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b5050505060005b8481101561169557816001600160a01b0316636a49d2c489838151811061160957fe5b602002602001015189848151811061161d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561167157600080fd5b505af1158015611685573d6000803e3d6000fd5b5050600190920191506115e69050565b50816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156116e557600080fd5b505af11580156116f9573d6000803e3d6000fd5b50505050806001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561173857600080fd5b505af115801561174c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561179757600080fd5b505af11580156117ab573d6000803e3d6000fd5b505050506117b881612859565b9b9a5050505050505050505050565b60606117e06000805160206131c3833981519152612465565b6001600160a01b0316635f1b50fe6040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b505afa15801561182c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561185557600080fd5b8101908080516040519392919084600160201b82111561187457600080fd5b90830190602082018581111561188957600080fd5b82518660208202830111600160201b821117156118a557600080fd5b82525081516020918201928201910280838360005b838110156118d25781810151838201526020016118ba565b50505050905001604052505050905090565b60006118fd6000805160206131c3833981519152612465565b6001600160a01b031663d6c4b5b284846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506040513d602081101561197b57600080fd5b50519392505050565b606080825167ffffffffffffffff8111801561199f57600080fd5b506040519080825280602002602001820160405280156119c9578160200160208202803683370190505b50905060005b8351811015611a7e578381815181106119e457fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a2457600080fd5b505afa158015611a38573d6000803e3d6000fd5b505050506040513d6020811015611a4e57600080fd5b50518251839083908110611a5e57fe5b6001600160a01b03909216602092830291909101909101526001016119cf565b5092915050565b6003546001600160a01b031681565b6000611aad6000805160206131c3833981519152612465565b6001600160a01b03166369be47846040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b505afa158015611af9573d6000803e3d6000fd5b505050506040513d6020811015611b0f57600080fd5b5051905090565b611b1e612410565b611b2781611f64565b611b70576040805162461bcd60e51b815260206004820152601560248201527422a9292fa4a72b20a624a22fa1a7a72b22a92a22a960591b604482015290519081900360640190fd5b611b7981612859565b50565b6000610edf838361215e565b6001546001600160a01b03163314611bdb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000611c586000805160206131c3833981519152612465565b6001600160a01b0316637a5f0ffd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b6002546001600160a01b031681565b6060611cb86000805160206131c3833981519152612465565b6001600160a01b0316637f45c4c36040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b6000611d096000805160206131c3833981519152612465565b6001600160a01b031663865cf194836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b6000546001600160a01b031681565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9757600080fd5b505afa158015611dab573d6000803e3d6000fd5b505050506040513d6020811015611dc157600080fd5b505161ffff16905060608167ffffffffffffffff81118015611de257600080fd5b50604051908082528060200260200182016040528015611e0c578160200160208202803683370190505b50905060608267ffffffffffffffff81118015611e2857600080fd5b50604051908082528060200260200182016040528015611e52578160200160208202803683370190505b50905060005b83811015611f39576000866001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ea657600080fd5b505afa158015611eba573d6000803e3d6000fd5b505050506040513d6020811015611ed057600080fd5b505184519091508190859084908110611ee557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611f0f8782612a14565b838381518110611f1b57fe5b63ffffffff9092166020928302919091019091015250600101611e58565b506000611f50611f498786612a9b565b8484610dff565b6001600160a01b0316141595945050505050565b6000816001600160a01b0316826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611fa957600080fd5b505afa158015611fbd573d6000803e3d6000fd5b505050506040513d6020811015611fd357600080fd5b505160408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b15801561201757600080fd5b505afa15801561202b573d6000803e3d6000fd5b505050506040513d602081101561204157600080fd5b50516001600160a01b03161492915050565b6000546001600160a01b0316331480612072575061207081611f64565b155b6120b7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611b7981612bc0565b6000610ef182611216565b6000610ef182610fa9565b60006120ef6000805160206131c3833981519152612465565b6001600160a01b031663a74498aa836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f6c57600080fd5b61213a612410565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b60006121776000805160206131c3833981519152612465565b6001600160a01b031663725b878684846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561195157600080fd5b6000610edf60018451116121e95760006121ec565b60015b60ff168484610dff565b600061220f6000805160206131c3833981519152612465565b6001600160a01b031663e571049b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae557600080fd5b6001546001600160a01b031681565b6000610edf83836118e4565b600061227b6000805160206131c3833981519152612465565b6001600160a01b0316634123ef60836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b6000610cc76121f6565b60006122ea6000805160206131c3833981519152612465565b6001600160a01b031663e85455d7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6c57600080fd5b606061234f6000805160206131c3833981519152612465565b6001600160a01b03166304ceaf416040518163ffffffff1660e01b815260040160006040518083038186803b15801561181857600080fd5b61238f612410565b6000546001600160a01b03828116911614156123e3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6060610ef182610ccc565b6000546001600160a01b03163314612463576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610f6c57600080fd5b606060006124cc6000805160206131c3833981519152612465565b90506000816001600160a01b031663a43d5e94856000815181106124ec57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561253157600080fd5b505afa158015612545573d6000803e3d6000fd5b505050506040513d602081101561255b57600080fd5b50519050600060015b8551811015612615576000846001600160a01b031663a43d5e9488848151811061258a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156125cf57600080fd5b505afa1580156125e3573d6000803e3d6000fd5b505050506040513d60208110156125f957600080fd5b505190508084111561260c578093508192505b50600101612564565b50826001600160a01b031663f4fb86c086838151811061263157fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561267657600080fd5b505afa15801561268a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156126b357600080fd5b8101908080516040519392919084600160201b8211156126d257600080fd5b9083019060208201858111156126e757600080fd5b82518660208202830111600160201b8211171561270357600080fd5b82525081516020918201928201910280838360005b83811015612730578181015183820152602001612718565b505050509050016040525050509350505050919050565b600080856001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561278357600080fd5b505afa158015612797573d6000803e3d6000fd5b505050506040513d60208110156127ad57600080fd5b505161ffff1690506127bf8682612a9b565b61ffff168561ffff16146127d7576000915050612851565b808451146127e9576000915050612851565b60005b845181101561284a576128128786838151811061280557fe5b6020026020010151612a14565b63ffffffff1684828151811061282457fe5b602002602001015163ffffffff161461284257600092505050612851565b6001016127ec565b5060019150505b949350505050565b60006128726000805160206131c3833981519152612465565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128af57600080fd5b505afa1580156128c3573d6000803e3d6000fd5b505050506040513d60208110156128d957600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b15801561292157600080fd5b505afa158015612935573d6000803e3d6000fd5b505050506040513d602081101561294b57600080fd5b505161ffff16905061295d8383612d74565b6001811115612975576129708383612e47565b612980565b612980838384612ee6565b60005b81811015612a0d57612a0584866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156129d357600080fd5b505afa1580156129e7573d6000803e3d6000fd5b505050506040513d60208110156129fd57600080fd5b505185612ee6565b600101612983565b5050505050565b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015612a6457600080fd5b505afa158015612a78573d6000803e3d6000fd5b505050506040513d60a0811015612a8e57600080fd5b5060200151949350505050565b60408051600481526024810182526020810180516001600160e01b0316633e8ff43f60e01b1781529151815160009384936060936001600160a01b03891693919290918291908083835b60208310612b045780518252601f199092019160209182019101612ae5565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612b64576040519150601f19603f3d011682016040523d82523d6000602084013e612b69565b606091505b5091509150818015612b7c575080516020145b15612ba257808060200190516020811015612b9657600080fd5b50519250610ef1915050565b60018411612bb1576000612bb4565b60015b60ff1695945050505050565b6000612bd96000805160206131c3833981519152612465565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c1657600080fd5b505afa158015612c2a573d6000803e3d6000fd5b505050506040513d6020811015612c4057600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b158015612c8857600080fd5b505afa158015612c9c573d6000803e3d6000fd5b505050506040513d6020811015612cb257600080fd5b505161ffff169050612cc48383612f9b565b6001811115612cdc57612cd7838361306e565b612ce7565b612ce783838461310d565b60005b81811015612a0d57612d6c84866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612d3a57600080fd5b505afa158015612d4e573d6000803e3d6000fd5b505050506040513d6020811015612d6457600080fd5b50518561310d565b600101612cea565b816001600160a01b0316638de6c3eb826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612dc357600080fd5b505af1158015612dd7573d6000803e3d6000fd5b50506040516001600160a01b03841692507fc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd9150600090a26040516001600160a01b038216907f88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab90600090a25050565b816001600160a01b031663ee6a934c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612e9657600080fd5b505af1158015612eaa573d6000803e3d6000fd5b50506040516001600160a01b03841692507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d899150600090a25050565b826001600160a01b03166336900c1183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015612f4657600080fd5b505af1158015612f5a573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507ff2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a590600090a3505050565b816001600160a01b031663ceb9838c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612fea57600080fd5b505af1158015612ffe573d6000803e3d6000fd5b50506040516001600160a01b03841692507fbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d9150600090a26040516001600160a01b038216907f2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf90600090a25050565b816001600160a01b031663ae22107f826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156130bd57600080fd5b505af11580156130d1573d6000803e3d6000fd5b50506040516001600160a01b03841692507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee609150600090a25050565b826001600160a01b031663fba8f03183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561316d57600080fd5b505af1158015613181573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507f9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced4390600090a350505056fe42616e636f72436f6e7665727465725265676973747279446174610000000000a2646970667358221220b491ab47d6148b2936035db25856c9ea3d1cfe85370d66f48e7843610288478564736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1414:24366:10:-:0;;;3479:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3479:90:10;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;3479:90:10;;594:23:64;3479:90:10;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;1414:24366:10;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;1414:24366:10:-;;;;;;;", + "deployedSourceMap": "1414:24366:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;23430:103:10;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11304:249;;;;;;;;;;;;;;;;-1:-1:-1;11304:249:10;-1:-1:-1;;;;;11304:249:10;;:::i;15233:1026::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15233:1026:10;;;;;;;;-1:-1:-1;15233:1026:10;;-1:-1:-1;;;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15233:1026:10;;-1:-1:-1;15233:1026:10;;-1:-1:-1;;;;;15233:1026:10:i;:::-;;;;-1:-1:-1;;;;;15233:1026:10;;;;;;;;;;;;;;25232:171;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25232:171:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25232:171:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25232:171:10;;-1:-1:-1;25232:171:10;;-1:-1:-1;;;;;25232:171:10:i;1333:38:56:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;10347:191:10;;;;;;;;;;;;;;;;-1:-1:-1;10347:191:10;-1:-1:-1;;;;;10347:191:10;;:::i;23835:107::-;;;;;;;;;;;;;;;;-1:-1:-1;23835:107:10;-1:-1:-1;;;;;23835:107:10;;:::i;10799:248::-;;;;;;;;;;;;;;;;-1:-1:-1;10799:248:10;-1:-1:-1;;;;;10799:248:10;;:::i;:::-;;;;;;;;;;;;;;;;2300:925:56;;;:::i;7106:189:10:-;;;;;;;;;;;;;;;;-1:-1:-1;7106:189:10;;:::i;4179:1300::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4179:1300:10;;;;;;;;-1:-1:-1;4179:1300:10;;-1:-1:-1;;;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4179:1300:10;;;;;;;;;;;;;;;;-1:-1:-1;4179:1300:10;-1:-1:-1;4179:1300:10;;;;-1:-1:-1;4179:1300:10;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4179:1300:10;;;;;;;;-1:-1:-1;4179:1300:10;;-1:-1:-1;;;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4179:1300:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4179:1300:10;;-1:-1:-1;4179:1300:10;;-1:-1:-1;;;;;4179:1300:10:i;9568:187::-;;;:::i;11805:271::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;11805:271:10;;;;;;;;:::i;12939:362::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12939:362:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12939:362:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12939:362:10;;-1:-1:-1;12939:362:10;;-1:-1:-1;;;;;12939:362:10:i;1243:37:56:-;;;:::i;9235:186:10:-;;;:::i;5648:::-;;;;;;;;;;;;;;;;-1:-1:-1;5648:186:10;-1:-1:-1;;;;;5648:186:10;;:::i;24939:189::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24939:189:10;;;;;;;;;;:::i;1422:217:57:-;;;:::i;7818:180:10:-;;;:::i;1154:33:56:-;;;:::i;8139:181:10:-;;;:::i;9933:200::-;;;;;;;;;;;;;;;;-1:-1:-1;9933:200:10;;:::i;219:29:57:-;;;:::i;13976:891:10:-;;;;;;;;;;;;;;;;-1:-1:-1;13976:891:10;-1:-1:-1;;;;;13976:891:10;;:::i;13503:199::-;;;;;;;;;;;;;;;;-1:-1:-1;13503:199:10;-1:-1:-1;;;;;13503:199:10;;:::i;6123:202::-;;;;;;;;;;;;;;;;-1:-1:-1;6123:202:10;-1:-1:-1;;;;;6123:202:10;;:::i;23624:121::-;;;;;;;;;;;;;;;;-1:-1:-1;23624:121:10;;:::i;24054:180::-;;;;;;;;;;;;;;;;-1:-1:-1;24054:180:10;-1:-1:-1;;;;;24054:180:10;;:::i;8492:199::-;;;;;;;;;;;;;;;;-1:-1:-1;8492:199:10;;:::i;3304:137:56:-;;;:::i;12391:257:10:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12391:257:10;;;;;;;;;;:::i;25509:268::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25509:268:10;;;;;;;;-1:-1:-1;25509:268:10;;-1:-1:-1;;;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25509:268:10;;-1:-1:-1;25509:268:10;;-1:-1:-1;;;;;25509:268:10:i;6464:170::-;;;:::i;255:23:57:-;;;:::i;24630:203:10:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24630:203:10;;;;;;;;:::i;7498:175::-;;;;;;;;;;;;;;;;-1:-1:-1;7498:175:10;-1:-1:-1;;;;;7498:175:10;;:::i;23236:102::-;;;:::i;8899:185::-;;;;;;;;;;;;;;;;-1:-1:-1;8899:185:10;-1:-1:-1;;;;;8899:185:10;;:::i;6769:171::-;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;24342:181:10:-;;;;;;;;;;;;;;;;-1:-1:-1;24342:181:10;-1:-1:-1;;;;;24342:181:10;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;23430:103:10:-;23477:16;23513:12;:10;:12::i;:::-;23506:19;;23430:103;:::o;11304:249::-;11401:16;11460:34;-1:-1:-1;;;;;;;;;;;11460:9:10;:34::i;:::-;-1:-1:-1;;;;;11437:89:10;;11527:17;11437:108;;;;;;;;;;;;;-1:-1:-1;;;;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11437:108:10;;;;;;;;;;;;-1:-1:-1;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11430:115;;11304:249;;;:::o;15233:1026::-;15372:16;15508:15;:22;15483:14;:21;:47;:76;;;;;15558:1;15534:14;:21;:25;15483:76;15479:734;;;15651:40;15694:44;15723:14;15694:28;:44::i;:::-;15651:87;;15825:9;15820:382;15844:23;:30;15840:1;:34;15820:382;;;15900:23;15943;15967:1;15943:26;;;;;;;;;;;;;;15900:70;;15989:20;16031:6;-1:-1:-1;;;;;16031:12:10;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16031:14:10;;-1:-1:-1;16070:80:10;16031:14;16111:5;16118:14;16134:15;16070:29;:80::i;:::-;16066:120;;;-1:-1:-1;16180:6:10;-1:-1:-1;16173:13:10;;-1:-1:-1;;16173:13:10;16066:120;-1:-1:-1;;15876:3:10;;15820:382;;;;15479:734;;-1:-1:-1;16249:1:10;15233:1026;;;;;;:::o;25232:171::-;25320:19;25359:36;25382:12;25359:22;:36::i;:::-;25352:43;25232:171;-1:-1:-1;;25232:171:10:o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;10347:191:10:-;10421:4;10468:34;-1:-1:-1;;;;;;;;;;;10468:9:10;:34::i;:::-;-1:-1:-1;;;;;10445:77:10;;10523:6;10445:85;;;;;;;;;;;;;-1:-1:-1;;;;;10445:85:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10445:85:10;;10347:191;-1:-1:-1;;10347:191:10:o;23835:107::-;23894:4;23918:16;23927:6;23918:8;:16::i;10799:248::-;10900:7;10950:34;-1:-1:-1;;;;;;;;;;;10950:9:10;:34::i;:::-;-1:-1:-1;;;;;10927:93:10;;11021:17;10927:112;;;;;;;;;;;;;-1:-1:-1;;;;;10927:112:10;;;;;;;;;;;;;;;;;;;;;;;;;;2300:925:56;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;7106:189:10:-;7171:16;7230:34;-1:-1:-1;;;;;;;;;;;7230:9:10;:34::i;:::-;-1:-1:-1;;;;;7207:72:10;;7280:6;7207:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4179:1300;4516:21;;4566:22;;4471:10;;4516:21;4556:32;;4548:65;;;;;-1:-1:-1;;;4548:65:10;;;;;;;;;;;;-1:-1:-1;;;4548:65:10;;;;;;;;;;;;;;;4717:1;4632:64;4657:5;4664:14;4680:15;4632:24;:64::i;:::-;-1:-1:-1;;;;;4632:87:10;;4624:118;;;;;-1:-1:-1;;;4624:118:10;;;;;;;;;;;;-1:-1:-1;;;4624:118:10;;;;;;;;;;;;;;;4755:25;4801:28;-1:-1:-1;;;4801:9:10;:28::i;:::-;4755:75;;4841:23;4884:7;-1:-1:-1;;;;;4884:20:10;;4905:5;4912;4919:7;4928:9;4884:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4884:54:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4884:54:10;5023:8;;4984:67;;;-1:-1:-1;;;4984:67:10;;;;;;;;;-1:-1:-1;;;;;4984:67:10;;;;;;;5023:8;;;4984:67;;;;;;;;;;;;;4884:54;;-1:-1:-1;4950:20:10;;4984:23;;;;;;:67;;;;;4884:54;;4984:67;;;;;;;;4950:20;4984:23;:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4984:67:10;5065:24;;;-1:-1:-1;;;5065:24:10;;;;4984:67;;-1:-1:-1;;;;;;5065:22:10;;;;;:24;;;;;;;;;;;;;;;;:22;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5100:9;-1:-1:-1;;;;;5100:25:10;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5145:9;5140:109;5164:6;5160:1;:10;5140:109;;;5190:9;-1:-1:-1;;;;;5190:20:10;;5211:14;5226:1;5211:17;;;;;;;;;;;;;;5230:15;5246:1;5230:18;;;;;;;;;;;;;;5190:59;;;;;;;;;;;;;-1:-1:-1;;;;;5190:59:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5172:3:10;;;;;-1:-1:-1;5140:109:10;;-1:-1:-1;5140:109:10;;;5262:6;-1:-1:-1;;;;;5262:24:10;;5295:9;5262:44;;;;;;;;;;;;;-1:-1:-1;;;;;5262:44:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5317:9;-1:-1:-1;;;;;5317:31:10;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5361:39:10;;;-1:-1:-1;;;5361:39:10;;5389:10;5361:39;;;;;;-1:-1:-1;;;;;5361:27:10;;;-1:-1:-1;5361:27:10;;-1:-1:-1;5361:39:10;;;;;-1:-1:-1;;5361:39:10;;;;;;;-1:-1:-1;5361:27:10;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5413:31;5434:9;5413:20;:31::i;:::-;5462:9;4179:1300;-1:-1:-1;;;;;;;;;;;4179:1300:10:o;9568:187::-;9630:16;9689:34;-1:-1:-1;;;;;;;;;;;9689:9:10;:34::i;:::-;-1:-1:-1;;;;;9666:79:10;;:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9666:81:10;;;;;;;;;;;;-1:-1:-1;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9659:88;;9568:187;:::o;11805:271::-;11917:16;11976:34;-1:-1:-1;;;;;;;;;;;11976:9:10;:34::i;:::-;-1:-1:-1;;;;;11953:88:10;;12042:17;12061:6;11953:115;;;;;;;;;;;;;-1:-1:-1;;;;;11953:115:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11953:115:10;;11805:271;-1:-1:-1;;;11805:271:10:o;12939:362::-;13019:19;13051:30;13101:8;:15;13084:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13084:33:10;;13051:66;;13135:9;13130:133;13154:8;:15;13150:1;:19;13130:133;;;13241:8;13250:1;13241:11;;;;;;;;;;;;;;-1:-1:-1;;;;;13224:35:10;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13224:37:10;13189:13;;:10;;13200:1;;13189:13;;;;;;-1:-1:-1;;;;;13189:74:10;;;:13;;;;;;;;;;;:74;13171:3;;13130:133;;;-1:-1:-1;13283:10:10;12939:362;-1:-1:-1;;12939:362:10:o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;9235:186:10:-;9301:7;9351:34;-1:-1:-1;;;;;;;;;;;9351:9:10;:34::i;:::-;-1:-1:-1;;;;;9328:83:10;;:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9328:85:10;;-1:-1:-1;9235:186:10;:::o;5648:::-;726:12:57;:10;:12::i;:::-;5729:28:10::1;5746:10;5729:16;:28::i;:::-;5721:62;;;::::0;;-1:-1:-1;;;5721:62:10;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5721:62:10;;;;;;;;;;;;;::::1;;5794:32;5815:10;5794:20;:32::i;:::-;5648:186:::0;:::o;24939:189::-;25045:4;25069:51;25094:17;25113:6;25069:24;:51::i;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;7818:180:10:-;7881:7;7931:34;-1:-1:-1;;;;;;;;;;;7931:9:10;:34::i;:::-;-1:-1:-1;;;;;7908:80:10;;:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1154:33:56;;;-1:-1:-1;;;;;1154:33:56;;:::o;8139:181:10:-;8198:16;8257:34;-1:-1:-1;;;;;;;;;;;8257:9:10;:34::i;:::-;-1:-1:-1;;;;;8234:76:10;;:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9933:200;10008:11;10062:34;-1:-1:-1;;;;;;;;;;;10062:9:10;:34::i;:::-;-1:-1:-1;;;;;10039:78:10;;10118:6;10039:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;219:29:57;;;-1:-1:-1;;;;;219:29:57;;:::o;13976:891:10:-;14062:4;14079:25;14107:10;-1:-1:-1;;;;;14107:30:10;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14107:32:10;14079:60;;;-1:-1:-1;14150:34:10;14079:60;14187:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14187:36:10;;14150:73;;14234:30;14280:17;14267:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14267:31:10;;14234:64;;14375:9;14370:254;14394:17;14390:1;:21;14370:254;;;14433:24;14460:10;-1:-1:-1;;;;;14460:26:10;;14487:1;14460:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14460:29:10;14504:16;;14460:29;;-1:-1:-1;14460:29:10;;14504:13;;14518:1;;14504:16;;;;;;;;;;;:31;-1:-1:-1;;;;;14504:31:10;;;-1:-1:-1;;;;;14504:31:10;;;;;14570:42;14587:10;14599:12;14570:16;:42::i;:::-;14550:14;14565:1;14550:17;;;;;;;;:62;;;;:17;;;;;;;;;;;:62;-1:-1:-1;14413:3:10;;14370:254;;;-1:-1:-1;14857:1:10;14732:104;14757:47;14774:10;14786:17;14757:16;:47::i;:::-;14806:13;14821:14;14732:24;:104::i;:::-;-1:-1:-1;;;;;14732:127:10;;;;13976:891;-1:-1:-1;;;;;13976:891:10:o;13503:199::-;13573:4;13683:10;-1:-1:-1;;;;;13645:49:10;:10;-1:-1:-1;;;;;13645:16:10;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13645:18:10;:26;;;-1:-1:-1;;;13645:26:10;;;;-1:-1:-1;;;;;13645:24:10;;;;;;:26;;;;;:18;;:26;;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13645:26:10;-1:-1:-1;;;;;13645:49:10;;;13503:199;-1:-1:-1;;13503:199:10:o;6123:202::-;6211:5;;-1:-1:-1;;;;;6211:5:10;6197:10;:19;;:52;;;6221:28;6238:10;6221:16;:28::i;:::-;6220:29;6197:52;6189:82;;;;;-1:-1:-1;;;6189:82:10;;;;;;;;;;;;-1:-1:-1;;;6189:82:10;;;;;;;;;;;;;;;6282:35;6306:10;6282:23;:35::i;23624:121::-;23684:16;23720:17;23730:6;23720:9;:17::i;24054:180::-;24150:7;24177:49;24208:17;24177:30;:49::i;8492:199::-;8564:16;8623:34;-1:-1:-1;;;;;;;;;;;8623:9:10;:34::i;:::-;-1:-1:-1;;;;;8600:75:10;;8676:6;8600:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3304:137:56;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;12391:257:10:-;12502:4;12549:34;-1:-1:-1;;;;;;;;;;;12549:9:10;:34::i;:::-;-1:-1:-1;;;;;12526:87:10;;12614:17;12633:6;12526:114;;;;;;;;;;;;;-1:-1:-1;;;;;12526:114:10;;;;;;-1:-1:-1;;;;;12526:114:10;;;;;;;;;;;;;;;;;;;;;;;;;;;25509:268;25641:16;25677:92;25726:1;25702:14;:21;:25;:33;;25734:1;25702:33;;;25730:1;25702:33;25677:92;;25737:14;25753:15;25677:24;:92::i;6464:170::-;6520:7;6570:34;-1:-1:-1;;;;;;;;;;;6570:9:10;:34::i;:::-;-1:-1:-1;;;;;6547:77:10;;:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;255:23:57;;;-1:-1:-1;;;;;255:23:57;;:::o;24630:203:10:-;24737:16;24773:52;24799:17;24818:6;24773:25;:52::i;7498:175::-;7562:4;7609:34;-1:-1:-1;;;;;;;;;;;7609:9:10;:34::i;:::-;-1:-1:-1;;;;;7586:71:10;;7658:6;7586:79;;;;;;;;;;;;;-1:-1:-1;;;;;7586:79:10;;;;;;;;;;;;;;;;;;;;;;;;;;23236:102;23287:7;23314:16;:14;:16::i;8899:185::-;8970:4;9017:34;-1:-1:-1;;;;;;;;;;;9017:9:10;:34::i;:::-;-1:-1:-1;;;;;8994:74:10;;9069:6;8994:82;;;;;;;;;;;;;-1:-1:-1;;;;;8994:82:10;;;;;;;;;;;;;;;;;;;;;;;;;;6769:171;6821:16;6880:34;-1:-1:-1;;;;;;;;;;;6880:9:10;:34::i;:::-;-1:-1:-1;;;;;6857:73:10;;:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1164:167:57;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;24342:181:10:-;24434:16;24470:45;24497:17;24470:26;:45::i;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;20557:934:10;20654:16;20683:44;20753:34;-1:-1:-1;;;;;;;;;;;20753:9:10;:34::i;:::-;20683:105;;20799:22;20824:21;-1:-1:-1;;;;;20824:56:10;;20881:14;20896:1;20881:17;;;;;;;;;;;;;;20824:75;;;;;;;;;;;;;-1:-1:-1;;;;;20824:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20824:75:10;;-1:-1:-1;20910:13:10;21043:1;21026:363;21050:14;:21;21046:1;:25;21026:363;;;21093:35;21131:21;-1:-1:-1;;;;;21131:56:10;;21188:14;21203:1;21188:17;;;;;;;;;;;;;;21131:75;;;;;;;;;;;;;-1:-1:-1;;;;;21131:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21131:75:10;;-1:-1:-1;21225:44:10;;;21221:157;;;21307:27;21290:44;;21361:1;21353:9;;21221:157;-1:-1:-1;21073:3:10;;21026:363;;;;21408:21;-1:-1:-1;;;;;21408:52:10;;21461:14;21476:5;21461:21;;;;;;;;;;;;;;21408:75;;;;;;;;;;;;;-1:-1:-1;;;;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21408:75:10;;;;;;;;;;;;-1:-1:-1;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21401:82;;;;;20557:934;;;:::o;21499:658::-;21667:4;21684:25;21712:10;-1:-1:-1;;;;;21712:30:10;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21712:32:10;21684:60;;;-1:-1:-1;21770:47:10;21787:10;21684:60;21770:16;:47::i;:::-;21761:56;;:5;:56;;;21757:87;;21839:5;21832:12;;;;;21757:87;21886:17;21861:14;:21;:42;21857:73;;21925:5;21918:12;;;;;21857:73;21948:9;21943:183;21967:14;:21;21963:1;:25;21943:183;;;22036:47;22053:10;22065:14;22080:1;22065:17;;;;;;;;;;;;;;22036:16;:47::i;:::-;22014:69;;:15;22030:1;22014:18;;;;;;;;;;;;;;:69;;;22010:104;;22109:5;22102:12;;;;;;22010:104;21990:3;;21943:183;;;;22145:4;22138:11;;;21499:658;;;;;;;:::o;18900:810::-;18972:44;19042:34;-1:-1:-1;;;;;;;;;;;19042:9:10;:34::i;:::-;18972:105;;19088:23;19125:10;-1:-1:-1;;;;;19114:28:10;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19114:30:10;19183:32;;;-1:-1:-1;;;19183:32:10;;;;19114:30;;-1:-1:-1;19155:25:10;;-1:-1:-1;;;;;19183:30:10;;;;;:32;;;;;19114:30;;19183:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19183:32:10;19155:60;;;-1:-1:-1;19265:40:10;19275:21;19298:6;19265:9;:40::i;:::-;19340:1;19320:17;:21;19316:196;;;19356:47;19373:21;19396:6;19356:16;:47::i;:::-;19316:196;;;19432:80;19452:21;19495:6;19505;19432:19;:80::i;:::-;19565:9;19560:142;19584:17;19580:1;:21;19560:142;;;19621:81;19641:21;19664:10;-1:-1:-1;;;;;19664:26:10;;19691:1;19664:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19664:29:10;19695:6;19621:19;:81::i;:::-;19603:3;;19560:142;;;;18900:810;;;;:::o;22294:208::-;22392:6;22414:13;22434:10;-1:-1:-1;;;;;22434:21:10;;22456:13;22434:36;;;;;;;;;;;;;-1:-1:-1;;;;;22434:36:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22434:36:10;;;;22294:208;-1:-1:-1;;;;22294:208:10:o;22736:404::-;22927:52;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22927:52:10;-1:-1:-1;;;22927:52:10;;;22896:84;;;;22835:6;;;;22869:23;;-1:-1:-1;;;;;22896:30:10;;;22927:52;;22896:84;;;;22927:52;22896:84;;22927:52;22896:84;;;;;;;;;;-1:-1:-1;;22896:84:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22854:126;;;;22995:7;:34;;;;;23006:10;:17;23027:2;23006:23;22995:34;22991:93;;;23063:10;23052:32;;;;;;;;;;;;;;;-1:-1:-1;23052:32:10;;-1:-1:-1;23045:39:10;;-1:-1:-1;;23045:39:10;22991:93;23123:1;23102:18;:22;:30;;23131:1;23102:30;;;23127:1;23102:30;23095:37;;;22736:404;-1:-1:-1;;;;;22736:404:10:o;19718:831::-;19793:44;19863:34;-1:-1:-1;;;;;;;;;;;19863:9:10;:34::i;:::-;19793:105;;19909:23;19946:10;-1:-1:-1;;;;;19935:28:10;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19935:30:10;20004:32;;;-1:-1:-1;;;20004:32:10;;;;19935:30;;-1:-1:-1;19976:25:10;;-1:-1:-1;;;;;20004:30:10;;;;;:32;;;;;19935:30;;20004:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20004:32:10;19976:60;;;-1:-1:-1;20089:43:10;20102:21;20125:6;20089:12;:43::i;:::-;20167:1;20147:17;:21;20143:202;;;20183:50;20203:21;20226:6;20183:19;:50::i;:::-;20143:202;;;20262:83;20285:21;20328:6;20338;20262:22;:83::i;:::-;20401:9;20396:145;20420:17;20416:1;:21;20396:145;;;20457:84;20480:21;20503:10;-1:-1:-1;;;;;20503:26:10;;20530:1;20503:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20503:29:10;20534:6;20457:22;:84::i;:::-;20439:3;;20396:145;;16388:250;16500:22;-1:-1:-1;;;;;16500:36:10;;16537:7;16500:45;;;;;;;;;;;;;-1:-1:-1;;;;;16500:45:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16561:29:10;;-1:-1:-1;;;;;16561:29:10;;;-1:-1:-1;16561:29:10;;-1:-1:-1;16561:29:10;;;16606:24;;-1:-1:-1;;;;;16606:24:10;;;;;;;;16388:250;;:::o;17187:257::-;17319:22;-1:-1:-1;;;;;17319:39:10;;17359:20;17319:61;;;;;;;;;;;;;-1:-1:-1;;;;;17319:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17396:40:10;;-1:-1:-1;;;;;17396:40:10;;;-1:-1:-1;17396:40:10;;-1:-1:-1;17396:40:10;;;17187:257;;:::o;18078:296::-;18231:22;-1:-1:-1;;;;;18231:42:10;;18274:17;18293:7;18231:70;;;;;;;;;;;;;-1:-1:-1;;;;;18231:70:10;;;;;;-1:-1:-1;;;;;18231:70:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18317:49:10;;-1:-1:-1;;;;;18317:49:10;;;;-1:-1:-1;18317:49:10;;;-1:-1:-1;18317:49:10;;;;;18078:296;;;:::o;16772:260::-;16887:22;-1:-1:-1;;;;;16887:39:10;;16927:7;16887:48;;;;;;;;;;;;;-1:-1:-1;;;;;16887:48:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16951:31:10;;-1:-1:-1;;;;;16951:31:10;;;-1:-1:-1;16951:31:10;;-1:-1:-1;16951:31:10;;;16998:26;;-1:-1:-1;;;;;16998:26:10;;;;;;;;16772:260;;:::o;17604:265::-;17739:22;-1:-1:-1;;;;;17739:42:10;;17782:20;17739:64;;;;;;;;;;;;;-1:-1:-1;;;;;17739:64:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17819:42:10;;-1:-1:-1;;;;;17819:42:10;;;-1:-1:-1;17819:42:10;;-1:-1:-1;17819:42:10;;;17604:265;;:::o;18588:304::-;18744:22;-1:-1:-1;;;;;18744:45:10;;18790:17;18809:7;18744:73;;;;;;;;;;;;;-1:-1:-1;;;;;18744:73:10;;;;;;-1:-1:-1;;;;;18744:73:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18833:51:10;;-1:-1:-1;;;;;18833:51:10;;;;-1:-1:-1;18833:51:10;;;-1:-1:-1;18833:51:10;;;;;18588:304;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../utility/TokenHandler.sol\";\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"./interfaces/IConverter.sol\";\r\nimport \"./interfaces/IConverterFactory.sol\";\r\nimport \"./interfaces/IConverterRegistry.sol\";\r\nimport \"./interfaces/IConverterRegistryData.sol\";\r\nimport \"../token/interfaces/ISmartToken.sol\";\r\n\r\n/**\r\n * @dev The ConverterRegistry maintains a list of all active converters in the Bancor Network.\r\n *\r\n * Since converters can be upgraded and thus their address can change, the registry actually keeps\r\n * converter anchors internally and not the converters themselves.\r\n * The active converter for each anchor can be easily accessed by querying the anchor's owner.\r\n *\r\n * The registry exposes 3 differnet lists that can be accessed and iterated, based on the use-case of the caller:\r\n * - Anchors - can be used to get all the latest / historical data in the network\r\n * - Liquidity pools - can be used to get all liquidity pools for funding, liquidation etc.\r\n * - Convertible tokens - can be used to get all tokens that can be converted in the network (excluding pool\r\n * tokens), and for each one - all anchors that hold it in their reserves\r\n *\r\n *\r\n * The contract fires events whenever one of the primitives is added to or removed from the registry\r\n *\r\n * The contract is upgradable.\r\n*/\r\ncontract ConverterRegistry is IConverterRegistry, ContractRegistryClient, TokenHandler {\r\n /**\r\n * @dev triggered when a converter anchor is added to the registry\r\n *\r\n * @param _anchor smart token\r\n */\r\n event ConverterAnchorAdded(IConverterAnchor indexed _anchor);\r\n\r\n /**\r\n * @dev triggered when a converter anchor is removed from the registry\r\n *\r\n * @param _anchor smart token\r\n */\r\n event ConverterAnchorRemoved(IConverterAnchor indexed _anchor);\r\n\r\n /**\r\n * @dev triggered when a liquidity pool is added to the registry\r\n *\r\n * @param _liquidityPool liquidity pool\r\n */\r\n event LiquidityPoolAdded(IConverterAnchor indexed _liquidityPool);\r\n\r\n /**\r\n * @dev triggered when a liquidity pool is removed from the registry\r\n *\r\n * @param _liquidityPool liquidity pool\r\n */\r\n event LiquidityPoolRemoved(IConverterAnchor indexed _liquidityPool);\r\n\r\n /**\r\n * @dev triggered when a convertible token is added to the registry\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _smartToken associated smart token\r\n */\r\n event ConvertibleTokenAdded(IERC20Token indexed _convertibleToken, IConverterAnchor indexed _smartToken);\r\n\r\n /**\r\n * @dev triggered when a convertible token is removed from the registry\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _smartToken associated smart token\r\n */\r\n event ConvertibleTokenRemoved(IERC20Token indexed _convertibleToken, IConverterAnchor indexed _smartToken);\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `ConverterAnchorAdded`\r\n */\r\n event SmartTokenAdded(IConverterAnchor indexed _smartToken);\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `ConverterAnchorRemoved`\r\n */\r\n event SmartTokenRemoved(IConverterAnchor indexed _smartToken);\r\n\r\n /**\r\n * @dev initializes a new ConverterRegistry instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {\r\n }\r\n\r\n /**\r\n * @dev creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry\r\n *\r\n * @param _type converter type, see ConverterBase contract main doc\r\n * @param _name token / pool name\r\n * @param _symbol token / pool symbol\r\n * @param _decimals token / pool decimals\r\n * @param _maxConversionFee maximum conversion-fee\r\n * @param _reserveTokens reserve tokens\r\n * @param _reserveWeights reserve weights\r\n *\r\n * @return new converter\r\n */\r\n function newConverter(\r\n uint16 _type,\r\n string memory _name,\r\n string memory _symbol,\r\n uint8 _decimals,\r\n uint32 _maxConversionFee,\r\n IERC20Token[] memory _reserveTokens,\r\n uint32[] memory _reserveWeights\r\n )\r\n public virtual returns (IConverter)\r\n {\r\n uint256 length = _reserveTokens.length;\r\n require(length == _reserveWeights.length, \"ERR_INVALID_RESERVES\");\r\n require(getLiquidityPoolByConfig(_type, _reserveTokens, _reserveWeights) == IConverterAnchor(0), \"ERR_ALREADY_EXISTS\");\r\n\r\n IConverterFactory factory = IConverterFactory(addressOf(CONVERTER_FACTORY));\r\n IConverterAnchor anchor = IConverterAnchor(factory.createAnchor(_type, _name, _symbol, _decimals));\r\n IConverter converter = IConverter(factory.createConverter(_type, anchor, registry, _maxConversionFee));\r\n\r\n anchor.acceptOwnership();\r\n converter.acceptOwnership();\r\n\r\n for (uint256 i = 0; i < length; i++)\r\n converter.addReserve(_reserveTokens[i], _reserveWeights[i]);\r\n\r\n anchor.transferOwnership(address(converter));\r\n converter.acceptAnchorOwnership();\r\n converter.transferOwnership(msg.sender);\r\n\r\n addConverterInternal(converter);\r\n return converter;\r\n }\r\n\r\n /**\r\n * @dev adds an existing converter to the registry\r\n * can only be called by the owner\r\n *\r\n * @param _converter converter\r\n */\r\n function addConverter(IConverter _converter) public ownerOnly {\r\n require(isConverterValid(_converter), \"ERR_INVALID_CONVERTER\");\r\n addConverterInternal(_converter);\r\n }\r\n\r\n /**\r\n * @dev removes a converter from the registry\r\n * anyone can remove an existing converter from the registry, as long as the converter is invalid\r\n * note that the owner can also remove valid converters\r\n *\r\n * @param _converter converter\r\n */\r\n function removeConverter(IConverter _converter) public {\r\n require(msg.sender == owner || !isConverterValid(_converter), \"ERR_ACCESS_DENIED\");\r\n removeConverterInternal(_converter);\r\n }\r\n\r\n /**\r\n * @dev returns the number of converter anchors in the registry\r\n *\r\n * @return number of anchors\r\n */\r\n function getAnchorCount() public view override returns (uint256) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getSmartTokenCount();\r\n }\r\n\r\n /**\r\n * @dev returns the list of converter anchors in the registry\r\n *\r\n * @return list of anchors\r\n */\r\n function getAnchors() public view override returns (address[] memory) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getSmartTokens();\r\n }\r\n\r\n /**\r\n * @dev returns the converter anchor at a given index\r\n *\r\n * @param _index index\r\n * @return anchor at the given index\r\n */\r\n function getAnchor(uint256 _index) public view override returns (IConverterAnchor) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getSmartToken(_index);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a converter anchor\r\n *\r\n * @param _value value\r\n * @return true if the given value is an anchor, false if not\r\n */\r\n function isAnchor(address _value) public view override returns (bool) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).isSmartToken(_value);\r\n }\r\n\r\n /**\r\n * @dev returns the number of liquidity pools in the registry\r\n *\r\n * @return number of liquidity pools\r\n */\r\n function getLiquidityPoolCount() public view override returns (uint256) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getLiquidityPoolCount();\r\n }\r\n\r\n /**\r\n * @dev returns the list of liquidity pools in the registry\r\n *\r\n * @return list of liquidity pools\r\n */\r\n function getLiquidityPools() public view override returns (address[] memory) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getLiquidityPools();\r\n }\r\n\r\n /**\r\n * @dev returns the liquidity pool at a given index\r\n *\r\n * @param _index index\r\n * @return liquidity pool at the given index\r\n */\r\n function getLiquidityPool(uint256 _index) public view override returns (IConverterAnchor) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getLiquidityPool(_index);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a liquidity pool\r\n *\r\n * @param _value value\r\n * @return true if the given value is a liquidity pool, false if not\r\n */\r\n function isLiquidityPool(address _value) public view override returns (bool) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).isLiquidityPool(_value);\r\n }\r\n\r\n /**\r\n * @dev returns the number of convertible tokens in the registry\r\n *\r\n * @return number of convertible tokens\r\n */\r\n function getConvertibleTokenCount() public view override returns (uint256) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleTokenCount();\r\n }\r\n\r\n /**\r\n * @dev returns the list of convertible tokens in the registry\r\n *\r\n * @return list of convertible tokens\r\n */\r\n function getConvertibleTokens() public view override returns (address[] memory) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleTokens();\r\n }\r\n\r\n /**\r\n * @dev returns the convertible token at a given index\r\n *\r\n * @param _index index\r\n * @return convertible token at the given index\r\n */\r\n function getConvertibleToken(uint256 _index) public view override returns (IERC20Token) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleToken(_index);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a convertible token\r\n *\r\n * @param _value value\r\n * @return true if the given value is a convertible token, false if not\r\n */\r\n function isConvertibleToken(address _value) public view override returns (bool) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).isConvertibleToken(_value);\r\n }\r\n\r\n /**\r\n * @dev returns the number of converter anchors associated with a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @return number of anchors associated with the given convertible token\r\n */\r\n function getConvertibleTokenAnchorCount(IERC20Token _convertibleToken) public view override returns (uint256) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleTokenSmartTokenCount(_convertibleToken);\r\n }\r\n\r\n /**\r\n * @dev returns the list of aoncerter anchors associated with a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @return list of anchors associated with the given convertible token\r\n */\r\n function getConvertibleTokenAnchors(IERC20Token _convertibleToken) public view override returns (address[] memory) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleTokenSmartTokens(_convertibleToken);\r\n }\r\n\r\n /**\r\n * @dev returns the converter anchor associated with a given convertible token at a given index\r\n *\r\n * @param _index index\r\n * @return anchor associated with the given convertible token at the given index\r\n */\r\n function getConvertibleTokenAnchor(IERC20Token _convertibleToken, uint256 _index) public view override returns (IConverterAnchor) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).getConvertibleTokenSmartToken(_convertibleToken, _index);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a converter anchor of a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _value value\r\n * @return true if the given value is an anchor of the given convertible token, false if not\r\n */\r\n function isConvertibleTokenAnchor(IERC20Token _convertibleToken, address _value) public view override returns (bool) {\r\n return IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA)).isConvertibleTokenSmartToken(_convertibleToken, _value);\r\n }\r\n\r\n /**\r\n * @dev returns a list of converters for a given list of anchors\r\n * this is a utility function that can be used to reduce the number of calls to the contract\r\n *\r\n * @param _anchors list of converter anchors\r\n * @return list of converters\r\n */\r\n function getConvertersByAnchors(address[] memory _anchors) public view returns (IConverter[] memory) {\r\n IConverter[] memory converters = new IConverter[](_anchors.length);\r\n\r\n for (uint256 i = 0; i < _anchors.length; i++)\r\n converters[i] = IConverter(payable(IConverterAnchor(_anchors[i]).owner()));\r\n\r\n return converters;\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given converter is valid\r\n *\r\n * @param _converter converter\r\n * @return true if the given converter is valid, false if not\r\n */\r\n function isConverterValid(IConverter _converter) public view returns (bool) {\r\n // verify that the converter is active\r\n return _converter.token().owner() == address(_converter);\r\n }\r\n\r\n /**\r\n * @dev checks if a liquidity pool with given configuration is already registered\r\n *\r\n * @param _converter converter with specific configuration\r\n * @return if a liquidity pool with the same configuration is already registered\r\n */\r\n function isSimilarLiquidityPoolRegistered(IConverter _converter) public view returns (bool) {\r\n uint256 reserveTokenCount = _converter.connectorTokenCount();\r\n IERC20Token[] memory reserveTokens = new IERC20Token[](reserveTokenCount);\r\n uint32[] memory reserveWeights = new uint32[](reserveTokenCount);\r\n\r\n // get the reserve-configuration of the converter\r\n for (uint256 i = 0; i < reserveTokenCount; i++) {\r\n IERC20Token reserveToken = _converter.connectorTokens(i);\r\n reserveTokens[i] = reserveToken;\r\n reserveWeights[i] = getReserveWeight(_converter, reserveToken);\r\n }\r\n\r\n // return if a liquidity pool with the same configuration is already registered\r\n return getLiquidityPoolByConfig(getConverterType(_converter, reserveTokenCount), reserveTokens, reserveWeights) != IConverterAnchor(0);\r\n }\r\n\r\n /**\r\n * @dev searches for a liquidity pool with specific configuration\r\n *\r\n * @param _type converter type, see ConverterBase contract main doc\r\n * @param _reserveTokens reserve tokens\r\n * @param _reserveWeights reserve weights\r\n * @return the liquidity pool, or zero if no such liquidity pool exists\r\n */\r\n function getLiquidityPoolByConfig(uint16 _type, IERC20Token[] memory _reserveTokens, uint32[] memory _reserveWeights) public view returns (IConverterAnchor) {\r\n // verify that the input parameters represent a valid liquidity pool\r\n if (_reserveTokens.length == _reserveWeights.length && _reserveTokens.length > 1) {\r\n // get the anchors of the least frequent token (optimization)\r\n address[] memory convertibleTokenAnchors = getLeastFrequentTokenAnchors(_reserveTokens);\r\n // search for a converter with the same configuration\r\n for (uint256 i = 0; i < convertibleTokenAnchors.length; i++) {\r\n IConverterAnchor anchor = IConverterAnchor(convertibleTokenAnchors[i]);\r\n IConverter converter = IConverter(payable(anchor.owner()));\r\n if (isConverterReserveConfigEqual(converter, _type, _reserveTokens, _reserveWeights))\r\n return anchor;\r\n }\r\n }\r\n\r\n return IConverterAnchor(0);\r\n }\r\n\r\n /**\r\n * @dev adds a converter anchor to the registry\r\n *\r\n * @param _anchor converter anchor\r\n */\r\n function addAnchor(IConverterRegistryData _converterRegistryData, IConverterAnchor _anchor) internal {\r\n _converterRegistryData.addSmartToken(_anchor);\r\n emit ConverterAnchorAdded(_anchor);\r\n emit SmartTokenAdded(_anchor);\r\n }\r\n\r\n /**\r\n * @dev removes a converter anchor from the registry\r\n *\r\n * @param _anchor converter anchor\r\n */\r\n function removeAnchor(IConverterRegistryData _converterRegistryData, IConverterAnchor _anchor) internal {\r\n _converterRegistryData.removeSmartToken(_anchor);\r\n emit ConverterAnchorRemoved(_anchor);\r\n emit SmartTokenRemoved(_anchor);\r\n }\r\n\r\n /**\r\n * @dev adds a liquidity pool to the registry\r\n *\r\n * @param _liquidityPoolAnchor liquidity pool converter anchor\r\n */\r\n function addLiquidityPool(IConverterRegistryData _converterRegistryData, IConverterAnchor _liquidityPoolAnchor) internal {\r\n _converterRegistryData.addLiquidityPool(_liquidityPoolAnchor);\r\n emit LiquidityPoolAdded(_liquidityPoolAnchor);\r\n }\r\n\r\n /**\r\n * @dev removes a liquidity pool from the registry\r\n *\r\n * @param _liquidityPoolAnchor liquidity pool converter anchor\r\n */\r\n function removeLiquidityPool(IConverterRegistryData _converterRegistryData, IConverterAnchor _liquidityPoolAnchor) internal {\r\n _converterRegistryData.removeLiquidityPool(_liquidityPoolAnchor);\r\n emit LiquidityPoolRemoved(_liquidityPoolAnchor);\r\n }\r\n\r\n /**\r\n * @dev adds a convertible token to the registry\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _anchor associated converter anchor\r\n */\r\n function addConvertibleToken(IConverterRegistryData _converterRegistryData, IERC20Token _convertibleToken, IConverterAnchor _anchor) internal {\r\n _converterRegistryData.addConvertibleToken(_convertibleToken, _anchor);\r\n emit ConvertibleTokenAdded(_convertibleToken, _anchor);\r\n }\r\n\r\n /**\r\n * @dev removes a convertible token from the registry\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _anchor associated converter anchor\r\n */\r\n function removeConvertibleToken(IConverterRegistryData _converterRegistryData, IERC20Token _convertibleToken, IConverterAnchor _anchor) internal {\r\n _converterRegistryData.removeConvertibleToken(_convertibleToken, _anchor);\r\n emit ConvertibleTokenRemoved(_convertibleToken, _anchor);\r\n }\r\n\r\n function addConverterInternal(IConverter _converter) private {\r\n IConverterRegistryData converterRegistryData = IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA));\r\n IConverterAnchor anchor = IConverter(_converter).token();\r\n uint256 reserveTokenCount = _converter.connectorTokenCount();\r\n\r\n // add the converter anchor\r\n addAnchor(converterRegistryData, anchor);\r\n if (reserveTokenCount > 1)\r\n addLiquidityPool(converterRegistryData, anchor);\r\n else\r\n addConvertibleToken(converterRegistryData, ISmartToken(address(anchor)), anchor);\r\n\r\n // add all reserve tokens\r\n for (uint256 i = 0; i < reserveTokenCount; i++)\r\n addConvertibleToken(converterRegistryData, _converter.connectorTokens(i), anchor);\r\n }\r\n\r\n function removeConverterInternal(IConverter _converter) private {\r\n IConverterRegistryData converterRegistryData = IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA));\r\n IConverterAnchor anchor = IConverter(_converter).token();\r\n uint256 reserveTokenCount = _converter.connectorTokenCount();\r\n\r\n // remove the converter anchor\r\n removeAnchor(converterRegistryData, anchor);\r\n if (reserveTokenCount > 1)\r\n removeLiquidityPool(converterRegistryData, anchor);\r\n else\r\n removeConvertibleToken(converterRegistryData, ISmartToken(address(anchor)), anchor);\r\n\r\n // remove all reserve tokens\r\n for (uint256 i = 0; i < reserveTokenCount; i++)\r\n removeConvertibleToken(converterRegistryData, _converter.connectorTokens(i), anchor);\r\n }\r\n\r\n function getLeastFrequentTokenAnchors(IERC20Token[] memory _reserveTokens) private view returns (address[] memory) {\r\n IConverterRegistryData converterRegistryData = IConverterRegistryData(addressOf(CONVERTER_REGISTRY_DATA));\r\n uint256 minAnchorCount = converterRegistryData.getConvertibleTokenSmartTokenCount(_reserveTokens[0]);\r\n uint256 index = 0;\r\n\r\n // find the reserve token which has the smallest number of converter anchors\r\n for (uint256 i = 1; i < _reserveTokens.length; i++) {\r\n uint256 convertibleTokenAnchorCount = converterRegistryData.getConvertibleTokenSmartTokenCount(_reserveTokens[i]);\r\n if (minAnchorCount > convertibleTokenAnchorCount) {\r\n minAnchorCount = convertibleTokenAnchorCount;\r\n index = i;\r\n }\r\n }\r\n\r\n return converterRegistryData.getConvertibleTokenSmartTokens(_reserveTokens[index]);\r\n }\r\n\r\n function isConverterReserveConfigEqual(IConverter _converter, uint16 _type, IERC20Token[] memory _reserveTokens, uint32[] memory _reserveWeights) private view returns (bool) {\r\n uint256 reserveTokenCount = _converter.connectorTokenCount();\r\n\r\n if (_type != getConverterType(_converter, reserveTokenCount))\r\n return false;\r\n\r\n if (_reserveTokens.length != reserveTokenCount)\r\n return false;\r\n\r\n for (uint256 i = 0; i < _reserveTokens.length; i++) {\r\n if (_reserveWeights[i] != getReserveWeight(_converter, _reserveTokens[i]))\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // utility to get the reserve weight (including from older converters that don't support the new getReserveWeight function)\r\n function getReserveWeight(IConverter _converter, IERC20Token _reserveToken) private view returns (uint32) {\r\n (, uint32 weight,,,) = _converter.connectors(_reserveToken);\r\n return weight;\r\n }\r\n\r\n bytes4 private constant CONVERTER_TYPE_FUNC_SELECTOR = bytes4(keccak256(\"converterType()\"));\r\n\r\n // utility to get the converter type (including from older converters that don't support the new converterType function)\r\n function getConverterType(IConverter _converter, uint256 _reserveTokenCount) private view returns (uint16) {\r\n (bool success, bytes memory returnData) = address(_converter).staticcall(abi.encodeWithSelector(CONVERTER_TYPE_FUNC_SELECTOR));\r\n if (success && returnData.length == 32) \r\n return abi.decode(returnData, (uint16));\r\n return _reserveTokenCount > 1 ? 1 : 0;\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getAnchorCount`\r\n */\r\n function getSmartTokenCount() public view returns (uint256) {\r\n return getAnchorCount();\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getAnchors`\r\n */\r\n function getSmartTokens() public view returns (address[] memory) {\r\n return getAnchors();\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getAnchor`\r\n */\r\n function getSmartToken(uint256 _index) public view returns (IConverterAnchor) {\r\n return getAnchor(_index);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `isAnchor`\r\n */\r\n function isSmartToken(address _value) public view returns (bool) {\r\n return isAnchor(_value);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`\r\n */\r\n function getConvertibleTokenSmartTokenCount(IERC20Token _convertibleToken) public view returns (uint256) {\r\n return getConvertibleTokenAnchorCount(_convertibleToken);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getConvertibleTokenAnchors`\r\n */\r\n function getConvertibleTokenSmartTokens(IERC20Token _convertibleToken) public view returns (address[] memory) {\r\n return getConvertibleTokenAnchors(_convertibleToken);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getConvertibleTokenAnchor`\r\n */\r\n function getConvertibleTokenSmartToken(IERC20Token _convertibleToken, uint256 _index) public view returns (IConverterAnchor) {\r\n return getConvertibleTokenAnchor(_convertibleToken, _index);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `isConvertibleTokenAnchor`\r\n */\r\n function isConvertibleTokenSmartToken(IERC20Token _convertibleToken, address _value) public view returns (bool) {\r\n return isConvertibleTokenAnchor(_convertibleToken, _value);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getConvertersByAnchors`\r\n */\r\n function getConvertersBySmartTokens(address[] memory _smartTokens) public view returns (IConverter[] memory) {\r\n return getConvertersByAnchors(_smartTokens);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility, use `getLiquidityPoolByConfig`\r\n */\r\n function getLiquidityPoolByReserveConfig(IERC20Token[] memory _reserveTokens, uint32[] memory _reserveWeights) public view returns (IConverterAnchor) {\r\n return getLiquidityPoolByConfig(_reserveTokens.length > 1 ? 1 : 0, _reserveTokens, _reserveWeights);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol", + "exportedSymbols": { + "ConverterRegistry": [ + 11667 + ] + }, + "id": 11668, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 10246, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:10" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 10247, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 22527, + "src": "77:37:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 10248, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 21720, + "src": "116:47:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 10249, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13341, + "src": "165:37:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 10250, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13390, + "src": "204:44:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "file": "./interfaces/IConverterRegistry.sol", + "id": 10251, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13502, + "src": "250:45:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "file": "./interfaces/IConverterRegistryData.sol", + "id": 10252, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13648, + "src": "297:49:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../token/interfaces/ISmartToken.sol", + "id": 10253, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 21183, + "src": "348:45:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10255, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "1444:18:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 10256, + "nodeType": "InheritanceSpecifier", + "src": "1444:18:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10257, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1464:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 10258, + "nodeType": "InheritanceSpecifier", + "src": "1464:22:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10259, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "1488:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 10260, + "nodeType": "InheritanceSpecifier", + "src": "1488:12:10" + } + ], + "contractDependencies": [ + 13501, + 21719, + 21818, + 22526, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 10254, + "nodeType": "StructuredDocumentation", + "src": "397:1015:10", + "text": " @dev The ConverterRegistry maintains a list of all active converters in the Bancor Network.\n Since converters can be upgraded and thus their address can change, the registry actually keeps\n converter anchors internally and not the converters themselves.\n The active converter for each anchor can be easily accessed by querying the anchor's owner.\n The registry exposes 3 differnet lists that can be accessed and iterated, based on the use-case of the caller:\n - Anchors - can be used to get all the latest / historical data in the network\n - Liquidity pools - can be used to get all liquidity pools for funding, liquidation etc.\n - Convertible tokens - can be used to get all tokens that can be converted in the network (excluding pool\n tokens), and for each one - all anchors that hold it in their reserves\n The contract fires events whenever one of the primitives is added to or removed from the registry\n The contract is upgradable." + }, + "fullyImplemented": true, + "id": 11667, + "linearizedBaseContracts": [ + 11667, + 22526, + 21719, + 22661, + 21818, + 22847, + 13501 + ], + "name": "ConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 10261, + "nodeType": "StructuredDocumentation", + "src": "1508:129:10", + "text": " @dev triggered when a converter anchor is added to the registry\n @param _anchor smart token" + }, + "id": 10265, + "name": "ConverterAnchorAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10263, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10265, + "src": "1670:32:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10262, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1670:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1669:34:10" + }, + "src": "1643:61:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10266, + "nodeType": "StructuredDocumentation", + "src": "1712:133:10", + "text": " @dev triggered when a converter anchor is removed from the registry\n @param _anchor smart token" + }, + "id": 10270, + "name": "ConverterAnchorRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10268, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10270, + "src": "1880:32:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10267, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1880:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1879:34:10" + }, + "src": "1851:63:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10271, + "nodeType": "StructuredDocumentation", + "src": "1922:137:10", + "text": " @dev triggered when a liquidity pool is added to the registry\n @param _liquidityPool liquidity pool" + }, + "id": 10275, + "name": "LiquidityPoolAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10273, + "indexed": true, + "mutability": "mutable", + "name": "_liquidityPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10275, + "src": "2090:39:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10272, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2090:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2089:41:10" + }, + "src": "2065:66:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10276, + "nodeType": "StructuredDocumentation", + "src": "2139:141:10", + "text": " @dev triggered when a liquidity pool is removed from the registry\n @param _liquidityPool liquidity pool" + }, + "id": 10280, + "name": "LiquidityPoolRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10278, + "indexed": true, + "mutability": "mutable", + "name": "_liquidityPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10280, + "src": "2313:39:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10277, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2313:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:41:10" + }, + "src": "2286:68:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10281, + "nodeType": "StructuredDocumentation", + "src": "2362:197:10", + "text": " @dev triggered when a convertible token is added to the registry\n @param _convertibleToken convertible token\n @param _smartToken associated smart token" + }, + "id": 10287, + "name": "ConvertibleTokenAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10283, + "indexed": true, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10287, + "src": "2593:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10282, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2593:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10285, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10287, + "src": "2632:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10284, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2632:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2592:77:10" + }, + "src": "2565:105:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10288, + "nodeType": "StructuredDocumentation", + "src": "2678:201:10", + "text": " @dev triggered when a convertible token is removed from the registry\n @param _convertibleToken convertible token\n @param _smartToken associated smart token" + }, + "id": 10294, + "name": "ConvertibleTokenRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10290, + "indexed": true, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10294, + "src": "2915:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10289, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2915:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10292, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10294, + "src": "2954:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10291, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2954:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:77:10" + }, + "src": "2885:107:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10295, + "nodeType": "StructuredDocumentation", + "src": "3000:88:10", + "text": " @dev deprecated, backward compatibility, use `ConverterAnchorAdded`" + }, + "id": 10299, + "name": "SmartTokenAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10297, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10299, + "src": "3116:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10296, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3116:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3115:38:10" + }, + "src": "3094:60:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10300, + "nodeType": "StructuredDocumentation", + "src": "3162:90:10", + "text": " @dev deprecated, backward compatibility, use `ConverterAnchorRemoved`" + }, + "id": 10304, + "name": "SmartTokenRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10302, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10304, + "src": "3282:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10301, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3282:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3281:38:10" + }, + "src": "3258:62:10" + }, + { + "body": { + "id": 10313, + "nodeType": "Block", + "src": "3561:8:10", + "statements": [] + }, + "documentation": { + "id": 10305, + "nodeType": "StructuredDocumentation", + "src": "3328:145:10", + "text": " @dev initializes a new ConverterRegistry instance\n @param _registry address of a contract registry contract" + }, + "id": 10314, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 10310, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10307, + "src": "3543:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 10311, + "modifierName": { + "argumentTypes": null, + "id": 10309, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3520:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3520:33:10" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10307, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10314, + "src": "3491:27:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 10306, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3491:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3490:29:10" + }, + "returnParameters": { + "id": 10312, + "nodeType": "ParameterList", + "parameters": [], + "src": "3561:0:10" + }, + "scope": 11667, + "src": "3479:90:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10453, + "nodeType": "Block", + "src": "4488:991:10", + "statements": [ + { + "assignments": [ + 10337 + ], + "declarations": [ + { + "constant": false, + "id": 10337, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4499:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4499:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10340, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10338, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "4516:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4516:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4499:38:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10342, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10337, + "src": "4556:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10343, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "4566:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4556:32:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245534552564553", + "id": 10346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4590:22:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9402087dd8193cd0dfdf2ea32d5d892390e5da6cfb95c2d9c82b55c80bcce77", + "typeString": "literal_string \"ERR_INVALID_RESERVES\"" + }, + "value": "ERR_INVALID_RESERVES" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d9402087dd8193cd0dfdf2ea32d5d892390e5da6cfb95c2d9c82b55c80bcce77", + "typeString": "literal_string \"ERR_INVALID_RESERVES\"" + } + ], + "id": 10341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4548:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:65:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10348, + "nodeType": "ExpressionStatement", + "src": "4548:65:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "id": 10358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10351, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "4657:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10352, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "4664:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 10353, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "4680:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 10350, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "4632:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 10354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4632:64:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4717: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": 10355, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4700:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4700:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "4632:87:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414c52454144595f455849535453", + "id": 10359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4721:20:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dee3679442264532ea8006772293a0d73a73c45dea71a562b7f372acad036a5c", + "typeString": "literal_string \"ERR_ALREADY_EXISTS\"" + }, + "value": "ERR_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dee3679442264532ea8006772293a0d73a73c45dea71a562b7f372acad036a5c", + "typeString": "literal_string \"ERR_ALREADY_EXISTS\"" + } + ], + "id": 10349, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4624:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4624:118:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10361, + "nodeType": "ExpressionStatement", + "src": "4624:118:10" + }, + { + "assignments": [ + 10363 + ], + "declarations": [ + { + "constant": false, + "id": 10363, + "mutability": "mutable", + "name": "factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4755:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 10362, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "4755:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10369, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10366, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21536, + "src": "4811:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10365, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "4801:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4801:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10364, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "4783:17:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 10368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4783:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4755:75:10" + }, + { + "assignments": [ + 10371 + ], + "declarations": [ + { + "constant": false, + "id": 10371, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4841:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10370, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4841:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10375, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "4905:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10376, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10319, + "src": "4912:5:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10377, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10321, + "src": "4919:7:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10378, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10323, + "src": "4928:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 10373, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10363, + "src": "4884:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13368, + "src": "4884:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,string memory,string memory,uint8) external returns (contract IConverterAnchor)" + } + }, + "id": 10379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4884:54:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 10372, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4867:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4867:72:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4841:98:10" + }, + { + "assignments": [ + 10383 + ], + "declarations": [ + { + "constant": false, + "id": 10383, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4950:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10382, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4950:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10393, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10387, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "5008:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10388, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5015:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 10389, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "5023:8:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 10390, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10325, + "src": "5033:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 10385, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10363, + "src": "4984:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13381, + "src": "4984:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 10391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4984:67:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10384, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "4973:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 10392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4973:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4950:102:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10394, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5065:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5065:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:24:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10398, + "nodeType": "ExpressionStatement", + "src": "5065:24:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10399, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5100:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5100:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5100:27:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10403, + "nodeType": "ExpressionStatement", + "src": "5100:27:10" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10417, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "5211:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10419, + "indexExpression": { + "argumentTypes": null, + "id": 10418, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5226:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5211:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10420, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "5230:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10422, + "indexExpression": { + "argumentTypes": null, + "id": 10421, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5246:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5230:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 10414, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5190:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "5190:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 10423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5190:59:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10424, + "nodeType": "ExpressionStatement", + "src": "5190:59:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10408, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5160:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 10409, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10337, + "src": "5164:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5160:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10425, + "initializationExpression": { + "assignments": [ + 10405 + ], + "declarations": [ + { + "constant": false, + "id": 10405, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10425, + "src": "5145:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5145:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10407, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5157:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5145:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5172:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10411, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5172:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10413, + "nodeType": "ExpressionStatement", + "src": "5172:3:10" + }, + "nodeType": "ForStatement", + "src": "5140:109:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10431, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5295:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5287:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5287:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5287:18:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10426, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5262:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "5262:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5262:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10434, + "nodeType": "ExpressionStatement", + "src": "5262:44:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10435, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5317:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13261, + "src": "5317:31:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5317:33:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10439, + "nodeType": "ExpressionStatement", + "src": "5317:33:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10443, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5389:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5389:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10440, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5361:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "5361:27:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5361:39:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10446, + "nodeType": "ExpressionStatement", + "src": "5361:39:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10448, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5434:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10447, + "name": "addConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11234, + "src": "5413:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5413:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10450, + "nodeType": "ExpressionStatement", + "src": "5413:31:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10451, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5462:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 10335, + "id": 10452, + "nodeType": "Return", + "src": "5455:16:10" + } + ] + }, + "documentation": { + "id": 10315, + "nodeType": "StructuredDocumentation", + "src": "3577:596:10", + "text": " @dev creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry\n @param _type converter type, see ConverterBase contract main doc\n @param _name token / pool name\n @param _symbol token / pool symbol\n @param _decimals token / pool decimals\n @param _maxConversionFee maximum conversion-fee\n @param _reserveTokens reserve tokens\n @param _reserveWeights reserve weights\n @return new converter" + }, + "functionSelector": "5a0a6618", + "id": 10454, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10332, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10317, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4211:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10316, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "4211:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10319, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4234:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10318, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4234:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10321, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4264:21:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10320, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4264:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10323, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4296:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 10322, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4296:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10325, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4322:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 10324, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4322:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10328, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4357:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10326, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4357:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10327, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4357:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10331, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4403:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10329, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4403:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10330, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4403:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4200:241:10" + }, + "returnParameters": { + "id": 10335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10334, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4471:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10333, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4471:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4470:12:10" + }, + "scope": 11667, + "src": "4179:1300:10", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 10473, + "nodeType": "Block", + "src": "5710:124:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10464, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10457, + "src": "5746:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10463, + "name": "isConverterValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10867, + "src": "5729:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 10465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5729:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e564552544552", + "id": 10466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5759:23:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29b07c9e09ddb3e03f778b1e41e2a2ddb5432c5f4862b4c497de9268b6aaf6bf", + "typeString": "literal_string \"ERR_INVALID_CONVERTER\"" + }, + "value": "ERR_INVALID_CONVERTER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29b07c9e09ddb3e03f778b1e41e2a2ddb5432c5f4862b4c497de9268b6aaf6bf", + "typeString": "literal_string \"ERR_INVALID_CONVERTER\"" + } + ], + "id": 10462, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5721:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5721:62:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10468, + "nodeType": "ExpressionStatement", + "src": "5721:62:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10470, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10457, + "src": "5815:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10469, + "name": "addConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11234, + "src": "5794:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5794:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10472, + "nodeType": "ExpressionStatement", + "src": "5794:32:10" + } + ] + }, + "documentation": { + "id": 10455, + "nodeType": "StructuredDocumentation", + "src": "5487:155:10", + "text": " @dev adds an existing converter to the registry\n can only be called by the owner\n @param _converter converter" + }, + "functionSelector": "6ce1c4dc", + "id": 10474, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10460, + "modifierName": { + "argumentTypes": null, + "id": 10459, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "5700:9:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5700:9:10" + } + ], + "name": "addConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10457, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10474, + "src": "5670:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10456, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5670:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5669:23:10" + }, + "returnParameters": { + "id": 10461, + "nodeType": "ParameterList", + "parameters": [], + "src": "5710:0:10" + }, + "scope": 11667, + "src": "5648:186:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10497, + "nodeType": "Block", + "src": "6178:147:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 10489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10481, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6197:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6197:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 10483, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "6211:5:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6197:19:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 10488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6220:29:10", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10486, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10477, + "src": "6238:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10485, + "name": "isConverterValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10867, + "src": "6221:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 10487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6221:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6197:52:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 10490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6251:19:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 10480, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6189:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6189:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10492, + "nodeType": "ExpressionStatement", + "src": "6189:82:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10494, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10477, + "src": "6306:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10493, + "name": "removeConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11307, + "src": "6282:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6282:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10496, + "nodeType": "ExpressionStatement", + "src": "6282:35:10" + } + ] + }, + "documentation": { + "id": 10475, + "nodeType": "StructuredDocumentation", + "src": "5842:275:10", + "text": " @dev removes a converter from the registry\n anyone can remove an existing converter from the registry, as long as the converter is invalid\n note that the owner can also remove valid converters\n @param _converter converter" + }, + "functionSelector": "9e76a007", + "id": 10498, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10477, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10498, + "src": "6148:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10476, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "6148:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6147:23:10" + }, + "returnParameters": { + "id": 10479, + "nodeType": "ParameterList", + "parameters": [], + "src": "6178:0:10" + }, + "scope": 11667, + "src": "6123:202:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13397 + ], + "body": { + "id": 10513, + "nodeType": "Block", + "src": "6529:105:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10507, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "6580:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10506, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6570:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6570:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10505, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "6547:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13543, + "src": "6547:77:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10504, + "id": 10512, + "nodeType": "Return", + "src": "6540:86:10" + } + ] + }, + "documentation": { + "id": 10499, + "nodeType": "StructuredDocumentation", + "src": "6333:125:10", + "text": " @dev returns the number of converter anchors in the registry\n @return number of anchors" + }, + "functionSelector": "d3182bed", + "id": 10514, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10501, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6502:8:10" + }, + "parameters": { + "id": 10500, + "nodeType": "ParameterList", + "parameters": [], + "src": "6487:2:10" + }, + "returnParameters": { + "id": 10504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10503, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10514, + "src": "6520:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6520:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6519:9:10" + }, + "scope": 11667, + "src": "6464:170:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13403 + ], + "body": { + "id": 10530, + "nodeType": "Block", + "src": "6839:101:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10524, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "6890:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10523, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6880:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6880:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10522, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "6857:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6857:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13549, + "src": "6857:73:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6857:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10521, + "id": 10529, + "nodeType": "Return", + "src": "6850:82:10" + } + ] + }, + "documentation": { + "id": 10515, + "nodeType": "StructuredDocumentation", + "src": "6642:121:10", + "text": " @dev returns the list of converter anchors in the registry\n @return list of anchors" + }, + "functionSelector": "effb3c6e", + "id": 10531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10517, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6803:8:10" + }, + "parameters": { + "id": 10516, + "nodeType": "ParameterList", + "parameters": [], + "src": "6788:2:10" + }, + "returnParameters": { + "id": 10521, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10520, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10531, + "src": "6821:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10518, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6821:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10519, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6821:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6820:18:10" + }, + "scope": 11667, + "src": "6769:171:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13410 + ], + "body": { + "id": 10549, + "nodeType": "Block", + "src": "7189:106:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10546, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10534, + "src": "7280:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10542, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7240:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10541, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7230:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7230:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10540, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7207:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7207:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13556, + "src": "7207:72:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7207:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10539, + "id": 10548, + "nodeType": "Return", + "src": "7200:87:10" + } + ] + }, + "documentation": { + "id": 10532, + "nodeType": "StructuredDocumentation", + "src": "6948:152:10", + "text": " @dev returns the converter anchor at a given index\n @param _index index\n @return anchor at the given index" + }, + "functionSelector": "4c7df18f", + "id": 10550, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10536, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7153:8:10" + }, + "parameters": { + "id": 10535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10534, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10550, + "src": "7125:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7125:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7124:16:10" + }, + "returnParameters": { + "id": 10539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10538, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10550, + "src": "7171:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10537, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "7171:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7170:18:10" + }, + "scope": 11667, + "src": "7106:189:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13417 + ], + "body": { + "id": 10568, + "nodeType": "Block", + "src": "7568:105:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10565, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10553, + "src": "7658:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10561, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7619:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10560, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7609:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7609:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10559, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7586:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7586:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13563, + "src": "7586:71:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7586:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10558, + "id": 10567, + "nodeType": "Return", + "src": "7579:86:10" + } + ] + }, + "documentation": { + "id": 10551, + "nodeType": "StructuredDocumentation", + "src": "7303:189:10", + "text": " @dev checks whether or not a given value is a converter anchor\n @param _value value\n @return true if the given value is an anchor, false if not" + }, + "functionSelector": "d8cced2a", + "id": 10569, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10555, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7544:8:10" + }, + "parameters": { + "id": 10554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10553, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10569, + "src": "7516:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7516:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7515:16:10" + }, + "returnParameters": { + "id": 10558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10557, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10569, + "src": "7562:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10556, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7562:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7561:6:10" + }, + "scope": 11667, + "src": "7498:175:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13422 + ], + "body": { + "id": 10584, + "nodeType": "Block", + "src": "7890:108:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10578, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7941:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10577, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7931:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7931:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10576, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7908:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7908:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPoolCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13568, + "src": "7908:80:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7908:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10575, + "id": 10583, + "nodeType": "Return", + "src": "7901:89:10" + } + ] + }, + "documentation": { + "id": 10570, + "nodeType": "StructuredDocumentation", + "src": "7681:131:10", + "text": " @dev returns the number of liquidity pools in the registry\n @return number of liquidity pools" + }, + "functionSelector": "7a5f0ffd", + "id": 10585, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10572, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7863:8:10" + }, + "parameters": { + "id": 10571, + "nodeType": "ParameterList", + "parameters": [], + "src": "7848:2:10" + }, + "returnParameters": { + "id": 10575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10574, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10585, + "src": "7881:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7881:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7880:9:10" + }, + "scope": 11667, + "src": "7818:180:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13428 + ], + "body": { + "id": 10601, + "nodeType": "Block", + "src": "8216:104:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10595, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "8267:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10594, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "8257:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8257:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10593, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8234:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8234:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPools", + "nodeType": "MemberAccess", + "referencedDeclaration": 13574, + "src": "8234:76:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8234:78:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10592, + "id": 10600, + "nodeType": "Return", + "src": "8227:85:10" + } + ] + }, + "documentation": { + "id": 10586, + "nodeType": "StructuredDocumentation", + "src": "8006:127:10", + "text": " @dev returns the list of liquidity pools in the registry\n @return list of liquidity pools" + }, + "functionSelector": "7f45c4c3", + "id": 10602, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10588, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8180:8:10" + }, + "parameters": { + "id": 10587, + "nodeType": "ParameterList", + "parameters": [], + "src": "8165:2:10" + }, + "returnParameters": { + "id": 10592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10591, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10602, + "src": "8198:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8198:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10590, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8198:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8197:18:10" + }, + "scope": 11667, + "src": "8139:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13435 + ], + "body": { + "id": 10620, + "nodeType": "Block", + "src": "8582:109:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10617, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10605, + "src": "8676:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10613, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "8633:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10612, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "8623:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8623:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10611, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8600:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8600:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13581, + "src": "8600:75:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8600:83:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10610, + "id": 10619, + "nodeType": "Return", + "src": "8593:90:10" + } + ] + }, + "documentation": { + "id": 10603, + "nodeType": "StructuredDocumentation", + "src": "8328:158:10", + "text": " @dev returns the liquidity pool at a given index\n @param _index index\n @return liquidity pool at the given index" + }, + "functionSelector": "a74498aa", + "id": 10621, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10607, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8546:8:10" + }, + "parameters": { + "id": 10606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10605, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10621, + "src": "8518:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8518:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8517:16:10" + }, + "returnParameters": { + "id": 10610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10609, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10621, + "src": "8564:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10608, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "8564:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8563:18:10" + }, + "scope": 11667, + "src": "8492:199:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13442 + ], + "body": { + "id": 10639, + "nodeType": "Block", + "src": "8976:108:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10636, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10624, + "src": "9069:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10632, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9027:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10631, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9017:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9017:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10630, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8994:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13588, + "src": "8994:74:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10629, + "id": 10638, + "nodeType": "Return", + "src": "8987:89:10" + } + ] + }, + "documentation": { + "id": 10622, + "nodeType": "StructuredDocumentation", + "src": "8699:194:10", + "text": " @dev checks whether or not a given value is a liquidity pool\n @param _value value\n @return true if the given value is a liquidity pool, false if not" + }, + "functionSelector": "e85455d7", + "id": 10640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10626, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8952:8:10" + }, + "parameters": { + "id": 10625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10624, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10640, + "src": "8924:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8924:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8923:16:10" + }, + "returnParameters": { + "id": 10629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10628, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10640, + "src": "8970:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10627, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8970:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8969:6:10" + }, + "scope": 11667, + "src": "8899:185:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13447 + ], + "body": { + "id": 10655, + "nodeType": "Block", + "src": "9310:111:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10649, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9361:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10648, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9351:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9351:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10647, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "9328:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9328:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13593, + "src": "9328:83:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9328:85:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10646, + "id": 10654, + "nodeType": "Return", + "src": "9321:92:10" + } + ] + }, + "documentation": { + "id": 10641, + "nodeType": "StructuredDocumentation", + "src": "9092:137:10", + "text": " @dev returns the number of convertible tokens in the registry\n @return number of convertible tokens" + }, + "functionSelector": "69be4784", + "id": 10656, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10643, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9283:8:10" + }, + "parameters": { + "id": 10642, + "nodeType": "ParameterList", + "parameters": [], + "src": "9268:2:10" + }, + "returnParameters": { + "id": 10646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10645, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10656, + "src": "9301:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10644, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9301:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9300:9:10" + }, + "scope": 11667, + "src": "9235:186:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13453 + ], + "body": { + "id": 10672, + "nodeType": "Block", + "src": "9648:107:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10666, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9699:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10665, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9689:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9689:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10664, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "9666:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9666:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13599, + "src": "9666:79:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9666:81:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10663, + "id": 10671, + "nodeType": "Return", + "src": "9659:88:10" + } + ] + }, + "documentation": { + "id": 10657, + "nodeType": "StructuredDocumentation", + "src": "9429:133:10", + "text": " @dev returns the list of convertible tokens in the registry\n @return list of convertible tokens" + }, + "functionSelector": "5f1b50fe", + "id": 10673, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10659, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9612:8:10" + }, + "parameters": { + "id": 10658, + "nodeType": "ParameterList", + "parameters": [], + "src": "9597:2:10" + }, + "returnParameters": { + "id": 10663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10662, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10673, + "src": "9630:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10660, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9630:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10661, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9630:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9629:18:10" + }, + "scope": 11667, + "src": "9568:187:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13460 + ], + "body": { + "id": 10691, + "nodeType": "Block", + "src": "10021:112:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10688, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10676, + "src": "10118:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10684, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10072:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10683, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10062:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10062:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10682, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10039:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10039:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13606, + "src": "10039:78:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 10689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10039:86:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 10681, + "id": 10690, + "nodeType": "Return", + "src": "10032:93:10" + } + ] + }, + "documentation": { + "id": 10674, + "nodeType": "StructuredDocumentation", + "src": "9763:164:10", + "text": " @dev returns the convertible token at a given index\n @param _index index\n @return convertible token at the given index" + }, + "functionSelector": "865cf194", + "id": 10692, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10678, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9990:8:10" + }, + "parameters": { + "id": 10677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10676, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10692, + "src": "9962:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9962:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9961:16:10" + }, + "returnParameters": { + "id": 10681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10680, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10692, + "src": "10008:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10679, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "10008:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10007:13:10" + }, + "scope": 11667, + "src": "9933:200:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13467 + ], + "body": { + "id": 10710, + "nodeType": "Block", + "src": "10427:111:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10707, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10695, + "src": "10523:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10703, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10478:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10702, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10468:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10468:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10701, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10445:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10445:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13613, + "src": "10445:77:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10445:85:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10700, + "id": 10709, + "nodeType": "Return", + "src": "10438:92:10" + } + ] + }, + "documentation": { + "id": 10693, + "nodeType": "StructuredDocumentation", + "src": "10141:200:10", + "text": " @dev checks whether or not a given value is a convertible token\n @param _value value\n @return true if the given value is a convertible token, false if not" + }, + "functionSelector": "3ab8857c", + "id": 10711, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10403:8:10" + }, + "parameters": { + "id": 10696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10695, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10711, + "src": "10375:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10375:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10374:16:10" + }, + "returnParameters": { + "id": 10700, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10699, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10711, + "src": "10421:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10698, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10421:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10420:6:10" + }, + "scope": 11667, + "src": "10347:191:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13474 + ], + "body": { + "id": 10729, + "nodeType": "Block", + "src": "10909:138:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10726, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10714, + "src": "11021:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10722, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10960:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10721, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10950:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10950:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10720, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10927:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10927:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "10927:93:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 10727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10927:112:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10719, + "id": 10728, + "nodeType": "Return", + "src": "10920:119:10" + } + ] + }, + "documentation": { + "id": 10712, + "nodeType": "StructuredDocumentation", + "src": "10546:247:10", + "text": " @dev returns the number of converter anchors associated with a given convertible token\n @param _convertibleToken convertible token\n @return number of anchors associated with the given convertible token" + }, + "functionSelector": "49c5f32b", + "id": 10730, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10716, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10882:8:10" + }, + "parameters": { + "id": 10715, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10714, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10730, + "src": "10839:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "10839:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10838:31:10" + }, + "returnParameters": { + "id": 10719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10718, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10730, + "src": "10900:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10900:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10899:9:10" + }, + "scope": 11667, + "src": "10799:248:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13482 + ], + "body": { + "id": 10749, + "nodeType": "Block", + "src": "11419:134:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10746, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10733, + "src": "11527:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10742, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "11470:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10741, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "11460:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11460:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10740, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "11437:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11437:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13628, + "src": "11437:89:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 10747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11437:108:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10739, + "id": 10748, + "nodeType": "Return", + "src": "11430:115:10" + } + ] + }, + "documentation": { + "id": 10731, + "nodeType": "StructuredDocumentation", + "src": "11055:243:10", + "text": " @dev returns the list of aoncerter anchors associated with a given convertible token\n @param _convertibleToken convertible token\n @return list of anchors associated with the given convertible token" + }, + "functionSelector": "11839064", + "id": 10750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10735, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11383:8:10" + }, + "parameters": { + "id": 10734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10733, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10750, + "src": "11340:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10732, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11340:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11339:31:10" + }, + "returnParameters": { + "id": 10739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10738, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10750, + "src": "11401:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11401:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10737, + "length": null, + "nodeType": "ArrayTypeName", + "src": "11401:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11400:18:10" + }, + "scope": 11667, + "src": "11304:249:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13491 + ], + "body": { + "id": 10771, + "nodeType": "Block", + "src": "11935:141:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10767, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10753, + "src": "12042:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10768, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10755, + "src": "12061:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10763, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "11986:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10762, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "11976:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11976:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10761, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "11953:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11953:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13637, + "src": "11953:88:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (contract IERC20Token,uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11953:115:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10760, + "id": 10770, + "nodeType": "Return", + "src": "11946:122:10" + } + ] + }, + "documentation": { + "id": 10751, + "nodeType": "StructuredDocumentation", + "src": "11561:238:10", + "text": " @dev returns the converter anchor associated with a given convertible token at a given index\n @param _index index\n @return anchor associated with the given convertible token at the given index" + }, + "functionSelector": "603f51e4", + "id": 10772, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10757, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11899:8:10" + }, + "parameters": { + "id": 10756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10753, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11840:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10752, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11840:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10755, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11871:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10754, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11871:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11839:47:10" + }, + "returnParameters": { + "id": 10760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10759, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11917:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10758, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "11917:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11916:18:10" + }, + "scope": 11667, + "src": "11805:271:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13500 + ], + "body": { + "id": 10793, + "nodeType": "Block", + "src": "12508:140:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10789, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10775, + "src": "12614:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10790, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10777, + "src": "12633:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10785, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "12559:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10784, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "12549:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12549:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10783, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "12526:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12526:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isConvertibleTokenSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13646, + "src": "12526:87:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_address_$returns$_t_bool_$", + "typeString": "function (contract IERC20Token,address) view external returns (bool)" + } + }, + "id": 10791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12526:114:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10782, + "id": 10792, + "nodeType": "Return", + "src": "12519:121:10" + } + ] + }, + "documentation": { + "id": 10773, + "nodeType": "StructuredDocumentation", + "src": "12084:301:10", + "text": " @dev checks whether or not a given value is a converter anchor of a given convertible token\n @param _convertibleToken convertible token\n @param _value value\n @return true if the given value is an anchor of the given convertible token, false if not" + }, + "functionSelector": "b4c4197a", + "id": 10794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10779, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12484:8:10" + }, + "parameters": { + "id": 10778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10775, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12425:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10774, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "12425:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10777, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12456:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10776, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12456:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12424:47:10" + }, + "returnParameters": { + "id": 10782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10781, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12502:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10780, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12502:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12501:6:10" + }, + "scope": 11667, + "src": "12391:257:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10846, + "nodeType": "Block", + "src": "13040:261:10", + "statements": [ + { + "assignments": [ + 10807 + ], + "declarations": [ + { + "constant": false, + "id": 10807, + "mutability": "mutable", + "name": "converters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10846, + "src": "13051:30:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10805, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13051:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10806, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13051:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10814, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10811, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13101:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13101:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "13084:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (contract IConverter[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10808, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13088:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10809, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13088:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + } + }, + "id": 10813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13084:33:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13051:66:10" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 10841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10826, + "name": "converters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10807, + "src": "13189:10:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "id": 10828, + "indexExpression": { + "argumentTypes": null, + "id": 10827, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13200:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13189:13:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10833, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13241:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10835, + "indexExpression": { + "argumentTypes": null, + "id": 10834, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13250:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13241:11:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10832, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "13224:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13224:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "13224:35:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 10838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13224:37:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13216:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 10830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13216:8:10", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13216:46:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 10829, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "13205:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 10840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13205:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "13189:74:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10842, + "nodeType": "ExpressionStatement", + "src": "13189:74:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10819, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13150:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10820, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13154:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13154:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13150:19:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10843, + "initializationExpression": { + "assignments": [ + 10816 + ], + "declarations": [ + { + "constant": false, + "id": 10816, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10843, + "src": "13135:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13135:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10818, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13147:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13135:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13171:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10823, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13171:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10825, + "nodeType": "ExpressionStatement", + "src": "13171:3:10" + }, + "nodeType": "ForStatement", + "src": "13130:133:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10844, + "name": "converters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10807, + "src": "13283:10:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "functionReturnParameters": 10803, + "id": 10845, + "nodeType": "Return", + "src": "13276:17:10" + } + ] + }, + "documentation": { + "id": 10795, + "nodeType": "StructuredDocumentation", + "src": "12656:277:10", + "text": " @dev returns a list of converters for a given list of anchors\n this is a utility function that can be used to reduce the number of calls to the contract\n @param _anchors list of converter anchors\n @return list of converters" + }, + "functionSelector": "610c0b05", + "id": 10847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertersByAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10799, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10798, + "mutability": "mutable", + "name": "_anchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10847, + "src": "12971:25:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12971:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10797, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12971:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12970:27:10" + }, + "returnParameters": { + "id": 10803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10802, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10847, + "src": "13019:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10800, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13019:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10801, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13019:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:21:10" + }, + "scope": 11667, + "src": "12939:362:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10866, + "nodeType": "Block", + "src": "13579:123:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10855, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10850, + "src": "13645:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "13645:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 10857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13645:18:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "13645:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 10859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13645:26:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10862, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10850, + "src": "13683:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13675:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13675:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13675:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "13645:49:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10854, + "id": 10865, + "nodeType": "Return", + "src": "13638:56:10" + } + ] + }, + "documentation": { + "id": 10848, + "nodeType": "StructuredDocumentation", + "src": "13309:188:10", + "text": " @dev checks whether or not a given converter is valid\n @param _converter converter\n @return true if the given converter is valid, false if not" + }, + "functionSelector": "954254f5", + "id": 10867, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConverterValid", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10850, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10867, + "src": "13529:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10849, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13529:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13528:23:10" + }, + "returnParameters": { + "id": 10854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10853, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10867, + "src": "13573:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10852, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13573:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13572:6:10" + }, + "scope": 11667, + "src": "13503:199:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10949, + "nodeType": "Block", + "src": "14068:799:10", + "statements": [ + { + "assignments": [ + 10876 + ], + "declarations": [ + { + "constant": false, + "id": 10876, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14079:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14079:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10880, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10877, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14107:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "14107:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 10879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14107:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14079:60:10" + }, + { + "assignments": [ + 10884 + ], + "declarations": [ + { + "constant": false, + "id": 10884, + "mutability": "mutable", + "name": "reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14150:34:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10882, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14150:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10883, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14150:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10890, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10888, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14205:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14187:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (contract IERC20Token[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10885, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14191:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10886, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14191:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + } + }, + "id": 10889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14187:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14150:73:10" + }, + { + "assignments": [ + 10895 + ], + "declarations": [ + { + "constant": false, + "id": 10895, + "mutability": "mutable", + "name": "reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14234:30:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10893, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14234:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10894, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14234:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10901, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10899, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14280:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14267:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint32_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint32[] memory)" + }, + "typeName": { + "baseType": { + "id": 10896, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14271:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10897, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14271:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + } + }, + "id": 10900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14267:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14234:64:10" + }, + { + "body": { + "id": 10934, + "nodeType": "Block", + "src": "14418:206:10", + "statements": [ + { + "assignments": [ + 10913 + ], + "declarations": [ + { + "constant": false, + "id": 10913, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10934, + "src": "14433:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10912, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14433:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10918, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10916, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14487:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 10914, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14460:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "14460:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 10917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14460:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14433:56:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10919, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10884, + "src": "14504:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10921, + "indexExpression": { + "argumentTypes": null, + "id": 10920, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14518:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14504:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10922, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10913, + "src": "14523:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14504:31:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10924, + "nodeType": "ExpressionStatement", + "src": "14504:31:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10925, + "name": "reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10895, + "src": "14550:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10927, + "indexExpression": { + "argumentTypes": null, + "id": 10926, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14565:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14550:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10929, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14587:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 10930, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10913, + "src": "14599:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 10928, + "name": "getReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11465, + "src": "14570:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_uint32_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (uint32)" + } + }, + "id": 10931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:42:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14550:62:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10933, + "nodeType": "ExpressionStatement", + "src": "14550:62:10" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10906, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14390:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 10907, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14394:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14390:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10935, + "initializationExpression": { + "assignments": [ + 10903 + ], + "declarations": [ + { + "constant": false, + "id": 10903, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10935, + "src": "14375:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14375:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10905, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14387:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14375:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14413:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10909, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14413:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10911, + "nodeType": "ExpressionStatement", + "src": "14413:3:10" + }, + "nodeType": "ForStatement", + "src": "14370:254:10" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "id": 10947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10938, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14774:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 10939, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14786:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10937, + "name": "getConverterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11520, + "src": "14757:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint256_$returns$_t_uint16_$", + "typeString": "function (contract IConverter,uint256) view returns (uint16)" + } + }, + "id": 10940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14757:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10941, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10884, + "src": "14806:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 10942, + "name": "reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10895, + "src": "14821:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 10936, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "14732:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 10943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14732:104:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14857: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": 10944, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "14840:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14840:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "14732:127:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10874, + "id": 10948, + "nodeType": "Return", + "src": "14725:134:10" + } + ] + }, + "documentation": { + "id": 10868, + "nodeType": "StructuredDocumentation", + "src": "13710:260:10", + "text": " @dev checks if a liquidity pool with given configuration is already registered\n @param _converter converter with specific configuration\n @return if a liquidity pool with the same configuration is already registered" + }, + "functionSelector": "8f1d0e1a", + "id": 10950, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSimilarLiquidityPoolRegistered", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10870, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10950, + "src": "14018:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10869, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "14018:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14017:23:10" + }, + "returnParameters": { + "id": 10874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10873, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10950, + "src": "14062:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10872, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14062:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14061:6:10" + }, + "scope": 11667, + "src": "13976:891:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11030, + "nodeType": "Block", + "src": "15390:869:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 10973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10964, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15483:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15483:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10966, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10959, + "src": "15508:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15508:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15483:47:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10969, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15534:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15534:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 10971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15558:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "15534:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15483:76:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11025, + "nodeType": "IfStatement", + "src": "15479:734:10", + "trueBody": { + "id": 11024, + "nodeType": "Block", + "src": "15561:652:10", + "statements": [ + { + "assignments": [ + 10978 + ], + "declarations": [ + { + "constant": false, + "id": 10978, + "mutability": "mutable", + "name": "convertibleTokenAnchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11024, + "src": "15651:40:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15651:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10977, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15651:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10982, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10980, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15723:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + ], + "id": 10979, + "name": "getLeastFrequentTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11380, + "src": "15694:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory) view returns (address[] memory)" + } + }, + "id": 10981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15694:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15651:87:10" + }, + { + "body": { + "id": 11022, + "nodeType": "Block", + "src": "15881:321:10", + "statements": [ + { + "assignments": [ + 10995 + ], + "declarations": [ + { + "constant": false, + "id": 10995, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11022, + "src": "15900:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10994, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "15900:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11001, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10997, + "name": "convertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10978, + "src": "15943:23:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10999, + "indexExpression": { + "argumentTypes": null, + "id": 10998, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15967:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15943:26:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10996, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "15926:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15926:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15900:70:10" + }, + { + "assignments": [ + 11003 + ], + "declarations": [ + { + "constant": false, + "id": 11003, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11022, + "src": "15989:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11002, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "15989:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11012, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11007, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10995, + "src": "16031:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 11008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "16031:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 11009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16031:14:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16023:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 11005, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16023:8:10", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16023:23:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 11004, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "16012:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16012:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15989:58:10" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11014, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11003, + "src": "16100:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 11015, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10953, + "src": "16111:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 11016, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "16118:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 11017, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10959, + "src": "16134:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 11013, + "name": "isConverterReserveConfigEqual", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11446, + "src": "16070:29:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_bool_$", + "typeString": "function (contract IConverter,uint16,contract IERC20Token[] memory,uint32[] memory) view returns (bool)" + } + }, + "id": 11018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16070:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11021, + "nodeType": "IfStatement", + "src": "16066:120:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 11019, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10995, + "src": "16180:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10963, + "id": 11020, + "nodeType": "Return", + "src": "16173:13:10" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10987, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15840:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10988, + "name": "convertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10978, + "src": "15844:23:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15844:30:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15840:34:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11023, + "initializationExpression": { + "assignments": [ + 10984 + ], + "declarations": [ + { + "constant": false, + "id": 10984, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11023, + "src": "15825:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10983, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15825:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10986, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15837:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15825:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15876:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10991, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15876:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10993, + "nodeType": "ExpressionStatement", + "src": "15876:3:10" + }, + "nodeType": "ForStatement", + "src": "15820:382:10" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 11027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16249: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": 11026, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "16232:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10963, + "id": 11029, + "nodeType": "Return", + "src": "16225:26:10" + } + ] + }, + "documentation": { + "id": 10951, + "nodeType": "StructuredDocumentation", + "src": "14875:352:10", + "text": " @dev searches for a liquidity pool with specific configuration\n @param _type converter type, see ConverterBase contract main doc\n @param _reserveTokens reserve tokens\n @param _reserveWeights reserve weights\n @return the liquidity pool, or zero if no such liquidity pool exists" + }, + "functionSelector": "1d3fccd5", + "id": 11031, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolByConfig", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10953, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15267:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10952, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "15267:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10956, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15281:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10954, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "15281:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10955, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15281:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10959, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15318:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10957, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15318:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10958, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15318:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15266:84:10" + }, + "returnParameters": { + "id": 10963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10962, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15372:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10961, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "15372:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15371:18:10" + }, + "scope": 11667, + "src": "15233:1026:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11053, + "nodeType": "Block", + "src": "16489:149:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11042, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16537:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11039, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11034, + "src": "16500:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13509, + "src": "16500:36:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16500:45:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11044, + "nodeType": "ExpressionStatement", + "src": "16500:45:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11046, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16582:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11045, + "name": "ConverterAnchorAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10265, + "src": "16561:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16561:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11048, + "nodeType": "EmitStatement", + "src": "16556:34:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11050, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16622:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11049, + "name": "SmartTokenAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10299, + "src": "16606:15:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16606:24:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11052, + "nodeType": "EmitStatement", + "src": "16601:29:10" + } + ] + }, + "documentation": { + "id": 11032, + "nodeType": "StructuredDocumentation", + "src": "16267:115:10", + "text": " @dev adds a converter anchor to the registry\n @param _anchor converter anchor" + }, + "id": 11054, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11034, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11054, + "src": "16407:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11033, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "16407:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11036, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11054, + "src": "16454:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11035, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "16454:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16406:73:10" + }, + "returnParameters": { + "id": 11038, + "nodeType": "ParameterList", + "parameters": [], + "src": "16489:0:10" + }, + "scope": 11667, + "src": "16388:250:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11076, + "nodeType": "Block", + "src": "16876:156:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11065, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "16927:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11062, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11057, + "src": "16887:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13514, + "src": "16887:39:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16887:48:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11067, + "nodeType": "ExpressionStatement", + "src": "16887:48:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11069, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "16974:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11068, + "name": "ConverterAnchorRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10270, + "src": "16951:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16951:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11071, + "nodeType": "EmitStatement", + "src": "16946:36:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11073, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "17016:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11072, + "name": "SmartTokenRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10304, + "src": "16998:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16998:26:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11075, + "nodeType": "EmitStatement", + "src": "16993:31:10" + } + ] + }, + "documentation": { + "id": 11055, + "nodeType": "StructuredDocumentation", + "src": "16646:120:10", + "text": " @dev removes a converter anchor from the registry\n @param _anchor converter anchor" + }, + "id": 11077, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11057, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11077, + "src": "16794:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11056, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "16794:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11059, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11077, + "src": "16841:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11058, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "16841:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16793:73:10" + }, + "returnParameters": { + "id": 11061, + "nodeType": "ParameterList", + "parameters": [], + "src": "16876:0:10" + }, + "scope": 11667, + "src": "16772:260:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11095, + "nodeType": "Block", + "src": "17308:136:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11088, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11082, + "src": "17359:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11085, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11080, + "src": "17319:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13519, + "src": "17319:39:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17319:61:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11090, + "nodeType": "ExpressionStatement", + "src": "17319:61:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11092, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11082, + "src": "17415:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11091, + "name": "LiquidityPoolAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10275, + "src": "17396:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17396:40:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11094, + "nodeType": "EmitStatement", + "src": "17391:45:10" + } + ] + }, + "documentation": { + "id": 11078, + "nodeType": "StructuredDocumentation", + "src": "17040:141:10", + "text": " @dev adds a liquidity pool to the registry\n @param _liquidityPoolAnchor liquidity pool converter anchor" + }, + "id": 11096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11080, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11096, + "src": "17213:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11079, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "17213:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11082, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11096, + "src": "17260:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11081, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "17260:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17212:86:10" + }, + "returnParameters": { + "id": 11084, + "nodeType": "ParameterList", + "parameters": [], + "src": "17308:0:10" + }, + "scope": 11667, + "src": "17187:257:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11114, + "nodeType": "Block", + "src": "17728:141:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11107, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11101, + "src": "17782:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11104, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11099, + "src": "17739:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13524, + "src": "17739:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17739:64:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11109, + "nodeType": "ExpressionStatement", + "src": "17739:64:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11111, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11101, + "src": "17840:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11110, + "name": "LiquidityPoolRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10280, + "src": "17819:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17819:42:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11113, + "nodeType": "EmitStatement", + "src": "17814:47:10" + } + ] + }, + "documentation": { + "id": 11097, + "nodeType": "StructuredDocumentation", + "src": "17452:146:10", + "text": " @dev removes a liquidity pool from the registry\n @param _liquidityPoolAnchor liquidity pool converter anchor" + }, + "id": 11115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11099, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11115, + "src": "17633:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11098, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "17633:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11101, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11115, + "src": "17680:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11100, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "17680:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17632:86:10" + }, + "returnParameters": { + "id": 11103, + "nodeType": "ParameterList", + "parameters": [], + "src": "17728:0:10" + }, + "scope": 11667, + "src": "17604:265:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11137, + "nodeType": "Block", + "src": "18220:154:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11128, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11120, + "src": "18274:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11129, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11122, + "src": "18293:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11125, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11118, + "src": "18231:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13531, + "src": "18231:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor) external" + } + }, + "id": 11130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18231:70:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11131, + "nodeType": "ExpressionStatement", + "src": "18231:70:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11133, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11120, + "src": "18339:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11134, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11122, + "src": "18358:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11132, + "name": "ConvertibleTokenAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10287, + "src": "18317:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18317:49:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11136, + "nodeType": "EmitStatement", + "src": "18312:54:10" + } + ] + }, + "documentation": { + "id": 11116, + "nodeType": "StructuredDocumentation", + "src": "17877:195:10", + "text": " @dev adds a convertible token to the registry\n @param _convertibleToken convertible token\n @param _anchor associated converter anchor" + }, + "id": 11138, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11118, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18107:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11117, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18107:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11120, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18154:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11119, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "18154:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11122, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18185:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11121, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "18185:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18106:104:10" + }, + "returnParameters": { + "id": 11124, + "nodeType": "ParameterList", + "parameters": [], + "src": "18220:0:10" + }, + "scope": 11667, + "src": "18078:296:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11160, + "nodeType": "Block", + "src": "18733:159:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11151, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11143, + "src": "18790:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11152, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11145, + "src": "18809:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11148, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11141, + "src": "18744:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13538, + "src": "18744:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor) external" + } + }, + "id": 11153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18744:73:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11154, + "nodeType": "ExpressionStatement", + "src": "18744:73:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11156, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11143, + "src": "18857:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11157, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11145, + "src": "18876:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11155, + "name": "ConvertibleTokenRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10294, + "src": "18833:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18833:51:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11159, + "nodeType": "EmitStatement", + "src": "18828:56:10" + } + ] + }, + "documentation": { + "id": 11139, + "nodeType": "StructuredDocumentation", + "src": "18382:200:10", + "text": " @dev removes a convertible token from the registry\n @param _convertibleToken convertible token\n @param _anchor associated converter anchor" + }, + "id": 11161, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11141, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18620:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11140, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18620:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11143, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18667:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11142, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "18667:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11145, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18698:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11144, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "18698:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18619:104:10" + }, + "returnParameters": { + "id": 11147, + "nodeType": "ParameterList", + "parameters": [], + "src": "18733:0:10" + }, + "scope": 11667, + "src": "18588:304:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11233, + "nodeType": "Block", + "src": "18961:749:10", + "statements": [ + { + "assignments": [ + 11167 + ], + "declarations": [ + { + "constant": false, + "id": 11167, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "18972:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11166, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18972:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11173, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11170, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "19052:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11169, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "19042:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19042:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11168, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "19019:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19019:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18972:105:10" + }, + { + "assignments": [ + 11175 + ], + "declarations": [ + { + "constant": false, + "id": 11175, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "19088:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11174, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "19088:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11181, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11177, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19125:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11176, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "19114:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19114:22:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "19114:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 11180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19114:30:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19088:56:10" + }, + { + "assignments": [ + 11183 + ], + "declarations": [ + { + "constant": false, + "id": 11183, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "19155:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11182, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19155:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11187, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11184, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19183:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "19183:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19183:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19155:60:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11189, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19275:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11190, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19298:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11188, + "name": "addAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11054, + "src": "19265:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19265:40:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11192, + "nodeType": "ExpressionStatement", + "src": "19265:40:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11193, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11183, + "src": "19320:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19340:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "19320:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11202, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19452:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11206, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19495:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19487:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19487:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19487:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11203, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "19475:11:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 11208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19475:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 11209, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19505:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11201, + "name": "addConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11138, + "src": "19432:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19432:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11211, + "nodeType": "ExpressionStatement", + "src": "19432:80:10" + }, + "id": 11212, + "nodeType": "IfStatement", + "src": "19316:196:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11197, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19373:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11198, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19396:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11196, + "name": "addLiquidityPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11096, + "src": "19356:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19356:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11200, + "nodeType": "ExpressionStatement", + "src": "19356:47:10" + } + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11224, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19641:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11227, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19691:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 11225, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19664:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "19664:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 11228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19664:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11229, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19695:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11223, + "name": "addConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11138, + "src": "19621:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19621:81:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11231, + "nodeType": "ExpressionStatement", + "src": "19621:81:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11217, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19580:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 11218, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11183, + "src": "19584:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19580:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11232, + "initializationExpression": { + "assignments": [ + 11214 + ], + "declarations": [ + { + "constant": false, + "id": 11214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11232, + "src": "19565:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19565:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11216, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19577:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "19565:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19603:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19603:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11222, + "nodeType": "ExpressionStatement", + "src": "19603:3:10" + }, + "nodeType": "ForStatement", + "src": "19560:142:10" + } + ] + }, + "documentation": null, + "id": 11234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addConverterInternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11163, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11234, + "src": "18930:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11162, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "18930:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18929:23:10" + }, + "returnParameters": { + "id": 11165, + "nodeType": "ParameterList", + "parameters": [], + "src": "18961:0:10" + }, + "scope": 11667, + "src": "18900:810:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11306, + "nodeType": "Block", + "src": "19782:767:10", + "statements": [ + { + "assignments": [ + 11240 + ], + "declarations": [ + { + "constant": false, + "id": 11240, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19793:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11239, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "19793:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11246, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11243, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "19873:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11242, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "19863:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19863:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11241, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "19840:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19840:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19793:105:10" + }, + { + "assignments": [ + 11248 + ], + "declarations": [ + { + "constant": false, + "id": 11248, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19909:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11247, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "19909:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11254, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11250, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "19946:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11249, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "19935:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19935:22:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "19935:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 11253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19935:30:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19909:56:10" + }, + { + "assignments": [ + 11256 + ], + "declarations": [ + { + "constant": false, + "id": 11256, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19976:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11255, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19976:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11260, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11257, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "20004:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "20004:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20004:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19976:60:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11262, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20102:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11263, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20125:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11261, + "name": "removeAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11077, + "src": "20089:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20089:43:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11265, + "nodeType": "ExpressionStatement", + "src": "20089:43:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11266, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11256, + "src": "20147:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20167:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "20147:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11275, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20285:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11279, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20328:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20320:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20320:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20320:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11276, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "20308:11:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 11281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20308:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 11282, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20338:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11274, + "name": "removeConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11161, + "src": "20262:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20262:83:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11284, + "nodeType": "ExpressionStatement", + "src": "20262:83:10" + }, + "id": 11285, + "nodeType": "IfStatement", + "src": "20143:202:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11270, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20203:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20226:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11269, + "name": "removeLiquidityPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11115, + "src": "20183:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20183:50:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11273, + "nodeType": "ExpressionStatement", + "src": "20183:50:10" + } + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11297, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20480:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11300, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20530:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 11298, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "20503:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "20503:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 11301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20534:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11296, + "name": "removeConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11161, + "src": "20457:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20457:84:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11304, + "nodeType": "ExpressionStatement", + "src": "20457:84:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11290, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20416:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 11291, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11256, + "src": "20420:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20416:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11305, + "initializationExpression": { + "assignments": [ + 11287 + ], + "declarations": [ + { + "constant": false, + "id": 11287, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11305, + "src": "20401:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20401:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11289, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20413:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20401:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20439:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20439:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11295, + "nodeType": "ExpressionStatement", + "src": "20439:3:10" + }, + "nodeType": "ForStatement", + "src": "20396:145:10" + } + ] + }, + "documentation": null, + "id": 11307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConverterInternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11236, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11307, + "src": "19751:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11235, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "19751:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19750:23:10" + }, + "returnParameters": { + "id": 11238, + "nodeType": "ParameterList", + "parameters": [], + "src": "19782:0:10" + }, + "scope": 11667, + "src": "19718:831:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11379, + "nodeType": "Block", + "src": "20672:819:10", + "statements": [ + { + "assignments": [ + 11317 + ], + "declarations": [ + { + "constant": false, + "id": 11317, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20683:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11316, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "20683:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11323, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11320, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "20763:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11319, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "20753:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20753:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11318, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "20730:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20730:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20683:105:10" + }, + { + "assignments": [ + 11325 + ], + "declarations": [ + { + "constant": false, + "id": 11325, + "mutability": "mutable", + "name": "minAnchorCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20799:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20799:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11328, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "20881:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11330, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20896:1:10", + "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": "20881:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11326, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "20824:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "20824:56:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 11331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20799:100:10" + }, + { + "assignments": [ + 11334 + ], + "declarations": [ + { + "constant": false, + "id": 11334, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20910:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20910:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11336, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20926:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20910:17:10" + }, + { + "body": { + "id": 11370, + "nodeType": "Block", + "src": "21078:311:10", + "statements": [ + { + "assignments": [ + 11349 + ], + "declarations": [ + { + "constant": false, + "id": 11349, + "mutability": "mutable", + "name": "convertibleTokenAnchorCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11370, + "src": "21093:35:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21093:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11356, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11352, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21188:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11354, + "indexExpression": { + "argumentTypes": null, + "id": 11353, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21203:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21188:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11350, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "21131:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "21131:56:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 11355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21131:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21093:113:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11357, + "name": "minAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11325, + "src": "21225:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 11358, + "name": "convertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11349, + "src": "21242:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21225:44:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11369, + "nodeType": "IfStatement", + "src": "21221:157:10", + "trueBody": { + "id": 11368, + "nodeType": "Block", + "src": "21271:107:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 11362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 11360, + "name": "minAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11325, + "src": "21290:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11361, + "name": "convertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11349, + "src": "21307:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21290:44:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11363, + "nodeType": "ExpressionStatement", + "src": "21290:44:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 11366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 11364, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11334, + "src": "21353:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11365, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21361:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21353:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11367, + "nodeType": "ExpressionStatement", + "src": "21353:9:10" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11341, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21046:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11342, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21050:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21050:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21046:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11371, + "initializationExpression": { + "assignments": [ + 11338 + ], + "declarations": [ + { + "constant": false, + "id": 11338, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11371, + "src": "21031:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21031:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11340, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 11339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21043:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "21031:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21073:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11345, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21073:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11347, + "nodeType": "ExpressionStatement", + "src": "21073:3:10" + }, + "nodeType": "ForStatement", + "src": "21026:363:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11374, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21461:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11376, + "indexExpression": { + "argumentTypes": null, + "id": 11375, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11334, + "src": "21476:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21461:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11372, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "21408:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13628, + "src": "21408:52:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 11377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21408:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11315, + "id": 11378, + "nodeType": "Return", + "src": "21401:82:10" + } + ] + }, + "documentation": null, + "id": 11380, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLeastFrequentTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11310, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11380, + "src": "20595:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11308, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20595:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11309, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20595:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20594:37:10" + }, + "returnParameters": { + "id": 11315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11314, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11380, + "src": "20654:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20654:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11313, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20654:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20653:18:10" + }, + "scope": 11667, + "src": "20557:934:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11445, + "nodeType": "Block", + "src": "21673:484:10", + "statements": [ + { + "assignments": [ + 11396 + ], + "declarations": [ + { + "constant": false, + "id": 11396, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11445, + "src": "21684:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11395, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21684:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11400, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11397, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "21712:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "21712:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21712:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21684:60:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 11406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11401, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11384, + "src": "21761:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11403, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "21787:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 11404, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11396, + "src": "21799:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11402, + "name": "getConverterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11520, + "src": "21770:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint256_$returns$_t_uint16_$", + "typeString": "function (contract IConverter,uint256) view returns (uint16)" + } + }, + "id": 11405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21770:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "21761:56:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11409, + "nodeType": "IfStatement", + "src": "21757:87:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21839:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11408, + "nodeType": "Return", + "src": "21832:12:10" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11410, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "21861:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21861:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 11412, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11396, + "src": "21886:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21861:42:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11416, + "nodeType": "IfStatement", + "src": "21857:73:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21925:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11415, + "nodeType": "Return", + "src": "21918:12:10" + } + }, + { + "body": { + "id": 11441, + "nodeType": "Block", + "src": "21995:131:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 11437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11428, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11390, + "src": "22014:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 11430, + "indexExpression": { + "argumentTypes": null, + "id": 11429, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "22030:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22014:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11432, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "22053:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11433, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "22065:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11435, + "indexExpression": { + "argumentTypes": null, + "id": 11434, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "22080:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22065:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11431, + "name": "getReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11465, + "src": "22036:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_uint32_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (uint32)" + } + }, + "id": 11436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22036:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "22014:69:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11440, + "nodeType": "IfStatement", + "src": "22010:104:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22109:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11439, + "nodeType": "Return", + "src": "22102:12:10" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11421, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "21963:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11422, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "21967:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21967:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21963:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11442, + "initializationExpression": { + "assignments": [ + 11418 + ], + "declarations": [ + { + "constant": false, + "id": 11418, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11442, + "src": "21948:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21948:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11420, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21960:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "21948:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21990:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "21990:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11427, + "nodeType": "ExpressionStatement", + "src": "21990:3:10" + }, + "nodeType": "ForStatement", + "src": "21943:183:10" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 11443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22145:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 11394, + "id": 11444, + "nodeType": "Return", + "src": "22138:11:10" + } + ] + }, + "documentation": null, + "id": 11446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConverterReserveConfigEqual", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11382, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21538:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11381, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "21538:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11384, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21561:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 11383, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "21561:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11387, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21575:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11385, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21575:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11386, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21575:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11390, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21612:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 11388, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "21612:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 11389, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21612:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21537:107:10" + }, + "returnParameters": { + "id": 11394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11393, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21667:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11392, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "21667:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21666:6:10" + }, + "scope": 11667, + "src": "21499:658:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11464, + "nodeType": "Block", + "src": "22400:102:10", + "statements": [ + { + "assignments": [ + null, + 11456, + null, + null, + null + ], + "declarations": [ + null, + { + "constant": false, + "id": 11456, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11464, + "src": "22414:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11455, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22414:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + null, + null, + null + ], + "id": 11461, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11459, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11450, + "src": "22456:13:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11457, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11448, + "src": "22434:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "22434:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 11460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22434:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22411:59:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 11462, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11456, + "src": "22488:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 11454, + "id": 11463, + "nodeType": "Return", + "src": "22481:13:10" + } + ] + }, + "documentation": null, + "id": 11465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11448, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22320:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11447, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "22320:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11450, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22343:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11449, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22343:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22319:50:10" + }, + "returnParameters": { + "id": 11454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11453, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22392:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11452, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22392:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22391:8:10" + }, + "scope": 11667, + "src": "22294:208:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 11473, + "mutability": "constant", + "name": "CONVERTER_TYPE_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11667, + "src": "22510:91:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 11466, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "22510:6:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "636f6e766572746572547970652829", + "id": 11470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22582:17:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e8ff43f1cd1bc4d06a757749a6e6e9fd9d44e027b0f9466e12cafa4eda5c2dd", + "typeString": "literal_string \"converterType()\"" + }, + "value": "converterType()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3e8ff43f1cd1bc4d06a757749a6e6e9fd9d44e027b0f9466e12cafa4eda5c2dd", + "typeString": "literal_string \"converterType()\"" + } + ], + "id": 11469, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "22572:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 11471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22572:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22565:6:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 11467, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "22565:6:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22565:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 11519, + "nodeType": "Block", + "src": "22843:297:10", + "statements": [ + { + "assignments": [ + 11483, + 11485 + ], + "declarations": [ + { + "constant": false, + "id": 11483, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11519, + "src": "22855:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11482, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22855:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11485, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11519, + "src": "22869:23:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 11484, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "22869:5:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11496, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11493, + "name": "CONVERTER_TYPE_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11473, + "src": "22950:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 11491, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "22927:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 11492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22927:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 11494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22927:52:10", + "tryCall": false, + "typeDescriptions": { + "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": 11488, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11475, + "src": "22904:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22896:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11486, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22896:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22896:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 11490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22896:30:10", + "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": 11495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22896:84:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22854:126:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 11502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11497, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11483, + "src": "22995:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11498, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11485, + "src": "23006:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 11499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23006:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 11500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23027:2:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "23006:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22995:34:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11511, + "nodeType": "IfStatement", + "src": "22991:93:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11505, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11485, + "src": "23063:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 11507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23076:6:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 11506, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "23076:6:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 11508, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "23075:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + ], + "expression": { + "argumentTypes": null, + "id": 11503, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "23052:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 11504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23052:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 11509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23052:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 11481, + "id": 11510, + "nodeType": "Return", + "src": "23045:39:10" + } + }, + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11512, + "name": "_reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11477, + "src": "23102:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23123:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "23102:22:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23131:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 11517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "23102:30:10", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23127:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 11481, + "id": 11518, + "nodeType": "Return", + "src": "23095:37:10" + } + ] + }, + "documentation": null, + "id": 11520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11475, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22762:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11474, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "22762:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11477, + "mutability": "mutable", + "name": "_reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22785:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22785:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22761:51:10" + }, + "returnParameters": { + "id": 11481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22835:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 11479, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "22835:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22834:8:10" + }, + "scope": 11667, + "src": "22736:404:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11529, + "nodeType": "Block", + "src": "23296:42:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 11526, + "name": "getAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10514, + "src": "23314:14:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 11527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23314:16:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11525, + "id": 11528, + "nodeType": "Return", + "src": "23307:23:10" + } + ] + }, + "documentation": { + "id": 11521, + "nodeType": "StructuredDocumentation", + "src": "23148:82:10", + "text": " @dev deprecated, backward compatibility, use `getAnchorCount`" + }, + "functionSelector": "e571049b", + "id": 11530, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11522, + "nodeType": "ParameterList", + "parameters": [], + "src": "23263:2:10" + }, + "returnParameters": { + "id": 11525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11524, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11530, + "src": "23287:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23287:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23286:9:10" + }, + "scope": 11667, + "src": "23236:102:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11540, + "nodeType": "Block", + "src": "23495:38:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 11537, + "name": "getAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10531, + "src": "23513:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view returns (address[] memory)" + } + }, + "id": 11538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23513:12:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11536, + "id": 11539, + "nodeType": "Return", + "src": "23506:19:10" + } + ] + }, + "documentation": { + "id": 11531, + "nodeType": "StructuredDocumentation", + "src": "23346:78:10", + "text": " @dev deprecated, backward compatibility, use `getAnchors`" + }, + "functionSelector": "04ceaf41", + "id": 11541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11532, + "nodeType": "ParameterList", + "parameters": [], + "src": "23453:2:10" + }, + "returnParameters": { + "id": 11536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11535, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11541, + "src": "23477:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23477:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11534, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23477:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23476:18:10" + }, + "scope": 11667, + "src": "23430:103:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11553, + "nodeType": "Block", + "src": "23702:43:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11550, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11544, + "src": "23730:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11549, + "name": "getAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10550, + "src": "23720:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view returns (contract IConverterAnchor)" + } + }, + "id": 11551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23720:17:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11548, + "id": 11552, + "nodeType": "Return", + "src": "23713:24:10" + } + ] + }, + "documentation": { + "id": 11542, + "nodeType": "StructuredDocumentation", + "src": "23541:77:10", + "text": " @dev deprecated, backward compatibility, use `getAnchor`" + }, + "functionSelector": "a109d214", + "id": 11554, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11544, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11554, + "src": "23647:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23647:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23646:16:10" + }, + "returnParameters": { + "id": 11548, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11547, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11554, + "src": "23684:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11546, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "23684:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23683:18:10" + }, + "scope": 11667, + "src": "23624:121:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11566, + "nodeType": "Block", + "src": "23900:42:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11563, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11557, + "src": "23927:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11562, + "name": "isAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10569, + "src": "23918:8:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 11564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23918:16:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11561, + "id": 11565, + "nodeType": "Return", + "src": "23911:23:10" + } + ] + }, + "documentation": { + "id": 11555, + "nodeType": "StructuredDocumentation", + "src": "23753:76:10", + "text": " @dev deprecated, backward compatibility, use `isAnchor`" + }, + "functionSelector": "4123ef60", + "id": 11567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11557, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11567, + "src": "23857:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11556, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23857:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23856:16:10" + }, + "returnParameters": { + "id": 11561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11560, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11567, + "src": "23894:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11559, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23894:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23893:6:10" + }, + "scope": 11667, + "src": "23835:107:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11579, + "nodeType": "Block", + "src": "24159:75:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11576, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11570, + "src": "24208:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11575, + "name": "getConvertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10730, + "src": "24177:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 11577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24177:49:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11574, + "id": 11578, + "nodeType": "Return", + "src": "24170:56:10" + } + ] + }, + "documentation": { + "id": 11568, + "nodeType": "StructuredDocumentation", + "src": "23950:98:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`" + }, + "functionSelector": "a43d5e94", + "id": 11580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11570, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11580, + "src": "24098:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11569, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24098:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24097:31:10" + }, + "returnParameters": { + "id": 11574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11573, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11580, + "src": "24150:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24150:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24149:9:10" + }, + "scope": 11667, + "src": "24054:180:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11593, + "nodeType": "Block", + "src": "24452:71:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11590, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11583, + "src": "24497:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11589, + "name": "getConvertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10750, + "src": "24470:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view returns (address[] memory)" + } + }, + "id": 11591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24470:45:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11588, + "id": 11592, + "nodeType": "Return", + "src": "24463:52:10" + } + ] + }, + "documentation": { + "id": 11581, + "nodeType": "StructuredDocumentation", + "src": "24242:94:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchors`" + }, + "functionSelector": "f4fb86c0", + "id": 11594, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11583, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11594, + "src": "24382:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11582, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24382:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24381:31:10" + }, + "returnParameters": { + "id": 11588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11587, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11594, + "src": "24434:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11585, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24434:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11586, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24434:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24433:18:10" + }, + "scope": 11667, + "src": "24342:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11609, + "nodeType": "Block", + "src": "24755:78:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11605, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11597, + "src": "24799:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11606, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11599, + "src": "24818:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11604, + "name": "getConvertibleTokenAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10772, + "src": "24773:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (contract IERC20Token,uint256) view returns (contract IConverterAnchor)" + } + }, + "id": 11607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24773:52:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11603, + "id": 11608, + "nodeType": "Return", + "src": "24766:59:10" + } + ] + }, + "documentation": { + "id": 11595, + "nodeType": "StructuredDocumentation", + "src": "24531:93:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchor`" + }, + "functionSelector": "d6c4b5b2", + "id": 11610, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11597, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24669:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11596, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24669:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11599, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24700:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11598, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24700:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24668:47:10" + }, + "returnParameters": { + "id": 11603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11602, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24737:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11601, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24737:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24736:18:10" + }, + "scope": 11667, + "src": "24630:203:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11625, + "nodeType": "Block", + "src": "25051:77:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11621, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11613, + "src": "25094:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11622, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11615, + "src": "25113:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11620, + "name": "isConvertibleTokenAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10794, + "src": "25069:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_address_$returns$_t_bool_$", + "typeString": "function (contract IERC20Token,address) view returns (bool)" + } + }, + "id": 11623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25069:51:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11619, + "id": 11624, + "nodeType": "Return", + "src": "25062:58:10" + } + ] + }, + "documentation": { + "id": 11611, + "nodeType": "StructuredDocumentation", + "src": "24841:92:10", + "text": " @dev deprecated, backward compatibility, use `isConvertibleTokenAnchor`" + }, + "functionSelector": "725b8786", + "id": 11626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11613, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "24977:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11612, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24977:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11615, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "25008:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11614, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25008:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24976:47:10" + }, + "returnParameters": { + "id": 11619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11618, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "25045:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11617, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25045:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25044:6:10" + }, + "scope": 11667, + "src": "24939:189:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11640, + "nodeType": "Block", + "src": "25341:62:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11637, + "name": "_smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11630, + "src": "25382:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 11636, + "name": "getConvertersByAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10847, + "src": "25359:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr_$", + "typeString": "function (address[] memory) view returns (contract IConverter[] memory)" + } + }, + "id": 11638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25359:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "functionReturnParameters": 11635, + "id": 11639, + "nodeType": "Return", + "src": "25352:43:10" + } + ] + }, + "documentation": { + "id": 11627, + "nodeType": "StructuredDocumentation", + "src": "25136:90:10", + "text": " @dev deprecated, backward compatibility, use `getConvertersByAnchors`" + }, + "functionSelector": "1f8e2620", + "id": 11641, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertersBySmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11630, + "mutability": "mutable", + "name": "_smartTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11641, + "src": "25268:29:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11628, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25268:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11629, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25268:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25267:31:10" + }, + "returnParameters": { + "id": 11635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11634, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11641, + "src": "25320:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11632, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "25320:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11633, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25320:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25319:21:10" + }, + "scope": 11667, + "src": "25232:171:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11665, + "nodeType": "Block", + "src": "25659:118:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11654, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11645, + "src": "25702:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25702:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25726:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25702:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25734:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 11660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "25702:33:10", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25730:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 11661, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11645, + "src": "25737:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 11662, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11648, + "src": "25753:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 11653, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "25677:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 11663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25677:92:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11652, + "id": 11664, + "nodeType": "Return", + "src": "25670:99:10" + } + ] + }, + "documentation": { + "id": 11642, + "nodeType": "StructuredDocumentation", + "src": "25411:92:10", + "text": " @dev deprecated, backward compatibility, use `getLiquidityPoolByConfig`" + }, + "functionSelector": "c22b82f0", + "id": 11666, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolByReserveConfig", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11645, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25550:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11643, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "25550:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11644, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25550:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11648, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25587:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 11646, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "25587:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 11647, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25587:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25549:70:10" + }, + "returnParameters": { + "id": 11652, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11651, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25641:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11650, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "25641:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25640:18:10" + }, + "scope": 11667, + "src": "25509:268:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 11668, + "src": "1414:24366:10" + } + ], + "src": "52:25730:10" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol", + "exportedSymbols": { + "ConverterRegistry": [ + 11667 + ] + }, + "id": 11668, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 10246, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:10" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 10247, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 22527, + "src": "77:37:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 10248, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 21720, + "src": "116:47:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 10249, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13341, + "src": "165:37:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 10250, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13390, + "src": "204:44:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "file": "./interfaces/IConverterRegistry.sol", + "id": 10251, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13502, + "src": "250:45:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "file": "./interfaces/IConverterRegistryData.sol", + "id": 10252, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 13648, + "src": "297:49:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../token/interfaces/ISmartToken.sol", + "id": 10253, + "nodeType": "ImportDirective", + "scope": 11668, + "sourceUnit": 21183, + "src": "348:45:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10255, + "name": "IConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13501, + "src": "1444:18:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistry_$13501", + "typeString": "contract IConverterRegistry" + } + }, + "id": 10256, + "nodeType": "InheritanceSpecifier", + "src": "1444:18:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10257, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1464:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 10258, + "nodeType": "InheritanceSpecifier", + "src": "1464:22:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10259, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "1488:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 10260, + "nodeType": "InheritanceSpecifier", + "src": "1488:12:10" + } + ], + "contractDependencies": [ + 13501, + 21719, + 21818, + 22526, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 10254, + "nodeType": "StructuredDocumentation", + "src": "397:1015:10", + "text": " @dev The ConverterRegistry maintains a list of all active converters in the Bancor Network.\n Since converters can be upgraded and thus their address can change, the registry actually keeps\n converter anchors internally and not the converters themselves.\n The active converter for each anchor can be easily accessed by querying the anchor's owner.\n The registry exposes 3 differnet lists that can be accessed and iterated, based on the use-case of the caller:\n - Anchors - can be used to get all the latest / historical data in the network\n - Liquidity pools - can be used to get all liquidity pools for funding, liquidation etc.\n - Convertible tokens - can be used to get all tokens that can be converted in the network (excluding pool\n tokens), and for each one - all anchors that hold it in their reserves\n The contract fires events whenever one of the primitives is added to or removed from the registry\n The contract is upgradable." + }, + "fullyImplemented": true, + "id": 11667, + "linearizedBaseContracts": [ + 11667, + 22526, + 21719, + 22661, + 21818, + 22847, + 13501 + ], + "name": "ConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 10261, + "nodeType": "StructuredDocumentation", + "src": "1508:129:10", + "text": " @dev triggered when a converter anchor is added to the registry\n @param _anchor smart token" + }, + "id": 10265, + "name": "ConverterAnchorAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10263, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10265, + "src": "1670:32:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10262, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1670:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1669:34:10" + }, + "src": "1643:61:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10266, + "nodeType": "StructuredDocumentation", + "src": "1712:133:10", + "text": " @dev triggered when a converter anchor is removed from the registry\n @param _anchor smart token" + }, + "id": 10270, + "name": "ConverterAnchorRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10268, + "indexed": true, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10270, + "src": "1880:32:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10267, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1880:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1879:34:10" + }, + "src": "1851:63:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10271, + "nodeType": "StructuredDocumentation", + "src": "1922:137:10", + "text": " @dev triggered when a liquidity pool is added to the registry\n @param _liquidityPool liquidity pool" + }, + "id": 10275, + "name": "LiquidityPoolAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10273, + "indexed": true, + "mutability": "mutable", + "name": "_liquidityPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10275, + "src": "2090:39:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10272, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2090:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2089:41:10" + }, + "src": "2065:66:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10276, + "nodeType": "StructuredDocumentation", + "src": "2139:141:10", + "text": " @dev triggered when a liquidity pool is removed from the registry\n @param _liquidityPool liquidity pool" + }, + "id": 10280, + "name": "LiquidityPoolRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10278, + "indexed": true, + "mutability": "mutable", + "name": "_liquidityPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10280, + "src": "2313:39:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10277, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2313:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:41:10" + }, + "src": "2286:68:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10281, + "nodeType": "StructuredDocumentation", + "src": "2362:197:10", + "text": " @dev triggered when a convertible token is added to the registry\n @param _convertibleToken convertible token\n @param _smartToken associated smart token" + }, + "id": 10287, + "name": "ConvertibleTokenAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10283, + "indexed": true, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10287, + "src": "2593:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10282, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2593:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10285, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10287, + "src": "2632:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10284, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2632:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2592:77:10" + }, + "src": "2565:105:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10288, + "nodeType": "StructuredDocumentation", + "src": "2678:201:10", + "text": " @dev triggered when a convertible token is removed from the registry\n @param _convertibleToken convertible token\n @param _smartToken associated smart token" + }, + "id": 10294, + "name": "ConvertibleTokenRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10290, + "indexed": true, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10294, + "src": "2915:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10289, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2915:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10292, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10294, + "src": "2954:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10291, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2954:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2914:77:10" + }, + "src": "2885:107:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10295, + "nodeType": "StructuredDocumentation", + "src": "3000:88:10", + "text": " @dev deprecated, backward compatibility, use `ConverterAnchorAdded`" + }, + "id": 10299, + "name": "SmartTokenAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 10298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10297, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10299, + "src": "3116:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10296, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3116:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3115:38:10" + }, + "src": "3094:60:10" + }, + { + "anonymous": false, + "documentation": { + "id": 10300, + "nodeType": "StructuredDocumentation", + "src": "3162:90:10", + "text": " @dev deprecated, backward compatibility, use `ConverterAnchorRemoved`" + }, + "id": 10304, + "name": "SmartTokenRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 10303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10302, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10304, + "src": "3282:36:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10301, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3282:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3281:38:10" + }, + "src": "3258:62:10" + }, + { + "body": { + "id": 10313, + "nodeType": "Block", + "src": "3561:8:10", + "statements": [] + }, + "documentation": { + "id": 10305, + "nodeType": "StructuredDocumentation", + "src": "3328:145:10", + "text": " @dev initializes a new ConverterRegistry instance\n @param _registry address of a contract registry contract" + }, + "id": 10314, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 10310, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10307, + "src": "3543:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 10311, + "modifierName": { + "argumentTypes": null, + "id": 10309, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3520:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3520:33:10" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10307, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10314, + "src": "3491:27:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 10306, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3491:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3490:29:10" + }, + "returnParameters": { + "id": 10312, + "nodeType": "ParameterList", + "parameters": [], + "src": "3561:0:10" + }, + "scope": 11667, + "src": "3479:90:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10453, + "nodeType": "Block", + "src": "4488:991:10", + "statements": [ + { + "assignments": [ + 10337 + ], + "declarations": [ + { + "constant": false, + "id": 10337, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4499:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4499:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10340, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10338, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "4516:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4516:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4499:38:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10342, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10337, + "src": "4556:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10343, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "4566:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4566:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4556:32:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5245534552564553", + "id": 10346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4590:22:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d9402087dd8193cd0dfdf2ea32d5d892390e5da6cfb95c2d9c82b55c80bcce77", + "typeString": "literal_string \"ERR_INVALID_RESERVES\"" + }, + "value": "ERR_INVALID_RESERVES" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d9402087dd8193cd0dfdf2ea32d5d892390e5da6cfb95c2d9c82b55c80bcce77", + "typeString": "literal_string \"ERR_INVALID_RESERVES\"" + } + ], + "id": 10341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4548:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:65:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10348, + "nodeType": "ExpressionStatement", + "src": "4548:65:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "id": 10358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10351, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "4657:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10352, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "4664:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 10353, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "4680:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 10350, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "4632:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 10354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4632:64:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4717: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": 10355, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4700:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4700:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "4632:87:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414c52454144595f455849535453", + "id": 10359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4721:20:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_dee3679442264532ea8006772293a0d73a73c45dea71a562b7f372acad036a5c", + "typeString": "literal_string \"ERR_ALREADY_EXISTS\"" + }, + "value": "ERR_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_dee3679442264532ea8006772293a0d73a73c45dea71a562b7f372acad036a5c", + "typeString": "literal_string \"ERR_ALREADY_EXISTS\"" + } + ], + "id": 10349, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4624:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4624:118:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10361, + "nodeType": "ExpressionStatement", + "src": "4624:118:10" + }, + { + "assignments": [ + 10363 + ], + "declarations": [ + { + "constant": false, + "id": 10363, + "mutability": "mutable", + "name": "factory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4755:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 10362, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "4755:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10369, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10366, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21536, + "src": "4811:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10365, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "4801:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4801:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10364, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "4783:17:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 10368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4783:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4755:75:10" + }, + { + "assignments": [ + 10371 + ], + "declarations": [ + { + "constant": false, + "id": 10371, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4841:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10370, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4841:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10375, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "4905:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10376, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10319, + "src": "4912:5:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10377, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10321, + "src": "4919:7:10", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 10378, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10323, + "src": "4928:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 10373, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10363, + "src": "4884:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 13368, + "src": "4884:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,string memory,string memory,uint8) external returns (contract IConverterAnchor)" + } + }, + "id": 10379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4884:54:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 10372, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4867:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4867:72:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4841:98:10" + }, + { + "assignments": [ + 10383 + ], + "declarations": [ + { + "constant": false, + "id": 10383, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10453, + "src": "4950:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10382, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4950:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10393, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10387, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10317, + "src": "5008:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10388, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5015:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 10389, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "5023:8:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 10390, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10325, + "src": "5033:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 10385, + "name": "factory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10363, + "src": "4984:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 10386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13381, + "src": "4984:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 10391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4984:67:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10384, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "4973:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 10392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4973:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4950:102:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10394, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5065:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5065:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:24:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10398, + "nodeType": "ExpressionStatement", + "src": "5065:24:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10399, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5100:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5100:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5100:27:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10403, + "nodeType": "ExpressionStatement", + "src": "5100:27:10" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10417, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10328, + "src": "5211:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10419, + "indexExpression": { + "argumentTypes": null, + "id": 10418, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5226:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5211:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10420, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10331, + "src": "5230:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10422, + "indexExpression": { + "argumentTypes": null, + "id": 10421, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5246:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5230:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 10414, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5190:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "5190:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 10423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5190:59:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10424, + "nodeType": "ExpressionStatement", + "src": "5190:59:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10408, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5160:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 10409, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10337, + "src": "5164:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5160:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10425, + "initializationExpression": { + "assignments": [ + 10405 + ], + "declarations": [ + { + "constant": false, + "id": 10405, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10425, + "src": "5145:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5145:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10407, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5157:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5145:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5172:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10411, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10405, + "src": "5172:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10413, + "nodeType": "ExpressionStatement", + "src": "5172:3:10" + }, + "nodeType": "ForStatement", + "src": "5140:109:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10431, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5295:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5287:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5287:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5287:18:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10426, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10371, + "src": "5262:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "5262:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5262:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10434, + "nodeType": "ExpressionStatement", + "src": "5262:44:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10435, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5317:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13261, + "src": "5317:31:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 10438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5317:33:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10439, + "nodeType": "ExpressionStatement", + "src": "5317:33:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10443, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5389:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5389:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 10440, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5361:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "5361:27:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 10445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5361:39:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10446, + "nodeType": "ExpressionStatement", + "src": "5361:39:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10448, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5434:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10447, + "name": "addConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11234, + "src": "5413:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5413:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10450, + "nodeType": "ExpressionStatement", + "src": "5413:31:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10451, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10383, + "src": "5462:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 10335, + "id": 10452, + "nodeType": "Return", + "src": "5455:16:10" + } + ] + }, + "documentation": { + "id": 10315, + "nodeType": "StructuredDocumentation", + "src": "3577:596:10", + "text": " @dev creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry\n @param _type converter type, see ConverterBase contract main doc\n @param _name token / pool name\n @param _symbol token / pool symbol\n @param _decimals token / pool decimals\n @param _maxConversionFee maximum conversion-fee\n @param _reserveTokens reserve tokens\n @param _reserveWeights reserve weights\n @return new converter" + }, + "functionSelector": "5a0a6618", + "id": 10454, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10332, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10317, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4211:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10316, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "4211:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10319, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4234:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10318, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4234:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10321, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4264:21:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 10320, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4264:6:10", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10323, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4296:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 10322, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4296:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10325, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4322:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 10324, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4322:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10328, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4357:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10326, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4357:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10327, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4357:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10331, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4403:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10329, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4403:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10330, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4403:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4200:241:10" + }, + "returnParameters": { + "id": 10335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10334, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10454, + "src": "4471:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10333, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4471:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4470:12:10" + }, + "scope": 11667, + "src": "4179:1300:10", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 10473, + "nodeType": "Block", + "src": "5710:124:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10464, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10457, + "src": "5746:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10463, + "name": "isConverterValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10867, + "src": "5729:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 10465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5729:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f434f4e564552544552", + "id": 10466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5759:23:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29b07c9e09ddb3e03f778b1e41e2a2ddb5432c5f4862b4c497de9268b6aaf6bf", + "typeString": "literal_string \"ERR_INVALID_CONVERTER\"" + }, + "value": "ERR_INVALID_CONVERTER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29b07c9e09ddb3e03f778b1e41e2a2ddb5432c5f4862b4c497de9268b6aaf6bf", + "typeString": "literal_string \"ERR_INVALID_CONVERTER\"" + } + ], + "id": 10462, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5721:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5721:62:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10468, + "nodeType": "ExpressionStatement", + "src": "5721:62:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10470, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10457, + "src": "5815:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10469, + "name": "addConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11234, + "src": "5794:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5794:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10472, + "nodeType": "ExpressionStatement", + "src": "5794:32:10" + } + ] + }, + "documentation": { + "id": 10455, + "nodeType": "StructuredDocumentation", + "src": "5487:155:10", + "text": " @dev adds an existing converter to the registry\n can only be called by the owner\n @param _converter converter" + }, + "functionSelector": "6ce1c4dc", + "id": 10474, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 10460, + "modifierName": { + "argumentTypes": null, + "id": 10459, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "5700:9:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5700:9:10" + } + ], + "name": "addConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10457, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10474, + "src": "5670:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10456, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5670:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5669:23:10" + }, + "returnParameters": { + "id": 10461, + "nodeType": "ParameterList", + "parameters": [], + "src": "5710:0:10" + }, + "scope": 11667, + "src": "5648:186:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10497, + "nodeType": "Block", + "src": "6178:147:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 10489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10481, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6197:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 10482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6197:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 10483, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "6211:5:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6197:19:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "id": 10488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6220:29:10", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10486, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10477, + "src": "6238:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10485, + "name": "isConverterValid", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10867, + "src": "6221:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 10487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6221:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6197:52:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 10490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6251:19:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 10480, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6189:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 10491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6189:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10492, + "nodeType": "ExpressionStatement", + "src": "6189:82:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10494, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10477, + "src": "6306:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10493, + "name": "removeConverterInternal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11307, + "src": "6282:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 10495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6282:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 10496, + "nodeType": "ExpressionStatement", + "src": "6282:35:10" + } + ] + }, + "documentation": { + "id": 10475, + "nodeType": "StructuredDocumentation", + "src": "5842:275:10", + "text": " @dev removes a converter from the registry\n anyone can remove an existing converter from the registry, as long as the converter is invalid\n note that the owner can also remove valid converters\n @param _converter converter" + }, + "functionSelector": "9e76a007", + "id": 10498, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10477, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10498, + "src": "6148:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10476, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "6148:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6147:23:10" + }, + "returnParameters": { + "id": 10479, + "nodeType": "ParameterList", + "parameters": [], + "src": "6178:0:10" + }, + "scope": 11667, + "src": "6123:202:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13397 + ], + "body": { + "id": 10513, + "nodeType": "Block", + "src": "6529:105:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10507, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "6580:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10506, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6570:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6570:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10505, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "6547:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13543, + "src": "6547:77:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10504, + "id": 10512, + "nodeType": "Return", + "src": "6540:86:10" + } + ] + }, + "documentation": { + "id": 10499, + "nodeType": "StructuredDocumentation", + "src": "6333:125:10", + "text": " @dev returns the number of converter anchors in the registry\n @return number of anchors" + }, + "functionSelector": "d3182bed", + "id": 10514, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10501, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6502:8:10" + }, + "parameters": { + "id": 10500, + "nodeType": "ParameterList", + "parameters": [], + "src": "6487:2:10" + }, + "returnParameters": { + "id": 10504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10503, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10514, + "src": "6520:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10502, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6520:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6519:9:10" + }, + "scope": 11667, + "src": "6464:170:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13403 + ], + "body": { + "id": 10530, + "nodeType": "Block", + "src": "6839:101:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10524, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "6890:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10523, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6880:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6880:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10522, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "6857:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6857:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13549, + "src": "6857:73:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6857:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10521, + "id": 10529, + "nodeType": "Return", + "src": "6850:82:10" + } + ] + }, + "documentation": { + "id": 10515, + "nodeType": "StructuredDocumentation", + "src": "6642:121:10", + "text": " @dev returns the list of converter anchors in the registry\n @return list of anchors" + }, + "functionSelector": "effb3c6e", + "id": 10531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10517, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6803:8:10" + }, + "parameters": { + "id": 10516, + "nodeType": "ParameterList", + "parameters": [], + "src": "6788:2:10" + }, + "returnParameters": { + "id": 10521, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10520, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10531, + "src": "6821:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10518, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6821:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10519, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6821:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6820:18:10" + }, + "scope": 11667, + "src": "6769:171:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13410 + ], + "body": { + "id": 10549, + "nodeType": "Block", + "src": "7189:106:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10546, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10534, + "src": "7280:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10542, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7240:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10541, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7230:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7230:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10540, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7207:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7207:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13556, + "src": "7207:72:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7207:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10539, + "id": 10548, + "nodeType": "Return", + "src": "7200:87:10" + } + ] + }, + "documentation": { + "id": 10532, + "nodeType": "StructuredDocumentation", + "src": "6948:152:10", + "text": " @dev returns the converter anchor at a given index\n @param _index index\n @return anchor at the given index" + }, + "functionSelector": "4c7df18f", + "id": 10550, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10536, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7153:8:10" + }, + "parameters": { + "id": 10535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10534, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10550, + "src": "7125:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7125:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7124:16:10" + }, + "returnParameters": { + "id": 10539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10538, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10550, + "src": "7171:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10537, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "7171:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7170:18:10" + }, + "scope": 11667, + "src": "7106:189:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13417 + ], + "body": { + "id": 10568, + "nodeType": "Block", + "src": "7568:105:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10565, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10553, + "src": "7658:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10561, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7619:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10560, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7609:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7609:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10559, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7586:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7586:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13563, + "src": "7586:71:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7586:79:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10558, + "id": 10567, + "nodeType": "Return", + "src": "7579:86:10" + } + ] + }, + "documentation": { + "id": 10551, + "nodeType": "StructuredDocumentation", + "src": "7303:189:10", + "text": " @dev checks whether or not a given value is a converter anchor\n @param _value value\n @return true if the given value is an anchor, false if not" + }, + "functionSelector": "d8cced2a", + "id": 10569, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10555, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7544:8:10" + }, + "parameters": { + "id": 10554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10553, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10569, + "src": "7516:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7516:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7515:16:10" + }, + "returnParameters": { + "id": 10558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10557, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10569, + "src": "7562:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10556, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7562:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7561:6:10" + }, + "scope": 11667, + "src": "7498:175:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13422 + ], + "body": { + "id": 10584, + "nodeType": "Block", + "src": "7890:108:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10578, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "7941:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10577, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7931:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7931:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10576, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "7908:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7908:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPoolCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13568, + "src": "7908:80:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7908:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10575, + "id": 10583, + "nodeType": "Return", + "src": "7901:89:10" + } + ] + }, + "documentation": { + "id": 10570, + "nodeType": "StructuredDocumentation", + "src": "7681:131:10", + "text": " @dev returns the number of liquidity pools in the registry\n @return number of liquidity pools" + }, + "functionSelector": "7a5f0ffd", + "id": 10585, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10572, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7863:8:10" + }, + "parameters": { + "id": 10571, + "nodeType": "ParameterList", + "parameters": [], + "src": "7848:2:10" + }, + "returnParameters": { + "id": 10575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10574, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10585, + "src": "7881:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7881:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7880:9:10" + }, + "scope": 11667, + "src": "7818:180:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13428 + ], + "body": { + "id": 10601, + "nodeType": "Block", + "src": "8216:104:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10595, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "8267:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10594, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "8257:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8257:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10593, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8234:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8234:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPools", + "nodeType": "MemberAccess", + "referencedDeclaration": 13574, + "src": "8234:76:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8234:78:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10592, + "id": 10600, + "nodeType": "Return", + "src": "8227:85:10" + } + ] + }, + "documentation": { + "id": 10586, + "nodeType": "StructuredDocumentation", + "src": "8006:127:10", + "text": " @dev returns the list of liquidity pools in the registry\n @return list of liquidity pools" + }, + "functionSelector": "7f45c4c3", + "id": 10602, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10588, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8180:8:10" + }, + "parameters": { + "id": 10587, + "nodeType": "ParameterList", + "parameters": [], + "src": "8165:2:10" + }, + "returnParameters": { + "id": 10592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10591, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10602, + "src": "8198:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8198:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10590, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8198:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8197:18:10" + }, + "scope": 11667, + "src": "8139:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13435 + ], + "body": { + "id": 10620, + "nodeType": "Block", + "src": "8582:109:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10617, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10605, + "src": "8676:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10613, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "8633:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10612, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "8623:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8623:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10611, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8600:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8600:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13581, + "src": "8600:75:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8600:83:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10610, + "id": 10619, + "nodeType": "Return", + "src": "8593:90:10" + } + ] + }, + "documentation": { + "id": 10603, + "nodeType": "StructuredDocumentation", + "src": "8328:158:10", + "text": " @dev returns the liquidity pool at a given index\n @param _index index\n @return liquidity pool at the given index" + }, + "functionSelector": "a74498aa", + "id": 10621, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10607, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8546:8:10" + }, + "parameters": { + "id": 10606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10605, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10621, + "src": "8518:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10604, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8518:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8517:16:10" + }, + "returnParameters": { + "id": 10610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10609, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10621, + "src": "8564:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10608, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "8564:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8563:18:10" + }, + "scope": 11667, + "src": "8492:199:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13442 + ], + "body": { + "id": 10639, + "nodeType": "Block", + "src": "8976:108:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10636, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10624, + "src": "9069:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10632, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9027:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10631, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9017:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9017:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10630, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "8994:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13588, + "src": "8994:74:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8994:82:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10629, + "id": 10638, + "nodeType": "Return", + "src": "8987:89:10" + } + ] + }, + "documentation": { + "id": 10622, + "nodeType": "StructuredDocumentation", + "src": "8699:194:10", + "text": " @dev checks whether or not a given value is a liquidity pool\n @param _value value\n @return true if the given value is a liquidity pool, false if not" + }, + "functionSelector": "e85455d7", + "id": 10640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10626, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8952:8:10" + }, + "parameters": { + "id": 10625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10624, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10640, + "src": "8924:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8924:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8923:16:10" + }, + "returnParameters": { + "id": 10629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10628, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10640, + "src": "8970:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10627, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "8970:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8969:6:10" + }, + "scope": 11667, + "src": "8899:185:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13447 + ], + "body": { + "id": 10655, + "nodeType": "Block", + "src": "9310:111:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10649, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9361:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10648, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9351:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9351:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10647, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "9328:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9328:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13593, + "src": "9328:83:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 10653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9328:85:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10646, + "id": 10654, + "nodeType": "Return", + "src": "9321:92:10" + } + ] + }, + "documentation": { + "id": 10641, + "nodeType": "StructuredDocumentation", + "src": "9092:137:10", + "text": " @dev returns the number of convertible tokens in the registry\n @return number of convertible tokens" + }, + "functionSelector": "69be4784", + "id": 10656, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10643, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9283:8:10" + }, + "parameters": { + "id": 10642, + "nodeType": "ParameterList", + "parameters": [], + "src": "9268:2:10" + }, + "returnParameters": { + "id": 10646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10645, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10656, + "src": "9301:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10644, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9301:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9300:9:10" + }, + "scope": 11667, + "src": "9235:186:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13453 + ], + "body": { + "id": 10672, + "nodeType": "Block", + "src": "9648:107:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10666, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "9699:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10665, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "9689:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9689:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10664, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "9666:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9666:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13599, + "src": "9666:79:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view external returns (address[] memory)" + } + }, + "id": 10670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9666:81:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10663, + "id": 10671, + "nodeType": "Return", + "src": "9659:88:10" + } + ] + }, + "documentation": { + "id": 10657, + "nodeType": "StructuredDocumentation", + "src": "9429:133:10", + "text": " @dev returns the list of convertible tokens in the registry\n @return list of convertible tokens" + }, + "functionSelector": "5f1b50fe", + "id": 10673, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10659, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9612:8:10" + }, + "parameters": { + "id": 10658, + "nodeType": "ParameterList", + "parameters": [], + "src": "9597:2:10" + }, + "returnParameters": { + "id": 10663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10662, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10673, + "src": "9630:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10660, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9630:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10661, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9630:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9629:18:10" + }, + "scope": 11667, + "src": "9568:187:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13460 + ], + "body": { + "id": 10691, + "nodeType": "Block", + "src": "10021:112:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10688, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10676, + "src": "10118:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10684, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10072:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10683, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10062:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10062:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10682, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10039:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10039:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13606, + "src": "10039:78:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 10689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10039:86:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 10681, + "id": 10690, + "nodeType": "Return", + "src": "10032:93:10" + } + ] + }, + "documentation": { + "id": 10674, + "nodeType": "StructuredDocumentation", + "src": "9763:164:10", + "text": " @dev returns the convertible token at a given index\n @param _index index\n @return convertible token at the given index" + }, + "functionSelector": "865cf194", + "id": 10692, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10678, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9990:8:10" + }, + "parameters": { + "id": 10677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10676, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10692, + "src": "9962:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9962:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9961:16:10" + }, + "returnParameters": { + "id": 10681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10680, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10692, + "src": "10008:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10679, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "10008:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10007:13:10" + }, + "scope": 11667, + "src": "9933:200:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13467 + ], + "body": { + "id": 10710, + "nodeType": "Block", + "src": "10427:111:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10707, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10695, + "src": "10523:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10703, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10478:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10702, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10468:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10468:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10701, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10445:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10445:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13613, + "src": "10445:77:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 10708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10445:85:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10700, + "id": 10709, + "nodeType": "Return", + "src": "10438:92:10" + } + ] + }, + "documentation": { + "id": 10693, + "nodeType": "StructuredDocumentation", + "src": "10141:200:10", + "text": " @dev checks whether or not a given value is a convertible token\n @param _value value\n @return true if the given value is a convertible token, false if not" + }, + "functionSelector": "3ab8857c", + "id": 10711, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10403:8:10" + }, + "parameters": { + "id": 10696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10695, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10711, + "src": "10375:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10375:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10374:16:10" + }, + "returnParameters": { + "id": 10700, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10699, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10711, + "src": "10421:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10698, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10421:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10420:6:10" + }, + "scope": 11667, + "src": "10347:191:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13474 + ], + "body": { + "id": 10729, + "nodeType": "Block", + "src": "10909:138:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10726, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10714, + "src": "11021:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10722, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "10960:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10721, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "10950:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10950:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10720, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "10927:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10927:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "10927:93:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 10727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10927:112:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 10719, + "id": 10728, + "nodeType": "Return", + "src": "10920:119:10" + } + ] + }, + "documentation": { + "id": 10712, + "nodeType": "StructuredDocumentation", + "src": "10546:247:10", + "text": " @dev returns the number of converter anchors associated with a given convertible token\n @param _convertibleToken convertible token\n @return number of anchors associated with the given convertible token" + }, + "functionSelector": "49c5f32b", + "id": 10730, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10716, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10882:8:10" + }, + "parameters": { + "id": 10715, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10714, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10730, + "src": "10839:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "10839:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10838:31:10" + }, + "returnParameters": { + "id": 10719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10718, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10730, + "src": "10900:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10900:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10899:9:10" + }, + "scope": 11667, + "src": "10799:248:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13482 + ], + "body": { + "id": 10749, + "nodeType": "Block", + "src": "11419:134:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10746, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10733, + "src": "11527:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10742, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "11470:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10741, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "11460:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11460:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10740, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "11437:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11437:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13628, + "src": "11437:89:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 10747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11437:108:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 10739, + "id": 10748, + "nodeType": "Return", + "src": "11430:115:10" + } + ] + }, + "documentation": { + "id": 10731, + "nodeType": "StructuredDocumentation", + "src": "11055:243:10", + "text": " @dev returns the list of aoncerter anchors associated with a given convertible token\n @param _convertibleToken convertible token\n @return list of anchors associated with the given convertible token" + }, + "functionSelector": "11839064", + "id": 10750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10735, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11383:8:10" + }, + "parameters": { + "id": 10734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10733, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10750, + "src": "11340:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10732, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11340:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11339:31:10" + }, + "returnParameters": { + "id": 10739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10738, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10750, + "src": "11401:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11401:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10737, + "length": null, + "nodeType": "ArrayTypeName", + "src": "11401:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11400:18:10" + }, + "scope": 11667, + "src": "11304:249:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13491 + ], + "body": { + "id": 10771, + "nodeType": "Block", + "src": "11935:141:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10767, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10753, + "src": "12042:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10768, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10755, + "src": "12061:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10763, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "11986:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10762, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "11976:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11976:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10761, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "11953:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10765, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11953:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13637, + "src": "11953:88:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (contract IERC20Token,uint256) view external returns (contract IConverterAnchor)" + } + }, + "id": 10769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11953:115:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10760, + "id": 10770, + "nodeType": "Return", + "src": "11946:122:10" + } + ] + }, + "documentation": { + "id": 10751, + "nodeType": "StructuredDocumentation", + "src": "11561:238:10", + "text": " @dev returns the converter anchor associated with a given convertible token at a given index\n @param _index index\n @return anchor associated with the given convertible token at the given index" + }, + "functionSelector": "603f51e4", + "id": 10772, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10757, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11899:8:10" + }, + "parameters": { + "id": 10756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10753, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11840:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10752, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11840:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10755, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11871:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10754, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11871:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11839:47:10" + }, + "returnParameters": { + "id": 10760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10759, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10772, + "src": "11917:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10758, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "11917:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11916:18:10" + }, + "scope": 11667, + "src": "11805:271:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13500 + ], + "body": { + "id": 10793, + "nodeType": "Block", + "src": "12508:140:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10789, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10775, + "src": "12614:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 10790, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10777, + "src": "12633:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10785, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "12559:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 10784, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "12549:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 10786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12549:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10783, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "12526:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 10787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12526:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 10788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isConvertibleTokenSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13646, + "src": "12526:87:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_address_$returns$_t_bool_$", + "typeString": "function (contract IERC20Token,address) view external returns (bool)" + } + }, + "id": 10791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12526:114:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10782, + "id": 10792, + "nodeType": "Return", + "src": "12519:121:10" + } + ] + }, + "documentation": { + "id": 10773, + "nodeType": "StructuredDocumentation", + "src": "12084:301:10", + "text": " @dev checks whether or not a given value is a converter anchor of a given convertible token\n @param _convertibleToken convertible token\n @param _value value\n @return true if the given value is an anchor of the given convertible token, false if not" + }, + "functionSelector": "b4c4197a", + "id": 10794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 10779, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12484:8:10" + }, + "parameters": { + "id": 10778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10775, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12425:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10774, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "12425:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10777, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12456:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 10776, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12456:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12424:47:10" + }, + "returnParameters": { + "id": 10782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10781, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10794, + "src": "12502:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10780, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12502:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12501:6:10" + }, + "scope": 11667, + "src": "12391:257:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10846, + "nodeType": "Block", + "src": "13040:261:10", + "statements": [ + { + "assignments": [ + 10807 + ], + "declarations": [ + { + "constant": false, + "id": 10807, + "mutability": "mutable", + "name": "converters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10846, + "src": "13051:30:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10805, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13051:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10806, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13051:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10814, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10811, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13101:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13101:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10810, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "13084:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (contract IConverter[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10808, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13088:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10809, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13088:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + } + }, + "id": 10813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13084:33:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13051:66:10" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 10841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10826, + "name": "converters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10807, + "src": "13189:10:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "id": 10828, + "indexExpression": { + "argumentTypes": null, + "id": 10827, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13200:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13189:13:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10833, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13241:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10835, + "indexExpression": { + "argumentTypes": null, + "id": 10834, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13250:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13241:11:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10832, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "13224:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13224:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "13224:35:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 10838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13224:37:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13216:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 10830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13216:8:10", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13216:46:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 10829, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "13205:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 10840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13205:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "13189:74:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10842, + "nodeType": "ExpressionStatement", + "src": "13189:74:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10819, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13150:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10820, + "name": "_anchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10798, + "src": "13154:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13154:15:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13150:19:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10843, + "initializationExpression": { + "assignments": [ + 10816 + ], + "declarations": [ + { + "constant": false, + "id": 10816, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10843, + "src": "13135:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13135:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10818, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13147:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13135:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13171:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10823, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10816, + "src": "13171:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10825, + "nodeType": "ExpressionStatement", + "src": "13171:3:10" + }, + "nodeType": "ForStatement", + "src": "13130:133:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10844, + "name": "converters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10807, + "src": "13283:10:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "functionReturnParameters": 10803, + "id": 10845, + "nodeType": "Return", + "src": "13276:17:10" + } + ] + }, + "documentation": { + "id": 10795, + "nodeType": "StructuredDocumentation", + "src": "12656:277:10", + "text": " @dev returns a list of converters for a given list of anchors\n this is a utility function that can be used to reduce the number of calls to the contract\n @param _anchors list of converter anchors\n @return list of converters" + }, + "functionSelector": "610c0b05", + "id": 10847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertersByAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10799, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10798, + "mutability": "mutable", + "name": "_anchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10847, + "src": "12971:25:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12971:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10797, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12971:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12970:27:10" + }, + "returnParameters": { + "id": 10803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10802, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10847, + "src": "13019:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10800, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13019:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10801, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13019:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:21:10" + }, + "scope": 11667, + "src": "12939:362:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10866, + "nodeType": "Block", + "src": "13579:123:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 10864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10855, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10850, + "src": "13645:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "13645:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 10857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13645:18:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 10858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "13645:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 10859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13645:26:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10862, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10850, + "src": "13683:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 10861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13675:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13675:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 10863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13675:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "13645:49:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10854, + "id": 10865, + "nodeType": "Return", + "src": "13638:56:10" + } + ] + }, + "documentation": { + "id": 10848, + "nodeType": "StructuredDocumentation", + "src": "13309:188:10", + "text": " @dev checks whether or not a given converter is valid\n @param _converter converter\n @return true if the given converter is valid, false if not" + }, + "functionSelector": "954254f5", + "id": 10867, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConverterValid", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10850, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10867, + "src": "13529:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10849, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "13529:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13528:23:10" + }, + "returnParameters": { + "id": 10854, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10853, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10867, + "src": "13573:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10852, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13573:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13572:6:10" + }, + "scope": 11667, + "src": "13503:199:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 10949, + "nodeType": "Block", + "src": "14068:799:10", + "statements": [ + { + "assignments": [ + 10876 + ], + "declarations": [ + { + "constant": false, + "id": 10876, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14079:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14079:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10880, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 10877, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14107:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "14107:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 10879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14107:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14079:60:10" + }, + { + "assignments": [ + 10884 + ], + "declarations": [ + { + "constant": false, + "id": 10884, + "mutability": "mutable", + "name": "reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14150:34:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10882, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14150:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10883, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14150:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10890, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10888, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14205:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14187:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (contract IERC20Token[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10885, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14191:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10886, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14191:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + } + }, + "id": 10889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14187:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14150:73:10" + }, + { + "assignments": [ + 10895 + ], + "declarations": [ + { + "constant": false, + "id": 10895, + "mutability": "mutable", + "name": "reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10949, + "src": "14234:30:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10893, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14234:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10894, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14234:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10901, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10899, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14280:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14267:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint32_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint32[] memory)" + }, + "typeName": { + "baseType": { + "id": 10896, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14271:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10897, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14271:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + } + }, + "id": 10900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14267:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14234:64:10" + }, + { + "body": { + "id": 10934, + "nodeType": "Block", + "src": "14418:206:10", + "statements": [ + { + "assignments": [ + 10913 + ], + "declarations": [ + { + "constant": false, + "id": 10913, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10934, + "src": "14433:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 10912, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14433:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10918, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10916, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14487:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 10914, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14460:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 10915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "14460:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 10917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14460:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14433:56:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10919, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10884, + "src": "14504:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10921, + "indexExpression": { + "argumentTypes": null, + "id": 10920, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14518:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14504:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 10922, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10913, + "src": "14523:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14504:31:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10924, + "nodeType": "ExpressionStatement", + "src": "14504:31:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 10932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10925, + "name": "reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10895, + "src": "14550:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10927, + "indexExpression": { + "argumentTypes": null, + "id": 10926, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14565:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14550:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10929, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14587:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 10930, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10913, + "src": "14599:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 10928, + "name": "getReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11465, + "src": "14570:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_uint32_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (uint32)" + } + }, + "id": 10931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:42:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14550:62:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10933, + "nodeType": "ExpressionStatement", + "src": "14550:62:10" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10906, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14390:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 10907, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14394:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14390:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 10935, + "initializationExpression": { + "assignments": [ + 10903 + ], + "declarations": [ + { + "constant": false, + "id": 10903, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10935, + "src": "14375:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14375:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10905, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14387:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14375:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14413:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10909, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10903, + "src": "14413:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10911, + "nodeType": "ExpressionStatement", + "src": "14413:3:10" + }, + "nodeType": "ForStatement", + "src": "14370:254:10" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "id": 10947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10938, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10870, + "src": "14774:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 10939, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10876, + "src": "14786:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 10937, + "name": "getConverterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11520, + "src": "14757:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint256_$returns$_t_uint16_$", + "typeString": "function (contract IConverter,uint256) view returns (uint16)" + } + }, + "id": 10940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14757:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 10941, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10884, + "src": "14806:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 10942, + "name": "reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10895, + "src": "14821:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 10936, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "14732:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 10943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14732:104:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 10945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14857: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": 10944, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "14840:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 10946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14840:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "14732:127:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 10874, + "id": 10948, + "nodeType": "Return", + "src": "14725:134:10" + } + ] + }, + "documentation": { + "id": 10868, + "nodeType": "StructuredDocumentation", + "src": "13710:260:10", + "text": " @dev checks if a liquidity pool with given configuration is already registered\n @param _converter converter with specific configuration\n @return if a liquidity pool with the same configuration is already registered" + }, + "functionSelector": "8f1d0e1a", + "id": 10950, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSimilarLiquidityPoolRegistered", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10870, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10950, + "src": "14018:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 10869, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "14018:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14017:23:10" + }, + "returnParameters": { + "id": 10874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10873, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 10950, + "src": "14062:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 10872, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "14062:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14061:6:10" + }, + "scope": 11667, + "src": "13976:891:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11030, + "nodeType": "Block", + "src": "15390:869:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 10973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10964, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15483:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15483:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10966, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10959, + "src": "15508:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 10967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15508:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15483:47:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10969, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15534:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 10970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15534:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 10971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15558:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "15534:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15483:76:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11025, + "nodeType": "IfStatement", + "src": "15479:734:10", + "trueBody": { + "id": 11024, + "nodeType": "Block", + "src": "15561:652:10", + "statements": [ + { + "assignments": [ + 10978 + ], + "declarations": [ + { + "constant": false, + "id": 10978, + "mutability": "mutable", + "name": "convertibleTokenAnchors", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11024, + "src": "15651:40:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 10976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15651:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10977, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15651:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10982, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 10980, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "15723:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + ], + "id": 10979, + "name": "getLeastFrequentTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11380, + "src": "15694:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory) view returns (address[] memory)" + } + }, + "id": 10981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15694:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15651:87:10" + }, + { + "body": { + "id": 11022, + "nodeType": "Block", + "src": "15881:321:10", + "statements": [ + { + "assignments": [ + 10995 + ], + "declarations": [ + { + "constant": false, + "id": 10995, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11022, + "src": "15900:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10994, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "15900:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11001, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 10997, + "name": "convertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10978, + "src": "15943:23:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10999, + "indexExpression": { + "argumentTypes": null, + "id": 10998, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15967:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15943:26:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10996, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "15926:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15926:44:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15900:70:10" + }, + { + "assignments": [ + 11003 + ], + "declarations": [ + { + "constant": false, + "id": 11003, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11022, + "src": "15989:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11002, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "15989:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11012, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11007, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10995, + "src": "16031:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 11008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "16031:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 11009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16031:14:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11006, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16023:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 11005, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16023:8:10", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16023:23:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 11004, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "16012:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16012:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15989:58:10" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11014, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11003, + "src": "16100:9:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 11015, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10953, + "src": "16111:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 11016, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10956, + "src": "16118:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 11017, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10959, + "src": "16134:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 11013, + "name": "isConverterReserveConfigEqual", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11446, + "src": "16070:29:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_bool_$", + "typeString": "function (contract IConverter,uint16,contract IERC20Token[] memory,uint32[] memory) view returns (bool)" + } + }, + "id": 11018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16070:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11021, + "nodeType": "IfStatement", + "src": "16066:120:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 11019, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10995, + "src": "16180:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10963, + "id": 11020, + "nodeType": "Return", + "src": "16173:13:10" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 10990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10987, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15840:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 10988, + "name": "convertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10978, + "src": "15844:23:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 10989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15844:30:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15840:34:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11023, + "initializationExpression": { + "assignments": [ + 10984 + ], + "declarations": [ + { + "constant": false, + "id": 10984, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11023, + "src": "15825:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10983, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15825:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 10986, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 10985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15837:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15825:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 10992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15876:3:10", + "subExpression": { + "argumentTypes": null, + "id": 10991, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10984, + "src": "15876:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 10993, + "nodeType": "ExpressionStatement", + "src": "15876:3:10" + }, + "nodeType": "ForStatement", + "src": "15820:382:10" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 11027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16249: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": 11026, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "16232:16:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 10963, + "id": 11029, + "nodeType": "Return", + "src": "16225:26:10" + } + ] + }, + "documentation": { + "id": 10951, + "nodeType": "StructuredDocumentation", + "src": "14875:352:10", + "text": " @dev searches for a liquidity pool with specific configuration\n @param _type converter type, see ConverterBase contract main doc\n @param _reserveTokens reserve tokens\n @param _reserveWeights reserve weights\n @return the liquidity pool, or zero if no such liquidity pool exists" + }, + "functionSelector": "1d3fccd5", + "id": 11031, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolByConfig", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 10960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10953, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15267:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 10952, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "15267:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10956, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15281:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 10954, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "15281:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 10955, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15281:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 10959, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15318:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 10957, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15318:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 10958, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15318:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15266:84:10" + }, + "returnParameters": { + "id": 10963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 10962, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11031, + "src": "15372:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 10961, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "15372:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15371:18:10" + }, + "scope": 11667, + "src": "15233:1026:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11053, + "nodeType": "Block", + "src": "16489:149:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11042, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16537:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11039, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11034, + "src": "16500:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13509, + "src": "16500:36:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16500:45:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11044, + "nodeType": "ExpressionStatement", + "src": "16500:45:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11046, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16582:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11045, + "name": "ConverterAnchorAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10265, + "src": "16561:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16561:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11048, + "nodeType": "EmitStatement", + "src": "16556:34:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11050, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11036, + "src": "16622:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11049, + "name": "SmartTokenAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10299, + "src": "16606:15:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16606:24:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11052, + "nodeType": "EmitStatement", + "src": "16601:29:10" + } + ] + }, + "documentation": { + "id": 11032, + "nodeType": "StructuredDocumentation", + "src": "16267:115:10", + "text": " @dev adds a converter anchor to the registry\n @param _anchor converter anchor" + }, + "id": 11054, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11034, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11054, + "src": "16407:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11033, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "16407:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11036, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11054, + "src": "16454:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11035, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "16454:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16406:73:10" + }, + "returnParameters": { + "id": 11038, + "nodeType": "ParameterList", + "parameters": [], + "src": "16489:0:10" + }, + "scope": 11667, + "src": "16388:250:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11076, + "nodeType": "Block", + "src": "16876:156:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11065, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "16927:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11062, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11057, + "src": "16887:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeSmartToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13514, + "src": "16887:39:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16887:48:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11067, + "nodeType": "ExpressionStatement", + "src": "16887:48:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11069, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "16974:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11068, + "name": "ConverterAnchorRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10270, + "src": "16951:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16951:31:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11071, + "nodeType": "EmitStatement", + "src": "16946:36:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11073, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11059, + "src": "17016:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11072, + "name": "SmartTokenRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10304, + "src": "16998:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16998:26:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11075, + "nodeType": "EmitStatement", + "src": "16993:31:10" + } + ] + }, + "documentation": { + "id": 11055, + "nodeType": "StructuredDocumentation", + "src": "16646:120:10", + "text": " @dev removes a converter anchor from the registry\n @param _anchor converter anchor" + }, + "id": 11077, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11057, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11077, + "src": "16794:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11056, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "16794:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11059, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11077, + "src": "16841:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11058, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "16841:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16793:73:10" + }, + "returnParameters": { + "id": 11061, + "nodeType": "ParameterList", + "parameters": [], + "src": "16876:0:10" + }, + "scope": 11667, + "src": "16772:260:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11095, + "nodeType": "Block", + "src": "17308:136:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11088, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11082, + "src": "17359:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11085, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11080, + "src": "17319:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13519, + "src": "17319:39:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17319:61:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11090, + "nodeType": "ExpressionStatement", + "src": "17319:61:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11092, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11082, + "src": "17415:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11091, + "name": "LiquidityPoolAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10275, + "src": "17396:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17396:40:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11094, + "nodeType": "EmitStatement", + "src": "17391:45:10" + } + ] + }, + "documentation": { + "id": 11078, + "nodeType": "StructuredDocumentation", + "src": "17040:141:10", + "text": " @dev adds a liquidity pool to the registry\n @param _liquidityPoolAnchor liquidity pool converter anchor" + }, + "id": 11096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11080, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11096, + "src": "17213:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11079, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "17213:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11082, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11096, + "src": "17260:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11081, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "17260:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17212:86:10" + }, + "returnParameters": { + "id": 11084, + "nodeType": "ParameterList", + "parameters": [], + "src": "17308:0:10" + }, + "scope": 11667, + "src": "17187:257:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11114, + "nodeType": "Block", + "src": "17728:141:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11107, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11101, + "src": "17782:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11104, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11099, + "src": "17739:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeLiquidityPool", + "nodeType": "MemberAccess", + "referencedDeclaration": 13524, + "src": "17739:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor) external" + } + }, + "id": 11108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17739:64:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11109, + "nodeType": "ExpressionStatement", + "src": "17739:64:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11111, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11101, + "src": "17840:20:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11110, + "name": "LiquidityPoolRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10280, + "src": "17819:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterAnchor)" + } + }, + "id": 11112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17819:42:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11113, + "nodeType": "EmitStatement", + "src": "17814:47:10" + } + ] + }, + "documentation": { + "id": 11097, + "nodeType": "StructuredDocumentation", + "src": "17452:146:10", + "text": " @dev removes a liquidity pool from the registry\n @param _liquidityPoolAnchor liquidity pool converter anchor" + }, + "id": 11115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11099, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11115, + "src": "17633:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11098, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "17633:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11101, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11115, + "src": "17680:37:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11100, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "17680:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17632:86:10" + }, + "returnParameters": { + "id": 11103, + "nodeType": "ParameterList", + "parameters": [], + "src": "17728:0:10" + }, + "scope": 11667, + "src": "17604:265:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11137, + "nodeType": "Block", + "src": "18220:154:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11128, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11120, + "src": "18274:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11129, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11122, + "src": "18293:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11125, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11118, + "src": "18231:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13531, + "src": "18231:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor) external" + } + }, + "id": 11130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18231:70:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11131, + "nodeType": "ExpressionStatement", + "src": "18231:70:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11133, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11120, + "src": "18339:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11134, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11122, + "src": "18358:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11132, + "name": "ConvertibleTokenAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10287, + "src": "18317:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18317:49:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11136, + "nodeType": "EmitStatement", + "src": "18312:54:10" + } + ] + }, + "documentation": { + "id": 11116, + "nodeType": "StructuredDocumentation", + "src": "17877:195:10", + "text": " @dev adds a convertible token to the registry\n @param _convertibleToken convertible token\n @param _anchor associated converter anchor" + }, + "id": 11138, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11118, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18107:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11117, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18107:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11120, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18154:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11119, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "18154:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11122, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11138, + "src": "18185:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11121, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "18185:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18106:104:10" + }, + "returnParameters": { + "id": 11124, + "nodeType": "ParameterList", + "parameters": [], + "src": "18220:0:10" + }, + "scope": 11667, + "src": "18078:296:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11160, + "nodeType": "Block", + "src": "18733:159:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11151, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11143, + "src": "18790:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11152, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11145, + "src": "18809:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "expression": { + "argumentTypes": null, + "id": 11148, + "name": "_converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11141, + "src": "18744:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "removeConvertibleToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 13538, + "src": "18744:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor) external" + } + }, + "id": 11153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18744:73:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11154, + "nodeType": "ExpressionStatement", + "src": "18744:73:10" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11156, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11143, + "src": "18857:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11157, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11145, + "src": "18876:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11155, + "name": "ConvertibleTokenRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10294, + "src": "18833:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18833:51:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11159, + "nodeType": "EmitStatement", + "src": "18828:56:10" + } + ] + }, + "documentation": { + "id": 11139, + "nodeType": "StructuredDocumentation", + "src": "18382:200:10", + "text": " @dev removes a convertible token from the registry\n @param _convertibleToken convertible token\n @param _anchor associated converter anchor" + }, + "id": 11161, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11141, + "mutability": "mutable", + "name": "_converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18620:45:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11140, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18620:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11143, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18667:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11142, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "18667:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11145, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11161, + "src": "18698:24:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11144, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "18698:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18619:104:10" + }, + "returnParameters": { + "id": 11147, + "nodeType": "ParameterList", + "parameters": [], + "src": "18733:0:10" + }, + "scope": 11667, + "src": "18588:304:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 11233, + "nodeType": "Block", + "src": "18961:749:10", + "statements": [ + { + "assignments": [ + 11167 + ], + "declarations": [ + { + "constant": false, + "id": 11167, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "18972:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11166, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "18972:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11173, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11170, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "19052:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11169, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "19042:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19042:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11168, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "19019:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19019:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18972:105:10" + }, + { + "assignments": [ + 11175 + ], + "declarations": [ + { + "constant": false, + "id": 11175, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "19088:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11174, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "19088:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11181, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11177, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19125:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11176, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "19114:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19114:22:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "19114:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 11180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19114:30:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19088:56:10" + }, + { + "assignments": [ + 11183 + ], + "declarations": [ + { + "constant": false, + "id": 11183, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11233, + "src": "19155:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11182, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19155:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11187, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11184, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19183:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "19183:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19183:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19155:60:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11189, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19275:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11190, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19298:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11188, + "name": "addAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11054, + "src": "19265:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19265:40:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11192, + "nodeType": "ExpressionStatement", + "src": "19265:40:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11193, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11183, + "src": "19320:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19340:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "19320:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11202, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19452:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11206, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19495:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19487:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19487:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19487:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11203, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "19475:11:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 11208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19475:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 11209, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19505:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11201, + "name": "addConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11138, + "src": "19432:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19432:80:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11211, + "nodeType": "ExpressionStatement", + "src": "19432:80:10" + }, + "id": 11212, + "nodeType": "IfStatement", + "src": "19316:196:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11197, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19373:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11198, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19396:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11196, + "name": "addLiquidityPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11096, + "src": "19356:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19356:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11200, + "nodeType": "ExpressionStatement", + "src": "19356:47:10" + } + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11224, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11167, + "src": "19641:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11227, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19691:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 11225, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11163, + "src": "19664:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "19664:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 11228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19664:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11229, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11175, + "src": "19695:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11223, + "name": "addConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11138, + "src": "19621:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19621:81:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11231, + "nodeType": "ExpressionStatement", + "src": "19621:81:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11217, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19580:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 11218, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11183, + "src": "19584:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19580:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11232, + "initializationExpression": { + "assignments": [ + 11214 + ], + "declarations": [ + { + "constant": false, + "id": 11214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11232, + "src": "19565:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19565:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11216, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19577:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "19565:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "19603:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11214, + "src": "19603:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11222, + "nodeType": "ExpressionStatement", + "src": "19603:3:10" + }, + "nodeType": "ForStatement", + "src": "19560:142:10" + } + ] + }, + "documentation": null, + "id": 11234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addConverterInternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11163, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11234, + "src": "18930:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11162, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "18930:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18929:23:10" + }, + "returnParameters": { + "id": 11165, + "nodeType": "ParameterList", + "parameters": [], + "src": "18961:0:10" + }, + "scope": 11667, + "src": "18900:810:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11306, + "nodeType": "Block", + "src": "19782:767:10", + "statements": [ + { + "assignments": [ + 11240 + ], + "declarations": [ + { + "constant": false, + "id": 11240, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19793:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11239, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "19793:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11246, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11243, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "19873:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11242, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "19863:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19863:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11241, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "19840:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19840:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19793:105:10" + }, + { + "assignments": [ + 11248 + ], + "declarations": [ + { + "constant": false, + "id": 11248, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19909:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11247, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "19909:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11254, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11250, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "19946:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11249, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "19935:10:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 11251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19935:22:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "19935:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 11253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19935:30:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19909:56:10" + }, + { + "assignments": [ + 11256 + ], + "declarations": [ + { + "constant": false, + "id": 11256, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11306, + "src": "19976:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11255, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19976:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11260, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11257, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "20004:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "20004:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20004:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19976:60:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11262, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20102:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11263, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20125:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11261, + "name": "removeAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11077, + "src": "20089:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20089:43:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11265, + "nodeType": "ExpressionStatement", + "src": "20089:43:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11266, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11256, + "src": "20147:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11267, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20167:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "20147:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11275, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20285:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11279, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20328:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20320:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11277, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20320:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20320:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11276, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "20308:11:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 11281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20308:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 11282, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20338:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11274, + "name": "removeConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11161, + "src": "20262:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20262:83:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11284, + "nodeType": "ExpressionStatement", + "src": "20262:83:10" + }, + "id": 11285, + "nodeType": "IfStatement", + "src": "20143:202:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11270, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20203:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "id": 11271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20226:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11269, + "name": "removeLiquidityPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11115, + "src": "20183:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IConverterAnchor)" + } + }, + "id": 11272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20183:50:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11273, + "nodeType": "ExpressionStatement", + "src": "20183:50:10" + } + }, + { + "body": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11297, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11240, + "src": "20480:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11300, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20530:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 11298, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11236, + "src": "20503:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "20503:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 11301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11248, + "src": "20534:6:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11296, + "name": "removeConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11161, + "src": "20457:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverterRegistryData_$13647_$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$returns$__$", + "typeString": "function (contract IConverterRegistryData,contract IERC20Token,contract IConverterAnchor)" + } + }, + "id": 11303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20457:84:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11304, + "nodeType": "ExpressionStatement", + "src": "20457:84:10" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11290, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20416:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 11291, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11256, + "src": "20420:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20416:21:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11305, + "initializationExpression": { + "assignments": [ + 11287 + ], + "declarations": [ + { + "constant": false, + "id": 11287, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11305, + "src": "20401:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20401:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11289, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11288, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20413:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20401:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20439:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11287, + "src": "20439:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11295, + "nodeType": "ExpressionStatement", + "src": "20439:3:10" + }, + "nodeType": "ForStatement", + "src": "20396:145:10" + } + ] + }, + "documentation": null, + "id": 11307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeConverterInternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11236, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11307, + "src": "19751:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11235, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "19751:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19750:23:10" + }, + "returnParameters": { + "id": 11238, + "nodeType": "ParameterList", + "parameters": [], + "src": "19782:0:10" + }, + "scope": 11667, + "src": "19718:831:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11379, + "nodeType": "Block", + "src": "20672:819:10", + "statements": [ + { + "assignments": [ + 11317 + ], + "declarations": [ + { + "constant": false, + "id": 11317, + "mutability": "mutable", + "name": "converterRegistryData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20683:44:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + }, + "typeName": { + "contractScope": null, + "id": 11316, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "20683:22:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11323, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11320, + "name": "CONVERTER_REGISTRY_DATA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21548, + "src": "20763:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11319, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "20753:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 11321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20753:34:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11318, + "name": "IConverterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13647, + "src": "20730:22:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterRegistryData_$13647_$", + "typeString": "type(contract IConverterRegistryData)" + } + }, + "id": 11322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20730:58:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20683:105:10" + }, + { + "assignments": [ + 11325 + ], + "declarations": [ + { + "constant": false, + "id": 11325, + "mutability": "mutable", + "name": "minAnchorCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20799:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20799:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11328, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "20881:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11330, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20896:1:10", + "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": "20881:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11326, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "20824:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "20824:56:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 11331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20799:100:10" + }, + { + "assignments": [ + 11334 + ], + "declarations": [ + { + "constant": false, + "id": 11334, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11379, + "src": "20910:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20910:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11336, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20926:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20910:17:10" + }, + { + "body": { + "id": 11370, + "nodeType": "Block", + "src": "21078:311:10", + "statements": [ + { + "assignments": [ + 11349 + ], + "declarations": [ + { + "constant": false, + "id": 11349, + "mutability": "mutable", + "name": "convertibleTokenAnchorCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11370, + "src": "21093:35:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21093:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11356, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11352, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21188:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11354, + "indexExpression": { + "argumentTypes": null, + "id": 11353, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21203:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21188:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11350, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "21131:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13620, + "src": "21131:56:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 11355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21131:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21093:113:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11357, + "name": "minAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11325, + "src": "21225:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 11358, + "name": "convertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11349, + "src": "21242:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21225:44:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11369, + "nodeType": "IfStatement", + "src": "21221:157:10", + "trueBody": { + "id": 11368, + "nodeType": "Block", + "src": "21271:107:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 11362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 11360, + "name": "minAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11325, + "src": "21290:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11361, + "name": "convertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11349, + "src": "21307:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21290:44:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11363, + "nodeType": "ExpressionStatement", + "src": "21290:44:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 11366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 11364, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11334, + "src": "21353:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11365, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21361:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21353:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11367, + "nodeType": "ExpressionStatement", + "src": "21353:9:10" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11341, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21046:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11342, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21050:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21050:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21046:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11371, + "initializationExpression": { + "assignments": [ + 11338 + ], + "declarations": [ + { + "constant": false, + "id": 11338, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11371, + "src": "21031:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21031:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11340, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 11339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21043:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "21031:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21073:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11345, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11338, + "src": "21073:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11347, + "nodeType": "ExpressionStatement", + "src": "21073:3:10" + }, + "nodeType": "ForStatement", + "src": "21026:363:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11374, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11310, + "src": "21461:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11376, + "indexExpression": { + "argumentTypes": null, + "id": 11375, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11334, + "src": "21476:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21461:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11372, + "name": "converterRegistryData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11317, + "src": "21408:21:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConvertibleTokenSmartTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13628, + "src": "21408:52:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 11377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21408:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11315, + "id": 11378, + "nodeType": "Return", + "src": "21401:82:10" + } + ] + }, + "documentation": null, + "id": 11380, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLeastFrequentTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11310, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11380, + "src": "20595:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11308, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20595:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11309, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20595:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20594:37:10" + }, + "returnParameters": { + "id": 11315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11314, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11380, + "src": "20654:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11312, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20654:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11313, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20654:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20653:18:10" + }, + "scope": 11667, + "src": "20557:934:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11445, + "nodeType": "Block", + "src": "21673:484:10", + "statements": [ + { + "assignments": [ + 11396 + ], + "declarations": [ + { + "constant": false, + "id": 11396, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11445, + "src": "21684:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11395, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21684:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11400, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 11397, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "21712:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "21712:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 11399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21712:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21684:60:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 11406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11401, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11384, + "src": "21761:5:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11403, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "21787:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 11404, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11396, + "src": "21799:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11402, + "name": "getConverterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11520, + "src": "21770:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_uint256_$returns$_t_uint16_$", + "typeString": "function (contract IConverter,uint256) view returns (uint16)" + } + }, + "id": 11405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21770:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "21761:56:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11409, + "nodeType": "IfStatement", + "src": "21757:87:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21839:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11408, + "nodeType": "Return", + "src": "21832:12:10" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11410, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "21861:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21861:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 11412, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11396, + "src": "21886:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21861:42:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11416, + "nodeType": "IfStatement", + "src": "21857:73:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21925:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11415, + "nodeType": "Return", + "src": "21918:12:10" + } + }, + { + "body": { + "id": 11441, + "nodeType": "Block", + "src": "21995:131:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 11437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11428, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11390, + "src": "22014:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + }, + "id": 11430, + "indexExpression": { + "argumentTypes": null, + "id": 11429, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "22030:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22014:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11432, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11382, + "src": "22053:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 11433, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "22065:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11435, + "indexExpression": { + "argumentTypes": null, + "id": 11434, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "22080:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22065:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11431, + "name": "getReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11465, + "src": "22036:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_uint32_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (uint32)" + } + }, + "id": 11436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22036:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "22014:69:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11440, + "nodeType": "IfStatement", + "src": "22010:104:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 11438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22109:5:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 11394, + "id": 11439, + "nodeType": "Return", + "src": "22102:12:10" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11421, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "21963:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11422, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11387, + "src": "21967:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21967:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21963:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 11442, + "initializationExpression": { + "assignments": [ + 11418 + ], + "declarations": [ + { + "constant": false, + "id": 11418, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11442, + "src": "21948:9:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21948:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11420, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 11419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21960:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "21948:13:10" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 11426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21990:3:10", + "subExpression": { + "argumentTypes": null, + "id": 11425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11418, + "src": "21990:1:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11427, + "nodeType": "ExpressionStatement", + "src": "21990:3:10" + }, + "nodeType": "ForStatement", + "src": "21943:183:10" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 11443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22145:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 11394, + "id": 11444, + "nodeType": "Return", + "src": "22138:11:10" + } + ] + }, + "documentation": null, + "id": 11446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConverterReserveConfigEqual", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11382, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21538:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11381, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "21538:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11384, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21561:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 11383, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "21561:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11387, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21575:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11385, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "21575:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11386, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21575:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11390, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21612:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 11388, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "21612:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 11389, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21612:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21537:107:10" + }, + "returnParameters": { + "id": 11394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11393, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11446, + "src": "21667:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11392, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "21667:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21666:6:10" + }, + "scope": 11667, + "src": "21499:658:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11464, + "nodeType": "Block", + "src": "22400:102:10", + "statements": [ + { + "assignments": [ + null, + 11456, + null, + null, + null + ], + "declarations": [ + null, + { + "constant": false, + "id": 11456, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11464, + "src": "22414:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11455, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22414:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + null, + null, + null + ], + "id": 11461, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11459, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11450, + "src": "22456:13:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 11457, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11448, + "src": "22434:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "22434:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 11460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22434:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22411:59:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 11462, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11456, + "src": "22488:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "functionReturnParameters": 11454, + "id": 11463, + "nodeType": "Return", + "src": "22481:13:10" + } + ] + }, + "documentation": null, + "id": 11465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11448, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22320:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11447, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "22320:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11450, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22343:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11449, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22343:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22319:50:10" + }, + "returnParameters": { + "id": 11454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11453, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11465, + "src": "22392:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 11452, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "22392:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22391:8:10" + }, + "scope": 11667, + "src": "22294:208:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 11473, + "mutability": "constant", + "name": "CONVERTER_TYPE_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11667, + "src": "22510:91:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 11466, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "22510:6:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "636f6e766572746572547970652829", + "id": 11470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22582:17:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e8ff43f1cd1bc4d06a757749a6e6e9fd9d44e027b0f9466e12cafa4eda5c2dd", + "typeString": "literal_string \"converterType()\"" + }, + "value": "converterType()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_3e8ff43f1cd1bc4d06a757749a6e6e9fd9d44e027b0f9466e12cafa4eda5c2dd", + "typeString": "literal_string \"converterType()\"" + } + ], + "id": 11469, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "22572:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 11471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22572:28:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 11468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22565:6:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 11467, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "22565:6:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11472, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22565:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 11519, + "nodeType": "Block", + "src": "22843:297:10", + "statements": [ + { + "assignments": [ + 11483, + 11485 + ], + "declarations": [ + { + "constant": false, + "id": 11483, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11519, + "src": "22855:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11482, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "22855:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11485, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11519, + "src": "22869:23:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 11484, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "22869:5:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11496, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11493, + "name": "CONVERTER_TYPE_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11473, + "src": "22950:28:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 11491, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "22927:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 11492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22927:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 11494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22927:52:10", + "tryCall": false, + "typeDescriptions": { + "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": 11488, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11475, + "src": "22904:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 11487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22896:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11486, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22896:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22896:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 11490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22896:30:10", + "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": 11495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22896:84:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22854:126:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 11502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11497, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11483, + "src": "22995:7:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11498, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11485, + "src": "23006:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 11499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23006:17:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 11500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23027:2:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "23006:23:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22995:34:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11511, + "nodeType": "IfStatement", + "src": "22991:93:10", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11505, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11485, + "src": "23063:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 11507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23076:6:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + }, + "typeName": { + "id": 11506, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "23076:6:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 11508, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "23075:8:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint16_$", + "typeString": "type(uint16)" + } + ], + "expression": { + "argumentTypes": null, + "id": 11503, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "23052:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 11504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23052:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 11509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23052:32:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 11481, + "id": 11510, + "nodeType": "Return", + "src": "23045:39:10" + } + }, + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 11512, + "name": "_reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11477, + "src": "23102:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23123:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "23102:22:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23131:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 11517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "23102:30:10", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23127:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 11481, + "id": 11518, + "nodeType": "Return", + "src": "23095:37:10" + } + ] + }, + "documentation": null, + "id": 11520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11475, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22762:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 11474, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "22762:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11477, + "mutability": "mutable", + "name": "_reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22785:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22785:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22761:51:10" + }, + "returnParameters": { + "id": 11481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11520, + "src": "22835:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 11479, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "22835:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22834:8:10" + }, + "scope": 11667, + "src": "22736:404:10", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 11529, + "nodeType": "Block", + "src": "23296:42:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 11526, + "name": "getAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10514, + "src": "23314:14:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 11527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23314:16:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11525, + "id": 11528, + "nodeType": "Return", + "src": "23307:23:10" + } + ] + }, + "documentation": { + "id": 11521, + "nodeType": "StructuredDocumentation", + "src": "23148:82:10", + "text": " @dev deprecated, backward compatibility, use `getAnchorCount`" + }, + "functionSelector": "e571049b", + "id": 11530, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11522, + "nodeType": "ParameterList", + "parameters": [], + "src": "23263:2:10" + }, + "returnParameters": { + "id": 11525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11524, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11530, + "src": "23287:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23287:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23286:9:10" + }, + "scope": 11667, + "src": "23236:102:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11540, + "nodeType": "Block", + "src": "23495:38:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 11537, + "name": "getAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10531, + "src": "23513:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function () view returns (address[] memory)" + } + }, + "id": 11538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23513:12:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11536, + "id": 11539, + "nodeType": "Return", + "src": "23506:19:10" + } + ] + }, + "documentation": { + "id": 11531, + "nodeType": "StructuredDocumentation", + "src": "23346:78:10", + "text": " @dev deprecated, backward compatibility, use `getAnchors`" + }, + "functionSelector": "04ceaf41", + "id": 11541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11532, + "nodeType": "ParameterList", + "parameters": [], + "src": "23453:2:10" + }, + "returnParameters": { + "id": 11536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11535, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11541, + "src": "23477:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23477:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11534, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23477:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23476:18:10" + }, + "scope": 11667, + "src": "23430:103:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11553, + "nodeType": "Block", + "src": "23702:43:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11550, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11544, + "src": "23730:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11549, + "name": "getAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10550, + "src": "23720:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint256) view returns (contract IConverterAnchor)" + } + }, + "id": 11551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23720:17:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11548, + "id": 11552, + "nodeType": "Return", + "src": "23713:24:10" + } + ] + }, + "documentation": { + "id": 11542, + "nodeType": "StructuredDocumentation", + "src": "23541:77:10", + "text": " @dev deprecated, backward compatibility, use `getAnchor`" + }, + "functionSelector": "a109d214", + "id": 11554, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11544, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11554, + "src": "23647:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23647:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23646:16:10" + }, + "returnParameters": { + "id": 11548, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11547, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11554, + "src": "23684:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11546, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "23684:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23683:18:10" + }, + "scope": 11667, + "src": "23624:121:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11566, + "nodeType": "Block", + "src": "23900:42:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11563, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11557, + "src": "23927:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11562, + "name": "isAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10569, + "src": "23918:8:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 11564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23918:16:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11561, + "id": 11565, + "nodeType": "Return", + "src": "23911:23:10" + } + ] + }, + "documentation": { + "id": 11555, + "nodeType": "StructuredDocumentation", + "src": "23753:76:10", + "text": " @dev deprecated, backward compatibility, use `isAnchor`" + }, + "functionSelector": "4123ef60", + "id": 11567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11557, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11567, + "src": "23857:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11556, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23857:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23856:16:10" + }, + "returnParameters": { + "id": 11561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11560, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11567, + "src": "23894:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11559, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23894:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23893:6:10" + }, + "scope": 11667, + "src": "23835:107:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11579, + "nodeType": "Block", + "src": "24159:75:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11576, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11570, + "src": "24208:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11575, + "name": "getConvertibleTokenAnchorCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10730, + "src": "24177:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 11577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24177:49:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11574, + "id": 11578, + "nodeType": "Return", + "src": "24170:56:10" + } + ] + }, + "documentation": { + "id": 11568, + "nodeType": "StructuredDocumentation", + "src": "23950:98:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`" + }, + "functionSelector": "a43d5e94", + "id": 11580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11570, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11580, + "src": "24098:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11569, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24098:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24097:31:10" + }, + "returnParameters": { + "id": 11574, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11573, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11580, + "src": "24150:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11572, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24150:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24149:9:10" + }, + "scope": 11667, + "src": "24054:180:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11593, + "nodeType": "Block", + "src": "24452:71:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11590, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11583, + "src": "24497:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11589, + "name": "getConvertibleTokenAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10750, + "src": "24470:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token) view returns (address[] memory)" + } + }, + "id": 11591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24470:45:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 11588, + "id": 11592, + "nodeType": "Return", + "src": "24463:52:10" + } + ] + }, + "documentation": { + "id": 11581, + "nodeType": "StructuredDocumentation", + "src": "24242:94:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchors`" + }, + "functionSelector": "f4fb86c0", + "id": 11594, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11583, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11594, + "src": "24382:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11582, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24382:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24381:31:10" + }, + "returnParameters": { + "id": 11588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11587, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11594, + "src": "24434:16:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11585, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24434:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11586, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24434:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24433:18:10" + }, + "scope": 11667, + "src": "24342:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11609, + "nodeType": "Block", + "src": "24755:78:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11605, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11597, + "src": "24799:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11606, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11599, + "src": "24818:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 11604, + "name": "getConvertibleTokenAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10772, + "src": "24773:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (contract IERC20Token,uint256) view returns (contract IConverterAnchor)" + } + }, + "id": 11607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24773:52:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11603, + "id": 11608, + "nodeType": "Return", + "src": "24766:59:10" + } + ] + }, + "documentation": { + "id": 11595, + "nodeType": "StructuredDocumentation", + "src": "24531:93:10", + "text": " @dev deprecated, backward compatibility, use `getConvertibleTokenAnchor`" + }, + "functionSelector": "d6c4b5b2", + "id": 11610, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11597, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24669:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11596, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24669:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11599, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24700:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11598, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24700:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24668:47:10" + }, + "returnParameters": { + "id": 11603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11602, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11610, + "src": "24737:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11601, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24737:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24736:18:10" + }, + "scope": 11667, + "src": "24630:203:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11625, + "nodeType": "Block", + "src": "25051:77:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11621, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11613, + "src": "25094:17:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 11622, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11615, + "src": "25113:6:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11620, + "name": "isConvertibleTokenAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10794, + "src": "25069:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_address_$returns$_t_bool_$", + "typeString": "function (contract IERC20Token,address) view returns (bool)" + } + }, + "id": 11623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25069:51:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11619, + "id": 11624, + "nodeType": "Return", + "src": "25062:58:10" + } + ] + }, + "documentation": { + "id": 11611, + "nodeType": "StructuredDocumentation", + "src": "24841:92:10", + "text": " @dev deprecated, backward compatibility, use `isConvertibleTokenAnchor`" + }, + "functionSelector": "725b8786", + "id": 11626, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11613, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "24977:29:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11612, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24977:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11615, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "25008:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11614, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25008:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24976:47:10" + }, + "returnParameters": { + "id": 11619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11618, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11626, + "src": "25045:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11617, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "25045:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25044:6:10" + }, + "scope": 11667, + "src": "24939:189:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11640, + "nodeType": "Block", + "src": "25341:62:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11637, + "name": "_smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11630, + "src": "25382:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "id": 11636, + "name": "getConvertersByAnchors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10847, + "src": "25359:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr_$", + "typeString": "function (address[] memory) view returns (contract IConverter[] memory)" + } + }, + "id": 11638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25359:36:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[] memory" + } + }, + "functionReturnParameters": 11635, + "id": 11639, + "nodeType": "Return", + "src": "25352:43:10" + } + ] + }, + "documentation": { + "id": 11627, + "nodeType": "StructuredDocumentation", + "src": "25136:90:10", + "text": " @dev deprecated, backward compatibility, use `getConvertersByAnchors`" + }, + "functionSelector": "1f8e2620", + "id": 11641, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertersBySmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11630, + "mutability": "mutable", + "name": "_smartTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11641, + "src": "25268:29:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11628, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25268:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11629, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25268:9:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25267:31:10" + }, + "returnParameters": { + "id": 11635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11634, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11641, + "src": "25320:19:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_memory_ptr", + "typeString": "contract IConverter[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11632, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "25320:10:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 11633, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25320:12:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IConverter_$13340_$dyn_storage_ptr", + "typeString": "contract IConverter[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25319:21:10" + }, + "scope": 11667, + "src": "25232:171:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 11665, + "nodeType": "Block", + "src": "25659:118:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11654, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11645, + "src": "25702:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 11655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25702:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25726:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25702:25:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25734:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 11660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "25702:33:10", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25730:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 11661, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11645, + "src": "25737:14:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 11662, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11648, + "src": "25753:15:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "id": 11653, + "name": "getLiquidityPoolByConfig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11031, + "src": "25677:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint16_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,contract IERC20Token[] memory,uint32[] memory) view returns (contract IConverterAnchor)" + } + }, + "id": 11663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25677:92:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11652, + "id": 11664, + "nodeType": "Return", + "src": "25670:99:10" + } + ] + }, + "documentation": { + "id": 11642, + "nodeType": "StructuredDocumentation", + "src": "25411:92:10", + "text": " @dev deprecated, backward compatibility, use `getLiquidityPoolByConfig`" + }, + "functionSelector": "c22b82f0", + "id": 11666, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolByReserveConfig", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11645, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25550:35:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 11643, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "25550:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 11644, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25550:13:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11648, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25587:31:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 11646, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "25587:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 11647, + "length": null, + "nodeType": "ArrayTypeName", + "src": "25587:8:10", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25549:70:10" + }, + "returnParameters": { + "id": 11652, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11651, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11666, + "src": "25641:16:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11650, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "25641:16:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25640:18:10" + }, + "scope": 11667, + "src": "25509:268:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + } + ], + "scope": 11668, + "src": "1414:24366:10" + } + ], + "src": "52:25730:10" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0xCF60ebC445b636a5ab787F9E8BC465A2A3eF8299", + "transactionHash": "0xea7ab1f17fff15b657a861099e05cfd8196aa6f1062785212d159ddfb0bc09be" + }, + "8995": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0xCF60ebC445b636a5ab787F9E8BC465A2A3eF8299", + "transactionHash": "0xea7ab1f17fff15b657a861099e05cfd8196aa6f1062785212d159ddfb0bc09be" + }, + "1604964387852": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0x71ee5585513e4fe9BDc67A3f527675C83a74c37e", + "transactionHash": "0xc7e60288612f1da37cfe45a25e9dde2d9ee5f5aeee58a1e72904f7bb07c7270d" + }, + "1604964469407": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0x8c3a1Ba32764346c643aF8Ad9A440bBDC41758Fe", + "transactionHash": "0x6ed9d2837a8320c7c6dd7255a96eaa3d2b9fc3b5c9dee387a2db43fda48ff9bc" + }, + "1604965528035": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0xEC8e2cC834470B3b7bbE2d1ae69CC0bb26f58EBa", + "transactionHash": "0x01a141adfc530dd82965fb5bea01a2fe668fd85ac421f1fefaff44945217442e" + }, + "1604965645554": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0x3C87F4471592cE5d81943EEdA26c5B5e59D062B9", + "transactionHash": "0xf4223f4e3885a9ca67ad25373e9bbfc92a4af7309198d1e63f2eb5f0b2f69e7e" + }, + "1604965679541": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0xc6ACc7d18d5084498287e247657d95545C10e9e4", + "transactionHash": "0x4a452a729592b9fbf4afacb288c569879a508acc52e0e47973d826f6ba39d890" + }, + "1604965719492": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0x8a62247a070de6c081486797d9C365f3C75526b7", + "transactionHash": "0x958d55e52dcf1d7059ab95aff0ae24649325bc7953e915d990442945fba39651" + }, + "1604965760834": { + "events": { + "0xc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + "0xbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + "0xf2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a5": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + "0x9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced43": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + "0xb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d89": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + "0x59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + "0x88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + "0x2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + } + }, + "links": {}, + "address": "0x5eE7451738f30E78BFa1b800dd2c799994D50930", + "transactionHash": "0x050e9db9f0ac9770f8c36cc490f80910d380962c069ac59ab0b29b1d3636d9e7" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:45.569Z", + "networkType": "ethereum", + "devdoc": { + "details": "The ConverterRegistry maintains a list of all active converters in the Bancor Network. Since converters can be upgraded and thus their address can change, the registry actually keeps converter anchors internally and not the converters themselves. The active converter for each anchor can be easily accessed by querying the anchor's owner. The registry exposes 3 differnet lists that can be accessed and iterated, based on the use-case of the caller: - Anchors - can be used to get all the latest / historical data in the network - Liquidity pools - can be used to get all liquidity pools for funding, liquidation etc. - Convertible tokens - can be used to get all tokens that can be converted in the network (excluding pool tokens), and for each one - all anchors that hold it in their reserves The contract fires events whenever one of the primitives is added to or removed from the registry The contract is upgradable.", + "events": { + "ConverterAnchorAdded(address)": { + "details": "triggered when a converter anchor is added to the registry", + "params": { + "_anchor": "smart token" + } + }, + "ConverterAnchorRemoved(address)": { + "details": "triggered when a converter anchor is removed from the registry", + "params": { + "_anchor": "smart token" + } + }, + "ConvertibleTokenAdded(address,address)": { + "details": "triggered when a convertible token is added to the registry", + "params": { + "_convertibleToken": "convertible token", + "_smartToken": "associated smart token" + } + }, + "ConvertibleTokenRemoved(address,address)": { + "details": "triggered when a convertible token is removed from the registry", + "params": { + "_convertibleToken": "convertible token", + "_smartToken": "associated smart token" + } + }, + "LiquidityPoolAdded(address)": { + "details": "triggered when a liquidity pool is added to the registry", + "params": { + "_liquidityPool": "liquidity pool" + } + }, + "LiquidityPoolRemoved(address)": { + "details": "triggered when a liquidity pool is removed from the registry", + "params": { + "_liquidityPool": "liquidity pool" + } + }, + "SmartTokenAdded(address)": { + "details": "deprecated, backward compatibility, use `ConverterAnchorAdded`" + }, + "SmartTokenRemoved(address)": { + "details": "deprecated, backward compatibility, use `ConverterAnchorRemoved`" + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "addConverter(address)": { + "details": "adds an existing converter to the registry can only be called by the owner", + "params": { + "_converter": "converter" + } + }, + "constructor": { + "details": "initializes a new ConverterRegistry instance", + "params": { + "_registry": "address of a contract registry contract" + } + }, + "getAnchor(uint256)": { + "details": "returns the converter anchor at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "anchor at the given index" + } + }, + "getAnchorCount()": { + "details": "returns the number of converter anchors in the registry", + "returns": { + "_0": "number of anchors" + } + }, + "getAnchors()": { + "details": "returns the list of converter anchors in the registry", + "returns": { + "_0": "list of anchors" + } + }, + "getConvertersByAnchors(address[])": { + "details": "returns a list of converters for a given list of anchors this is a utility function that can be used to reduce the number of calls to the contract", + "params": { + "_anchors": "list of converter anchors" + }, + "returns": { + "_0": "list of converters" + } + }, + "getConvertersBySmartTokens(address[])": { + "details": "deprecated, backward compatibility, use `getConvertersByAnchors`" + }, + "getConvertibleToken(uint256)": { + "details": "returns the convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "convertible token at the given index" + } + }, + "getConvertibleTokenAnchor(address,uint256)": { + "details": "returns the converter anchor associated with a given convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "anchor associated with the given convertible token at the given index" + } + }, + "getConvertibleTokenAnchorCount(address)": { + "details": "returns the number of converter anchors associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "number of anchors associated with the given convertible token" + } + }, + "getConvertibleTokenAnchors(address)": { + "details": "returns the list of aoncerter anchors associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "list of anchors associated with the given convertible token" + } + }, + "getConvertibleTokenCount()": { + "details": "returns the number of convertible tokens in the registry", + "returns": { + "_0": "number of convertible tokens" + } + }, + "getConvertibleTokenSmartToken(address,uint256)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchor`" + }, + "getConvertibleTokenSmartTokenCount(address)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`" + }, + "getConvertibleTokenSmartTokens(address)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchors`" + }, + "getConvertibleTokens()": { + "details": "returns the list of convertible tokens in the registry", + "returns": { + "_0": "list of convertible tokens" + } + }, + "getLiquidityPool(uint256)": { + "details": "returns the liquidity pool at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "liquidity pool at the given index" + } + }, + "getLiquidityPoolByConfig(uint16,address[],uint32[])": { + "details": "searches for a liquidity pool with specific configuration", + "params": { + "_reserveTokens": "reserve tokens", + "_reserveWeights": "reserve weights", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "the liquidity pool, or zero if no such liquidity pool exists" + } + }, + "getLiquidityPoolByReserveConfig(address[],uint32[])": { + "details": "deprecated, backward compatibility, use `getLiquidityPoolByConfig`" + }, + "getLiquidityPoolCount()": { + "details": "returns the number of liquidity pools in the registry", + "returns": { + "_0": "number of liquidity pools" + } + }, + "getLiquidityPools()": { + "details": "returns the list of liquidity pools in the registry", + "returns": { + "_0": "list of liquidity pools" + } + }, + "getSmartToken(uint256)": { + "details": "deprecated, backward compatibility, use `getAnchor`" + }, + "getSmartTokenCount()": { + "details": "deprecated, backward compatibility, use `getAnchorCount`" + }, + "getSmartTokens()": { + "details": "deprecated, backward compatibility, use `getAnchors`" + }, + "isAnchor(address)": { + "details": "checks whether or not a given value is a converter anchor", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is an anchor, false if not" + } + }, + "isConverterValid(address)": { + "details": "checks whether or not a given converter is valid", + "params": { + "_converter": "converter" + }, + "returns": { + "_0": "true if the given converter is valid, false if not" + } + }, + "isConvertibleToken(address)": { + "details": "checks whether or not a given value is a convertible token", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a convertible token, false if not" + } + }, + "isConvertibleTokenAnchor(address,address)": { + "details": "checks whether or not a given value is a converter anchor of a given convertible token", + "params": { + "_convertibleToken": "convertible token", + "_value": "value" + }, + "returns": { + "_0": "true if the given value is an anchor of the given convertible token, false if not" + } + }, + "isConvertibleTokenSmartToken(address,address)": { + "details": "deprecated, backward compatibility, use `isConvertibleTokenAnchor`" + }, + "isLiquidityPool(address)": { + "details": "checks whether or not a given value is a liquidity pool", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a liquidity pool, false if not" + } + }, + "isSimilarLiquidityPoolRegistered(address)": { + "details": "checks if a liquidity pool with given configuration is already registered", + "params": { + "_converter": "converter with specific configuration" + }, + "returns": { + "_0": "if a liquidity pool with the same configuration is already registered" + } + }, + "isSmartToken(address)": { + "details": "deprecated, backward compatibility, use `isAnchor`" + }, + "newConverter(uint16,string,string,uint8,uint32,address[],uint32[])": { + "details": "creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry", + "params": { + "_decimals": "token / pool decimals", + "_maxConversionFee": "maximum conversion-fee", + "_name": "token / pool name", + "_reserveTokens": "reserve tokens", + "_reserveWeights": "reserve weights", + "_symbol": "token / pool symbol", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "new converter" + } + }, + "removeConverter(address)": { + "details": "removes a converter from the registry anyone can remove an existing converter from the registry, as long as the converter is invalid note that the owner can also remove valid converters", + "params": { + "_converter": "converter" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterRegistryData.json b/apps/cic-eth/tests/testdata/bancor/ConverterRegistryData.json new file mode 100644 index 00000000..2ece5943 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterRegistryData.json @@ -0,0 +1,17181 @@ +{ + "contractName": "ConverterRegistryData", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "addSmartToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "removeSmartToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_liquidityPoolAnchor", + "type": "address" + } + ], + "name": "addLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_liquidityPoolAnchor", + "type": "address" + } + ], + "name": "removeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "addConvertibleToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "removeConvertibleToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getLiquidityPoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getLiquidityPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isLiquidityPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getConvertibleTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getConvertibleTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"addConvertibleToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPoolAnchor\",\"type\":\"address\"}],\"name\":\"addLiquidityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"addSmartToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPoolCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isLiquidityPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"removeConvertibleToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPoolAnchor\",\"type\":\"address\"}],\"name\":\"removeLiquidityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"removeSmartToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The ConverterRegistryData contract is an integral part of the converter registry as it serves as the database contract that holds all registry data. The registry is separated into two different contracts for upgradability - the data contract is harder to upgrade as it requires migrating all registry data into a new contract, while the registry contract itself can be easily upgraded. For that same reason, the data contract is simple and contains no logic beyond the basic data access utilities that it exposes.\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addConvertibleToken(address,address)\":{\"details\":\"adds a convertible token\",\"params\":{\"_anchor\":\"associated smart token\",\"_convertibleToken\":\"convertible token\"}},\"addLiquidityPool(address)\":{\"details\":\"adds a liquidity pool\",\"params\":{\"_liquidityPoolAnchor\":\"liquidity pool\"}},\"addSmartToken(address)\":{\"details\":\"adds a smart token\",\"params\":{\"_anchor\":\"smart token\"}},\"constructor\":{\"details\":\"initializes a new ConverterRegistryData instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"getConvertibleToken(uint256)\":{\"details\":\"returns the convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"convertible token at the given index\"}},\"getConvertibleTokenCount()\":{\"details\":\"returns the number of convertible tokens\",\"returns\":{\"_0\":\"number of convertible tokens\"}},\"getConvertibleTokenSmartToken(address,uint256)\":{\"details\":\"returns the smart token associated with a given convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"smart token associated with the given convertible token at the given index\"}},\"getConvertibleTokenSmartTokenCount(address)\":{\"details\":\"returns the number of smart tokens associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"number of smart tokens associated with the given convertible token\"}},\"getConvertibleTokenSmartTokens(address)\":{\"details\":\"returns the list of smart tokens associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"list of smart tokens associated with the given convertible token\"}},\"getConvertibleTokens()\":{\"details\":\"returns the list of convertible tokens\",\"returns\":{\"_0\":\"list of convertible tokens\"}},\"getLiquidityPool(uint256)\":{\"details\":\"returns the liquidity pool at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"liquidity pool at the given index\"}},\"getLiquidityPoolCount()\":{\"details\":\"returns the number of liquidity pools\",\"returns\":{\"_0\":\"number of liquidity pools\"}},\"getLiquidityPools()\":{\"details\":\"returns the list of liquidity pools\",\"returns\":{\"_0\":\"list of liquidity pools\"}},\"getSmartToken(uint256)\":{\"details\":\"returns the smart token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"smart token at the given index\"}},\"getSmartTokenCount()\":{\"details\":\"returns the number of smart tokens\",\"returns\":{\"_0\":\"number of smart tokens\"}},\"getSmartTokens()\":{\"details\":\"returns the list of smart tokens\",\"returns\":{\"_0\":\"list of smart tokens\"}},\"isConvertibleToken(address)\":{\"details\":\"checks whether or not a given value is a convertible token\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a convertible token, false if not\"}},\"isConvertibleTokenSmartToken(address,address)\":{\"details\":\"checks whether or not a given value is a smart token of a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\",\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a smart token of the given convertible token, false it not\"}},\"isLiquidityPool(address)\":{\"details\":\"checks whether or not a given value is a liquidity pool\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a liquidity pool, false if not\"}},\"isSmartToken(address)\":{\"details\":\"checks whether or not a given value is a smart token\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a smart token, false if not\"}},\"removeConvertibleToken(address,address)\":{\"details\":\"removes a convertible token\",\"params\":{\"_anchor\":\"associated smart token\",\"_convertibleToken\":\"convertible token\"}},\"removeLiquidityPool(address)\":{\"details\":\"removes a liquidity pool\",\"params\":{\"_liquidityPoolAnchor\":\"liquidity pool\"}},\"removeSmartToken(address)\":{\"details\":\"removes a smart token\",\"params\":{\"_anchor\":\"smart token\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistryData.sol\":\"ConverterRegistryData\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistryData.sol\":{\"keccak256\":\"0x1cd40757c5d9316221a12e4f2a73593b3d01fd45d719534e2ec5d78f60ac92f0\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ed83c89f0284b0868364f0788434e963f7e98c86ce982ff747882981aff9e31d\",\"dweb:/ipfs/QmVC8zcAfdZ5EG1QNpvvGnm2xMVAzsJjiBhHCJHAumpA8n\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol\":{\"keccak256\":\"0xc2b8e75bf4d69b34f9687d90d8eb31e8462bfcf25565f5ca399151648624c73a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e3825b1ccce31117c984a7605376ec2e6f18b15cdd61e9d5624667332a935dd7\",\"dweb:/ipfs/QmeRHtWU1oZJtL8UxJQMbwmTyMhf8Z3DJz6XubFxbP5xQx\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516113c43803806113c48339818101604052602081101561003357600080fd5b5051600080546001600160a01b03191633179055808061005281610083565b50600280546001600160a01b039092166001600160a01b0319928316811790915560038054909216179055506100e1565b6001600160a01b0381166100de576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b6112d4806100f06000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063d4ee1d90116100a2578063ee6a934c11610071578063ee6a934c14610501578063f2fde38b14610527578063f4fb86c01461054d578063fba8f03114610573576101f0565b8063d4ee1d901461049f578063d6c4b5b2146104a7578063e571049b146104d3578063e85455d7146104db576101f0565b8063a74498aa116100de578063a74498aa1461042e578063ae22107f1461044b578063b4a176d314610471578063ceb9838c14610479576101f0565b80638da5cb5b146103bd5780638de6c3eb146103c5578063a109d214146103eb578063a43d5e9414610408576101f0565b806361cd756e116101875780637a5f0ffd116101565780637a5f0ffd146103885780637b103999146103905780637f45c4c314610398578063865cf194146103a0576101f0565b806361cd756e1461031457806369be478414610338578063725b87861461035257806379ba509714610380576101f0565b80633ab8857c116101c35780633ab8857c146102b85780634123ef60146102de57806349d10b64146103045780635f1b50fe1461030c576101f0565b8063024c7ec7146101f557806304ceaf41146102165780632fe8a6ad1461026e57806336900c111461028a575b600080fd5b6102146004803603602081101561020b57600080fd5b503515156105a1565b005b61021e6105c7565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561025a578181015183820152602001610242565b505050509050019250505060405180910390f35b61027661062c565b604080519115158252519081900360200190f35b610214600480360360408110156102a057600080fd5b506001600160a01b038135811691602001351661063c565b610276600480360360208110156102ce57600080fd5b50356001600160a01b03166106d7565b610276600480360360208110156102f457600080fd5b50356001600160a01b03166106f7565b610214610715565b61021e61091d565b61031c610980565b604080516001600160a01b039092168252519081900360200190f35b61034061098f565b60408051918252519081900360200190f35b6102766004803603604081101561036857600080fd5b506001600160a01b0381358116916020013516610995565b6102146109c7565b610340610a7e565b61031c610a84565b61021e610a93565b61031c600480360360208110156103b657600080fd5b5035610af6565b61031c610b23565b610214600480360360208110156103db57600080fd5b50356001600160a01b0316610b32565b61031c6004803603602081101561040157600080fd5b5035610b59565b6103406004803603602081101561041e57600080fd5b50356001600160a01b0316610b6b565b61031c6004803603602081101561044457600080fd5b5035610b89565b6102146004803603602081101561046157600080fd5b50356001600160a01b0316610b9b565b610214610bbe565b6102146004803603602081101561048f57600080fd5b50356001600160a01b0316610bea565b61031c610c0d565b61031c600480360360408110156104bd57600080fd5b506001600160a01b038135169060200135610c1c565b610340610c5f565b610276600480360360208110156104f157600080fd5b50356001600160a01b0316610c65565b6102146004803603602081101561051757600080fd5b50356001600160a01b0316610c83565b6102146004803603602081101561053d57600080fd5b50356001600160a01b0316610ca6565b61021e6004803603602081101561056357600080fd5b50356001600160a01b0316610d24565b6102146004803603604081101561058957600080fd5b506001600160a01b0381358116916020013516610d9d565b6105a9610ec3565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060600460000180548060200260200160405190810160405280929190818152602001828054801561062257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610604575b5050505050905090565b600354600160a01b900460ff1681565b60008051602061127f83398151915261065481610f18565b6001600160a01b038316600090815260096020526040902060018101546106c457600880548083556001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6106d18160010184610f7d565b50505050565b6001600160a01b0316600090815260096020526040902060010154151590565b6001600160a01b031660009081526005602052604090205460ff1690565b6000546001600160a01b03163314806107385750600354600160a01b900460ff16155b61077d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600061079b6f436f6e7472616374526567697374727960801b611032565b6002549091506001600160a01b038083169116148015906107c457506001600160a01b03811615155b61080c576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516001600160a01b031614156108ed576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b60606008600001805480602002602001604051908101604052809291908181526020018280548015610622576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610604575050505050905090565b6003546001600160a01b031681565b60085490565b6001600160a01b0391821660009081526009602090815260408083209390941682526002909201909152205460ff1690565b6001546001600160a01b03163314610a1a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60065490565b6002546001600160a01b031681565b60606006600001805480602002602001604051908101604052809291908181526020018280548015610622576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610604575050505050905090565b600060086000018281548110610b0857fe5b6000918252602090912001546001600160a01b031692915050565b6000546001600160a01b031681565b60008051602061127f833981519152610b4a81610f18565b610b55600483610f7d565b5050565b600060046000018281548110610b0857fe5b6001600160a01b031660009081526009602052604090206001015490565b600060066000018281548110610b0857fe5b60008051602061127f833981519152610bb381610f18565b610b556006836110b0565b610bc6610ec3565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b60008051602061127f833981519152610c0281610f18565b610b556004836110b0565b6001546001600160a01b031681565b6001600160a01b0382166000908152600960205260408120600101805483908110610c4357fe5b6000918252602090912001546001600160a01b03169392505050565b60045490565b6001600160a01b031660009081526007602052604090205460ff1690565b60008051602061127f833981519152610c9b81610f18565b610b55600683610f7d565b610cae610ec3565b6000546001600160a01b0382811691161415610d02576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116600090815260096020908152604091829020600101805483518184028101840190945280845260609392830182828015610d9157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d73575b50505050509050919050565b60008051602061127f833981519152610db581610f18565b6001600160a01b0383166000908152600960205260409020610dda60018201846110b0565b60018101546106d15760088054600091906000198101908110610df957fe5b600091825260208083209091015484546001600160a01b039091168084526009909252604090922082905560088054919350839290918110610e3757fe5b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556008805480610e6b57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03871682526009905260408120818155906001820181610eb8828261124c565b505050505050505050565b6000546001600160a01b03163314610f16576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b610f2181611032565b6001600160a01b0316336001600160a01b031614610f7a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b50565b80610f87816111fb565b6001600160a01b03821660009081526001840160205260409020805460ff1615610feb576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4954454d60801b604482015290519081900360640190fd5b835460018281018290558082018655600095865260209095200180546001600160a01b0319166001600160a01b03949094169390931790925550805460ff19169091179055565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561107e57600080fd5b505afa158015611092573d6000803e3d6000fd5b505050506040513d60208110156110a857600080fd5b505192915050565b806110ba816111fb565b6001600160a01b03821660009081526001840160205260409020805460ff1661111d576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4954454d60801b604482015290519081900360640190fd5b83546000908590600019810190811061113257fe5b60009182526020808320909101546001858101546001600160a01b039092168085528982019093526040909320909201829055865490925082918791811061117657fe5b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905584548590806111aa57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b039590951681526001958601909452505060408220805460ff191681559092015550565b6001600160a01b038116610f7a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5080546000825590600052602060002090810190610f7a91905b8082111561127a5760008155600101611266565b509056fe42616e636f72436f6e7665727465725265676973747279000000000000000000a26469706673582212204a484f67d4c791ea09d72b50c23bff0b3e627810a6c00a1935a071f3ff88796464736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063d4ee1d90116100a2578063ee6a934c11610071578063ee6a934c14610501578063f2fde38b14610527578063f4fb86c01461054d578063fba8f03114610573576101f0565b8063d4ee1d901461049f578063d6c4b5b2146104a7578063e571049b146104d3578063e85455d7146104db576101f0565b8063a74498aa116100de578063a74498aa1461042e578063ae22107f1461044b578063b4a176d314610471578063ceb9838c14610479576101f0565b80638da5cb5b146103bd5780638de6c3eb146103c5578063a109d214146103eb578063a43d5e9414610408576101f0565b806361cd756e116101875780637a5f0ffd116101565780637a5f0ffd146103885780637b103999146103905780637f45c4c314610398578063865cf194146103a0576101f0565b806361cd756e1461031457806369be478414610338578063725b87861461035257806379ba509714610380576101f0565b80633ab8857c116101c35780633ab8857c146102b85780634123ef60146102de57806349d10b64146103045780635f1b50fe1461030c576101f0565b8063024c7ec7146101f557806304ceaf41146102165780632fe8a6ad1461026e57806336900c111461028a575b600080fd5b6102146004803603602081101561020b57600080fd5b503515156105a1565b005b61021e6105c7565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561025a578181015183820152602001610242565b505050509050019250505060405180910390f35b61027661062c565b604080519115158252519081900360200190f35b610214600480360360408110156102a057600080fd5b506001600160a01b038135811691602001351661063c565b610276600480360360208110156102ce57600080fd5b50356001600160a01b03166106d7565b610276600480360360208110156102f457600080fd5b50356001600160a01b03166106f7565b610214610715565b61021e61091d565b61031c610980565b604080516001600160a01b039092168252519081900360200190f35b61034061098f565b60408051918252519081900360200190f35b6102766004803603604081101561036857600080fd5b506001600160a01b0381358116916020013516610995565b6102146109c7565b610340610a7e565b61031c610a84565b61021e610a93565b61031c600480360360208110156103b657600080fd5b5035610af6565b61031c610b23565b610214600480360360208110156103db57600080fd5b50356001600160a01b0316610b32565b61031c6004803603602081101561040157600080fd5b5035610b59565b6103406004803603602081101561041e57600080fd5b50356001600160a01b0316610b6b565b61031c6004803603602081101561044457600080fd5b5035610b89565b6102146004803603602081101561046157600080fd5b50356001600160a01b0316610b9b565b610214610bbe565b6102146004803603602081101561048f57600080fd5b50356001600160a01b0316610bea565b61031c610c0d565b61031c600480360360408110156104bd57600080fd5b506001600160a01b038135169060200135610c1c565b610340610c5f565b610276600480360360208110156104f157600080fd5b50356001600160a01b0316610c65565b6102146004803603602081101561051757600080fd5b50356001600160a01b0316610c83565b6102146004803603602081101561053d57600080fd5b50356001600160a01b0316610ca6565b61021e6004803603602081101561056357600080fd5b50356001600160a01b0316610d24565b6102146004803603604081101561058957600080fd5b506001600160a01b0381358116916020013516610d9d565b6105a9610ec3565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060600460000180548060200260200160405190810160405280929190818152602001828054801561062257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610604575b5050505050905090565b600354600160a01b900460ff1681565b60008051602061127f83398151915261065481610f18565b6001600160a01b038316600090815260096020526040902060018101546106c457600880548083556001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0386161790555b6106d18160010184610f7d565b50505050565b6001600160a01b0316600090815260096020526040902060010154151590565b6001600160a01b031660009081526005602052604090205460ff1690565b6000546001600160a01b03163314806107385750600354600160a01b900460ff16155b61077d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600061079b6f436f6e7472616374526567697374727960801b611032565b6002549091506001600160a01b038083169116148015906107c457506001600160a01b03811615155b61080c576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b50516001600160a01b031614156108ed576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b60606008600001805480602002602001604051908101604052809291908181526020018280548015610622576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610604575050505050905090565b6003546001600160a01b031681565b60085490565b6001600160a01b0391821660009081526009602090815260408083209390941682526002909201909152205460ff1690565b6001546001600160a01b03163314610a1a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60065490565b6002546001600160a01b031681565b60606006600001805480602002602001604051908101604052809291908181526020018280548015610622576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610604575050505050905090565b600060086000018281548110610b0857fe5b6000918252602090912001546001600160a01b031692915050565b6000546001600160a01b031681565b60008051602061127f833981519152610b4a81610f18565b610b55600483610f7d565b5050565b600060046000018281548110610b0857fe5b6001600160a01b031660009081526009602052604090206001015490565b600060066000018281548110610b0857fe5b60008051602061127f833981519152610bb381610f18565b610b556006836110b0565b610bc6610ec3565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b60008051602061127f833981519152610c0281610f18565b610b556004836110b0565b6001546001600160a01b031681565b6001600160a01b0382166000908152600960205260408120600101805483908110610c4357fe5b6000918252602090912001546001600160a01b03169392505050565b60045490565b6001600160a01b031660009081526007602052604090205460ff1690565b60008051602061127f833981519152610c9b81610f18565b610b55600683610f7d565b610cae610ec3565b6000546001600160a01b0382811691161415610d02576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116600090815260096020908152604091829020600101805483518184028101840190945280845260609392830182828015610d9157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d73575b50505050509050919050565b60008051602061127f833981519152610db581610f18565b6001600160a01b0383166000908152600960205260409020610dda60018201846110b0565b60018101546106d15760088054600091906000198101908110610df957fe5b600091825260208083209091015484546001600160a01b039091168084526009909252604090922082905560088054919350839290918110610e3757fe5b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556008805480610e6b57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03871682526009905260408120818155906001820181610eb8828261124c565b505050505050505050565b6000546001600160a01b03163314610f16576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b610f2181611032565b6001600160a01b0316336001600160a01b031614610f7a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b50565b80610f87816111fb565b6001600160a01b03821660009081526001840160205260409020805460ff1615610feb576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4954454d60801b604482015290519081900360640190fd5b835460018281018290558082018655600095865260209095200180546001600160a01b0319166001600160a01b03949094169390931790925550805460ff19169091179055565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561107e57600080fd5b505afa158015611092573d6000803e3d6000fd5b505050506040513d60208110156110a857600080fd5b505192915050565b806110ba816111fb565b6001600160a01b03821660009081526001840160205260409020805460ff1661111d576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4954454d60801b604482015290519081900360640190fd5b83546000908590600019810190811061113257fe5b60009182526020808320909101546001858101546001600160a01b039092168085528982019093526040909320909201829055865490925082918791811061117657fe5b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905584548590806111aa57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b039590951681526001958601909452505060408220805460ff191681559092015550565b6001600160a01b038116610f7a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5080546000825590600052602060002090810190610f7a91905b8082111561127a5760008155600101611266565b509056fe42616e636f72436f6e7665727465725265676973747279000000000000000000a26469706673582212204a484f67d4c791ea09d72b50c23bff0b3e627810a6c00a1935a071f3ff88796464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "752:10050:11:-:0;;;1441:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1441:90:11;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;1441:90:11;;594:23:64;1441:90:11;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;752:10050:11;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;752:10050:11:-;;;;;;;", + "deployedSourceMap": "752:10050:11:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;4556:119:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1333:38:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;2847:452:11;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2847:452:11;;;;;;;;;;:::i;7605:162::-;;;;;;;;;;;;;;;;-1:-1:-1;7605:162:11;-1:-1:-1;;;;;7605:162:11;;:::i;5201:133::-;;;;;;;;;;;;;;;;-1:-1:-1;5201:133:11;-1:-1:-1;;;;;5201:133:11;;:::i;2300:925:56:-;;;:::i;6922:131:11:-;;;:::i;1243:37:56:-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;6658:133:11;;;:::i;:::-;;;;;;;;;;;;;;;;9524:226;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9524:226:11;;;;;;;;;;:::i;1422:217:57:-;;;:::i;5463:127:11:-;;;:::i;1154:33:56:-;;;:::i;5715:125:11:-;;;:::i;7231:160::-;;;;;;;;;;;;;;;;-1:-1:-1;7231:160:11;;:::i;219:29:57:-;;;:::i;1634:149:11:-;;;;;;;;;;;;;;;;-1:-1:-1;1634:149:11;-1:-1:-1;;;;;1634:149:11;;:::i;4841:158::-;;;;;;;;;;;;;;;;-1:-1:-1;4841:158:11;;:::i;8028:212::-;;;;;;;;;;;;;;;;-1:-1:-1;8028:212:11;-1:-1:-1;;;;;8028:212:11;;:::i;6012:164::-;;;;;;;;;;;;;;;;-1:-1:-1;6012:164:11;;:::i;2472:187::-;;;;;;;;;;;;;;;;-1:-1:-1;2472:187:11;-1:-1:-1;;;;;2472:187:11;;:::i;3304:137:56:-;;;:::i;1889:155:11:-;;;;;;;;;;;;;;;;-1:-1:-1;1889:155:11;-1:-1:-1;;;;;1889:155:11;;:::i;255:23:57:-;;;:::i;8959:251:11:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8959:251:11;;;;;;;;:::i;4316:121::-;;;:::i;6384:139::-;;;;;;;;;;;;;;;;-1:-1:-1;6384:139:11;-1:-1:-1;;;;;6384:139:11;;:::i;2166:181::-;;;;;;;;;;;;;;;;-1:-1:-1;2166:181:11;-1:-1:-1;;;;;2166:181:11;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;8497:210:11:-;;;;;;;;;;;;;;;;-1:-1:-1;8497:210:11;-1:-1:-1;;;;;8497:210:11;;:::i;3490:703::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3490:703:11;;;;;;;;;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;4556:119:11:-;4614:16;4650:11;:17;;4643:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4643:24:11;;;;;;;;;;;;;;;;;;;;;;;4556:119;:::o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2847:452:11:-;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;-1:-1:-1;;;;;3007:51:11;::::1;2987:17;3007:51:::0;;;:23;:51:::1;::::0;;;;:23:::1;3073:10:::0;::::1;:23:::0;3069:175:::1;;3131:17;:30:::0;;3118:43;;;3176:56:::1;::::0;::::1;::::0;;-1:-1:-1;3176:56:11;;;;;::::1;::::0;;-1:-1:-1;;;;;;3176:56:11::1;-1:-1:-1::0;;;;;3176:56:11;::::1;;::::0;;3069:175:::1;3254:37;3262:4;:10;;3282:7;3254;:37::i;:::-;1658:1:56;2847:452:11::0;;;:::o;7605:162::-;-1:-1:-1;;;;;7705:31:11;7681:4;7705:31;;;:23;:31;;;;;:23;:37;:50;:54;;;7605:162::o;5201:133::-;-1:-1:-1;;;;;5295:25:11;5271:4;5295:25;;;:17;:25;;;;;:31;;;;5201:133::o;2300:925:56:-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;6922:131:11:-;6986:16;7022:17;:23;;7015:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7015:30:11;;;;;;;;;;;;;;;;;;;;;;6922:131;:::o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;6658:133:11:-;6753:17;:30;6658:133;:::o;9524:226::-;-1:-1:-1;;;;;9665:51:11;;;9641:4;9665:51;;;:23;:51;;;;;;;;:71;;;;;;:63;;;;:71;;;;:77;;;;9524:226::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;5463:127:11:-;5555:14;:27;5463:127;:::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;5715:125:11:-;5776:16;5812:14;:20;;5805:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5805:27:11;;;;;;;;;;;;;;;;;;;;;;5715:125;:::o;7231:160::-;7308:11;7351:17;:23;;7375:6;7351:31;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7351:31:11;;7231:160;-1:-1:-1;;7231:160:11:o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;1634:149:11:-;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;1737:38:11::1;1745:11;1766:7;1737;:38::i;:::-;1634:149:::0;;:::o;4841:158::-;4912:16;4965:11;:17;;4983:6;4965:25;;;;;;;8028:212;-1:-1:-1;;;;;8162:51:11;8135:7;8162:51;;;:23;:51;;;;;:23;:57;:70;;8028:212::o;6012:164::-;6086:16;6139:14;:20;;6160:6;6139:28;;;;;;;2472:187;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;2594:57:11::1;2605:14;2629:20;2594:10;:57::i;3304:137:56:-:0;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;1889:155:11:-;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;1995:41:11::1;2006:11;2027:7;1995:10;:41::i;255:23:57:-:0;;;-1:-1:-1;;;;;255:23:57;;:::o;8959:251:11:-;-1:-1:-1;;;;;9130:51:11;;9077:16;9130:51;;;:23;:51;;;;;:23;:57;:71;;9194:6;;9130:71;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9130:71:11;;8959:251;-1:-1:-1;;;8959:251:11:o;4316:121::-;4405:11;:24;4316:121;:::o;6384:139::-;-1:-1:-1;;;;;6481:28:11;6457:4;6481:28;;;:20;:28;;;;;:34;;;;6384:139::o;2166:181::-;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;2285:54:11::1;2293:14;2317:20;2285:7;:54::i;1164:167:57:-:0;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;8497:210:11:-;-1:-1:-1;;;;;8636:51:11;;;;;;:23;:51;;;;;;;;;:23;:57;8629:70;;;;;;;;;;;;;;;;;8600:16;;8629:70;;;8636:57;8629:70;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8629:70:11;;;;;;;;;;;;;;;;;;;;;;;8497:210;;;:::o;3490:703::-;-1:-1:-1;;;;;;;;;;;1627:20:56;1633:13;1627:5;:20::i;:::-;-1:-1:-1;;;;;3653:51:11;::::1;3633:17;3653:51:::0;;;:23;:51:::1;::::0;;;;3715:40:::1;3653:23;3726:10:::0;::::1;3746:7:::0;3715:10:::1;:40::i;:::-;3770:10;::::0;::::1;:23:::0;3766:420:::1;;3846:17;3870:30:::0;;3815:28:::1;::::0;3846:17;-1:-1:-1;;3870:34:11;;;3846:59;::::1;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;3974:10;;-1:-1:-1;;;;;3846:59:11;;::::1;3920:45:::0;;;:23;:45;;;;;;;:64;;;:17:::1;3999:35:::0;;3846:59;;-1:-1:-1;3846:59:11;;3920:17;;3999:35;::::1;;;;;;::::0;;;::::1;::::0;;;::::1;:58:::0;;-1:-1:-1;;;;;;3999:58:11::1;-1:-1:-1::0;;;;;3999:58:11;;;::::1;::::0;;;::::1;::::0;;4072:17:::1;:29:::0;;;::::1;;;;;::::0;;;::::1;::::0;;;;;-1:-1:-1;;4072:29:11;;;;;-1:-1:-1;;;;;;4072:29:11::1;::::0;;;;;;;;-1:-1:-1;;;;;4123:51:11;::::1;::::0;;:23;:51;;;;;4116:58;;;4123:51;4072:29:::1;4116:58:::0;::::1;4072:29:::0;4116:58:::1;::::0;4072:29;4116:58:::1;:::i;:::-;;;;;3766:420;1658:1:56;3490:703:11::0;;;:::o;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;1722:139:56:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:56;:10;-1:-1:-1;;;;;1793:38:56;;1785:68;;;;;-1:-1:-1;;;1785:68:56;;;;;;;;;;;;-1:-1:-1;;;1785:68:56;;;;;;;;;;;;;;;1722:139;:::o;9903:304:11:-;9980:6;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1;;;;;10019:20:11;::::1;9999:17;10019:20:::0;;;:12:::1;::::0;::::1;:20;::::0;;;;10059:10;;::::1;;10058:11;10050:40;;;::::0;;-1:-1:-1;;;10050:40:11;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;10050:40:11;;;;;;;;;;;;;::::1;;10116:19:::0;;10103:10:::1;::::0;;::::1;:32:::0;;;10146:25;;::::1;::::0;;-1:-1:-1;10146:25:11;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;;;;10146:25:11::1;-1:-1:-1::0;;;;;10146:25:11;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;10182:17:11;;-1:-1:-1;;10182:17:11::1;::::0;;::::1;::::0;;9903:304::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o;10365:434:11:-;10445:6;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1;;;;;10484:20:11;::::1;10464:17;10484:20:::0;;;:12:::1;::::0;::::1;:20;::::0;;;;10523:10;;::::1;;10515:39;;;::::0;;-1:-1:-1;;;10515:39:11;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;10515:39:11;;;;;;;;;;;;;::::1;;10600:19:::0;;10567:17:::1;::::0;10587:6;;-1:-1:-1;;10600:23:11;;;10587:37;::::1;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;;10667:10;;::::1;::::0;-1:-1:-1;;;;;10587:37:11;;::::1;10635:23:::0;;;:12;;::::1;:23:::0;;;;;;;:29;;::::1;:42:::0;;;10688:24;;10587:37;;-1:-1:-1;10587:37:11;;10635:6;;10688:24;::::1;;;;;;::::0;;;::::1;::::0;;;::::1;:36:::0;;-1:-1:-1;;;;;;10688:36:11::1;-1:-1:-1::0;;;;;10688:36:11;;;::::1;::::0;;;::::1;::::0;;10735:18;;;;;::::1;;;;;::::0;;;::::1;::::0;;;;;-1:-1:-1;;10735:18:11;;;;;-1:-1:-1;;;;;;10735:18:11::1;::::0;;;;;;;;-1:-1:-1;;;;;10771:20:11;;;::::1;::::0;;10735:18:::1;10771:12:::0;;::::1;:20:::0;;;-1:-1:-1;;10771:20:11;;;10764:27;;-1:-1:-1;;10764:27:11::1;::::0;;;;::::1;::::0;-1:-1:-1;10365:434:11:o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"./interfaces/IConverterRegistryData.sol\";\r\n\r\n/**\r\n * @dev The ConverterRegistryData contract is an integral part of the converter registry\r\n * as it serves as the database contract that holds all registry data.\r\n *\r\n * The registry is separated into two different contracts for upgradability - the data contract\r\n * is harder to upgrade as it requires migrating all registry data into a new contract, while\r\n * the registry contract itself can be easily upgraded.\r\n *\r\n * For that same reason, the data contract is simple and contains no logic beyond the basic data\r\n * access utilities that it exposes.\r\n*/\r\ncontract ConverterRegistryData is IConverterRegistryData, ContractRegistryClient {\r\n struct Item {\r\n bool valid;\r\n uint256 index;\r\n }\r\n\r\n struct Items {\r\n address[] array;\r\n mapping(address => Item) table;\r\n }\r\n\r\n struct List {\r\n uint256 index;\r\n Items items;\r\n }\r\n\r\n struct Lists {\r\n address[] array;\r\n mapping(address => List) table;\r\n }\r\n\r\n Items private smartTokens;\r\n Items private liquidityPools;\r\n Lists private convertibleTokens;\r\n\r\n /**\r\n * @dev initializes a new ConverterRegistryData instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {\r\n }\r\n\r\n /**\r\n * @dev adds a smart token\r\n *\r\n * @param _anchor smart token\r\n */\r\n function addSmartToken(IConverterAnchor _anchor) external override only(CONVERTER_REGISTRY) {\r\n addItem(smartTokens, address(_anchor));\r\n }\r\n\r\n /**\r\n * @dev removes a smart token\r\n *\r\n * @param _anchor smart token\r\n */\r\n function removeSmartToken(IConverterAnchor _anchor) external override only(CONVERTER_REGISTRY) {\r\n removeItem(smartTokens, address(_anchor));\r\n }\r\n\r\n /**\r\n * @dev adds a liquidity pool\r\n *\r\n * @param _liquidityPoolAnchor liquidity pool\r\n */\r\n function addLiquidityPool(IConverterAnchor _liquidityPoolAnchor) external override only(CONVERTER_REGISTRY) {\r\n addItem(liquidityPools, address(_liquidityPoolAnchor));\r\n }\r\n\r\n /**\r\n * @dev removes a liquidity pool\r\n *\r\n * @param _liquidityPoolAnchor liquidity pool\r\n */\r\n function removeLiquidityPool(IConverterAnchor _liquidityPoolAnchor) external override only(CONVERTER_REGISTRY) {\r\n removeItem(liquidityPools, address(_liquidityPoolAnchor));\r\n }\r\n\r\n /**\r\n * @dev adds a convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _anchor associated smart token\r\n */\r\n function addConvertibleToken(IERC20Token _convertibleToken, IConverterAnchor _anchor) external override only(CONVERTER_REGISTRY) {\r\n List storage list = convertibleTokens.table[address(_convertibleToken)];\r\n if (list.items.array.length == 0) {\r\n list.index = convertibleTokens.array.length;\r\n convertibleTokens.array.push(address(_convertibleToken));\r\n }\r\n addItem(list.items, address(_anchor));\r\n }\r\n\r\n /**\r\n * @dev removes a convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _anchor associated smart token\r\n */\r\n function removeConvertibleToken(IERC20Token _convertibleToken, IConverterAnchor _anchor) external override only(CONVERTER_REGISTRY) {\r\n List storage list = convertibleTokens.table[address(_convertibleToken)];\r\n removeItem(list.items, address(_anchor));\r\n if (list.items.array.length == 0) {\r\n address lastConvertibleToken = convertibleTokens.array[convertibleTokens.array.length - 1];\r\n convertibleTokens.table[lastConvertibleToken].index = list.index;\r\n convertibleTokens.array[list.index] = lastConvertibleToken;\r\n convertibleTokens.array.pop();\r\n delete convertibleTokens.table[address(_convertibleToken)];\r\n }\r\n }\r\n\r\n /**\r\n * @dev returns the number of smart tokens\r\n *\r\n * @return number of smart tokens\r\n */\r\n function getSmartTokenCount() external view override returns (uint256) {\r\n return smartTokens.array.length;\r\n }\r\n\r\n /**\r\n * @dev returns the list of smart tokens\r\n *\r\n * @return list of smart tokens\r\n */\r\n function getSmartTokens() external view override returns (address[] memory) {\r\n return smartTokens.array;\r\n }\r\n\r\n /**\r\n * @dev returns the smart token at a given index\r\n *\r\n * @param _index index\r\n * @return smart token at the given index\r\n */\r\n function getSmartToken(uint256 _index) external view override returns (IConverterAnchor) {\r\n return IConverterAnchor(smartTokens.array[_index]);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a smart token\r\n *\r\n * @param _value value\r\n * @return true if the given value is a smart token, false if not\r\n */\r\n function isSmartToken(address _value) external view override returns (bool) {\r\n return smartTokens.table[_value].valid;\r\n }\r\n\r\n /**\r\n * @dev returns the number of liquidity pools\r\n *\r\n * @return number of liquidity pools\r\n */\r\n function getLiquidityPoolCount() external view override returns (uint256) {\r\n return liquidityPools.array.length;\r\n }\r\n\r\n /**\r\n * @dev returns the list of liquidity pools\r\n *\r\n * @return list of liquidity pools\r\n */\r\n function getLiquidityPools() external view override returns (address[] memory) {\r\n return liquidityPools.array;\r\n }\r\n\r\n /**\r\n * @dev returns the liquidity pool at a given index\r\n *\r\n * @param _index index\r\n * @return liquidity pool at the given index\r\n */\r\n function getLiquidityPool(uint256 _index) external view override returns (IConverterAnchor) {\r\n return IConverterAnchor(liquidityPools.array[_index]);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a liquidity pool\r\n *\r\n * @param _value value\r\n * @return true if the given value is a liquidity pool, false if not\r\n */\r\n function isLiquidityPool(address _value) external view override returns (bool) {\r\n return liquidityPools.table[_value].valid;\r\n }\r\n\r\n /**\r\n * @dev returns the number of convertible tokens\r\n *\r\n * @return number of convertible tokens\r\n */\r\n function getConvertibleTokenCount() external view override returns (uint256) {\r\n return convertibleTokens.array.length;\r\n }\r\n\r\n /**\r\n * @dev returns the list of convertible tokens\r\n *\r\n * @return list of convertible tokens\r\n */\r\n function getConvertibleTokens() external view override returns (address[] memory) {\r\n return convertibleTokens.array;\r\n }\r\n\r\n /**\r\n * @dev returns the convertible token at a given index\r\n *\r\n * @param _index index\r\n * @return convertible token at the given index\r\n */\r\n function getConvertibleToken(uint256 _index) external view override returns (IERC20Token) {\r\n return IERC20Token(convertibleTokens.array[_index]);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a convertible token\r\n *\r\n * @param _value value\r\n * @return true if the given value is a convertible token, false if not\r\n */\r\n function isConvertibleToken(address _value) external view override returns (bool) {\r\n return convertibleTokens.table[_value].items.array.length > 0;\r\n }\r\n\r\n /**\r\n * @dev returns the number of smart tokens associated with a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @return number of smart tokens associated with the given convertible token\r\n */\r\n function getConvertibleTokenSmartTokenCount(IERC20Token _convertibleToken) external view override returns (uint256) {\r\n return convertibleTokens.table[address(_convertibleToken)].items.array.length;\r\n }\r\n\r\n /**\r\n * @dev returns the list of smart tokens associated with a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @return list of smart tokens associated with the given convertible token\r\n */\r\n function getConvertibleTokenSmartTokens(IERC20Token _convertibleToken) external view override returns (address[] memory) {\r\n return convertibleTokens.table[address(_convertibleToken)].items.array;\r\n }\r\n\r\n /**\r\n * @dev returns the smart token associated with a given convertible token at a given index\r\n *\r\n * @param _index index\r\n * @return smart token associated with the given convertible token at the given index\r\n */\r\n function getConvertibleTokenSmartToken(IERC20Token _convertibleToken, uint256 _index) external view override returns (IConverterAnchor) {\r\n return IConverterAnchor(convertibleTokens.table[address(_convertibleToken)].items.array[_index]);\r\n }\r\n\r\n /**\r\n * @dev checks whether or not a given value is a smart token of a given convertible token\r\n *\r\n * @param _convertibleToken convertible token\r\n * @param _value value\r\n * @return true if the given value is a smart token of the given convertible token, false it not\r\n */\r\n function isConvertibleTokenSmartToken(IERC20Token _convertibleToken, address _value) external view override returns (bool) {\r\n return convertibleTokens.table[address(_convertibleToken)].items.table[_value].valid;\r\n }\r\n\r\n /**\r\n * @dev adds an item to a list of items\r\n *\r\n * @param _items list of items\r\n * @param _value item's value\r\n */\r\n function addItem(Items storage _items, address _value) internal validAddress(_value) {\r\n Item storage item = _items.table[_value];\r\n require(!item.valid, \"ERR_INVALID_ITEM\");\r\n\r\n item.index = _items.array.length;\r\n _items.array.push(_value);\r\n item.valid = true;\r\n }\r\n\r\n /**\r\n * @dev removes an item from a list of items\r\n *\r\n * @param _items list of items\r\n * @param _value item's value\r\n */\r\n function removeItem(Items storage _items, address _value) internal validAddress(_value) {\r\n Item storage item = _items.table[_value];\r\n require(item.valid, \"ERR_INVALID_ITEM\");\r\n\r\n address lastValue = _items.array[_items.array.length - 1];\r\n _items.table[lastValue].index = item.index;\r\n _items.array[item.index] = lastValue;\r\n _items.array.pop();\r\n delete _items.table[_value];\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistryData.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistryData.sol", + "exportedSymbols": { + "ConverterRegistryData": [ + 12324 + ] + }, + "id": 12325, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 11669, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:11" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 11670, + "nodeType": "ImportDirective", + "scope": 12325, + "sourceUnit": 21720, + "src": "77:47:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "file": "./interfaces/IConverterRegistryData.sol", + "id": 11671, + "nodeType": "ImportDirective", + "scope": 12325, + "sourceUnit": 13648, + "src": "126:49:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11673, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "786:22:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11674, + "nodeType": "InheritanceSpecifier", + "src": "786:22:11" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11675, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "810:22:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 11676, + "nodeType": "InheritanceSpecifier", + "src": "810:22:11" + } + ], + "contractDependencies": [ + 13647, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 11672, + "nodeType": "StructuredDocumentation", + "src": "179:571:11", + "text": " @dev The ConverterRegistryData contract is an integral part of the converter registry\n as it serves as the database contract that holds all registry data.\n The registry is separated into two different contracts for upgradability - the data contract\n is harder to upgrade as it requires migrating all registry data into a new contract, while\n the registry contract itself can be easily upgraded.\n For that same reason, the data contract is simple and contains no logic beyond the basic data\n access utilities that it exposes." + }, + "fullyImplemented": true, + "id": 12324, + "linearizedBaseContracts": [ + 12324, + 21719, + 22661, + 21818, + 22847, + 13647 + ], + "name": "ConverterRegistryData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ConverterRegistryData.Item", + "id": 11681, + "members": [ + { + "constant": false, + "id": 11678, + "mutability": "mutable", + "name": "valid", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11681, + "src": "863:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11677, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11680, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11681, + "src": "884:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "884:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Item", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "840:65:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.Items", + "id": 11689, + "members": [ + { + "constant": false, + "id": 11684, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11689, + "src": "937:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11682, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "937:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11683, + "length": null, + "nodeType": "ArrayTypeName", + "src": "937:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11688, + "mutability": "mutable", + "name": "table", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11689, + "src": "963:30:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item)" + }, + "typeName": { + "id": 11687, + "keyType": { + "id": 11685, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "971:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "963:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item)" + }, + "valueType": { + "contractScope": null, + "id": 11686, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "982:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Items", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "913:88:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.List", + "id": 11694, + "members": [ + { + "constant": false, + "id": 11691, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11694, + "src": "1032:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11690, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1032:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11693, + "mutability": "mutable", + "name": "items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11694, + "src": "1056:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11692, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1056:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "List", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "1009:66:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.Lists", + "id": 11702, + "members": [ + { + "constant": false, + "id": 11697, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11702, + "src": "1107:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1107:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11696, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1107:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11701, + "mutability": "mutable", + "name": "table", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11702, + "src": "1133:30:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List)" + }, + "typeName": { + "id": 11700, + "keyType": { + "id": 11698, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1141:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1133:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List)" + }, + "valueType": { + "contractScope": null, + "id": 11699, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "1152:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Lists", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "1083:88:11", + "visibility": "public" + }, + { + "constant": false, + "id": 11704, + "mutability": "mutable", + "name": "smartTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1179:25:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11703, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1179:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 11706, + "mutability": "mutable", + "name": "liquidityPools", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1211:28:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11705, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1211:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 11708, + "mutability": "mutable", + "name": "convertibleTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1246:31:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists" + }, + "typeName": { + "contractScope": null, + "id": 11707, + "name": "Lists", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11702, + "src": "1246:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage_ptr", + "typeString": "struct ConverterRegistryData.Lists" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 11717, + "nodeType": "Block", + "src": "1523:8:11", + "statements": [] + }, + "documentation": { + "id": 11709, + "nodeType": "StructuredDocumentation", + "src": "1286:149:11", + "text": " @dev initializes a new ConverterRegistryData instance\n @param _registry address of a contract registry contract" + }, + "id": 11718, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11714, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11711, + "src": "1505:9:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 11715, + "modifierName": { + "argumentTypes": null, + "id": 11713, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "1482:22:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1482:33:11" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11712, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11711, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11718, + "src": "1453:27:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 11710, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1453:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1452:29:11" + }, + "returnParameters": { + "id": 11716, + "nodeType": "ParameterList", + "parameters": [], + "src": "1523:0:11" + }, + "scope": 12324, + "src": "1441:90:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13509 + ], + "body": { + "id": 11736, + "nodeType": "Block", + "src": "1726:57:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11729, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "1745:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11732, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11721, + "src": "1766:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1758:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1758:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1758:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11728, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "1737:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1737:38:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11735, + "nodeType": "ExpressionStatement", + "src": "1737:38:11" + } + ] + }, + "documentation": { + "id": 11719, + "nodeType": "StructuredDocumentation", + "src": "1539:89:11", + "text": " @dev adds a smart token\n @param _anchor smart token" + }, + "functionSelector": "8de6c3eb", + "id": 11737, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11725, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1706:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11726, + "modifierName": { + "argumentTypes": null, + "id": 11724, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "1701:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1701:24:11" + } + ], + "name": "addSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11723, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1692:8:11" + }, + "parameters": { + "id": 11722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11721, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11737, + "src": "1657:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11720, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1657:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1656:26:11" + }, + "returnParameters": { + "id": 11727, + "nodeType": "ParameterList", + "parameters": [], + "src": "1726:0:11" + }, + "scope": 12324, + "src": "1634:149:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13514 + ], + "body": { + "id": 11755, + "nodeType": "Block", + "src": "1984:60:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11748, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "2006:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11751, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11740, + "src": "2027:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2019:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2019:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2019:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11747, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "1995:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1995:41:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11754, + "nodeType": "ExpressionStatement", + "src": "1995:41:11" + } + ] + }, + "documentation": { + "id": 11738, + "nodeType": "StructuredDocumentation", + "src": "1791:92:11", + "text": " @dev removes a smart token\n @param _anchor smart token" + }, + "functionSelector": "ceb9838c", + "id": 11756, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11744, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1964:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11745, + "modifierName": { + "argumentTypes": null, + "id": 11743, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "1959:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1959:24:11" + } + ], + "name": "removeSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11742, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1950:8:11" + }, + "parameters": { + "id": 11741, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11740, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11756, + "src": "1915:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11739, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1915:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1914:26:11" + }, + "returnParameters": { + "id": 11746, + "nodeType": "ParameterList", + "parameters": [], + "src": "1984:0:11" + }, + "scope": 12324, + "src": "1889:155:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13519 + ], + "body": { + "id": 11774, + "nodeType": "Block", + "src": "2274:73:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11767, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "2293:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11770, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11759, + "src": "2317:20:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2309:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2309:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11766, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "2285:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2285:54:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11773, + "nodeType": "ExpressionStatement", + "src": "2285:54:11" + } + ] + }, + "documentation": { + "id": 11757, + "nodeType": "StructuredDocumentation", + "src": "2052:108:11", + "text": " @dev adds a liquidity pool\n @param _liquidityPoolAnchor liquidity pool" + }, + "functionSelector": "ee6a934c", + "id": 11775, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11763, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2254:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11764, + "modifierName": { + "argumentTypes": null, + "id": 11762, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2249:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2249:24:11" + } + ], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11761, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2240:8:11" + }, + "parameters": { + "id": 11760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11759, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11775, + "src": "2192:37:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11758, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2192:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2191:39:11" + }, + "returnParameters": { + "id": 11765, + "nodeType": "ParameterList", + "parameters": [], + "src": "2274:0:11" + }, + "scope": 12324, + "src": "2166:181:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13524 + ], + "body": { + "id": 11793, + "nodeType": "Block", + "src": "2583:76:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11786, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "2605:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11789, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11778, + "src": "2629:20:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2621:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2621:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11785, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "2594:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2594:57:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11792, + "nodeType": "ExpressionStatement", + "src": "2594:57:11" + } + ] + }, + "documentation": { + "id": 11776, + "nodeType": "StructuredDocumentation", + "src": "2355:111:11", + "text": " @dev removes a liquidity pool\n @param _liquidityPoolAnchor liquidity pool" + }, + "functionSelector": "ae22107f", + "id": 11794, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11782, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2563:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11783, + "modifierName": { + "argumentTypes": null, + "id": 11781, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2558:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2558:24:11" + } + ], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11780, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2549:8:11" + }, + "parameters": { + "id": 11779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11778, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11794, + "src": "2501:37:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11777, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2501:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2500:39:11" + }, + "returnParameters": { + "id": 11784, + "nodeType": "ParameterList", + "parameters": [], + "src": "2583:0:11" + }, + "scope": 12324, + "src": "2472:187:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13531 + ], + "body": { + "id": 11852, + "nodeType": "Block", + "src": "2976:323:11", + "statements": [ + { + "assignments": [ + 11807 + ], + "declarations": [ + { + "constant": false, + "id": 11807, + "mutability": "mutable", + "name": "list", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11852, + "src": "2987:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + }, + "typeName": { + "contractScope": null, + "id": 11806, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "2987:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11815, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11808, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3007:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3007:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11814, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11812, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11797, + "src": "3039:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3031:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3031:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3031:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3007:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2987:71:11" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11816, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3073:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11817, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3073:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11818, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "3073:16:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3073:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3100:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3073:28:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11842, + "nodeType": "IfStatement", + "src": "3069:175:11", + "trueBody": { + "id": 11841, + "nodeType": "Block", + "src": "3103:141:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 11828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11822, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3118:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11824, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3118:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11825, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3131:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3131:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3131:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3118:43:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11829, + "nodeType": "ExpressionStatement", + "src": "3118:43:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11837, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11797, + "src": "3213:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3205:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3205:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11830, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3176:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3176:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3176:28:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 11839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3176:56:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11840, + "nodeType": "ExpressionStatement", + "src": "3176:56:11" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11844, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3262:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3262:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11848, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11799, + "src": "3282:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3274:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11846, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3274:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3274:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11843, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "3254:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3254:37:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11851, + "nodeType": "ExpressionStatement", + "src": "3254:37:11" + } + ] + }, + "documentation": { + "id": 11795, + "nodeType": "StructuredDocumentation", + "src": "2667:174:11", + "text": " @dev adds a convertible token\n @param _convertibleToken convertible token\n @param _anchor associated smart token" + }, + "functionSelector": "36900c11", + "id": 11853, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11803, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2956:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11804, + "modifierName": { + "argumentTypes": null, + "id": 11802, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2951:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2951:24:11" + } + ], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11801, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2942:8:11" + }, + "parameters": { + "id": 11800, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11797, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11853, + "src": "2876:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11796, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2876:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11799, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11853, + "src": "2907:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11798, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2907:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2875:57:11" + }, + "returnParameters": { + "id": 11805, + "nodeType": "ParameterList", + "parameters": [], + "src": "2976:0:11" + }, + "scope": 12324, + "src": "2847:452:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13538 + ], + "body": { + "id": 11938, + "nodeType": "Block", + "src": "3622:571:11", + "statements": [ + { + "assignments": [ + 11866 + ], + "declarations": [ + { + "constant": false, + "id": 11866, + "mutability": "mutable", + "name": "list", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11938, + "src": "3633:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + }, + "typeName": { + "contractScope": null, + "id": 11865, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "3633:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11874, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11867, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3653:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11868, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3653:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11873, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11871, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11856, + "src": "3685:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3677:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3677:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3677:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3653:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3633:71:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11876, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3726:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3726:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11880, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11858, + "src": "3746:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3738:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11878, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3738:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3738:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11875, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "3715:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3715:40:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11883, + "nodeType": "ExpressionStatement", + "src": "3715:40:11" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11884, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3770:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11885, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3770:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11886, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "3770:16:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3770:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3797:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3770:28:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11937, + "nodeType": "IfStatement", + "src": "3766:420:11", + "trueBody": { + "id": 11936, + "nodeType": "Block", + "src": "3800:386:11", + "statements": [ + { + "assignments": [ + 11891 + ], + "declarations": [ + { + "constant": false, + "id": 11891, + "mutability": "mutable", + "name": "lastConvertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11936, + "src": "3815:28:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3815:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11900, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11892, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3846:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11893, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3846:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11899, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11894, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3870:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3870:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3870:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3903:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3870:34:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3846:59:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3815:90:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11901, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3920:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11904, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3920:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11905, + "indexExpression": { + "argumentTypes": null, + "id": 11903, + "name": "lastConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11891, + "src": "3944:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3920:45:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 11906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3920:51:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11907, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3974:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3974:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3920:64:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11910, + "nodeType": "ExpressionStatement", + "src": "3920:64:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11911, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3999:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3999:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11916, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11913, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "4023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "4023:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3999:35:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11917, + "name": "lastConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11891, + "src": "4037:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3999:58:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11919, + "nodeType": "ExpressionStatement", + "src": "3999:58:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11920, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "4072:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "4072:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4072:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 11925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4072:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11926, + "nodeType": "ExpressionStatement", + "src": "4072:29:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "4116:58:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11927, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "4123:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "4123:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11933, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11931, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11856, + "src": "4155:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4147:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4147:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4147:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4123:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11935, + "nodeType": "ExpressionStatement", + "src": "4116:58:11" + } + ] + } + } + ] + }, + "documentation": { + "id": 11854, + "nodeType": "StructuredDocumentation", + "src": "3307:177:11", + "text": " @dev removes a convertible token\n @param _convertibleToken convertible token\n @param _anchor associated smart token" + }, + "functionSelector": "fba8f031", + "id": 11939, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11862, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "3602:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11863, + "modifierName": { + "argumentTypes": null, + "id": 11861, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "3597:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3597:24:11" + } + ], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3588:8:11" + }, + "parameters": { + "id": 11859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11856, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11939, + "src": "3522:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11855, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3522:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11858, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11939, + "src": "3553:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11857, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3553:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3521:57:11" + }, + "returnParameters": { + "id": 11864, + "nodeType": "ParameterList", + "parameters": [], + "src": "3622:0:11" + }, + "scope": 12324, + "src": "3490:703:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13543 + ], + "body": { + "id": 11950, + "nodeType": "Block", + "src": "4387:50:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11946, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4405:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11947, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4405:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4405:24:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11945, + "id": 11949, + "nodeType": "Return", + "src": "4398:31:11" + } + ] + }, + "documentation": { + "id": 11940, + "nodeType": "StructuredDocumentation", + "src": "4201:109:11", + "text": " @dev returns the number of smart tokens\n @return number of smart tokens" + }, + "functionSelector": "e571049b", + "id": 11951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11942, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4360:8:11" + }, + "parameters": { + "id": 11941, + "nodeType": "ParameterList", + "parameters": [], + "src": "4343:2:11" + }, + "returnParameters": { + "id": 11945, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11944, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11951, + "src": "4378:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4378:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4377:9:11" + }, + "scope": 12324, + "src": "4316:121:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13549 + ], + "body": { + "id": 11962, + "nodeType": "Block", + "src": "4632:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11959, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4650:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11960, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4650:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 11958, + "id": 11961, + "nodeType": "Return", + "src": "4643:24:11" + } + ] + }, + "documentation": { + "id": 11952, + "nodeType": "StructuredDocumentation", + "src": "4445:105:11", + "text": " @dev returns the list of smart tokens\n @return list of smart tokens" + }, + "functionSelector": "04ceaf41", + "id": 11963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11954, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4596:8:11" + }, + "parameters": { + "id": 11953, + "nodeType": "ParameterList", + "parameters": [], + "src": "4579:2:11" + }, + "returnParameters": { + "id": 11958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11957, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11963, + "src": "4614:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4614:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11956, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4614:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4613:18:11" + }, + "scope": 12324, + "src": "4556:119:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13556 + ], + "body": { + "id": 11979, + "nodeType": "Block", + "src": "4930:69:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11973, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4965:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11974, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4965:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11976, + "indexExpression": { + "argumentTypes": null, + "id": 11975, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11966, + "src": "4983:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:25:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11972, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4948:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:43:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11971, + "id": 11978, + "nodeType": "Return", + "src": "4941:50:11" + } + ] + }, + "documentation": { + "id": 11964, + "nodeType": "StructuredDocumentation", + "src": "4683:152:11", + "text": " @dev returns the smart token at a given index\n @param _index index\n @return smart token at the given index" + }, + "functionSelector": "a109d214", + "id": 11980, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11968, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4894:8:11" + }, + "parameters": { + "id": 11967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11966, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11980, + "src": "4864:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4864:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4863:16:11" + }, + "returnParameters": { + "id": 11971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11970, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11980, + "src": "4912:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11969, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4912:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4911:18:11" + }, + "scope": 12324, + "src": "4841:158:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13563 + ], + "body": { + "id": 11995, + "nodeType": "Block", + "src": "5277:57:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11989, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "5295:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11990, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "5295:17:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 11992, + "indexExpression": { + "argumentTypes": null, + "id": 11991, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11983, + "src": "5313:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5295:25:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 11993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "5295:31:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11988, + "id": 11994, + "nodeType": "Return", + "src": "5288:38:11" + } + ] + }, + "documentation": { + "id": 11981, + "nodeType": "StructuredDocumentation", + "src": "5007:188:11", + "text": " @dev checks whether or not a given value is a smart token\n @param _value value\n @return true if the given value is a smart token, false if not" + }, + "functionSelector": "4123ef60", + "id": 11996, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11985, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5253:8:11" + }, + "parameters": { + "id": 11984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11983, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11996, + "src": "5223:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5223:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5222:16:11" + }, + "returnParameters": { + "id": 11988, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11987, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11996, + "src": "5271:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11986, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5271:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5270:6:11" + }, + "scope": 12324, + "src": "5201:133:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13568 + ], + "body": { + "id": 12007, + "nodeType": "Block", + "src": "5537:53:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12003, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "5555:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "5555:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5555:27:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12002, + "id": 12006, + "nodeType": "Return", + "src": "5548:34:11" + } + ] + }, + "documentation": { + "id": 11997, + "nodeType": "StructuredDocumentation", + "src": "5342:115:11", + "text": " @dev returns the number of liquidity pools\n @return number of liquidity pools" + }, + "functionSelector": "7a5f0ffd", + "id": 12008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11999, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5510:8:11" + }, + "parameters": { + "id": 11998, + "nodeType": "ParameterList", + "parameters": [], + "src": "5493:2:11" + }, + "returnParameters": { + "id": 12002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12001, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12008, + "src": "5528:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12000, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5528:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5527:9:11" + }, + "scope": 12324, + "src": "5463:127:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13574 + ], + "body": { + "id": 12019, + "nodeType": "Block", + "src": "5794:46:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12016, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "5812:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "5812:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12015, + "id": 12018, + "nodeType": "Return", + "src": "5805:27:11" + } + ] + }, + "documentation": { + "id": 12009, + "nodeType": "StructuredDocumentation", + "src": "5598:111:11", + "text": " @dev returns the list of liquidity pools\n @return list of liquidity pools" + }, + "functionSelector": "7f45c4c3", + "id": 12020, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12011, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5758:8:11" + }, + "parameters": { + "id": 12010, + "nodeType": "ParameterList", + "parameters": [], + "src": "5741:2:11" + }, + "returnParameters": { + "id": 12015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12014, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12020, + "src": "5776:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12012, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5776:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12013, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5776:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5775:18:11" + }, + "scope": 12324, + "src": "5715:125:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13581 + ], + "body": { + "id": 12036, + "nodeType": "Block", + "src": "6104:72:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12030, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "6139:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12031, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "6139:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12033, + "indexExpression": { + "argumentTypes": null, + "id": 12032, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12023, + "src": "6160:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6139:28:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12029, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6122:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 12034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 12028, + "id": 12035, + "nodeType": "Return", + "src": "6115:53:11" + } + ] + }, + "documentation": { + "id": 12021, + "nodeType": "StructuredDocumentation", + "src": "5848:158:11", + "text": " @dev returns the liquidity pool at a given index\n @param _index index\n @return liquidity pool at the given index" + }, + "functionSelector": "a74498aa", + "id": 12037, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12025, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6068:8:11" + }, + "parameters": { + "id": 12024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12023, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12037, + "src": "6038:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6038:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6037:16:11" + }, + "returnParameters": { + "id": 12028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12027, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12037, + "src": "6086:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12026, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "6086:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6085:18:11" + }, + "scope": 12324, + "src": "6012:164:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13588 + ], + "body": { + "id": 12052, + "nodeType": "Block", + "src": "6463:60:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12046, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "6481:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12047, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "6481:20:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12049, + "indexExpression": { + "argumentTypes": null, + "id": 12048, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12040, + "src": "6502:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6481:28:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "6481:34:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12045, + "id": 12051, + "nodeType": "Return", + "src": "6474:41:11" + } + ] + }, + "documentation": { + "id": 12038, + "nodeType": "StructuredDocumentation", + "src": "6184:194:11", + "text": " @dev checks whether or not a given value is a liquidity pool\n @param _value value\n @return true if the given value is a liquidity pool, false if not" + }, + "functionSelector": "e85455d7", + "id": 12053, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12042, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6439:8:11" + }, + "parameters": { + "id": 12041, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12040, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12053, + "src": "6409:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12039, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6409:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6408:16:11" + }, + "returnParameters": { + "id": 12045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12044, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12053, + "src": "6457:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12043, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6457:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6456:6:11" + }, + "scope": 12324, + "src": "6384:139:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13593 + ], + "body": { + "id": 12064, + "nodeType": "Block", + "src": "6735:56:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12060, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "6753:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12061, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "6753:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6753:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12059, + "id": 12063, + "nodeType": "Return", + "src": "6746:37:11" + } + ] + }, + "documentation": { + "id": 12054, + "nodeType": "StructuredDocumentation", + "src": "6531:121:11", + "text": " @dev returns the number of convertible tokens\n @return number of convertible tokens" + }, + "functionSelector": "69be4784", + "id": 12065, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12056, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6708:8:11" + }, + "parameters": { + "id": 12055, + "nodeType": "ParameterList", + "parameters": [], + "src": "6691:2:11" + }, + "returnParameters": { + "id": 12059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12058, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12065, + "src": "6726:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12057, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6726:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6725:9:11" + }, + "scope": 12324, + "src": "6658:133:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13599 + ], + "body": { + "id": 12076, + "nodeType": "Block", + "src": "7004:49:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12073, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7022:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "7022:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12072, + "id": 12075, + "nodeType": "Return", + "src": "7015:30:11" + } + ] + }, + "documentation": { + "id": 12066, + "nodeType": "StructuredDocumentation", + "src": "6799:117:11", + "text": " @dev returns the list of convertible tokens\n @return list of convertible tokens" + }, + "functionSelector": "5f1b50fe", + "id": 12077, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6968:8:11" + }, + "parameters": { + "id": 12067, + "nodeType": "ParameterList", + "parameters": [], + "src": "6951:2:11" + }, + "returnParameters": { + "id": 12072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12071, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12077, + "src": "6986:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12069, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6986:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12070, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6986:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6985:18:11" + }, + "scope": 12324, + "src": "6922:131:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13606 + ], + "body": { + "id": 12093, + "nodeType": "Block", + "src": "7321:70:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12087, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7351:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12088, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "7351:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12090, + "indexExpression": { + "argumentTypes": null, + "id": 12089, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12080, + "src": "7375:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7351:31:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12086, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "7339:11:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 12091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7339:44:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 12085, + "id": 12092, + "nodeType": "Return", + "src": "7332:51:11" + } + ] + }, + "documentation": { + "id": 12078, + "nodeType": "StructuredDocumentation", + "src": "7061:164:11", + "text": " @dev returns the convertible token at a given index\n @param _index index\n @return convertible token at the given index" + }, + "functionSelector": "865cf194", + "id": 12094, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12082, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7290:8:11" + }, + "parameters": { + "id": 12081, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12080, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12094, + "src": "7260:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7260:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7259:16:11" + }, + "returnParameters": { + "id": 12085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12084, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12094, + "src": "7308:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12083, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7308:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7307:13:11" + }, + "scope": 12324, + "src": "7231:160:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13613 + ], + "body": { + "id": 12113, + "nodeType": "Block", + "src": "7687:80:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12103, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7705:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12104, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "7705:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12106, + "indexExpression": { + "argumentTypes": null, + "id": 12105, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12097, + "src": "7729:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7705:31:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "7705:37:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12108, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "7705:43:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7705:50:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 12110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7758:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7705:54:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12102, + "id": 12112, + "nodeType": "Return", + "src": "7698:61:11" + } + ] + }, + "documentation": { + "id": 12095, + "nodeType": "StructuredDocumentation", + "src": "7399:200:11", + "text": " @dev checks whether or not a given value is a convertible token\n @param _value value\n @return true if the given value is a convertible token, false if not" + }, + "functionSelector": "3ab8857c", + "id": 12114, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12099, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7663:8:11" + }, + "parameters": { + "id": 12098, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12097, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12114, + "src": "7633:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7633:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7632:16:11" + }, + "returnParameters": { + "id": 12102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12101, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12114, + "src": "7681:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7681:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7680:6:11" + }, + "scope": 12324, + "src": "7605:162:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13620 + ], + "body": { + "id": 12134, + "nodeType": "Block", + "src": "8144:96:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12123, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "8162:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "8162:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12129, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12127, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12117, + "src": "8194:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8186:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8186:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8162:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12130, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "8162:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "8162:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8162:70:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12122, + "id": 12133, + "nodeType": "Return", + "src": "8155:77:11" + } + ] + }, + "documentation": { + "id": 12115, + "nodeType": "StructuredDocumentation", + "src": "7775:247:11", + "text": " @dev returns the number of smart tokens associated with a given convertible token\n @param _convertibleToken convertible token\n @return number of smart tokens associated with the given convertible token" + }, + "functionSelector": "a43d5e94", + "id": 12135, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12119, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8117:8:11" + }, + "parameters": { + "id": 12118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12117, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12135, + "src": "8072:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12116, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8072:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8071:31:11" + }, + "returnParameters": { + "id": 12122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12121, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12135, + "src": "8135:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8135:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8134:9:11" + }, + "scope": 12324, + "src": "8028:212:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13628 + ], + "body": { + "id": 12155, + "nodeType": "Block", + "src": "8618:89:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12145, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "8636:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12146, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "8636:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12151, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12149, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12138, + "src": "8668:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8660:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8660:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8660:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8636:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "8636:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "8636:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12144, + "id": 12154, + "nodeType": "Return", + "src": "8629:70:11" + } + ] + }, + "documentation": { + "id": 12136, + "nodeType": "StructuredDocumentation", + "src": "8248:243:11", + "text": " @dev returns the list of smart tokens associated with a given convertible token\n @param _convertibleToken convertible token\n @return list of smart tokens associated with the given convertible token" + }, + "functionSelector": "f4fb86c0", + "id": 12156, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12140, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8582:8:11" + }, + "parameters": { + "id": 12139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12138, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12156, + "src": "8537:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12137, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8537:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8536:31:11" + }, + "returnParameters": { + "id": 12144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12143, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12156, + "src": "8600:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8600:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12142, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8600:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8599:18:11" + }, + "scope": 12324, + "src": "8497:210:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13637 + ], + "body": { + "id": 12181, + "nodeType": "Block", + "src": "9095:115:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12168, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "9130:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "9130:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12174, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12172, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12159, + "src": "9162:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9154:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9154:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9154:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9130:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "9130:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12176, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "9130:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12178, + "indexExpression": { + "argumentTypes": null, + "id": 12177, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12161, + "src": "9194:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9130:71:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12167, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "9113:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 12179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9113:89:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 12166, + "id": 12180, + "nodeType": "Return", + "src": "9106:96:11" + } + ] + }, + "documentation": { + "id": 12157, + "nodeType": "StructuredDocumentation", + "src": "8715:238:11", + "text": " @dev returns the smart token associated with a given convertible token at a given index\n @param _index index\n @return smart token associated with the given convertible token at the given index" + }, + "functionSelector": "d6c4b5b2", + "id": 12182, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12163, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9059:8:11" + }, + "parameters": { + "id": 12162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12159, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "8998:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12158, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8998:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12161, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "9029:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9029:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8997:47:11" + }, + "returnParameters": { + "id": 12166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12165, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "9077:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12164, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "9077:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9076:18:11" + }, + "scope": 12324, + "src": "8959:251:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13646 + ], + "body": { + "id": 12206, + "nodeType": "Block", + "src": "9647:103:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12193, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "9665:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12194, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "9665:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12199, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12197, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12185, + "src": "9697:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9689:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9689:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9689:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9665:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12200, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "9665:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "9665:63:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12203, + "indexExpression": { + "argumentTypes": null, + "id": 12202, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12187, + "src": "9729:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9665:71:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "9665:77:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12192, + "id": 12205, + "nodeType": "Return", + "src": "9658:84:11" + } + ] + }, + "documentation": { + "id": 12183, + "nodeType": "StructuredDocumentation", + "src": "9218:300:11", + "text": " @dev checks whether or not a given value is a smart token of a given convertible token\n @param _convertibleToken convertible token\n @param _value value\n @return true if the given value is a smart token of the given convertible token, false it not" + }, + "functionSelector": "725b8786", + "id": 12207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12189, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9623:8:11" + }, + "parameters": { + "id": 12188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12185, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9562:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12184, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9562:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12187, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9593:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9593:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9561:47:11" + }, + "returnParameters": { + "id": 12192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12191, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9641:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12190, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9641:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9640:6:11" + }, + "scope": 12324, + "src": "9524:226:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 12254, + "nodeType": "Block", + "src": "9988:219:11", + "statements": [ + { + "assignments": [ + 12219 + ], + "declarations": [ + { + "constant": false, + "id": 12219, + "mutability": "mutable", + "name": "item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12254, + "src": "9999:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + }, + "typeName": { + "contractScope": null, + "id": 12218, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "9999:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12224, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12220, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10019:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10019:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12223, + "indexExpression": { + "argumentTypes": null, + "id": 12222, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "10032:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10019:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9999:40:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10058:11:11", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12226, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10059:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4954454d", + "id": 12229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10071:18:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + }, + "value": "ERR_INVALID_ITEM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + } + ], + "id": 12225, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10050:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 12230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10050:40:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12231, + "nodeType": "ExpressionStatement", + "src": "10050:40:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12232, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10103:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10103:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12235, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10116:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12236, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10116:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10116:19:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10103:32:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12239, + "nodeType": "ExpressionStatement", + "src": "10103:32:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12245, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "10164:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12240, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10146:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10146:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10146:17:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 12246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10146:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12247, + "nodeType": "ExpressionStatement", + "src": "10146:25:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12248, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10182:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12250, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10182:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 12251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10195:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10182:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12253, + "nodeType": "ExpressionStatement", + "src": "10182:17:11" + } + ] + }, + "documentation": { + "id": 12208, + "nodeType": "StructuredDocumentation", + "src": "9758:139:11", + "text": " @dev adds an item to a list of items\n @param _items list of items\n @param _value item's value" + }, + "id": 12255, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12215, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "9980:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 12216, + "modifierName": { + "argumentTypes": null, + "id": 12214, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "9967:12:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9967:20:11" + } + ], + "name": "addItem", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12210, + "mutability": "mutable", + "name": "_items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12255, + "src": "9920:20:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 12209, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "9920:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12212, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12255, + "src": "9942:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9942:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9919:38:11" + }, + "returnParameters": { + "id": 12217, + "nodeType": "ParameterList", + "parameters": [], + "src": "9988:0:11" + }, + "scope": 12324, + "src": "9903:304:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 12322, + "nodeType": "Block", + "src": "10453:346:11", + "statements": [ + { + "assignments": [ + 12267 + ], + "declarations": [ + { + "constant": false, + "id": 12267, + "mutability": "mutable", + "name": "item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12322, + "src": "10464:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + }, + "typeName": { + "contractScope": null, + "id": 12266, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "10464:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12272, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12268, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10484:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10484:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12271, + "indexExpression": { + "argumentTypes": null, + "id": 12270, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10497:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10484:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10464:40:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12274, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10523:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10523:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4954454d", + "id": 12276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10535:18:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + }, + "value": "ERR_INVALID_ITEM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + } + ], + "id": 12273, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10515:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 12277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10515:39:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12278, + "nodeType": "ExpressionStatement", + "src": "10515:39:11" + }, + { + "assignments": [ + 12280 + ], + "declarations": [ + { + "constant": false, + "id": 12280, + "mutability": "mutable", + "name": "lastValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12322, + "src": "10567:17:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10567:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12289, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12281, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10587:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10587:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12288, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12283, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10600:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10600:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10600:19:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 12286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10622:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10600:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10587:37:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10567:57:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12290, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10635:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12293, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10635:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12294, + "indexExpression": { + "argumentTypes": null, + "id": 12292, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12280, + "src": "10648:9:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10635:23:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12295, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10635:29:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12296, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10667:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10667:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10635:42:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12299, + "nodeType": "ExpressionStatement", + "src": "10635:42:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12300, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10688:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10688:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12305, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12302, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10701:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12303, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10701:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10688:24:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 12306, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12280, + "src": "10715:9:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10688:36:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12308, + "nodeType": "ExpressionStatement", + "src": "10688:36:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12309, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10735:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10735:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10735:16:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 12314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10735:18:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12315, + "nodeType": "ExpressionStatement", + "src": "10735:18:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "10764:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12316, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10771:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10771:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12319, + "indexExpression": { + "argumentTypes": null, + "id": 12318, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10784:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10771:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12321, + "nodeType": "ExpressionStatement", + "src": "10764:27:11" + } + ] + }, + "documentation": { + "id": 12256, + "nodeType": "StructuredDocumentation", + "src": "10215:144:11", + "text": " @dev removes an item from a list of items\n @param _items list of items\n @param _value item's value" + }, + "id": 12323, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12263, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10445:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 12264, + "modifierName": { + "argumentTypes": null, + "id": 12262, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "10432:12:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10432:20:11" + } + ], + "name": "removeItem", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12258, + "mutability": "mutable", + "name": "_items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12323, + "src": "10385:20:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 12257, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "10385:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12323, + "src": "10407:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10407:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10384:38:11" + }, + "returnParameters": { + "id": 12265, + "nodeType": "ParameterList", + "parameters": [], + "src": "10453:0:11" + }, + "scope": 12324, + "src": "10365:434:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 12325, + "src": "752:10050:11" + } + ], + "src": "52:10752:11" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistryData.sol", + "exportedSymbols": { + "ConverterRegistryData": [ + 12324 + ] + }, + "id": 12325, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 11669, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:11" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 11670, + "nodeType": "ImportDirective", + "scope": 12325, + "sourceUnit": 21720, + "src": "77:47:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "file": "./interfaces/IConverterRegistryData.sol", + "id": 11671, + "nodeType": "ImportDirective", + "scope": 12325, + "sourceUnit": 13648, + "src": "126:49:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11673, + "name": "IConverterRegistryData", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13647, + "src": "786:22:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterRegistryData_$13647", + "typeString": "contract IConverterRegistryData" + } + }, + "id": 11674, + "nodeType": "InheritanceSpecifier", + "src": "786:22:11" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11675, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "810:22:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 11676, + "nodeType": "InheritanceSpecifier", + "src": "810:22:11" + } + ], + "contractDependencies": [ + 13647, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 11672, + "nodeType": "StructuredDocumentation", + "src": "179:571:11", + "text": " @dev The ConverterRegistryData contract is an integral part of the converter registry\n as it serves as the database contract that holds all registry data.\n The registry is separated into two different contracts for upgradability - the data contract\n is harder to upgrade as it requires migrating all registry data into a new contract, while\n the registry contract itself can be easily upgraded.\n For that same reason, the data contract is simple and contains no logic beyond the basic data\n access utilities that it exposes." + }, + "fullyImplemented": true, + "id": 12324, + "linearizedBaseContracts": [ + 12324, + 21719, + 22661, + 21818, + 22847, + 13647 + ], + "name": "ConverterRegistryData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ConverterRegistryData.Item", + "id": 11681, + "members": [ + { + "constant": false, + "id": 11678, + "mutability": "mutable", + "name": "valid", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11681, + "src": "863:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11677, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11680, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11681, + "src": "884:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "884:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Item", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "840:65:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.Items", + "id": 11689, + "members": [ + { + "constant": false, + "id": 11684, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11689, + "src": "937:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11682, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "937:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11683, + "length": null, + "nodeType": "ArrayTypeName", + "src": "937:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11688, + "mutability": "mutable", + "name": "table", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11689, + "src": "963:30:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item)" + }, + "typeName": { + "id": 11687, + "keyType": { + "id": 11685, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "971:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "963:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item)" + }, + "valueType": { + "contractScope": null, + "id": 11686, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "982:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Items", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "913:88:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.List", + "id": 11694, + "members": [ + { + "constant": false, + "id": 11691, + "mutability": "mutable", + "name": "index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11694, + "src": "1032:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11690, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1032:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11693, + "mutability": "mutable", + "name": "items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11694, + "src": "1056:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11692, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1056:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "List", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "1009:66:11", + "visibility": "public" + }, + { + "canonicalName": "ConverterRegistryData.Lists", + "id": 11702, + "members": [ + { + "constant": false, + "id": 11697, + "mutability": "mutable", + "name": "array", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11702, + "src": "1107:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1107:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11696, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1107:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11701, + "mutability": "mutable", + "name": "table", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11702, + "src": "1133:30:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List)" + }, + "typeName": { + "id": 11700, + "keyType": { + "id": 11698, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1141:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1133:24:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List)" + }, + "valueType": { + "contractScope": null, + "id": 11699, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "1152:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Lists", + "nodeType": "StructDefinition", + "scope": 12324, + "src": "1083:88:11", + "visibility": "public" + }, + { + "constant": false, + "id": 11704, + "mutability": "mutable", + "name": "smartTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1179:25:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11703, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1179:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 11706, + "mutability": "mutable", + "name": "liquidityPools", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1211:28:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 11705, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "1211:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 11708, + "mutability": "mutable", + "name": "convertibleTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12324, + "src": "1246:31:11", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists" + }, + "typeName": { + "contractScope": null, + "id": 11707, + "name": "Lists", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11702, + "src": "1246:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage_ptr", + "typeString": "struct ConverterRegistryData.Lists" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 11717, + "nodeType": "Block", + "src": "1523:8:11", + "statements": [] + }, + "documentation": { + "id": 11709, + "nodeType": "StructuredDocumentation", + "src": "1286:149:11", + "text": " @dev initializes a new ConverterRegistryData instance\n @param _registry address of a contract registry contract" + }, + "id": 11718, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11714, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11711, + "src": "1505:9:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 11715, + "modifierName": { + "argumentTypes": null, + "id": 11713, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "1482:22:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1482:33:11" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 11712, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11711, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11718, + "src": "1453:27:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 11710, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1453:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1452:29:11" + }, + "returnParameters": { + "id": 11716, + "nodeType": "ParameterList", + "parameters": [], + "src": "1523:0:11" + }, + "scope": 12324, + "src": "1441:90:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13509 + ], + "body": { + "id": 11736, + "nodeType": "Block", + "src": "1726:57:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11729, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "1745:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11732, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11721, + "src": "1766:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1758:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1758:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1758:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11728, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "1737:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1737:38:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11735, + "nodeType": "ExpressionStatement", + "src": "1737:38:11" + } + ] + }, + "documentation": { + "id": 11719, + "nodeType": "StructuredDocumentation", + "src": "1539:89:11", + "text": " @dev adds a smart token\n @param _anchor smart token" + }, + "functionSelector": "8de6c3eb", + "id": 11737, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11725, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1706:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11726, + "modifierName": { + "argumentTypes": null, + "id": 11724, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "1701:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1701:24:11" + } + ], + "name": "addSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11723, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1692:8:11" + }, + "parameters": { + "id": 11722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11721, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11737, + "src": "1657:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11720, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1657:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1656:26:11" + }, + "returnParameters": { + "id": 11727, + "nodeType": "ParameterList", + "parameters": [], + "src": "1726:0:11" + }, + "scope": 12324, + "src": "1634:149:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13514 + ], + "body": { + "id": 11755, + "nodeType": "Block", + "src": "1984:60:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11748, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "2006:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11751, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11740, + "src": "2027:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2019:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2019:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2019:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11747, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "1995:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1995:41:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11754, + "nodeType": "ExpressionStatement", + "src": "1995:41:11" + } + ] + }, + "documentation": { + "id": 11738, + "nodeType": "StructuredDocumentation", + "src": "1791:92:11", + "text": " @dev removes a smart token\n @param _anchor smart token" + }, + "functionSelector": "ceb9838c", + "id": 11756, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11744, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "1964:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11745, + "modifierName": { + "argumentTypes": null, + "id": 11743, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "1959:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1959:24:11" + } + ], + "name": "removeSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11742, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1950:8:11" + }, + "parameters": { + "id": 11741, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11740, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11756, + "src": "1915:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11739, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1915:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1914:26:11" + }, + "returnParameters": { + "id": 11746, + "nodeType": "ParameterList", + "parameters": [], + "src": "1984:0:11" + }, + "scope": 12324, + "src": "1889:155:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13519 + ], + "body": { + "id": 11774, + "nodeType": "Block", + "src": "2274:73:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11767, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "2293:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11770, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11759, + "src": "2317:20:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2309:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2309:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2309:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11766, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "2285:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2285:54:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11773, + "nodeType": "ExpressionStatement", + "src": "2285:54:11" + } + ] + }, + "documentation": { + "id": 11757, + "nodeType": "StructuredDocumentation", + "src": "2052:108:11", + "text": " @dev adds a liquidity pool\n @param _liquidityPoolAnchor liquidity pool" + }, + "functionSelector": "ee6a934c", + "id": 11775, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11763, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2254:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11764, + "modifierName": { + "argumentTypes": null, + "id": 11762, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2249:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2249:24:11" + } + ], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11761, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2240:8:11" + }, + "parameters": { + "id": 11760, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11759, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11775, + "src": "2192:37:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11758, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2192:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2191:39:11" + }, + "returnParameters": { + "id": 11765, + "nodeType": "ParameterList", + "parameters": [], + "src": "2274:0:11" + }, + "scope": 12324, + "src": "2166:181:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13524 + ], + "body": { + "id": 11793, + "nodeType": "Block", + "src": "2583:76:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11786, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "2605:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11789, + "name": "_liquidityPoolAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11778, + "src": "2629:20:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2621:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2621:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2621:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11785, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "2594:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2594:57:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11792, + "nodeType": "ExpressionStatement", + "src": "2594:57:11" + } + ] + }, + "documentation": { + "id": 11776, + "nodeType": "StructuredDocumentation", + "src": "2355:111:11", + "text": " @dev removes a liquidity pool\n @param _liquidityPoolAnchor liquidity pool" + }, + "functionSelector": "ae22107f", + "id": 11794, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11782, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2563:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11783, + "modifierName": { + "argumentTypes": null, + "id": 11781, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2558:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2558:24:11" + } + ], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11780, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2549:8:11" + }, + "parameters": { + "id": 11779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11778, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11794, + "src": "2501:37:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11777, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2501:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2500:39:11" + }, + "returnParameters": { + "id": 11784, + "nodeType": "ParameterList", + "parameters": [], + "src": "2583:0:11" + }, + "scope": 12324, + "src": "2472:187:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13531 + ], + "body": { + "id": 11852, + "nodeType": "Block", + "src": "2976:323:11", + "statements": [ + { + "assignments": [ + 11807 + ], + "declarations": [ + { + "constant": false, + "id": 11807, + "mutability": "mutable", + "name": "list", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11852, + "src": "2987:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + }, + "typeName": { + "contractScope": null, + "id": 11806, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "2987:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11815, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11808, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3007:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3007:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11814, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11812, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11797, + "src": "3039:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3031:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3031:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3031:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3007:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2987:71:11" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11816, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3073:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11817, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3073:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11818, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "3073:16:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3073:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3100:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3073:28:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11842, + "nodeType": "IfStatement", + "src": "3069:175:11", + "trueBody": { + "id": 11841, + "nodeType": "Block", + "src": "3103:141:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 11828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11822, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3118:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11824, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3118:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11825, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3131:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3131:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3131:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3118:43:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11829, + "nodeType": "ExpressionStatement", + "src": "3118:43:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11837, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11797, + "src": "3213:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3205:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3205:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11830, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3176:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3176:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3176:28:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 11839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3176:56:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11840, + "nodeType": "ExpressionStatement", + "src": "3176:56:11" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11844, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11807, + "src": "3262:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3262:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11848, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11799, + "src": "3282:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11847, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3274:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11846, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3274:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3274:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11843, + "name": "addItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12255, + "src": "3254:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3254:37:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11851, + "nodeType": "ExpressionStatement", + "src": "3254:37:11" + } + ] + }, + "documentation": { + "id": 11795, + "nodeType": "StructuredDocumentation", + "src": "2667:174:11", + "text": " @dev adds a convertible token\n @param _convertibleToken convertible token\n @param _anchor associated smart token" + }, + "functionSelector": "36900c11", + "id": 11853, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11803, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "2956:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11804, + "modifierName": { + "argumentTypes": null, + "id": 11802, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "2951:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2951:24:11" + } + ], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11801, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2942:8:11" + }, + "parameters": { + "id": 11800, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11797, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11853, + "src": "2876:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11796, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2876:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11799, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11853, + "src": "2907:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11798, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2907:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2875:57:11" + }, + "returnParameters": { + "id": 11805, + "nodeType": "ParameterList", + "parameters": [], + "src": "2976:0:11" + }, + "scope": 12324, + "src": "2847:452:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13538 + ], + "body": { + "id": 11938, + "nodeType": "Block", + "src": "3622:571:11", + "statements": [ + { + "assignments": [ + 11866 + ], + "declarations": [ + { + "constant": false, + "id": 11866, + "mutability": "mutable", + "name": "list", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11938, + "src": "3633:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + }, + "typeName": { + "contractScope": null, + "id": 11865, + "name": "List", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11694, + "src": "3633:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11874, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11867, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3653:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11868, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3653:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11873, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11871, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11856, + "src": "3685:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3677:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11869, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3677:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3677:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3653:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3633:71:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11876, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3726:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3726:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11880, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11858, + "src": "3746:7:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 11879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3738:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11878, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3738:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3738:16:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11875, + "name": "removeItem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12323, + "src": "3715:10:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Items_$11689_storage_ptr_$_t_address_$returns$__$", + "typeString": "function (struct ConverterRegistryData.Items storage pointer,address)" + } + }, + "id": 11882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3715:40:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11883, + "nodeType": "ExpressionStatement", + "src": "3715:40:11" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11884, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3770:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11885, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "3770:10:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11886, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "3770:16:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3770:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 11888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3797:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3770:28:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 11937, + "nodeType": "IfStatement", + "src": "3766:420:11", + "trueBody": { + "id": 11936, + "nodeType": "Block", + "src": "3800:386:11", + "statements": [ + { + "assignments": [ + 11891 + ], + "declarations": [ + { + "constant": false, + "id": 11891, + "mutability": "mutable", + "name": "lastConvertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11936, + "src": "3815:28:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3815:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 11900, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11892, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3846:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11893, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3846:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11899, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 11898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11894, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3870:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3870:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3870:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 11897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3903:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3870:34:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3846:59:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3815:90:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11901, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3920:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11904, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "3920:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11905, + "indexExpression": { + "argumentTypes": null, + "id": 11903, + "name": "lastConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11891, + "src": "3944:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3920:45:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 11906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3920:51:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11907, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "3974:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "3974:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3920:64:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 11910, + "nodeType": "ExpressionStatement", + "src": "3920:64:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11911, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "3999:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "3999:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11916, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11913, + "name": "list", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11866, + "src": "4023:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage_ptr", + "typeString": "struct ConverterRegistryData.List storage pointer" + } + }, + "id": 11914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11691, + "src": "4023:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3999:35:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 11917, + "name": "lastConvertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11891, + "src": "4037:20:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3999:58:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11919, + "nodeType": "ExpressionStatement", + "src": "3999:58:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11920, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "4072:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "4072:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4072:27:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 11925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4072:29:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11926, + "nodeType": "ExpressionStatement", + "src": "4072:29:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 11934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "4116:58:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11927, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "4123:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 11928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "4123:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 11933, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 11931, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11856, + "src": "4155:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 11930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4147:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 11929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4147:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 11932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4147:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4123:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 11935, + "nodeType": "ExpressionStatement", + "src": "4116:58:11" + } + ] + } + } + ] + }, + "documentation": { + "id": 11854, + "nodeType": "StructuredDocumentation", + "src": "3307:177:11", + "text": " @dev removes a convertible token\n @param _convertibleToken convertible token\n @param _anchor associated smart token" + }, + "functionSelector": "fba8f031", + "id": 11939, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 11862, + "name": "CONVERTER_REGISTRY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21545, + "src": "3602:18:11", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 11863, + "modifierName": { + "argumentTypes": null, + "id": 11861, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21577, + "src": "3597:4:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3597:24:11" + } + ], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3588:8:11" + }, + "parameters": { + "id": 11859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11856, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11939, + "src": "3522:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 11855, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3522:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11858, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11939, + "src": "3553:24:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11857, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3553:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3521:57:11" + }, + "returnParameters": { + "id": 11864, + "nodeType": "ParameterList", + "parameters": [], + "src": "3622:0:11" + }, + "scope": 12324, + "src": "3490:703:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13543 + ], + "body": { + "id": 11950, + "nodeType": "Block", + "src": "4387:50:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11946, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4405:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11947, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4405:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4405:24:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 11945, + "id": 11949, + "nodeType": "Return", + "src": "4398:31:11" + } + ] + }, + "documentation": { + "id": 11940, + "nodeType": "StructuredDocumentation", + "src": "4201:109:11", + "text": " @dev returns the number of smart tokens\n @return number of smart tokens" + }, + "functionSelector": "e571049b", + "id": 11951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11942, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4360:8:11" + }, + "parameters": { + "id": 11941, + "nodeType": "ParameterList", + "parameters": [], + "src": "4343:2:11" + }, + "returnParameters": { + "id": 11945, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11944, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11951, + "src": "4378:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4378:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4377:9:11" + }, + "scope": 12324, + "src": "4316:121:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13549 + ], + "body": { + "id": 11962, + "nodeType": "Block", + "src": "4632:43:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11959, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4650:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11960, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4650:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 11958, + "id": 11961, + "nodeType": "Return", + "src": "4643:24:11" + } + ] + }, + "documentation": { + "id": 11952, + "nodeType": "StructuredDocumentation", + "src": "4445:105:11", + "text": " @dev returns the list of smart tokens\n @return list of smart tokens" + }, + "functionSelector": "04ceaf41", + "id": 11963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11954, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4596:8:11" + }, + "parameters": { + "id": 11953, + "nodeType": "ParameterList", + "parameters": [], + "src": "4579:2:11" + }, + "returnParameters": { + "id": 11958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11957, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11963, + "src": "4614:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 11955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4614:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 11956, + "length": null, + "nodeType": "ArrayTypeName", + "src": "4614:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4613:18:11" + }, + "scope": 12324, + "src": "4556:119:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13556 + ], + "body": { + "id": 11979, + "nodeType": "Block", + "src": "4930:69:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11973, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "4965:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11974, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "4965:17:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 11976, + "indexExpression": { + "argumentTypes": null, + "id": 11975, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11966, + "src": "4983:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4965:25:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11972, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "4948:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 11977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:43:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 11971, + "id": 11978, + "nodeType": "Return", + "src": "4941:50:11" + } + ] + }, + "documentation": { + "id": 11964, + "nodeType": "StructuredDocumentation", + "src": "4683:152:11", + "text": " @dev returns the smart token at a given index\n @param _index index\n @return smart token at the given index" + }, + "functionSelector": "a109d214", + "id": 11980, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11968, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4894:8:11" + }, + "parameters": { + "id": 11967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11966, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11980, + "src": "4864:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 11965, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4864:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4863:16:11" + }, + "returnParameters": { + "id": 11971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11970, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11980, + "src": "4912:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 11969, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4912:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4911:18:11" + }, + "scope": 12324, + "src": "4841:158:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13563 + ], + "body": { + "id": 11995, + "nodeType": "Block", + "src": "5277:57:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11989, + "name": "smartTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11704, + "src": "5295:11:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 11990, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "5295:17:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 11992, + "indexExpression": { + "argumentTypes": null, + "id": 11991, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11983, + "src": "5313:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5295:25:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 11993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "5295:31:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 11988, + "id": 11994, + "nodeType": "Return", + "src": "5288:38:11" + } + ] + }, + "documentation": { + "id": 11981, + "nodeType": "StructuredDocumentation", + "src": "5007:188:11", + "text": " @dev checks whether or not a given value is a smart token\n @param _value value\n @return true if the given value is a smart token, false if not" + }, + "functionSelector": "4123ef60", + "id": 11996, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11985, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5253:8:11" + }, + "parameters": { + "id": 11984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11983, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11996, + "src": "5223:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5223:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5222:16:11" + }, + "returnParameters": { + "id": 11988, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 11987, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 11996, + "src": "5271:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 11986, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5271:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5270:6:11" + }, + "scope": 12324, + "src": "5201:133:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13568 + ], + "body": { + "id": 12007, + "nodeType": "Block", + "src": "5537:53:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12003, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "5555:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "5555:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5555:27:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12002, + "id": 12006, + "nodeType": "Return", + "src": "5548:34:11" + } + ] + }, + "documentation": { + "id": 11997, + "nodeType": "StructuredDocumentation", + "src": "5342:115:11", + "text": " @dev returns the number of liquidity pools\n @return number of liquidity pools" + }, + "functionSelector": "7a5f0ffd", + "id": 12008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 11999, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5510:8:11" + }, + "parameters": { + "id": 11998, + "nodeType": "ParameterList", + "parameters": [], + "src": "5493:2:11" + }, + "returnParameters": { + "id": 12002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12001, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12008, + "src": "5528:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12000, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5528:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5527:9:11" + }, + "scope": 12324, + "src": "5463:127:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13574 + ], + "body": { + "id": 12019, + "nodeType": "Block", + "src": "5794:46:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12016, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "5812:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "5812:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12015, + "id": 12018, + "nodeType": "Return", + "src": "5805:27:11" + } + ] + }, + "documentation": { + "id": 12009, + "nodeType": "StructuredDocumentation", + "src": "5598:111:11", + "text": " @dev returns the list of liquidity pools\n @return list of liquidity pools" + }, + "functionSelector": "7f45c4c3", + "id": 12020, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12011, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5758:8:11" + }, + "parameters": { + "id": 12010, + "nodeType": "ParameterList", + "parameters": [], + "src": "5741:2:11" + }, + "returnParameters": { + "id": 12015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12014, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12020, + "src": "5776:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12012, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5776:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12013, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5776:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5775:18:11" + }, + "scope": 12324, + "src": "5715:125:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13581 + ], + "body": { + "id": 12036, + "nodeType": "Block", + "src": "6104:72:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12030, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "6139:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12031, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "6139:20:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12033, + "indexExpression": { + "argumentTypes": null, + "id": 12032, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12023, + "src": "6160:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6139:28:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12029, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6122:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 12034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6122:46:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 12028, + "id": 12035, + "nodeType": "Return", + "src": "6115:53:11" + } + ] + }, + "documentation": { + "id": 12021, + "nodeType": "StructuredDocumentation", + "src": "5848:158:11", + "text": " @dev returns the liquidity pool at a given index\n @param _index index\n @return liquidity pool at the given index" + }, + "functionSelector": "a74498aa", + "id": 12037, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12025, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6068:8:11" + }, + "parameters": { + "id": 12024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12023, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12037, + "src": "6038:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6038:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6037:16:11" + }, + "returnParameters": { + "id": 12028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12027, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12037, + "src": "6086:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12026, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "6086:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6085:18:11" + }, + "scope": 12324, + "src": "6012:164:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13588 + ], + "body": { + "id": 12052, + "nodeType": "Block", + "src": "6463:60:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12046, + "name": "liquidityPools", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11706, + "src": "6481:14:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12047, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "6481:20:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12049, + "indexExpression": { + "argumentTypes": null, + "id": 12048, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12040, + "src": "6502:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6481:28:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "6481:34:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12045, + "id": 12051, + "nodeType": "Return", + "src": "6474:41:11" + } + ] + }, + "documentation": { + "id": 12038, + "nodeType": "StructuredDocumentation", + "src": "6184:194:11", + "text": " @dev checks whether or not a given value is a liquidity pool\n @param _value value\n @return true if the given value is a liquidity pool, false if not" + }, + "functionSelector": "e85455d7", + "id": 12053, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12042, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6439:8:11" + }, + "parameters": { + "id": 12041, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12040, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12053, + "src": "6409:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12039, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6409:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6408:16:11" + }, + "returnParameters": { + "id": 12045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12044, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12053, + "src": "6457:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12043, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6457:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6456:6:11" + }, + "scope": 12324, + "src": "6384:139:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13593 + ], + "body": { + "id": 12064, + "nodeType": "Block", + "src": "6735:56:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12060, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "6753:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12061, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "6753:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6753:30:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12059, + "id": 12063, + "nodeType": "Return", + "src": "6746:37:11" + } + ] + }, + "documentation": { + "id": 12054, + "nodeType": "StructuredDocumentation", + "src": "6531:121:11", + "text": " @dev returns the number of convertible tokens\n @return number of convertible tokens" + }, + "functionSelector": "69be4784", + "id": 12065, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12056, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6708:8:11" + }, + "parameters": { + "id": 12055, + "nodeType": "ParameterList", + "parameters": [], + "src": "6691:2:11" + }, + "returnParameters": { + "id": 12059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12058, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12065, + "src": "6726:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12057, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6726:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6725:9:11" + }, + "scope": 12324, + "src": "6658:133:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13599 + ], + "body": { + "id": 12076, + "nodeType": "Block", + "src": "7004:49:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12073, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7022:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "7022:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12072, + "id": 12075, + "nodeType": "Return", + "src": "7015:30:11" + } + ] + }, + "documentation": { + "id": 12066, + "nodeType": "StructuredDocumentation", + "src": "6799:117:11", + "text": " @dev returns the list of convertible tokens\n @return list of convertible tokens" + }, + "functionSelector": "5f1b50fe", + "id": 12077, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6968:8:11" + }, + "parameters": { + "id": 12067, + "nodeType": "ParameterList", + "parameters": [], + "src": "6951:2:11" + }, + "returnParameters": { + "id": 12072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12071, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12077, + "src": "6986:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12069, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6986:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12070, + "length": null, + "nodeType": "ArrayTypeName", + "src": "6986:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6985:18:11" + }, + "scope": 12324, + "src": "6922:131:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13606 + ], + "body": { + "id": 12093, + "nodeType": "Block", + "src": "7321:70:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12087, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7351:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12088, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11697, + "src": "7351:23:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12090, + "indexExpression": { + "argumentTypes": null, + "id": 12089, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12080, + "src": "7375:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7351:31:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12086, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "7339:11:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 12091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7339:44:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 12085, + "id": 12092, + "nodeType": "Return", + "src": "7332:51:11" + } + ] + }, + "documentation": { + "id": 12078, + "nodeType": "StructuredDocumentation", + "src": "7061:164:11", + "text": " @dev returns the convertible token at a given index\n @param _index index\n @return convertible token at the given index" + }, + "functionSelector": "865cf194", + "id": 12094, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12082, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7290:8:11" + }, + "parameters": { + "id": 12081, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12080, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12094, + "src": "7260:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7260:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7259:16:11" + }, + "returnParameters": { + "id": 12085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12084, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12094, + "src": "7308:11:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12083, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7308:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7307:13:11" + }, + "scope": 12324, + "src": "7231:160:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13613 + ], + "body": { + "id": 12113, + "nodeType": "Block", + "src": "7687:80:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12103, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "7705:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12104, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "7705:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12106, + "indexExpression": { + "argumentTypes": null, + "id": 12105, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12097, + "src": "7729:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7705:31:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "7705:37:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12108, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "7705:43:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7705:50:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 12110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7758:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7705:54:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12102, + "id": 12112, + "nodeType": "Return", + "src": "7698:61:11" + } + ] + }, + "documentation": { + "id": 12095, + "nodeType": "StructuredDocumentation", + "src": "7399:200:11", + "text": " @dev checks whether or not a given value is a convertible token\n @param _value value\n @return true if the given value is a convertible token, false if not" + }, + "functionSelector": "3ab8857c", + "id": 12114, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12099, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7663:8:11" + }, + "parameters": { + "id": 12098, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12097, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12114, + "src": "7633:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7633:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7632:16:11" + }, + "returnParameters": { + "id": 12102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12101, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12114, + "src": "7681:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7681:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7680:6:11" + }, + "scope": 12324, + "src": "7605:162:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13620 + ], + "body": { + "id": 12134, + "nodeType": "Block", + "src": "8144:96:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12123, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "8162:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "8162:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12129, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12127, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12117, + "src": "8194:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8186:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8186:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8162:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12130, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "8162:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "8162:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8162:70:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 12122, + "id": 12133, + "nodeType": "Return", + "src": "8155:77:11" + } + ] + }, + "documentation": { + "id": 12115, + "nodeType": "StructuredDocumentation", + "src": "7775:247:11", + "text": " @dev returns the number of smart tokens associated with a given convertible token\n @param _convertibleToken convertible token\n @return number of smart tokens associated with the given convertible token" + }, + "functionSelector": "a43d5e94", + "id": 12135, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12119, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8117:8:11" + }, + "parameters": { + "id": 12118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12117, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12135, + "src": "8072:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12116, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8072:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8071:31:11" + }, + "returnParameters": { + "id": 12122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12121, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12135, + "src": "8135:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8135:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8134:9:11" + }, + "scope": 12324, + "src": "8028:212:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13628 + ], + "body": { + "id": 12155, + "nodeType": "Block", + "src": "8618:89:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12145, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "8636:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12146, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "8636:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12151, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12149, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12138, + "src": "8668:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8660:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8660:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8660:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8636:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "8636:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "8636:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 12144, + "id": 12154, + "nodeType": "Return", + "src": "8629:70:11" + } + ] + }, + "documentation": { + "id": 12136, + "nodeType": "StructuredDocumentation", + "src": "8248:243:11", + "text": " @dev returns the list of smart tokens associated with a given convertible token\n @param _convertibleToken convertible token\n @return list of smart tokens associated with the given convertible token" + }, + "functionSelector": "f4fb86c0", + "id": 12156, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12140, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8582:8:11" + }, + "parameters": { + "id": 12139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12138, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12156, + "src": "8537:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12137, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8537:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8536:31:11" + }, + "returnParameters": { + "id": 12144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12143, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12156, + "src": "8600:16:11", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 12141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8600:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12142, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8600:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8599:18:11" + }, + "scope": 12324, + "src": "8497:210:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13637 + ], + "body": { + "id": 12181, + "nodeType": "Block", + "src": "9095:115:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12168, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "9130:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "9130:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12174, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12172, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12159, + "src": "9162:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9154:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12170, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9154:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9154:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9130:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "9130:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12176, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "9130:63:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12178, + "indexExpression": { + "argumentTypes": null, + "id": 12177, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12161, + "src": "9194:6:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9130:71:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12167, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "9113:16:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 12179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9113:89:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 12166, + "id": 12180, + "nodeType": "Return", + "src": "9106:96:11" + } + ] + }, + "documentation": { + "id": 12157, + "nodeType": "StructuredDocumentation", + "src": "8715:238:11", + "text": " @dev returns the smart token associated with a given convertible token at a given index\n @param _index index\n @return smart token associated with the given convertible token at the given index" + }, + "functionSelector": "d6c4b5b2", + "id": 12182, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12163, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9059:8:11" + }, + "parameters": { + "id": 12162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12159, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "8998:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12158, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8998:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12161, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "9029:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9029:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8997:47:11" + }, + "returnParameters": { + "id": 12166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12165, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12182, + "src": "9077:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12164, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "9077:16:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9076:18:11" + }, + "scope": 12324, + "src": "8959:251:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13646 + ], + "body": { + "id": 12206, + "nodeType": "Block", + "src": "9647:103:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12193, + "name": "convertibleTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11708, + "src": "9665:17:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Lists_$11702_storage", + "typeString": "struct ConverterRegistryData.Lists storage ref" + } + }, + "id": 12194, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11701, + "src": "9665:23:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_List_$11694_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.List storage ref)" + } + }, + "id": 12199, + "indexExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12197, + "name": "_convertibleToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12185, + "src": "9697:17:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 12196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9689:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12195, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9689:7:11", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9689:26:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9665:51:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_List_$11694_storage", + "typeString": "struct ConverterRegistryData.List storage ref" + } + }, + "id": 12200, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "items", + "nodeType": "MemberAccess", + "referencedDeclaration": 11693, + "src": "9665:57:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage", + "typeString": "struct ConverterRegistryData.Items storage ref" + } + }, + "id": 12201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "9665:63:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12203, + "indexExpression": { + "argumentTypes": null, + "id": 12202, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12187, + "src": "9729:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9665:71:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "9665:77:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12192, + "id": 12205, + "nodeType": "Return", + "src": "9658:84:11" + } + ] + }, + "documentation": { + "id": 12183, + "nodeType": "StructuredDocumentation", + "src": "9218:300:11", + "text": " @dev checks whether or not a given value is a smart token of a given convertible token\n @param _convertibleToken convertible token\n @param _value value\n @return true if the given value is a smart token of the given convertible token, false it not" + }, + "functionSelector": "725b8786", + "id": 12207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12189, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9623:8:11" + }, + "parameters": { + "id": 12188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12185, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9562:29:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12184, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9562:11:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12187, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9593:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12186, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9593:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9561:47:11" + }, + "returnParameters": { + "id": 12192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12191, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12207, + "src": "9641:4:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12190, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "9641:4:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9640:6:11" + }, + "scope": 12324, + "src": "9524:226:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 12254, + "nodeType": "Block", + "src": "9988:219:11", + "statements": [ + { + "assignments": [ + 12219 + ], + "declarations": [ + { + "constant": false, + "id": 12219, + "mutability": "mutable", + "name": "item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12254, + "src": "9999:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + }, + "typeName": { + "contractScope": null, + "id": 12218, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "9999:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12224, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12220, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10019:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10019:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12223, + "indexExpression": { + "argumentTypes": null, + "id": 12222, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "10032:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10019:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9999:40:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10058:11:11", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12226, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10059:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10059:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4954454d", + "id": 12229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10071:18:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + }, + "value": "ERR_INVALID_ITEM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + } + ], + "id": 12225, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10050:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 12230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10050:40:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12231, + "nodeType": "ExpressionStatement", + "src": "10050:40:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12232, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10103:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10103:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12235, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10116:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12236, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10116:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10116:19:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10103:32:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12239, + "nodeType": "ExpressionStatement", + "src": "10103:32:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12245, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "10164:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12240, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12210, + "src": "10146:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10146:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10146:17:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 12246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10146:25:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12247, + "nodeType": "ExpressionStatement", + "src": "10146:25:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12248, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12219, + "src": "10182:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12250, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10182:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 12251, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10195:4:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10182:17:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12253, + "nodeType": "ExpressionStatement", + "src": "10182:17:11" + } + ] + }, + "documentation": { + "id": 12208, + "nodeType": "StructuredDocumentation", + "src": "9758:139:11", + "text": " @dev adds an item to a list of items\n @param _items list of items\n @param _value item's value" + }, + "id": 12255, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12215, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12212, + "src": "9980:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 12216, + "modifierName": { + "argumentTypes": null, + "id": 12214, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "9967:12:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9967:20:11" + } + ], + "name": "addItem", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12210, + "mutability": "mutable", + "name": "_items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12255, + "src": "9920:20:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 12209, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "9920:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12212, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12255, + "src": "9942:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9942:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9919:38:11" + }, + "returnParameters": { + "id": 12217, + "nodeType": "ParameterList", + "parameters": [], + "src": "9988:0:11" + }, + "scope": 12324, + "src": "9903:304:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 12322, + "nodeType": "Block", + "src": "10453:346:11", + "statements": [ + { + "assignments": [ + 12267 + ], + "declarations": [ + { + "constant": false, + "id": 12267, + "mutability": "mutable", + "name": "item", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12322, + "src": "10464:17:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + }, + "typeName": { + "contractScope": null, + "id": 12266, + "name": "Item", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11681, + "src": "10464:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12272, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12268, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10484:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10484:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12271, + "indexExpression": { + "argumentTypes": null, + "id": 12270, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10497:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10484:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10464:40:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12274, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10523:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valid", + "nodeType": "MemberAccess", + "referencedDeclaration": 11678, + "src": "10523:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4954454d", + "id": 12276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10535:18:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + }, + "value": "ERR_INVALID_ITEM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_45c52aff26d012f687a90a37723f3c6469b3bdb8dce3fb6f14072d935b05b47b", + "typeString": "literal_string \"ERR_INVALID_ITEM\"" + } + ], + "id": 12273, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10515:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 12277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10515:39:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12278, + "nodeType": "ExpressionStatement", + "src": "10515:39:11" + }, + { + "assignments": [ + 12280 + ], + "declarations": [ + { + "constant": false, + "id": 12280, + "mutability": "mutable", + "name": "lastValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12322, + "src": "10567:17:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10567:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12289, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12281, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10587:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10587:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12288, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12283, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10600:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10600:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10600:19:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 12286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10622:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10600:23:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10587:37:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10567:57:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12290, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10635:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12293, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10635:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12294, + "indexExpression": { + "argumentTypes": null, + "id": 12292, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12280, + "src": "10648:9:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10635:23:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "id": 12295, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10635:29:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12296, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10667:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12297, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10667:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10635:42:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12299, + "nodeType": "ExpressionStatement", + "src": "10635:42:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12300, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10688:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10688:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12305, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12302, + "name": "item", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12267, + "src": "10701:4:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage_ptr", + "typeString": "struct ConverterRegistryData.Item storage pointer" + } + }, + "id": 12303, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "index", + "nodeType": "MemberAccess", + "referencedDeclaration": 11680, + "src": "10701:10:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10688:24:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 12306, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12280, + "src": "10715:9:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10688:36:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 12308, + "nodeType": "ExpressionStatement", + "src": "10688:36:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12309, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10735:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "array", + "nodeType": "MemberAccess", + "referencedDeclaration": 11684, + "src": "10735:12:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 12313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10735:16:11", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 12314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10735:18:11", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12315, + "nodeType": "ExpressionStatement", + "src": "10735:18:11" + }, + { + "expression": { + "argumentTypes": null, + "id": 12320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "10764:27:11", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12316, + "name": "_items", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12258, + "src": "10771:6:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items storage pointer" + } + }, + "id": 12317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "table", + "nodeType": "MemberAccess", + "referencedDeclaration": 11688, + "src": "10771:12:11", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Item_$11681_storage_$", + "typeString": "mapping(address => struct ConverterRegistryData.Item storage ref)" + } + }, + "id": 12319, + "indexExpression": { + "argumentTypes": null, + "id": 12318, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10784:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10771:20:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Item_$11681_storage", + "typeString": "struct ConverterRegistryData.Item storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12321, + "nodeType": "ExpressionStatement", + "src": "10764:27:11" + } + ] + }, + "documentation": { + "id": 12256, + "nodeType": "StructuredDocumentation", + "src": "10215:144:11", + "text": " @dev removes an item from a list of items\n @param _items list of items\n @param _value item's value" + }, + "id": 12323, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12263, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12260, + "src": "10445:6:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 12264, + "modifierName": { + "argumentTypes": null, + "id": 12262, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "10432:12:11", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "10432:20:11" + } + ], + "name": "removeItem", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12258, + "mutability": "mutable", + "name": "_items", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12323, + "src": "10385:20:11", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + }, + "typeName": { + "contractScope": null, + "id": 12257, + "name": "Items", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11689, + "src": "10385:5:11", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Items_$11689_storage_ptr", + "typeString": "struct ConverterRegistryData.Items" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12323, + "src": "10407:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10407:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10384:38:11" + }, + "returnParameters": { + "id": 12265, + "nodeType": "ParameterList", + "parameters": [], + "src": "10453:0:11" + }, + "scope": 12324, + "src": "10365:434:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 12325, + "src": "752:10050:11" + } + ], + "src": "52:10752:11" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xd0097a901AF4ac2E63A5b6E86be8Ad91f10b05d7", + "transactionHash": "0x89fa917fc8afde60ec81e4388b75a298bf821df70589964493f8950d8fc3f63d" + }, + "8995": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xd0097a901AF4ac2E63A5b6E86be8Ad91f10b05d7", + "transactionHash": "0x89fa917fc8afde60ec81e4388b75a298bf821df70589964493f8950d8fc3f63d" + }, + "1604964387852": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x55Ff16F5765c13A4446b511b596263C1De8Dfc26", + "transactionHash": "0x144e03bae03b254034eaa0e1aee71eb82f73230d9588852d68d86a8f921304c1" + }, + "1604964469407": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xAC3ff05D43718dF1d4c0F9363Baec946609640BA", + "transactionHash": "0xa9dc657a9abf000cda08ff7cca415975f43550f7f240e7be3e37f3f888e5485a" + }, + "1604965528035": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xcF7f75A6080BeA51a04A5d10B6f2A9eD4fA94160", + "transactionHash": "0xfe909296dec939d70261c1d9f24e15e47fb1eda091150932ba01fa5330ab0ae4" + }, + "1604965645554": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x48ec918ea761D509b367fe291A0980648554181C", + "transactionHash": "0x98be38342bdb36332b2c7fa19cab1741f3af7ab71882436748519f23e938dfbd" + }, + "1604965679541": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x87745E2a343213bBB441dcd051DdF097a013892E", + "transactionHash": "0x2c03673176e2c2328055a2a41b8cc82543c7a9986ff766e19a5cf2d67a951489" + }, + "1604965719492": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0xD382D4E21484C60847a48E52122cCf704C731bFf", + "transactionHash": "0x753f7963061ecd52d6348c9b8af34721f84069b72fcb487c9226d29ccf3771a9" + }, + "1604965760834": { + "events": { + "0x343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + } + }, + "links": {}, + "address": "0x6076e2Dbe065826C21C4bB82e05D0e5fd1D92d15", + "transactionHash": "0x1c4d1c3a519f64956bc6b5727cf1248addf3d8d8369b350d008125b6710c035d" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:41.912Z", + "networkType": "ethereum", + "devdoc": { + "details": "The ConverterRegistryData contract is an integral part of the converter registry as it serves as the database contract that holds all registry data. The registry is separated into two different contracts for upgradability - the data contract is harder to upgrade as it requires migrating all registry data into a new contract, while the registry contract itself can be easily upgraded. For that same reason, the data contract is simple and contains no logic beyond the basic data access utilities that it exposes.", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "addConvertibleToken(address,address)": { + "details": "adds a convertible token", + "params": { + "_anchor": "associated smart token", + "_convertibleToken": "convertible token" + } + }, + "addLiquidityPool(address)": { + "details": "adds a liquidity pool", + "params": { + "_liquidityPoolAnchor": "liquidity pool" + } + }, + "addSmartToken(address)": { + "details": "adds a smart token", + "params": { + "_anchor": "smart token" + } + }, + "constructor": { + "details": "initializes a new ConverterRegistryData instance", + "params": { + "_registry": "address of a contract registry contract" + } + }, + "getConvertibleToken(uint256)": { + "details": "returns the convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "convertible token at the given index" + } + }, + "getConvertibleTokenCount()": { + "details": "returns the number of convertible tokens", + "returns": { + "_0": "number of convertible tokens" + } + }, + "getConvertibleTokenSmartToken(address,uint256)": { + "details": "returns the smart token associated with a given convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "smart token associated with the given convertible token at the given index" + } + }, + "getConvertibleTokenSmartTokenCount(address)": { + "details": "returns the number of smart tokens associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "number of smart tokens associated with the given convertible token" + } + }, + "getConvertibleTokenSmartTokens(address)": { + "details": "returns the list of smart tokens associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "list of smart tokens associated with the given convertible token" + } + }, + "getConvertibleTokens()": { + "details": "returns the list of convertible tokens", + "returns": { + "_0": "list of convertible tokens" + } + }, + "getLiquidityPool(uint256)": { + "details": "returns the liquidity pool at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "liquidity pool at the given index" + } + }, + "getLiquidityPoolCount()": { + "details": "returns the number of liquidity pools", + "returns": { + "_0": "number of liquidity pools" + } + }, + "getLiquidityPools()": { + "details": "returns the list of liquidity pools", + "returns": { + "_0": "list of liquidity pools" + } + }, + "getSmartToken(uint256)": { + "details": "returns the smart token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "smart token at the given index" + } + }, + "getSmartTokenCount()": { + "details": "returns the number of smart tokens", + "returns": { + "_0": "number of smart tokens" + } + }, + "getSmartTokens()": { + "details": "returns the list of smart tokens", + "returns": { + "_0": "list of smart tokens" + } + }, + "isConvertibleToken(address)": { + "details": "checks whether or not a given value is a convertible token", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a convertible token, false if not" + } + }, + "isConvertibleTokenSmartToken(address,address)": { + "details": "checks whether or not a given value is a smart token of a given convertible token", + "params": { + "_convertibleToken": "convertible token", + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a smart token of the given convertible token, false it not" + } + }, + "isLiquidityPool(address)": { + "details": "checks whether or not a given value is a liquidity pool", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a liquidity pool, false if not" + } + }, + "isSmartToken(address)": { + "details": "checks whether or not a given value is a smart token", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a smart token, false if not" + } + }, + "removeConvertibleToken(address,address)": { + "details": "removes a convertible token", + "params": { + "_anchor": "associated smart token", + "_convertibleToken": "convertible token" + } + }, + "removeLiquidityPool(address)": { + "details": "removes a liquidity pool", + "params": { + "_liquidityPoolAnchor": "liquidity pool" + } + }, + "removeSmartToken(address)": { + "details": "removes a smart token", + "params": { + "_anchor": "smart token" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json b/apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json new file mode 100644 index 00000000..3bd2e3f7 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json @@ -0,0 +1,18634 @@ +{ + "contractName": "ConverterUpgrader", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "contract IEtherToken", + "name": "_etherToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "ConverterOwned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_oldConverter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newConverter", + "type": "address" + } + ], + "name": "ConverterUpgrade", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "etherToken", + "outputs": [ + { + "internalType": "contract IEtherToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_version", + "type": "bytes32" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_version", + "type": "bytes32" + } + ], + "name": "upgradeOld", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"contract IEtherToken\",\"name\":\"_etherToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"ConverterOwned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldConverter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newConverter\",\"type\":\"address\"}],\"name\":\"ConverterUpgrade\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"etherToken\",\"outputs\":[{\"internalType\":\"contract IEtherToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgradeOld\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Converter Upgrader The converter upgrader contract allows upgrading an older converter contract (0.4 and up) to the latest version. To begin the upgrade process, simply execute the 'upgrade' function. At the end of the process, the ownership of the newly upgraded converter will be transferred back to the original owner and the original owner will need to execute the 'acceptOwnership' function. The address of the new converter is available in the ConverterUpgrade event. Note that for older converters that don't yet have the 'upgrade' function, ownership should first be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function and then the upgrader 'upgrade' function should be executed directly.\",\"events\":{\"ConverterOwned(address,address)\":{\"details\":\"triggered when the contract accept a converter ownership\",\"params\":{\"_converter\":\"converter address\",\"_owner\":\"new owner - local upgrader address\"}},\"ConverterUpgrade(address,address)\":{\"details\":\"triggered when the upgrading process is done\",\"params\":{\"_newConverter\":\"new converter address\",\"_oldConverter\":\"old converter address\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new ConverterUpgrader instance\",\"params\":{\"_registry\":\"address of a contract registry contract\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade(bytes32)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter\",\"params\":{\"_version\":\"old converter version\"}},\"upgrade(uint16)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter\",\"params\":{\"_version\":\"old converter version\"}},\"upgradeOld(address,bytes32)\":{\"details\":\"upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success.\",\"params\":{\"_converter\":\"old converter contract address\",\"_version\":\"old converter version\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol\":\"ConverterUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol\":{\"keccak256\":\"0x323711379e7fb617613e4260e5e04f745103cbcda30ff8d61ec29529b99d7526\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://770228b2605de3fe44710a54e9ab5116e58e652e9be23c3d0fecb82c7171b6a5\",\"dweb:/ipfs/QmWpJzUtG9Kpq39tFQ6K6pmk69H5HhYamiJAwKSRdcmCPL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\":{\"keccak256\":\"0x2420b67eec33085ab879f4962fc0b98d14ae227f2afccc85308e6333ca1b49fd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://074f808b01138b47d823eff0a15512005144cab48f450ff35ee41cb36adab3e5\",\"dweb:/ipfs/QmS2hpadJLAJCCavW7Gq8TTo8AUEJgqCe1BSFFUQ2MvGiW\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051611d60380380611d608339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b0319163317905581806100598161009c565b50600280546001600160a01b039283166001600160a01b0319918216811790925560038054821690921790915560048054939092169216919091179055506100fa565b6001600160a01b0381166100f7576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b611c57806101096000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f58c961161008c578063bc444e1311610066578063bc444e13146101a1578063d4ee1d90146101be578063f2cfed87146101c6578063f2fde38b146101f2576100ea565b806390f58c9614610170578063b4a176d314610191578063b8066bcb14610199576100ea565b806361cd756e116100c857806361cd756e1461013457806379ba5097146101585780637b103999146101605780638da5cb5b14610168576100ea565b8063024c7ec7146100ef5780632fe8a6ad1461011057806349d10b641461012c575b600080fd5b61010e6004803603602081101561010557600080fd5b50351515610218565b005b61011861023e565b604080519115158252519081900360200190f35b61010e61024e565b61013c610456565b604080516001600160a01b039092168252519081900360200190f35b61010e610465565b61013c61051c565b61013c61052b565b61010e6004803603602081101561018657600080fd5b503561ffff1661053a565b61010e61054b565b61013c610577565b61010e600480360360208110156101b757600080fd5b5035610586565b61013c610590565b61010e600480360360408110156101dc57600080fd5b506001600160a01b03813516906020013561059f565b61010e6004803603602081101561020857600080fd5b50356001600160a01b0316610977565b6102206109f5565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102715750600354600160a01b900460ff16155b6102b6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102d46f436f6e7472616374526567697374727960801b610a4a565b6002549091506001600160a01b038083169116148015906102fd57506001600160a01b03811615155b610345576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d60208110156103d157600080fd5b50516001600160a01b03161415610426576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146104b8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b6105483361ffff831661059f565b50565b6105536109f5565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6004546001600160a01b031681565b610548338261059f565b6001546001600160a01b031681565b60008290506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d602081101561060957600080fd5b5051905061061682610aca565b600061062183610b56565b905061062d8382610e56565b6106378382611175565b610641838261124a565b6000836001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d60208110156106a657600080fd5b5051905060006106b585611641565b80156107225750846001600160a01b03166322f3e2d46040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f557600080fd5b505afa158015610709573d6000803e3d6000fd5b505050506040513d602081101561071f57600080fd5b50515b9050846001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076757600080fd5b505afa15801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50516001600160a01b0316141561085d57846001600160a01b03166321e6b53d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b50505050826001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561084457600080fd5b505af1158015610858573d6000803e3d6000fd5b505050505b610868858483611758565b846001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156108b757600080fd5b505af11580156108cb573d6000803e3d6000fd5b50505050826001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50506040516001600160a01b038087169350881691507f522b846327aea07106ec4d64ae4b6d6dea47689884dab650fd3a1f2e1d6a270190600090a350505050505050565b61097f6109f5565b6000546001600160a01b03828116911614156109d3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a48576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610a9657600080fd5b505afa158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b505190505b919050565b806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b0557600080fd5b505af1158015610b19573d6000803e3d6000fd5b50506040513092506001600160a01b03841691507ff764604894fa993d4370a9cb28b81c11deb1aafdb2909156173ae3833dad807590600090a350565b600080826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051604080516394c275ad60e01b815290519192506000916001600160a01b038616916394c275ad916004808301926020929190829003018186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d6020811015610c2e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038716916371f52bf3916004808301926020929190829003018186803b158015610c7657600080fd5b505afa158015610c8a573d6000803e3d6000fd5b505050506040513d6020811015610ca057600080fd5b505190506000610caf86611641565b15610d2057856001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b50519050610d31565b60018261ffff161115610d31575060015b6000610d4f6f436f6e766572746572466163746f727960801b610a4a565b60025460408051630afb25b560e11b815261ffff861660048201526001600160a01b038981166024830152928316604482015263ffffffff881660648201529051929350600092918416916315f64b6a9160848082019260209290919082900301818787803b158015610dc157600080fd5b505af1158015610dd5573d6000803e3d6000fd5b505050506040513d6020811015610deb57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b50929a9950505050505050505050565b6000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9157600080fd5b505afa158015610ea5573d6000803e3d6000fd5b505050506040513d6020811015610ebb57600080fd5b5051905060005b8161ffff168161ffff16101561116f576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b505160408051630e53aae960e01b81526001600160a01b038084166004830152915192935060009291881691630e53aae99160248082019260a092909190829003018186803b158015610f9857600080fd5b505afa158015610fac573d6000803e3d6000fd5b505050506040513d60a0811015610fc257600080fd5b506020015190506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110725760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b50505050611165565b6004546001600160a01b03838116911614156110ef5760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b846001600160a01b0316636a49d2c483836040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b505050505b5050600101610ec2565b50505050565b6000826001600160a01b031663579cd3ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b50516040805163ecbca55d60e01b815263ffffffff8316600482015290519192506001600160a01b0384169163ecbca55d9160248082019260009290919082900301818387803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b50505050505050565b600080836001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060005b8161ffff168161ffff16101561163a576000856001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561131157600080fd5b505afa158015611325573d6000803e3d6000fd5b505050506040513d602081101561133b57600080fd5b505190506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d057856001600160a01b031663690d8320866040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050611631565b6004546001600160a01b038281169116141561154457600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144857600080fd5b505afa15801561145c573d6000803e3d6000fd5b505050506040513d602081101561147257600080fd5b50516004805460408051632f1a9acf60e11b81526001600160a01b03928316938101939093523060248401526044830184905251929650881691635e35359e9160648082019260009290919082900301818387803b1580156114d357600080fd5b505af11580156114e7573d6000803e3d6000fd5b5050600480546040805163040b850f60e31b81526001600160a01b038b811694820194909452602481018a9052905192909116935063205c2878925060448082019260009290919082900301818387803b1580156113b357600080fd5b604080516370a0823160e01b81526001600160a01b038881166004830152915183928316916370a08231916024808301926020929190829003018186803b15801561158e57600080fd5b505afa1580156115a2573d6000803e3d6000fd5b505050506040513d60208110156115b857600080fd5b505160408051632f1a9acf60e11b81526001600160a01b038481166004830152898116602483015260448201849052915192975090891691635e35359e9160648082019260009290919082900301818387803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b50505050505b506001016112b7565b5050505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106116ad5780518252601f19909201916020918201910161168e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461170e576040519150601f19603f3d011682016040523d82523d6000602084013e611713565b606091505b5091509150818015611726575080516020145b1561174d5780806020019051602081101561174057600080fd5b50519350610ac592505050565b506000949350505050565b61176183611641565b61176a57611c1c565b6000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d60208110156117cf57600080fd5b50519050600261ffff8216141561116f57600084905060008490506000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b505050506040513d602081101561184f57600080fd5b5051905060005b8161ffff168161ffff1610156119d1576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b1580156118b057600080fd5b505afa1580156118c4573d6000803e3d6000fd5b505050506040513d60208110156118da57600080fd5b50516040805162178c6760e21b81526001600160a01b038084166004830152915192935060009291881691625e319c91602480820192602092909190829003018186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d602081101561195457600080fd5b505160408051635fbed35d60e11b81526001600160a01b0385811660048301526024820184905291519293509087169163bf7da6ba9160448082019260009290919082900301818387803b1580156119ab57600080fd5b505af11580156119bf573d6000803e3d6000fd5b50506001909401935061185692505050565b50846119e05750505050611c1c565b6000836001600160a01b0316630337e3fb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d6020811015611a4557600080fd5b505160408051632630c12f60e01b815290519192506000916001600160a01b03871691632630c12f916004808301926020929190829003018186803b158015611a8d57600080fd5b505afa158015611aa1573d6000803e3d6000fd5b505050506040513d6020811015611ab757600080fd5b50516040805163b9e1715b60e01b815290519192506000916001600160a01b0384169163b9e1715b916004808301926020929190829003018186803b158015611aff57600080fd5b505afa158015611b13573d6000803e3d6000fd5b505050506040513d6020811015611b2957600080fd5b50516040805163f997fda760e01b815290519192506000916001600160a01b0385169163f997fda7916004808301926020929190829003018186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b50516040805163119b90cd60e01b81526001600160a01b0387811660048301528581166024830152808416604483015291519293509088169163119b90cd9160648082019260009290919082900301818387803b158015611bfb57600080fd5b505af1158015611c0f573d6000803e3d6000fd5b5050505050505050505050505b50505056fea2646970667358221220111fd1a2ce055791c689823e173085bc0f337d75226fe3b9173a5cb0977f91e864736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806390f58c961161008c578063bc444e1311610066578063bc444e13146101a1578063d4ee1d90146101be578063f2cfed87146101c6578063f2fde38b146101f2576100ea565b806390f58c9614610170578063b4a176d314610191578063b8066bcb14610199576100ea565b806361cd756e116100c857806361cd756e1461013457806379ba5097146101585780637b103999146101605780638da5cb5b14610168576100ea565b8063024c7ec7146100ef5780632fe8a6ad1461011057806349d10b641461012c575b600080fd5b61010e6004803603602081101561010557600080fd5b50351515610218565b005b61011861023e565b604080519115158252519081900360200190f35b61010e61024e565b61013c610456565b604080516001600160a01b039092168252519081900360200190f35b61010e610465565b61013c61051c565b61013c61052b565b61010e6004803603602081101561018657600080fd5b503561ffff1661053a565b61010e61054b565b61013c610577565b61010e600480360360208110156101b757600080fd5b5035610586565b61013c610590565b61010e600480360360408110156101dc57600080fd5b506001600160a01b03813516906020013561059f565b61010e6004803603602081101561020857600080fd5b50356001600160a01b0316610977565b6102206109f5565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806102715750600354600160a01b900460ff16155b6102b6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102d46f436f6e7472616374526567697374727960801b610a4a565b6002549091506001600160a01b038083169116148015906102fd57506001600160a01b03811615155b610345576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156103a757600080fd5b505afa1580156103bb573d6000803e3d6000fd5b505050506040513d60208110156103d157600080fd5b50516001600160a01b03161415610426576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146104b8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b6105483361ffff831661059f565b50565b6105536109f5565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6004546001600160a01b031681565b610548338261059f565b6001546001600160a01b031681565b60008290506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105df57600080fd5b505afa1580156105f3573d6000803e3d6000fd5b505050506040513d602081101561060957600080fd5b5051905061061682610aca565b600061062183610b56565b905061062d8382610e56565b6106378382611175565b610641838261124a565b6000836001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d60208110156106a657600080fd5b5051905060006106b585611641565b80156107225750846001600160a01b03166322f3e2d46040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f557600080fd5b505afa158015610709573d6000803e3d6000fd5b505050506040513d602081101561071f57600080fd5b50515b9050846001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076757600080fd5b505afa15801561077b573d6000803e3d6000fd5b505050506040513d602081101561079157600080fd5b50516001600160a01b0316141561085d57846001600160a01b03166321e6b53d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b50505050826001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561084457600080fd5b505af1158015610858573d6000803e3d6000fd5b505050505b610868858483611758565b846001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156108b757600080fd5b505af11580156108cb573d6000803e3d6000fd5b50505050826001600160a01b031663f2fde38b856040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561091e57600080fd5b505af1158015610932573d6000803e3d6000fd5b50506040516001600160a01b038087169350881691507f522b846327aea07106ec4d64ae4b6d6dea47689884dab650fd3a1f2e1d6a270190600090a350505050505050565b61097f6109f5565b6000546001600160a01b03828116911614156109d3576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a48576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610a9657600080fd5b505afa158015610aaa573d6000803e3d6000fd5b505050506040513d6020811015610ac057600080fd5b505190505b919050565b806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b0557600080fd5b505af1158015610b19573d6000803e3d6000fd5b50506040513092506001600160a01b03841691507ff764604894fa993d4370a9cb28b81c11deb1aafdb2909156173ae3833dad807590600090a350565b600080826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051604080516394c275ad60e01b815290519192506000916001600160a01b038616916394c275ad916004808301926020929190829003018186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d6020811015610c2e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038716916371f52bf3916004808301926020929190829003018186803b158015610c7657600080fd5b505afa158015610c8a573d6000803e3d6000fd5b505050506040513d6020811015610ca057600080fd5b505190506000610caf86611641565b15610d2057856001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b50519050610d31565b60018261ffff161115610d31575060015b6000610d4f6f436f6e766572746572466163746f727960801b610a4a565b60025460408051630afb25b560e11b815261ffff861660048201526001600160a01b038981166024830152928316604482015263ffffffff881660648201529051929350600092918416916315f64b6a9160848082019260209290919082900301818787803b158015610dc157600080fd5b505af1158015610dd5573d6000803e3d6000fd5b505050506040513d6020811015610deb57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015610e3257600080fd5b505af1158015610e46573d6000803e3d6000fd5b50929a9950505050505050505050565b6000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e9157600080fd5b505afa158015610ea5573d6000803e3d6000fd5b505050506040513d6020811015610ebb57600080fd5b5051905060005b8161ffff168161ffff16101561116f576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d6020811015610f4657600080fd5b505160408051630e53aae960e01b81526001600160a01b038084166004830152915192935060009291881691630e53aae99160248082019260a092909190829003018186803b158015610f9857600080fd5b505afa158015610fac573d6000803e3d6000fd5b505050506040513d60a0811015610fc257600080fd5b506020015190506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110725760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b505af1158015611069573d6000803e3d6000fd5b50505050611165565b6004546001600160a01b03838116911614156110ef5760408051631a9274b160e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015263ffffffff8316602482015290516001600160a01b03871691636a49d2c491604480830192600092919082900301818387803b15801561105557600080fd5b846001600160a01b0316636a49d2c483836040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b505050505b5050600101610ec2565b50505050565b6000826001600160a01b031663579cd3ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b50516040805163ecbca55d60e01b815263ffffffff8316600482015290519192506001600160a01b0384169163ecbca55d9160248082019260009290919082900301818387803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b50505050505050565b600080836001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060005b8161ffff168161ffff16101561163a576000856001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561131157600080fd5b505afa158015611325573d6000803e3d6000fd5b505050506040513d602081101561133b57600080fd5b505190506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d057856001600160a01b031663690d8320866040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b50505050611631565b6004546001600160a01b038281169116141561154457600460009054906101000a90046001600160a01b03166001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144857600080fd5b505afa15801561145c573d6000803e3d6000fd5b505050506040513d602081101561147257600080fd5b50516004805460408051632f1a9acf60e11b81526001600160a01b03928316938101939093523060248401526044830184905251929650881691635e35359e9160648082019260009290919082900301818387803b1580156114d357600080fd5b505af11580156114e7573d6000803e3d6000fd5b5050600480546040805163040b850f60e31b81526001600160a01b038b811694820194909452602481018a9052905192909116935063205c2878925060448082019260009290919082900301818387803b1580156113b357600080fd5b604080516370a0823160e01b81526001600160a01b038881166004830152915183928316916370a08231916024808301926020929190829003018186803b15801561158e57600080fd5b505afa1580156115a2573d6000803e3d6000fd5b505050506040513d60208110156115b857600080fd5b505160408051632f1a9acf60e11b81526001600160a01b038481166004830152898116602483015260448201849052915192975090891691635e35359e9160648082019260009290919082900301818387803b15801561161757600080fd5b505af115801561162b573d6000803e3d6000fd5b50505050505b506001016112b7565b5050505050565b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b602083106116ad5780518252601f19909201916020918201910161168e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461170e576040519150601f19603f3d011682016040523d82523d6000602084013e611713565b606091505b5091509150818015611726575080516020145b1561174d5780806020019051602081101561174057600080fd5b50519350610ac592505050565b506000949350505050565b61176183611641565b61176a57611c1c565b6000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d60208110156117cf57600080fd5b50519050600261ffff8216141561116f57600084905060008490506000826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561182557600080fd5b505afa158015611839573d6000803e3d6000fd5b505050506040513d602081101561184f57600080fd5b5051905060005b8161ffff168161ffff1610156119d1576000846001600160a01b03166319b64015836040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b1580156118b057600080fd5b505afa1580156118c4573d6000803e3d6000fd5b505050506040513d60208110156118da57600080fd5b50516040805162178c6760e21b81526001600160a01b038084166004830152915192935060009291881691625e319c91602480820192602092909190829003018186803b15801561192a57600080fd5b505afa15801561193e573d6000803e3d6000fd5b505050506040513d602081101561195457600080fd5b505160408051635fbed35d60e11b81526001600160a01b0385811660048301526024820184905291519293509087169163bf7da6ba9160448082019260009290919082900301818387803b1580156119ab57600080fd5b505af11580156119bf573d6000803e3d6000fd5b50506001909401935061185692505050565b50846119e05750505050611c1c565b6000836001600160a01b0316630337e3fb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d6020811015611a4557600080fd5b505160408051632630c12f60e01b815290519192506000916001600160a01b03871691632630c12f916004808301926020929190829003018186803b158015611a8d57600080fd5b505afa158015611aa1573d6000803e3d6000fd5b505050506040513d6020811015611ab757600080fd5b50516040805163b9e1715b60e01b815290519192506000916001600160a01b0384169163b9e1715b916004808301926020929190829003018186803b158015611aff57600080fd5b505afa158015611b13573d6000803e3d6000fd5b505050506040513d6020811015611b2957600080fd5b50516040805163f997fda760e01b815290519192506000916001600160a01b0385169163f997fda7916004808301926020929190829003018186803b158015611b7157600080fd5b505afa158015611b85573d6000803e3d6000fd5b505050506040513d6020811015611b9b57600080fd5b50516040805163119b90cd60e01b81526001600160a01b0387811660048301528581166024830152808416604483015291519293509088169163119b90cd9160648082019260009290919082900301818387803b158015611bfb57600080fd5b505af1158015611c0f573d6000803e3d6000fd5b5050505050505050505050505b50505056fea2646970667358221220111fd1a2ce055791c689823e173085bc0f337d75226fe3b9173a5cb0977f91e864736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1251:11574:12:-:0;;;2216:150;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2216:150:12;;;;;;;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;2216:150:12;;594:23:64;2216:150:12;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;::::1;::::0;;::::1;::::0;;;2334:10:12::1;:24:::0;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1251:11574:12;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;1251:11574:12:-;;;;;;;", + "deployedSourceMap": "1251:11574:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;1333:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;2300:925;;;:::i;1243:37::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;1422:217:57;;;:::i;1154:33:56:-;;;:::i;219:29:57:-;;;:::i;3336:131:12:-;;;;;;;;;;;;;;;;-1:-1:-1;3336:131:12;;;;:::i;3304:137:56:-;;;:::i;1444:29:12:-;;;:::i;2794:114::-;;;;;;;;;;;;;;;;-1:-1:-1;2794:114:12;;:::i;255:23:57:-;;;:::i;3916:1113:12:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3916:1113:12;;;;;;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;1333:38::-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;1243:37::-;;;-1:-1:-1;;;;;1243:37:56;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;3336:131:12:-;3397:62;3419:10;3440:17;;;3397:10;:62::i;:::-;3336:131;:::o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;1444:29:12:-;;;-1:-1:-1;;;;;1444:29:12;;:::o;2794:114::-;2856:44;2878:10;2891:8;2856:10;:44::i;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;3916:1113:12:-;4014:20;4048:10;4014:45;;4070:17;4090:9;-1:-1:-1;;;;;4090:15:12;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4090:17:12;;-1:-1:-1;4118:35:12;4143:9;4118:24;:35::i;:::-;4164:23;4190:26;4206:9;4190:15;:26::i;:::-;4164:52;;4227:37;4240:9;4251:12;4227;:37::i;:::-;4275:42;4293:9;4304:12;4275:17;:42::i;:::-;4328:48;4352:9;4363:12;4328:23;:48::i;:::-;4387:23;4413:9;-1:-1:-1;;;;;4413:15:12;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4413:17:12;;-1:-1:-1;4511:13:12;4527:33;4550:9;4527:22;:33::i;:::-;:57;;;;;4564:9;-1:-1:-1;;;;;4564:18:12;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4564:20:12;4527:57;4511:73;;4627:9;-1:-1:-1;;;;;4601:36:12;:6;-1:-1:-1;;;;;4601:12:12;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4601:14:12;-1:-1:-1;;;;;4601:36:12;;4597:175;;;4654:9;-1:-1:-1;;;;;4654:32:12;;4695:12;4654:55;;;;;;;;;;;;;-1:-1:-1;;;;;4654:55:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4724:12;-1:-1:-1;;;;;4724:34:12;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4597:175;4784:57;4807:9;4818:12;4832:8;4784:22;:57::i;:::-;4854:9;-1:-1:-1;;;;;4854:27:12;;4882:9;4854:38;;;;;;;;;;;;;-1:-1:-1;;;;;4854:38:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4903:12;-1:-1:-1;;;;;4903:30:12;;4934:9;4903:41;;;;;;;;;;;;;-1:-1:-1;;;;;4903:41:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4962:59:12;;-1:-1:-1;;;;;4962:59:12;;;;-1:-1:-1;4962:59:12;;;-1:-1:-1;4962:59:12;;;;;3916:1113;;;;;;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;-1:-1:-1;4077:133:56;;;;:::o;5416:178:12:-;5495:13;-1:-1:-1;;;;;5495:29:12;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5542:44:12;;5580:4;;-1:-1:-1;;;;;;5542:44:12;;;-1:-1:-1;5542:44:12;;;;;5416:178;:::o;5930:992::-;5998:10;6021:23;6047:13;-1:-1:-1;;;;;6047:19:12;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6047:21:12;6105:32;;;-1:-1:-1;;;6105:32:12;;;;6047:21;;-1:-1:-1;6079:23:12;;-1:-1:-1;;;;;6105:30:12;;;;;:32;;;;;6047:21;;6105:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6105:32:12;6175:35;;;-1:-1:-1;;;6175:35:12;;;;6105:32;;-1:-1:-1;6148:24:12;;-1:-1:-1;;;;;6175:33:12;;;;;:35;;;;;6105:32;;6175:35;;;;;;;:33;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6175:35:12;;-1:-1:-1;6264:14:12;6364:37;6387:13;6364:22;:37::i;:::-;6360:279;;;6426:13;-1:-1:-1;;;;;6426:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6426:29:12;;-1:-1:-1;6360:279:12;;;6612:1;6592:17;:21;;;6588:51;;;-1:-1:-1;6638:1:12;6588:51;6652:34;6707:28;-1:-1:-1;;;6707:9:12;:28::i;:::-;6820:8;;6770:77;;;-1:-1:-1;;;6770:77:12;;;;;;;;;-1:-1:-1;;;;;6770:77:12;;;;;;;6820:8;;;6770:77;;;;;;;;;;;;;6652:84;;-1:-1:-1;6747:20:12;;6770:32;;;;;;:77;;;;;;;;;;;;;;;6747:20;6770:32;:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6770:77:12;6860:27;;;-1:-1:-1;;;6860:27:12;;;;6770:77;;-1:-1:-1;;;;;;6860:25:12;;;;;:27;;;;;;;;;;;;;;;;:25;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6905:9:12;;5930:992;-1:-1:-1;;;;;;;;;;5930:992:12:o;7267:883::-;7360:24;7387:13;-1:-1:-1;;;;;7387:33:12;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7387:35:12;;-1:-1:-1;7440:8:12;7435:708;7458:17;7454:21;;:1;:21;;;7435:708;;;7497:26;7526:13;-1:-1:-1;;;;;7526:29:12;;7556:1;7526:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7526:32:12;7599:40;;;-1:-1:-1;;;7599:40:12;;-1:-1:-1;;;;;7599:40:12;;;;;;;;;7526:32;;-1:-1:-1;7576:13:12;;7599:24;;;;;;:40;;;;;;;;;;;;;;;:24;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7599:40:12;;;;-1:-1:-1;;;;;;7690:37:12;;1394:42;7690:37;7686:446;;;7748:53;;;-1:-1:-1;;;7748:53:12;;1394:42;7748:53;;;;;;;;;;;;;-1:-1:-1;;;;;7748:24:12;;;;;:53;;;;;-1:-1:-1;;7748:53:12;;;;;;;-1:-1:-1;7748:24:12;:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7686:446;;;7894:10;;-1:-1:-1;;;;;7876:28:12;;;7894:10;;7876:28;7872:260;;;7925:53;;;-1:-1:-1;;;7925:53:12;;1394:42;7925:53;;;;;;;;;;;;;-1:-1:-1;;;;;7925:24:12;;;;;:53;;;;;-1:-1:-1;;7925:53:12;;;;;;;-1:-1:-1;7925:24:12;:53;;;;;;;;;;7872:260;8068:13;-1:-1:-1;;;;;8068:24:12;;8093:14;8109:6;8068:48;;;;;;;;;;;;;-1:-1:-1;;;;;8068:48:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7872:260;-1:-1:-1;;7477:3:12;;7435:708;;;;7267:883;;;:::o;8390:214::-;8488:20;8511:13;-1:-1:-1;;;;;8511:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8511:29:12;8551:45;;;-1:-1:-1;;;8551:45:12;;;;;;;;;;;8511:29;;-1:-1:-1;;;;;;8551:30:12;;;;;:45;;;;;-1:-1:-1;;8551:45:12;;;;;;;;-1:-1:-1;8551:30:12;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8390:214;;;:::o;9061:1185::-;9165:22;9198:24;9225:13;-1:-1:-1;;;;;9225:33:12;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9225:35:12;;-1:-1:-1;9278:8:12;9273:966;9296:17;9292:21;;:1;:21;;;9273:966;;;9335:26;9364:13;-1:-1:-1;;;;;9364:29:12;;9394:1;9364:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9364:32:12;;-1:-1:-1;;;;;;9445:37:12;;1394:42;9445:37;9441:787;;;9503:13;-1:-1:-1;;;;;9503:25:12;;9537:13;9503:49;;;;;;;;;;;;;-1:-1:-1;;;;;9503:49:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9441:787;;;9645:10;;-1:-1:-1;;;;;9627:28:12;;;9645:10;;9627:28;9623:605;;;9693:10;;;;;;;;;-1:-1:-1;;;;;9693:10:12;-1:-1:-1;;;;;9693:20:12;;9722:13;9693:44;;;;;;;;;;;;;-1:-1:-1;;;;;9693:44:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9693:44:12;9785:10;;;9756:71;;;-1:-1:-1;;;9756:71:12;;-1:-1:-1;;;;;9785:10:12;;;9756:71;;;;;;;9805:4;9756:71;;;;;;;;;;;9693:44;;-1:-1:-1;9756:28:12;;;;;:71;;;;;9785:10;;9756:71;;;;;;;;9785:10;9756:28;:71;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9846:10:12;;;:61;;;-1:-1:-1;;;9846:61:12;;-1:-1:-1;;;;;9846:61:12;;;;;;;;;;;;;;;;;;:10;;;;;-1:-1:-1;9846:21:12;;-1:-1:-1;9846:61:12;;;;;:10;;:61;;;;;;;;:10;;:61;;;;;;;;;;9623:605;10071:43;;;-1:-1:-1;;;10071:43:12;;-1:-1:-1;;;;;10071:43:12;;;;;;;;;10021:14;;10071:19;;;;;:43;;;;;;;;;;;;;;:19;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10071:43:12;10133:79;;;-1:-1:-1;;;10133:79:12;;-1:-1:-1;;;;;10133:79:12;;;;;;;;;;;;;;;;;;;;;;10071:43;;-1:-1:-1;10133:28:12;;;;;;:79;;;;;-1:-1:-1;;10133:79:12;;;;;;;;-1:-1:-1;10133:28:12;:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9623:605;;-1:-1:-1;9315:3:12;;9273:966;;;;9061:1185;;;;:::o;12402:420::-;12517:54;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12517:54:12;-1:-1:-1;;;12517:54:12;;;12624:49;;;;12480:4;;;;12497:17;;-1:-1:-1;;;;;12624:30:12;;;12661:4;;12517:54;;12624:49;;;;;;12517:54;12624:49;;;;;;;;;;-1:-1:-1;;12624:49:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12582:91;;;;12690:7;:34;;;;;12701:10;:17;12722:2;12701:23;12690:34;12686:104;;;12759:10;12748:30;;;;;;;;;;;;;;;-1:-1:-1;12748:30:12;;-1:-1:-1;12741:37:12;;-1:-1:-1;;;12741:37:12;12686:104;-1:-1:-1;12809:5:12;;12402:420;-1:-1:-1;;;;12402:420:12:o;10566:1562::-;10690:37;10713:13;10690:22;:37::i;:::-;10685:64;;10742:7;;10685:64;10761:20;10784:13;-1:-1:-1;;;;;10784:27:12;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10784:29:12;;-1:-1:-1;10845:1:12;10828:18;;;;10824:1297;;;10863:38;10938:13;10863:90;;10968:38;11043:13;10968:90;;11075:24;11102:12;-1:-1:-1;;;;;11102:32:12;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11102:34:12;;-1:-1:-1;11156:8:12;11151:371;11174:17;11170:21;;:1;:21;;;11151:371;;;11265:31;11299:12;-1:-1:-1;;;;;11299:28:12;;11328:1;11299:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11299:31:12;11367:54;;;-1:-1:-1;;;11367:54:12;;-1:-1:-1;;;;;11367:54:12;;;;;;;;;11299:31;;-1:-1:-1;11349:15:12;;11367:33;;;;;;:54;;;;;11299:31;;11367:54;;;;;;;;:33;:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11367:54:12;11440:66;;;-1:-1:-1;;;11440:66:12;;-1:-1:-1;;;;;11440:66:12;;;;;;;;;;;;;;;11367:54;;-1:-1:-1;11440:36:12;;;;;;:66;;;;;-1:-1:-1;;11440:66:12;;;;;;;;-1:-1:-1;11440:36:12;:66;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11193:3:12;;;;;-1:-1:-1;11151:371:12;;-1:-1:-1;;;11151:371:12;;;11543:9;11538:57;;11573:7;;;;;;11538:57;11657:31;11691:12;-1:-1:-1;;;;;11691:32:12;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11691:34:12;11817:26;;;-1:-1:-1;;;11817:26:12;;;;11691:34;;-1:-1:-1;11790:24:12;;-1:-1:-1;;;;;11817:24:12;;;;;:26;;;;;11691:34;;11817:26;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11817:26:12;11890;;;-1:-1:-1;;;11890:26:12;;;;11817;;-1:-1:-1;11858:29:12;;-1:-1:-1;;;;;11890:24:12;;;;;:26;;;;;11817;;11890;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11890:26:12;11963;;;-1:-1:-1;;;11963:26:12;;;;11890;;-1:-1:-1;11931:29:12;;-1:-1:-1;;;;;11963:24:12;;;;;:26;;;;;11890;;11963;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11963:26:12;12049:60;;;-1:-1:-1;;;12049:60:12;;-1:-1:-1;;;;;12049:60:12;;;;;;;;;;;;;;;;;;;;;;;11963:26;;-1:-1:-1;12049:21:12;;;;;;:60;;;;;-1:-1:-1;;12049:60:12;;;;;;;;-1:-1:-1;12049:21:12;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10824:1297;;;;;;;10566:1562;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IConverter.sol\";\r\nimport \"./interfaces/IConverterUpgrader.sol\";\r\nimport \"./interfaces/IConverterFactory.sol\";\r\nimport \"../utility/ContractRegistryClient.sol\";\r\nimport \"../utility/interfaces/IWhitelist.sol\";\r\nimport \"../token/interfaces/IEtherToken.sol\";\r\nimport \"./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\";\r\n\r\n/**\r\n * @dev Converter Upgrader\r\n *\r\n * The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\r\n * to the latest version.\r\n * To begin the upgrade process, simply execute the 'upgrade' function.\r\n * At the end of the process, the ownership of the newly upgraded converter will be transferred\r\n * back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\r\n *\r\n * The address of the new converter is available in the ConverterUpgrade event.\r\n *\r\n * Note that for older converters that don't yet have the 'upgrade' function, ownership should first\r\n * be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\r\n * and then the upgrader 'upgrade' function should be executed directly.\r\n*/\r\ncontract ConverterUpgrader is IConverterUpgrader, ContractRegistryClient {\r\n IERC20Token private constant ETH_RESERVE_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n IEtherToken public etherToken;\r\n\r\n /**\r\n * @dev triggered when the contract accept a converter ownership\r\n *\r\n * @param _converter converter address\r\n * @param _owner new owner - local upgrader address\r\n */\r\n event ConverterOwned(IConverter indexed _converter, address indexed _owner);\r\n\r\n /**\r\n * @dev triggered when the upgrading process is done\r\n *\r\n * @param _oldConverter old converter address\r\n * @param _newConverter new converter address\r\n */\r\n event ConverterUpgrade(address indexed _oldConverter, address indexed _newConverter);\r\n\r\n /**\r\n * @dev initializes a new ConverterUpgrader instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry, IEtherToken _etherToken) ContractRegistryClient(_registry) public {\r\n etherToken = _etherToken;\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n * can only be called by a converter\r\n *\r\n * @param _version old converter version\r\n */\r\n function upgrade(bytes32 _version) public override {\r\n upgradeOld(IConverter(msg.sender), _version);\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n * can only be called by a converter\r\n *\r\n * @param _version old converter version\r\n */\r\n function upgrade(uint16 _version) public override {\r\n upgradeOld(IConverter(msg.sender), bytes32(uint256(_version)));\r\n }\r\n\r\n /**\r\n * @dev upgrades an old converter to the latest version\r\n * will throw if ownership wasn't transferred to the upgrader before calling this function.\r\n * ownership of the new converter will be transferred back to the original owner.\r\n * fires the ConverterUpgrade event upon success.\r\n *\r\n * @param _converter old converter contract address\r\n * @param _version old converter version\r\n */\r\n function upgradeOld(IConverter _converter, bytes32 _version) public {\r\n _version;\r\n IConverter converter = IConverter(_converter);\r\n address prevOwner = converter.owner();\r\n acceptConverterOwnership(converter);\r\n IConverter newConverter = createConverter(converter);\r\n copyReserves(converter, newConverter);\r\n copyConversionFee(converter, newConverter);\r\n transferReserveBalances(converter, newConverter);\r\n IConverterAnchor anchor = converter.token();\r\n\r\n // get the activation status before it's being invalidated\r\n bool activate = isV28OrHigherConverter(converter) && converter.isActive();\r\n\r\n if (anchor.owner() == address(converter)) {\r\n converter.transferTokenOwnership(address(newConverter));\r\n newConverter.acceptAnchorOwnership();\r\n }\r\n\r\n handleTypeSpecificData(converter, newConverter, activate);\r\n\r\n converter.transferOwnership(prevOwner);\r\n newConverter.transferOwnership(prevOwner);\r\n\r\n emit ConverterUpgrade(address(converter), address(newConverter));\r\n }\r\n\r\n /**\r\n * @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\r\n * the upgrader contract then needs to accept the ownership transfer before initiating\r\n * the upgrade process.\r\n * fires the ConverterOwned event upon success\r\n *\r\n * @param _oldConverter converter to accept ownership of\r\n */\r\n function acceptConverterOwnership(IConverter _oldConverter) private {\r\n _oldConverter.acceptOwnership();\r\n emit ConverterOwned(_oldConverter, address(this));\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with same basic data as the original old converter\r\n * the newly created converter will have no reserves at this step.\r\n *\r\n * @param _oldConverter old converter contract address\r\n *\r\n * @return the new converter new converter contract address\r\n */\r\n function createConverter(IConverter _oldConverter) private returns (IConverter) {\r\n IConverterAnchor anchor = _oldConverter.token();\r\n uint32 maxConversionFee = _oldConverter.maxConversionFee();\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n // determine new converter type\r\n uint16 newType = 0;\r\n // new converter - get the type from the converter itself\r\n if (isV28OrHigherConverter(_oldConverter))\r\n newType = _oldConverter.converterType();\r\n // old converter - if it has 1 reserve token, the type is a liquid token, otherwise the type liquidity pool\r\n else if (reserveTokenCount > 1)\r\n newType = 1;\r\n\r\n IConverterFactory converterFactory = IConverterFactory(addressOf(CONVERTER_FACTORY));\r\n IConverter converter = converterFactory.createConverter(newType, anchor, registry, maxConversionFee);\r\n\r\n converter.acceptOwnership();\r\n return converter;\r\n }\r\n\r\n /**\r\n * @dev copies the reserves from the old converter to the new one.\r\n * note that this will not work for an unlimited number of reserves due to block gas limit constraints.\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function copyReserves(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n IERC20Token reserveAddress = _oldConverter.connectorTokens(i);\r\n (, uint32 weight, , , ) = _oldConverter.connectors(reserveAddress);\r\n\r\n // Ether reserve\r\n if (reserveAddress == ETH_RESERVE_ADDRESS) {\r\n _newConverter.addReserve(ETH_RESERVE_ADDRESS, weight);\r\n }\r\n // Ether reserve token\r\n else if (reserveAddress == etherToken) {\r\n _newConverter.addReserve(ETH_RESERVE_ADDRESS, weight);\r\n }\r\n // ERC20 reserve token\r\n else {\r\n _newConverter.addReserve(reserveAddress, weight);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @dev copies the conversion fee from the old converter to the new one\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function copyConversionFee(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint32 conversionFee = _oldConverter.conversionFee();\r\n _newConverter.setConversionFee(conversionFee);\r\n }\r\n\r\n /**\r\n * @dev transfers the balance of each reserve in the old converter to the new one.\r\n * note that the function assumes that the new converter already has the exact same number of\r\n * also, this will not work for an unlimited number of reserves due to block gas limit constraints.\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n */\r\n function transferReserveBalances(IConverter _oldConverter, IConverter _newConverter) private {\r\n uint256 reserveBalance;\r\n uint16 reserveTokenCount = _oldConverter.connectorTokenCount();\r\n\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n IERC20Token reserveAddress = _oldConverter.connectorTokens(i);\r\n // Ether reserve\r\n if (reserveAddress == ETH_RESERVE_ADDRESS) {\r\n _oldConverter.withdrawETH(address(_newConverter));\r\n }\r\n // Ether reserve token\r\n else if (reserveAddress == etherToken) {\r\n reserveBalance = etherToken.balanceOf(address(_oldConverter));\r\n _oldConverter.withdrawTokens(etherToken, address(this), reserveBalance);\r\n etherToken.withdrawTo(address(_newConverter), reserveBalance);\r\n }\r\n // ERC20 reserve token\r\n else {\r\n IERC20Token connector = reserveAddress;\r\n reserveBalance = connector.balanceOf(address(_oldConverter));\r\n _oldConverter.withdrawTokens(connector, address(_newConverter), reserveBalance);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @dev handles upgrading custom (type specific) data from the old converter to the new one\r\n *\r\n * @param _oldConverter old converter contract address\r\n * @param _newConverter new converter contract address\r\n * @param _activate activate the new converter\r\n */\r\n function handleTypeSpecificData(IConverter _oldConverter, IConverter _newConverter, bool _activate) private {\r\n if (!isV28OrHigherConverter(_oldConverter))\r\n return;\r\n\r\n uint16 converterType = _oldConverter.converterType();\r\n if (converterType == 2) {\r\n ILiquidityPoolV2Converter oldConverter = ILiquidityPoolV2Converter(address(_oldConverter));\r\n ILiquidityPoolV2Converter newConverter = ILiquidityPoolV2Converter(address(_newConverter));\r\n\r\n uint16 reserveTokenCount = oldConverter.connectorTokenCount();\r\n for (uint16 i = 0; i < reserveTokenCount; i++) {\r\n // copy reserve staked balance\r\n IERC20Token reserveTokenAddress = oldConverter.connectorTokens(i);\r\n uint256 balance = oldConverter.reserveStakedBalance(reserveTokenAddress);\r\n newConverter.setReserveStakedBalance(reserveTokenAddress, balance);\r\n }\r\n\r\n if (!_activate) {\r\n return;\r\n }\r\n\r\n // get the primary reserve token\r\n IERC20Token primaryReserveToken = oldConverter.primaryReserveToken();\r\n\r\n // get the chainlink price oracles\r\n IPriceOracle priceOracle = oldConverter.priceOracle();\r\n IChainlinkPriceOracle oracleA = priceOracle.tokenAOracle();\r\n IChainlinkPriceOracle oracleB = priceOracle.tokenBOracle();\r\n\r\n // activate the new converter\r\n newConverter.activate(primaryReserveToken, oracleA, oracleB);\r\n }\r\n }\r\n\r\n bytes4 private constant IS_V28_OR_HIGHER_FUNC_SELECTOR = bytes4(keccak256(\"isV28OrHigher()\"));\r\n\r\n // using a static call to identify converter version\r\n // can't rely on the version number since the function had a different signature in older converters\r\n function isV28OrHigherConverter(IConverter _converter) internal view returns (bool) {\r\n bytes memory data = abi.encodeWithSelector(IS_V28_OR_HIGHER_FUNC_SELECTOR);\r\n (bool success, bytes memory returnData) = address(_converter).staticcall{ gas: 4000 }(data);\r\n\r\n if (success && returnData.length == 32) {\r\n return abi.decode(returnData, (bool));\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol", + "exportedSymbols": { + "ConverterUpgrader": [ + 13009 + ] + }, + "id": 13010, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 12326, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:12" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 12327, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13341, + "src": "77:37:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "file": "./interfaces/IConverterUpgrader.sol", + "id": 12328, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13661, + "src": "116:45:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 12329, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13390, + "src": "163:44:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 12330, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 21720, + "src": "209:47:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "../utility/interfaces/IWhitelist.sol", + "id": 12331, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 22918, + "src": "258:46:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "../token/interfaces/IEtherToken.sol", + "id": 12332, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 21154, + "src": "306:45:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "file": "./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "id": 12333, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 18766, + "src": "353:76:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 12335, + "name": "IConverterUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13660, + "src": "1281:18:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "id": 12336, + "nodeType": "InheritanceSpecifier", + "src": "1281:18:12" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 12337, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1301:22:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 12338, + "nodeType": "InheritanceSpecifier", + "src": "1301:22:12" + } + ], + "contractDependencies": [ + 13660, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 12334, + "nodeType": "StructuredDocumentation", + "src": "433:816:12", + "text": " @dev Converter Upgrader\n The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\n to the latest version.\n To begin the upgrade process, simply execute the 'upgrade' function.\n At the end of the process, the ownership of the newly upgraded converter will be transferred\n back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\n The address of the new converter is available in the ConverterUpgrade event.\n Note that for older converters that don't yet have the 'upgrade' function, ownership should first\n be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\n and then the upgrader 'upgrade' function should be executed directly." + }, + "fullyImplemented": true, + "id": 13009, + "linearizedBaseContracts": [ + 13009, + 21719, + 22661, + 21818, + 22847, + 13660 + ], + "name": "ConverterUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 12343, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "1331:106:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12339, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1331:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 12341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1394:42:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12340, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1382:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 12342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1382:55:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "b8066bcb", + "id": 12345, + "mutability": "mutable", + "name": "etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "1444:29:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 12344, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "1444:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 12346, + "nodeType": "StructuredDocumentation", + "src": "1482:202:12", + "text": " @dev triggered when the contract accept a converter ownership\n @param _converter converter address\n @param _owner new owner - local upgrader address" + }, + "id": 12352, + "name": "ConverterOwned", + "nodeType": "EventDefinition", + "parameters": { + "id": 12351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12348, + "indexed": true, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12352, + "src": "1711:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12347, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1711:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12350, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12352, + "src": "1742:22:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1742:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1710:55:12" + }, + "src": "1690:76:12" + }, + { + "anonymous": false, + "documentation": { + "id": 12353, + "nodeType": "StructuredDocumentation", + "src": "1774:189:12", + "text": " @dev triggered when the upgrading process is done\n @param _oldConverter old converter address\n @param _newConverter new converter address" + }, + "id": 12359, + "name": "ConverterUpgrade", + "nodeType": "EventDefinition", + "parameters": { + "id": 12358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12355, + "indexed": true, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12359, + "src": "1992:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12354, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1992:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12357, + "indexed": true, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12359, + "src": "2023:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2023:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1991:62:12" + }, + "src": "1969:85:12" + }, + { + "body": { + "id": 12374, + "nodeType": "Block", + "src": "2323:43:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12370, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "2334:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 12371, + "name": "_etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12364, + "src": "2347:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "2334:24:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12373, + "nodeType": "ExpressionStatement", + "src": "2334:24:12" + } + ] + }, + "documentation": { + "id": 12360, + "nodeType": "StructuredDocumentation", + "src": "2062:148:12", + "text": " @dev initializes a new ConverterUpgrader instance\n @param _registry address of a contract registry contract" + }, + "id": 12375, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12367, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12362, + "src": "2305:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 12368, + "modifierName": { + "argumentTypes": null, + "id": 12366, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "2282:22:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2282:33:12" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12362, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12375, + "src": "2228:27:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 12361, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2228:17:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12364, + "mutability": "mutable", + "name": "_etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12375, + "src": "2257:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 12363, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "2257:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2227:54:12" + }, + "returnParameters": { + "id": 12369, + "nodeType": "ParameterList", + "parameters": [], + "src": "2323:0:12" + }, + "scope": 13009, + "src": "2216:150:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13654 + ], + "body": { + "id": 12390, + "nodeType": "Block", + "src": "2845:63:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12384, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2878:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2878:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12383, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2867:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2867:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12387, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12378, + "src": "2891:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12382, + "name": "upgradeOld", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12530, + "src": "2856:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$", + "typeString": "function (contract IConverter,bytes32)" + } + }, + "id": 12388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2856:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12389, + "nodeType": "ExpressionStatement", + "src": "2856:44:12" + } + ] + }, + "documentation": { + "id": 12376, + "nodeType": "StructuredDocumentation", + "src": "2374:414:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version" + }, + "functionSelector": "bc444e13", + "id": 12391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12380, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2836:8:12" + }, + "parameters": { + "id": 12379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12378, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12391, + "src": "2811:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 12377, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2811:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2810:18:12" + }, + "returnParameters": { + "id": 12381, + "nodeType": "ParameterList", + "parameters": [], + "src": "2845:0:12" + }, + "scope": 13009, + "src": "2794:114:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13659 + ], + "body": { + "id": 12412, + "nodeType": "Block", + "src": "3386:81:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12400, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3419:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3419:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12399, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "3408:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3408:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12407, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12394, + "src": "3448:8:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "id": 12406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3440:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 12405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3440:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 12404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3432:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 12403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3432:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3432:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12398, + "name": "upgradeOld", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12530, + "src": "3397:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$", + "typeString": "function (contract IConverter,bytes32)" + } + }, + "id": 12410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3397:62:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12411, + "nodeType": "ExpressionStatement", + "src": "3397:62:12" + } + ] + }, + "documentation": { + "id": 12392, + "nodeType": "StructuredDocumentation", + "src": "2916:414:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version" + }, + "functionSelector": "90f58c96", + "id": 12413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12396, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3377:8:12" + }, + "parameters": { + "id": 12395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12394, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12413, + "src": "3353:15:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12393, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3353:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3352:17:12" + }, + "returnParameters": { + "id": 12397, + "nodeType": "ParameterList", + "parameters": [], + "src": "3386:0:12" + }, + "scope": 13009, + "src": "3336:131:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 12529, + "nodeType": "Block", + "src": "3984:1045:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12421, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12418, + "src": "3995:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 12422, + "nodeType": "ExpressionStatement", + "src": "3995:8:12" + }, + { + "assignments": [ + 12424 + ], + "declarations": [ + { + "constant": false, + "id": 12424, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4014:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12423, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4014:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12428, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12426, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12416, + "src": "4048:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12425, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "4037:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4037:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4014:45:12" + }, + { + "assignments": [ + 12430 + ], + "declarations": [ + { + "constant": false, + "id": 12430, + "mutability": "mutable", + "name": "prevOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4070:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4070:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12434, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12431, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4090:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "4090:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 12433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4090:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4070:37:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12436, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4143:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12435, + "name": "acceptConverterOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12550, + "src": "4118:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 12437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4118:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12438, + "nodeType": "ExpressionStatement", + "src": "4118:35:12" + }, + { + "assignments": [ + 12440 + ], + "declarations": [ + { + "constant": false, + "id": 12440, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4164:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12439, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4164:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12444, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12442, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4206:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12441, + "name": "createConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12624, + "src": "4190:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (contract IConverter) returns (contract IConverter)" + } + }, + "id": 12443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4190:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4164:52:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12446, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4240:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12447, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4251:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12445, + "name": "copyReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12697, + "src": "4227:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4227:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12449, + "nodeType": "ExpressionStatement", + "src": "4227:37:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12451, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4293:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12452, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4304:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12450, + "name": "copyConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12718, + "src": "4275:17:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4275:42:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12454, + "nodeType": "ExpressionStatement", + "src": "4275:42:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12456, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4352:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12457, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4363:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12455, + "name": "transferReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12831, + "src": "4328:23:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4328:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12459, + "nodeType": "ExpressionStatement", + "src": "4328:48:12" + }, + { + "assignments": [ + 12461 + ], + "declarations": [ + { + "constant": false, + "id": 12461, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4387:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12460, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4387:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12465, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12462, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4413:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "4413:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 12464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4387:43:12" + }, + { + "assignments": [ + 12467 + ], + "declarations": [ + { + "constant": false, + "id": 12467, + "mutability": "mutable", + "name": "activate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4511:13:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4511:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12475, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 12474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12469, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4550:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12468, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "4527:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4527:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12471, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4564:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isActive", + "nodeType": "MemberAccess", + "referencedDeclaration": 13200, + "src": "4564:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 12473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4564:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4527:57:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4511:73:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 12483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12476, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12461, + "src": "4601:6:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 12477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "4601:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 12478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4601:14:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12481, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4627:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4619:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4619:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4619:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4601:36:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12499, + "nodeType": "IfStatement", + "src": "4597:175:12", + "trueBody": { + "id": 12498, + "nodeType": "Block", + "src": "4639:133:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12489, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4695:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4687:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4687:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4687:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12484, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4654:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13302, + "src": "4654:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4654:55:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12492, + "nodeType": "ExpressionStatement", + "src": "4654:55:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12493, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4724:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13261, + "src": "4724:34:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4724:36:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12497, + "nodeType": "ExpressionStatement", + "src": "4724:36:12" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12501, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4807:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12502, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4818:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12503, + "name": "activate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12467, + "src": "4832:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 12500, + "name": "handleTypeSpecificData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12953, + "src": "4784:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$_t_bool_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter,bool)" + } + }, + "id": 12504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4784:57:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12505, + "nodeType": "ExpressionStatement", + "src": "4784:57:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12509, + "name": "prevOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12430, + "src": "4882:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 12506, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4854:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "4854:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4854:38:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12511, + "nodeType": "ExpressionStatement", + "src": "4854:38:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12515, + "name": "prevOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12430, + "src": "4934:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 12512, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4903:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "4903:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4903:41:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12517, + "nodeType": "ExpressionStatement", + "src": "4903:41:12" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12521, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4987:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4979:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4979:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4979:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12525, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "5007:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4999:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4999:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12518, + "name": "ConverterUpgrade", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12359, + "src": "4962:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 12527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4962:59:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12528, + "nodeType": "EmitStatement", + "src": "4957:64:12" + } + ] + }, + "documentation": { + "id": 12414, + "nodeType": "StructuredDocumentation", + "src": "3475:435:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n @param _converter old converter contract address\n @param _version old converter version" + }, + "functionSelector": "f2cfed87", + "id": 12530, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgradeOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12416, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12530, + "src": "3936:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12415, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "3936:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12418, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12530, + "src": "3959:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 12417, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3959:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3935:41:12" + }, + "returnParameters": { + "id": 12420, + "nodeType": "ParameterList", + "parameters": [], + "src": "3984:0:12" + }, + "scope": 13009, + "src": "3916:1113:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 12549, + "nodeType": "Block", + "src": "5484:110:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12536, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12533, + "src": "5495:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5495:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:31:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12540, + "nodeType": "ExpressionStatement", + "src": "5495:31:12" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12542, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12533, + "src": "5557:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12545, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5580:4:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + ], + "id": 12544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5572:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5572:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5572:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12541, + "name": "ConverterOwned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12352, + "src": "5542:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverter_$13340_$_t_address_$returns$__$", + "typeString": "function (contract IConverter,address)" + } + }, + "id": 12547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12548, + "nodeType": "EmitStatement", + "src": "5537:49:12" + } + ] + }, + "documentation": { + "id": 12531, + "nodeType": "StructuredDocumentation", + "src": "5037:373:12", + "text": " @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\n the upgrader contract then needs to accept the ownership transfer before initiating\n the upgrade process.\n fires the ConverterOwned event upon success\n @param _oldConverter converter to accept ownership of" + }, + "id": 12550, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptConverterOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12533, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12550, + "src": "5450:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12532, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5450:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5449:26:12" + }, + "returnParameters": { + "id": 12535, + "nodeType": "ParameterList", + "parameters": [], + "src": "5484:0:12" + }, + "scope": 13009, + "src": "5416:178:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12623, + "nodeType": "Block", + "src": "6010:912:12", + "statements": [ + { + "assignments": [ + 12559 + ], + "declarations": [ + { + "constant": false, + "id": 12559, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6021:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12558, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "6021:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12563, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12560, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6047:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "6047:19:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 12562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6047:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6021:47:12" + }, + { + "assignments": [ + 12565 + ], + "declarations": [ + { + "constant": false, + "id": 12565, + "mutability": "mutable", + "name": "maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6079:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12564, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "6079:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12569, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12566, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6105:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "maxConversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13243, + "src": "6105:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 12568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6105:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6079:58:12" + }, + { + "assignments": [ + 12571 + ], + "declarations": [ + { + "constant": false, + "id": 12571, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6148:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12570, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "6148:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12575, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12572, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6175:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "6175:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6175:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6148:62:12" + }, + { + "assignments": [ + 12577 + ], + "declarations": [ + { + "constant": false, + "id": 12577, + "mutability": "mutable", + "name": "newType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6264:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12576, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "6264:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12579, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6281:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6264:18:12" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12581, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6387:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12580, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "6364:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6364:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12589, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12571, + "src": "6592:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 12590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6612:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6592:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12596, + "nodeType": "IfStatement", + "src": "6588:51:12", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 12594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12592, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6628:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 12593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6638:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6628:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12595, + "nodeType": "ExpressionStatement", + "src": "6628:11:12" + } + }, + "id": 12597, + "nodeType": "IfStatement", + "src": "6360:279:12", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 12587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12583, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6416:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12584, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6426:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13190, + "src": "6426:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 12586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6426:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6416:39:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12588, + "nodeType": "ExpressionStatement", + "src": "6416:39:12" + } + }, + { + "assignments": [ + 12599 + ], + "declarations": [ + { + "constant": false, + "id": 12599, + "mutability": "mutable", + "name": "converterFactory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6652:34:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 12598, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "6652:17:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12605, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12602, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21536, + "src": "6717:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12601, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6707:9:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 12603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6707:28:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12600, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "6689:17:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 12604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6689:47:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6652:84:12" + }, + { + "assignments": [ + 12607 + ], + "declarations": [ + { + "constant": false, + "id": 12607, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6747:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12606, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "6747:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12615, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12610, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6803:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 12611, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12559, + "src": "6812:6:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 12612, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "6820:8:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 12613, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12565, + "src": "6830:16:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12608, + "name": "converterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12599, + "src": "6770:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 12609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13381, + "src": "6770:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 12614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6770:77:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6747:100:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12616, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12607, + "src": "6860:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "6860:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6860:27:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12620, + "nodeType": "ExpressionStatement", + "src": "6860:27:12" + }, + { + "expression": { + "argumentTypes": null, + "id": 12621, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12607, + "src": "6905:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 12557, + "id": 12622, + "nodeType": "Return", + "src": "6898:16:12" + } + ] + }, + "documentation": { + "id": 12551, + "nodeType": "StructuredDocumentation", + "src": "5602:322:12", + "text": " @dev creates a new converter with same basic data as the original old converter\n the newly created converter will have no reserves at this step.\n @param _oldConverter old converter contract address\n @return the new converter new converter contract address" + }, + "id": 12624, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12553, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12624, + "src": "5955:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12552, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5955:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5954:26:12" + }, + "returnParameters": { + "id": 12557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12556, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12624, + "src": "5998:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12555, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5998:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5997:12:12" + }, + "scope": 13009, + "src": "5930:992:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12696, + "nodeType": "Block", + "src": "7349:801:12", + "statements": [ + { + "assignments": [ + 12633 + ], + "declarations": [ + { + "constant": false, + "id": 12633, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12696, + "src": "7360:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12632, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7360:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12637, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12634, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7387:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "7387:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7387:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7360:62:12" + }, + { + "body": { + "id": 12694, + "nodeType": "Block", + "src": "7482:661:12", + "statements": [ + { + "assignments": [ + 12649 + ], + "declarations": [ + { + "constant": false, + "id": 12649, + "mutability": "mutable", + "name": "reserveAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12694, + "src": "7497:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12648, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7497:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12654, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12652, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7556:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12650, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7526:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "7526:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7526:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7497:61:12" + }, + { + "assignments": [ + null, + 12656, + null, + null, + null + ], + "declarations": [ + null, + { + "constant": false, + "id": 12656, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12694, + "src": "7576:13:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12655, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7576:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + null, + null, + null + ], + "id": 12661, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12659, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7624:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 12657, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7599:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7599:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 12660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7599:40:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7573:66:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12662, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7690:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12663, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7708:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "7690:37:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12673, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7876:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12674, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "7894:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "7876:28:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 12691, + "nodeType": "Block", + "src": "8049:83:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12687, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "8093:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12688, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "8109:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12684, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "8068:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "8068:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8068:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12690, + "nodeType": "ExpressionStatement", + "src": "8068:48:12" + } + ] + }, + "id": 12692, + "nodeType": "IfStatement", + "src": "7872:260:12", + "trueBody": { + "id": 12683, + "nodeType": "Block", + "src": "7906:88:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12679, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7950:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12680, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "7971:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12676, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "7925:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "7925:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7925:53:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12682, + "nodeType": "ExpressionStatement", + "src": "7925:53:12" + } + ] + } + }, + "id": 12693, + "nodeType": "IfStatement", + "src": "7686:446:12", + "trueBody": { + "id": 12672, + "nodeType": "Block", + "src": "7729:88:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12668, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7773:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12669, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "7794:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12665, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "7748:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "7748:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7748:53:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12671, + "nodeType": "ExpressionStatement", + "src": "7748:53:12" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12642, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7454:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12643, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12633, + "src": "7458:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "7454:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12695, + "initializationExpression": { + "assignments": [ + 12639 + ], + "declarations": [ + { + "constant": false, + "id": 12639, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12695, + "src": "7440:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12638, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7440:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12641, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7451:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7440:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "7477:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12645, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7477:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12647, + "nodeType": "ExpressionStatement", + "src": "7477:3:12" + }, + "nodeType": "ForStatement", + "src": "7435:708:12" + } + ] + }, + "documentation": { + "id": 12625, + "nodeType": "StructuredDocumentation", + "src": "6930:331:12", + "text": " @dev copies the reserves from the old converter to the new one.\n note that this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12697, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "copyReserves", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12627, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12697, + "src": "7289:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12626, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "7289:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12629, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12697, + "src": "7315:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12628, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "7315:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7288:52:12" + }, + "returnParameters": { + "id": 12631, + "nodeType": "ParameterList", + "parameters": [], + "src": "7349:0:12" + }, + "scope": 13009, + "src": "7267:883:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12717, + "nodeType": "Block", + "src": "8477:127:12", + "statements": [ + { + "assignments": [ + 12706 + ], + "declarations": [ + { + "constant": false, + "id": 12706, + "mutability": "mutable", + "name": "conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12717, + "src": "8488:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12705, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8488:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12710, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12707, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12700, + "src": "8511:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8511:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 12709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8511:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8488:52:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12714, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12706, + "src": "8582:13:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12711, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12702, + "src": "8551:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setConversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13266, + "src": "8551:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$", + "typeString": "function (uint32) external" + } + }, + "id": 12715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8551:45:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12716, + "nodeType": "ExpressionStatement", + "src": "8551:45:12" + } + ] + }, + "documentation": { + "id": 12698, + "nodeType": "StructuredDocumentation", + "src": "8158:226:12", + "text": " @dev copies the conversion fee from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12718, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "copyConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12700, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12718, + "src": "8417:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12699, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "8417:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12702, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12718, + "src": "8443:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12701, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "8443:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8416:52:12" + }, + "returnParameters": { + "id": 12704, + "nodeType": "ParameterList", + "parameters": [], + "src": "8477:0:12" + }, + "scope": 13009, + "src": "8390:214:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12830, + "nodeType": "Block", + "src": "9154:1092:12", + "statements": [ + { + "assignments": [ + 12727 + ], + "declarations": [ + { + "constant": false, + "id": 12727, + "mutability": "mutable", + "name": "reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12830, + "src": "9165:22:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9165:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12728, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9165:22:12" + }, + { + "assignments": [ + 12730 + ], + "declarations": [ + { + "constant": false, + "id": 12730, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12830, + "src": "9198:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12729, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "9198:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12734, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12731, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9225:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "9225:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9225:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9198:62:12" + }, + { + "body": { + "id": 12828, + "nodeType": "Block", + "src": "9320:919:12", + "statements": [ + { + "assignments": [ + 12746 + ], + "declarations": [ + { + "constant": false, + "id": 12746, + "mutability": "mutable", + "name": "reserveAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12828, + "src": "9335:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12745, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9335:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12751, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12749, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9394:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12747, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9364:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "9364:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9364:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9335:61:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12752, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "9445:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12753, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "9463:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "9445:37:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12765, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "9627:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12766, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9645:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "9627:28:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 12825, + "nodeType": "Block", + "src": "9978:250:12", + "statements": [ + { + "assignments": [ + 12801 + ], + "declarations": [ + { + "constant": false, + "id": 12801, + "mutability": "mutable", + "name": "connector", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12825, + "src": "9997:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12800, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9997:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12803, + "initialValue": { + "argumentTypes": null, + "id": 12802, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "10021:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9997:38:12" + }, + { + "expression": { + "argumentTypes": null, + "id": 12812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12804, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "10054:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12809, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "10099:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10091:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10091:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10091:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12805, + "name": "connector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12801, + "src": "10071:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 12806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "10071:19:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 12811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10071:43:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10054:60:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12813, + "nodeType": "ExpressionStatement", + "src": "10054:60:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12817, + "name": "connector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12801, + "src": "10162:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12820, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "10181:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10173:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12818, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10173:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 12822, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "10197:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12814, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "10133:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13280, + "src": "10133:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 12823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10133:79:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12824, + "nodeType": "ExpressionStatement", + "src": "10133:79:12" + } + ] + }, + "id": 12826, + "nodeType": "IfStatement", + "src": "9623:605:12", + "trueBody": { + "id": 12799, + "nodeType": "Block", + "src": "9657:266:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12768, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9676:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12773, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9722:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9714:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9714:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9714:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12769, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9693:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "9693:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 12775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9693:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9676:61:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12777, + "nodeType": "ExpressionStatement", + "src": "9676:61:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12781, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9785:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12784, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9805:4:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + ], + "id": 12783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9797:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9797:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9797:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 12786, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9812:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12778, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9756:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13280, + "src": "9756:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 12787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9756:71:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12788, + "nodeType": "ExpressionStatement", + "src": "9756:71:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12794, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "9876:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9868:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9868:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9868:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 12796, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9892:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12789, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9846:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "9846:21:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 12797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9846:61:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12798, + "nodeType": "ExpressionStatement", + "src": "9846:61:12" + } + ] + } + }, + "id": 12827, + "nodeType": "IfStatement", + "src": "9441:787:12", + "trueBody": { + "id": 12764, + "nodeType": "Block", + "src": "9484:84:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12760, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "9537:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12758, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9529:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9529:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12755, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9503:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 13285, + "src": "9503:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable) external" + } + }, + "id": 12762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9503:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12763, + "nodeType": "ExpressionStatement", + "src": "9503:49:12" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12739, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9292:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12740, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12730, + "src": "9296:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "9292:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12829, + "initializationExpression": { + "assignments": [ + 12736 + ], + "declarations": [ + { + "constant": false, + "id": 12736, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12829, + "src": "9278:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12735, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "9278:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12738, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9289:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "9278:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9315:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12742, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9315:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12744, + "nodeType": "ExpressionStatement", + "src": "9315:3:12" + }, + "nodeType": "ForStatement", + "src": "9273:966:12" + } + ] + }, + "documentation": { + "id": 12719, + "nodeType": "StructuredDocumentation", + "src": "8612:443:12", + "text": " @dev transfers the balance of each reserve in the old converter to the new one.\n note that the function assumes that the new converter already has the exact same number of\n also, this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferReserveBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12724, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12721, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12831, + "src": "9094:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12720, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "9094:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12723, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12831, + "src": "9120:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12722, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "9120:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9093:52:12" + }, + "returnParameters": { + "id": 12725, + "nodeType": "ParameterList", + "parameters": [], + "src": "9154:0:12" + }, + "scope": 13009, + "src": "9061:1185:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12952, + "nodeType": "Block", + "src": "10674:1454:12", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 12844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10689:38:12", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12842, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10713:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12841, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "10690:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10690:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12846, + "nodeType": "IfStatement", + "src": "10685:64:12", + "trueBody": { + "expression": null, + "functionReturnParameters": 12840, + "id": 12845, + "nodeType": "Return", + "src": "10742:7:12" + } + }, + { + "assignments": [ + 12848 + ], + "declarations": [ + { + "constant": false, + "id": 12848, + "mutability": "mutable", + "name": "converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12952, + "src": "10761:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12847, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "10761:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12852, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12849, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10784:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13190, + "src": "10784:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 12851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10784:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:52:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12853, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12848, + "src": "10828:13:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 12854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10845:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10828:18:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12951, + "nodeType": "IfStatement", + "src": "10824:1297:12", + "trueBody": { + "id": 12950, + "nodeType": "Block", + "src": "10848:1273:12", + "statements": [ + { + "assignments": [ + 12857 + ], + "declarations": [ + { + "constant": false, + "id": 12857, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "10863:38:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + }, + "typeName": { + "contractScope": null, + "id": 12856, + "name": "ILiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18765, + "src": "10863:25:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12864, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12861, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10938:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10930:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10930:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10930:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12858, + "name": "ILiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18765, + "src": "10904:25:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$", + "typeString": "type(contract ILiquidityPoolV2Converter)" + } + }, + "id": 12863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10863:90:12" + }, + { + "assignments": [ + 12866 + ], + "declarations": [ + { + "constant": false, + "id": 12866, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "10968:38:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + }, + "typeName": { + "contractScope": null, + "id": 12865, + "name": "ILiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18765, + "src": "10968:25:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12873, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12870, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12836, + "src": "11043:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11035:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11035:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11035:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12867, + "name": "ILiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18765, + "src": "11009:25:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$", + "typeString": "type(contract ILiquidityPoolV2Converter)" + } + }, + "id": 12872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11009:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10968:90:12" + }, + { + "assignments": [ + 12875 + ], + "declarations": [ + { + "constant": false, + "id": 12875, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11075:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12874, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "11075:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12879, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12876, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11102:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "11102:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11102:34:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11075:61:12" + }, + { + "body": { + "id": 12911, + "nodeType": "Block", + "src": "11198:324:12", + "statements": [ + { + "assignments": [ + 12891 + ], + "declarations": [ + { + "constant": false, + "id": 12891, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12911, + "src": "11265:31:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12890, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11265:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12896, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12894, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11328:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12892, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11299:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "11299:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11299:31:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11265:65:12" + }, + { + "assignments": [ + 12898 + ], + "declarations": [ + { + "constant": false, + "id": 12898, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12911, + "src": "11349:15:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11349:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12903, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12901, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12891, + "src": "11401:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 12899, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11367:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "reserveStakedBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 18738, + "src": "11367:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 12902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11367:54:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11349:72:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12907, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12891, + "src": "11477:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12908, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12898, + "src": "11498:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12904, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12866, + "src": "11440:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setReserveStakedBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 18745, + "src": "11440:36:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,uint256) external" + } + }, + "id": 12909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11440:66:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12910, + "nodeType": "ExpressionStatement", + "src": "11440:66:12" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12884, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11170:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12885, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12875, + "src": "11174:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "11170:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12912, + "initializationExpression": { + "assignments": [ + 12881 + ], + "declarations": [ + { + "constant": false, + "id": 12881, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12912, + "src": "11156:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12880, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "11156:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12883, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11156:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11193:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12887, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11193:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12889, + "nodeType": "ExpressionStatement", + "src": "11193:3:12" + }, + "nodeType": "ForStatement", + "src": "11151:371:12" + }, + { + "condition": { + "argumentTypes": null, + "id": 12914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11542:10:12", + "subExpression": { + "argumentTypes": null, + "id": 12913, + "name": "_activate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12838, + "src": "11543:9:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12917, + "nodeType": "IfStatement", + "src": "11538:57:12", + "trueBody": { + "id": 12916, + "nodeType": "Block", + "src": "11554:41:12", + "statements": [ + { + "expression": null, + "functionReturnParameters": 12840, + "id": 12915, + "nodeType": "Return", + "src": "11573:7:12" + } + ] + } + }, + { + "assignments": [ + 12919 + ], + "declarations": [ + { + "constant": false, + "id": 12919, + "mutability": "mutable", + "name": "primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11657:31:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12918, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11657:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12923, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12920, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11691:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "primaryReserveToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 18750, + "src": "11691:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 12922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11691:34:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11657:68:12" + }, + { + "assignments": [ + 12925 + ], + "declarations": [ + { + "constant": false, + "id": 12925, + "mutability": "mutable", + "name": "priceOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11790:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12924, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "11790:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12929, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12926, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11817:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "priceOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 18755, + "src": "11817:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPriceOracle_$22891_$", + "typeString": "function () view external returns (contract IPriceOracle)" + } + }, + "id": 12928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11817:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11790:53:12" + }, + { + "assignments": [ + 12931 + ], + "declarations": [ + { + "constant": false, + "id": 12931, + "mutability": "mutable", + "name": "oracleA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11858:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12930, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "11858:21:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12935, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12932, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12925, + "src": "11890:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 12933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenAOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 22856, + "src": "11890:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "function () view external returns (contract IChainlinkPriceOracle)" + } + }, + "id": 12934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11890:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11858:58:12" + }, + { + "assignments": [ + 12937 + ], + "declarations": [ + { + "constant": false, + "id": 12937, + "mutability": "mutable", + "name": "oracleB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11931:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12936, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "11931:21:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12941, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12938, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12925, + "src": "11963:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 12939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenBOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 22861, + "src": "11963:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "function () view external returns (contract IChainlinkPriceOracle)" + } + }, + "id": 12940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11963:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11931:58:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12945, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12919, + "src": "12071:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12946, + "name": "oracleA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12931, + "src": "12092:7:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 12947, + "name": "oracleB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12937, + "src": "12101:7:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "expression": { + "argumentTypes": null, + "id": 12942, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12866, + "src": "12049:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "activate", + "nodeType": "MemberAccess", + "referencedDeclaration": 18764, + "src": "12049:21:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$__$", + "typeString": "function (contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external" + } + }, + "id": 12948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12049:60:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12949, + "nodeType": "ExpressionStatement", + "src": "12049:60:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 12832, + "nodeType": "StructuredDocumentation", + "src": "10254:306:12", + "text": " @dev handles upgrading custom (type specific) data from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address\n @param _activate activate the new converter" + }, + "id": 12953, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTypeSpecificData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12839, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12834, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10598:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12833, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "10598:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12836, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10624:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12835, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "10624:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12838, + "mutability": "mutable", + "name": "_activate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10650:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12837, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10650:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10597:68:12" + }, + "returnParameters": { + "id": 12840, + "nodeType": "ParameterList", + "parameters": [], + "src": "10674:0:12" + }, + "scope": 13009, + "src": "10566:1562:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 12961, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "12136:93:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 12954, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12136:6:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 12958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12210:17:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 12957, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "12200:9:12", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 12959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12200:28:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12193:6:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 12955, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12193:6:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12193:36:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 13007, + "nodeType": "Block", + "src": "12486:336:12", + "statements": [ + { + "assignments": [ + 12969 + ], + "declarations": [ + { + "constant": false, + "id": 12969, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12497:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 12968, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12497:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12974, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12972, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12961, + "src": "12540:30:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 12970, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "12517:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 12971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12517:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 12973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12517:54:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12497:74:12" + }, + { + "assignments": [ + 12976, + 12978 + ], + "declarations": [ + { + "constant": false, + "id": 12976, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12583:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12975, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12583:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12978, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12597:23:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 12977, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12597:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12988, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12986, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12969, + "src": "12668:4:12", + "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": 12981, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12963, + "src": "12632:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12624:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12979, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12624:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12624:19:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 12983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12624:30:12", + "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": 12985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 12984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12661:4:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "12624:43:12", + "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": 12987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12624:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12582:91:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 12994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12989, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12976, + "src": "12690:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12990, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12978, + "src": "12701:10:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 12991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12701:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 12992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12722:2:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12701:23:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12690:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13004, + "nodeType": "IfStatement", + "src": "12686:104:12", + "trueBody": { + "id": 13003, + "nodeType": "Block", + "src": "12726:64:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12997, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12978, + "src": "12759:10:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 12999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12772:4:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 12998, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12772:4:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 13000, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12771:6:12", + "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": 12995, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "12748:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 12996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12748:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 13001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12748:30:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12967, + "id": 13002, + "nodeType": "Return", + "src": "12741:37:12" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 13005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12809:5:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 12967, + "id": 13006, + "nodeType": "Return", + "src": "12802:12:12" + } + ] + }, + "documentation": null, + "id": 13008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12963, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13008, + "src": "12434:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12962, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "12434:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12433:23:12" + }, + "returnParameters": { + "id": 12967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12966, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13008, + "src": "12480:4:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12965, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12480:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12479:6:12" + }, + "scope": 13009, + "src": "12402:420:12", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 13010, + "src": "1251:11574:12" + } + ], + "src": "52:12775:12" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterUpgrader.sol", + "exportedSymbols": { + "ConverterUpgrader": [ + 13009 + ] + }, + "id": 13010, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 12326, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:12" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./interfaces/IConverter.sol", + "id": 12327, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13341, + "src": "77:37:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "file": "./interfaces/IConverterUpgrader.sol", + "id": 12328, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13661, + "src": "116:45:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "./interfaces/IConverterFactory.sol", + "id": 12329, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 13390, + "src": "163:44:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 12330, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 21720, + "src": "209:47:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "../utility/interfaces/IWhitelist.sol", + "id": 12331, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 22918, + "src": "258:46:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "../token/interfaces/IEtherToken.sol", + "id": 12332, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 21154, + "src": "306:45:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "file": "./types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "id": 12333, + "nodeType": "ImportDirective", + "scope": 13010, + "sourceUnit": 18766, + "src": "353:76:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 12335, + "name": "IConverterUpgrader", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13660, + "src": "1281:18:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterUpgrader_$13660", + "typeString": "contract IConverterUpgrader" + } + }, + "id": 12336, + "nodeType": "InheritanceSpecifier", + "src": "1281:18:12" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 12337, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1301:22:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 12338, + "nodeType": "InheritanceSpecifier", + "src": "1301:22:12" + } + ], + "contractDependencies": [ + 13660, + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 12334, + "nodeType": "StructuredDocumentation", + "src": "433:816:12", + "text": " @dev Converter Upgrader\n The converter upgrader contract allows upgrading an older converter contract (0.4 and up)\n to the latest version.\n To begin the upgrade process, simply execute the 'upgrade' function.\n At the end of the process, the ownership of the newly upgraded converter will be transferred\n back to the original owner and the original owner will need to execute the 'acceptOwnership' function.\n The address of the new converter is available in the ConverterUpgrade event.\n Note that for older converters that don't yet have the 'upgrade' function, ownership should first\n be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function\n and then the upgrader 'upgrade' function should be executed directly." + }, + "fullyImplemented": true, + "id": 13009, + "linearizedBaseContracts": [ + 13009, + 21719, + 22661, + 21818, + 22847, + 13660 + ], + "name": "ConverterUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 12343, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "1331:106:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12339, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1331:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 12341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1394:42:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12340, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1382:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 12342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1382:55:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "b8066bcb", + "id": 12345, + "mutability": "mutable", + "name": "etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "1444:29:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 12344, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "1444:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 12346, + "nodeType": "StructuredDocumentation", + "src": "1482:202:12", + "text": " @dev triggered when the contract accept a converter ownership\n @param _converter converter address\n @param _owner new owner - local upgrader address" + }, + "id": 12352, + "name": "ConverterOwned", + "nodeType": "EventDefinition", + "parameters": { + "id": 12351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12348, + "indexed": true, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12352, + "src": "1711:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12347, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1711:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12350, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12352, + "src": "1742:22:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1742:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1710:55:12" + }, + "src": "1690:76:12" + }, + { + "anonymous": false, + "documentation": { + "id": 12353, + "nodeType": "StructuredDocumentation", + "src": "1774:189:12", + "text": " @dev triggered when the upgrading process is done\n @param _oldConverter old converter address\n @param _newConverter new converter address" + }, + "id": 12359, + "name": "ConverterUpgrade", + "nodeType": "EventDefinition", + "parameters": { + "id": 12358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12355, + "indexed": true, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12359, + "src": "1992:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12354, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1992:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12357, + "indexed": true, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12359, + "src": "2023:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2023:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1991:62:12" + }, + "src": "1969:85:12" + }, + { + "body": { + "id": 12374, + "nodeType": "Block", + "src": "2323:43:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12370, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "2334:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 12371, + "name": "_etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12364, + "src": "2347:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "2334:24:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12373, + "nodeType": "ExpressionStatement", + "src": "2334:24:12" + } + ] + }, + "documentation": { + "id": 12360, + "nodeType": "StructuredDocumentation", + "src": "2062:148:12", + "text": " @dev initializes a new ConverterUpgrader instance\n @param _registry address of a contract registry contract" + }, + "id": 12375, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 12367, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12362, + "src": "2305:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 12368, + "modifierName": { + "argumentTypes": null, + "id": 12366, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "2282:22:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2282:33:12" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12362, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12375, + "src": "2228:27:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 12361, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2228:17:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12364, + "mutability": "mutable", + "name": "_etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12375, + "src": "2257:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 12363, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "2257:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2227:54:12" + }, + "returnParameters": { + "id": 12369, + "nodeType": "ParameterList", + "parameters": [], + "src": "2323:0:12" + }, + "scope": 13009, + "src": "2216:150:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13654 + ], + "body": { + "id": 12390, + "nodeType": "Block", + "src": "2845:63:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12384, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2878:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2878:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12383, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2867:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2867:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12387, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12378, + "src": "2891:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12382, + "name": "upgradeOld", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12530, + "src": "2856:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$", + "typeString": "function (contract IConverter,bytes32)" + } + }, + "id": 12388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2856:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12389, + "nodeType": "ExpressionStatement", + "src": "2856:44:12" + } + ] + }, + "documentation": { + "id": 12376, + "nodeType": "StructuredDocumentation", + "src": "2374:414:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version" + }, + "functionSelector": "bc444e13", + "id": 12391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12380, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2836:8:12" + }, + "parameters": { + "id": 12379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12378, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12391, + "src": "2811:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 12377, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2811:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2810:18:12" + }, + "returnParameters": { + "id": 12381, + "nodeType": "ParameterList", + "parameters": [], + "src": "2845:0:12" + }, + "scope": 13009, + "src": "2794:114:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13659 + ], + "body": { + "id": 12412, + "nodeType": "Block", + "src": "3386:81:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12400, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3419:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3419:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12399, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "3408:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3408:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12407, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12394, + "src": "3448:8:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "id": 12406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3440:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 12405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3440:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3440:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 12404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3432:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 12403, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3432:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3432:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12398, + "name": "upgradeOld", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12530, + "src": "3397:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_bytes32_$returns$__$", + "typeString": "function (contract IConverter,bytes32)" + } + }, + "id": 12410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3397:62:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12411, + "nodeType": "ExpressionStatement", + "src": "3397:62:12" + } + ] + }, + "documentation": { + "id": 12392, + "nodeType": "StructuredDocumentation", + "src": "2916:414:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n can only be called by a converter\n @param _version old converter version" + }, + "functionSelector": "90f58c96", + "id": 12413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 12396, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3377:8:12" + }, + "parameters": { + "id": 12395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12394, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12413, + "src": "3353:15:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12393, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3353:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3352:17:12" + }, + "returnParameters": { + "id": 12397, + "nodeType": "ParameterList", + "parameters": [], + "src": "3386:0:12" + }, + "scope": 13009, + "src": "3336:131:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 12529, + "nodeType": "Block", + "src": "3984:1045:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12421, + "name": "_version", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12418, + "src": "3995:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 12422, + "nodeType": "ExpressionStatement", + "src": "3995:8:12" + }, + { + "assignments": [ + 12424 + ], + "declarations": [ + { + "constant": false, + "id": 12424, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4014:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12423, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4014:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12428, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12426, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12416, + "src": "4048:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12425, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "4037:10:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 12427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4037:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4014:45:12" + }, + { + "assignments": [ + 12430 + ], + "declarations": [ + { + "constant": false, + "id": 12430, + "mutability": "mutable", + "name": "prevOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4070:17:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4070:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12434, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12431, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4090:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "4090:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 12433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4090:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4070:37:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12436, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4143:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12435, + "name": "acceptConverterOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12550, + "src": "4118:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter)" + } + }, + "id": 12437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4118:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12438, + "nodeType": "ExpressionStatement", + "src": "4118:35:12" + }, + { + "assignments": [ + 12440 + ], + "declarations": [ + { + "constant": false, + "id": 12440, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4164:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12439, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "4164:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12444, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12442, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4206:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12441, + "name": "createConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12624, + "src": "4190:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (contract IConverter) returns (contract IConverter)" + } + }, + "id": 12443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4190:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4164:52:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12446, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4240:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12447, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4251:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12445, + "name": "copyReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12697, + "src": "4227:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4227:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12449, + "nodeType": "ExpressionStatement", + "src": "4227:37:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12451, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4293:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12452, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4304:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12450, + "name": "copyConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12718, + "src": "4275:17:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4275:42:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12454, + "nodeType": "ExpressionStatement", + "src": "4275:42:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12456, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4352:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12457, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4363:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12455, + "name": "transferReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12831, + "src": "4328:23:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter)" + } + }, + "id": 12458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4328:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12459, + "nodeType": "ExpressionStatement", + "src": "4328:48:12" + }, + { + "assignments": [ + 12461 + ], + "declarations": [ + { + "constant": false, + "id": 12461, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4387:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12460, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "4387:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12465, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12462, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4413:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "4413:15:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 12464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4413:17:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4387:43:12" + }, + { + "assignments": [ + 12467 + ], + "declarations": [ + { + "constant": false, + "id": 12467, + "mutability": "mutable", + "name": "activate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12529, + "src": "4511:13:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12466, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4511:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12475, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 12474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12469, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4550:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12468, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "4527:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4527:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12471, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4564:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isActive", + "nodeType": "MemberAccess", + "referencedDeclaration": 13200, + "src": "4564:18:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 12473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4564:20:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4527:57:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4511:73:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 12483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12476, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12461, + "src": "4601:6:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 12477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "4601:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 12478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4601:14:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12481, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4627:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4619:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4619:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4619:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4601:36:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12499, + "nodeType": "IfStatement", + "src": "4597:175:12", + "trueBody": { + "id": 12498, + "nodeType": "Block", + "src": "4639:133:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12489, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4695:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4687:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4687:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4687:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12484, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4654:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferTokenOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13302, + "src": "4654:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4654:55:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12492, + "nodeType": "ExpressionStatement", + "src": "4654:55:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12493, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4724:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13261, + "src": "4724:34:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4724:36:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12497, + "nodeType": "ExpressionStatement", + "src": "4724:36:12" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12501, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4807:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12502, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4818:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 12503, + "name": "activate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12467, + "src": "4832:8:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 12500, + "name": "handleTypeSpecificData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12953, + "src": "4784:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IConverter_$13340_$_t_contract$_IConverter_$13340_$_t_bool_$returns$__$", + "typeString": "function (contract IConverter,contract IConverter,bool)" + } + }, + "id": 12504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4784:57:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12505, + "nodeType": "ExpressionStatement", + "src": "4784:57:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12509, + "name": "prevOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12430, + "src": "4882:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 12506, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4854:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "4854:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4854:38:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12511, + "nodeType": "ExpressionStatement", + "src": "4854:38:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12515, + "name": "prevOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12430, + "src": "4934:9:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 12512, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "4903:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "4903:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 12516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4903:41:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12517, + "nodeType": "ExpressionStatement", + "src": "4903:41:12" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12521, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12424, + "src": "4987:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4979:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4979:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4979:18:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12525, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12440, + "src": "5007:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4999:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4999:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4999:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12518, + "name": "ConverterUpgrade", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12359, + "src": "4962:16:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 12527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4962:59:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12528, + "nodeType": "EmitStatement", + "src": "4957:64:12" + } + ] + }, + "documentation": { + "id": 12414, + "nodeType": "StructuredDocumentation", + "src": "3475:435:12", + "text": " @dev upgrades an old converter to the latest version\n will throw if ownership wasn't transferred to the upgrader before calling this function.\n ownership of the new converter will be transferred back to the original owner.\n fires the ConverterUpgrade event upon success.\n @param _converter old converter contract address\n @param _version old converter version" + }, + "functionSelector": "f2cfed87", + "id": 12530, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "upgradeOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12416, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12530, + "src": "3936:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12415, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "3936:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12418, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12530, + "src": "3959:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 12417, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3959:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3935:41:12" + }, + "returnParameters": { + "id": 12420, + "nodeType": "ParameterList", + "parameters": [], + "src": "3984:0:12" + }, + "scope": 13009, + "src": "3916:1113:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 12549, + "nodeType": "Block", + "src": "5484:110:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12536, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12533, + "src": "5495:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "5495:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:31:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12540, + "nodeType": "ExpressionStatement", + "src": "5495:31:12" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12542, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12533, + "src": "5557:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12545, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5580:4:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + ], + "id": 12544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5572:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5572:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5572:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12541, + "name": "ConverterOwned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12352, + "src": "5542:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverter_$13340_$_t_address_$returns$__$", + "typeString": "function (contract IConverter,address)" + } + }, + "id": 12547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5542:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12548, + "nodeType": "EmitStatement", + "src": "5537:49:12" + } + ] + }, + "documentation": { + "id": 12531, + "nodeType": "StructuredDocumentation", + "src": "5037:373:12", + "text": " @dev the first step when upgrading a converter is to transfer the ownership to the local contract.\n the upgrader contract then needs to accept the ownership transfer before initiating\n the upgrade process.\n fires the ConverterOwned event upon success\n @param _oldConverter converter to accept ownership of" + }, + "id": 12550, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptConverterOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12533, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12550, + "src": "5450:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12532, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5450:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5449:26:12" + }, + "returnParameters": { + "id": 12535, + "nodeType": "ParameterList", + "parameters": [], + "src": "5484:0:12" + }, + "scope": 13009, + "src": "5416:178:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12623, + "nodeType": "Block", + "src": "6010:912:12", + "statements": [ + { + "assignments": [ + 12559 + ], + "declarations": [ + { + "constant": false, + "id": 12559, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6021:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 12558, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "6021:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12563, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12560, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6047:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 13297, + "src": "6047:19:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function () view external returns (contract IConverterAnchor)" + } + }, + "id": 12562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6047:21:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6021:47:12" + }, + { + "assignments": [ + 12565 + ], + "declarations": [ + { + "constant": false, + "id": 12565, + "mutability": "mutable", + "name": "maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6079:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12564, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "6079:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12569, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12566, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6105:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "maxConversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13243, + "src": "6105:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 12568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6105:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6079:58:12" + }, + { + "assignments": [ + 12571 + ], + "declarations": [ + { + "constant": false, + "id": 12571, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6148:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12570, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "6148:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12575, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12572, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6175:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "6175:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6175:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6148:62:12" + }, + { + "assignments": [ + 12577 + ], + "declarations": [ + { + "constant": false, + "id": 12577, + "mutability": "mutable", + "name": "newType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6264:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12576, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "6264:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12579, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6281:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6264:18:12" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12581, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6387:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12580, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "6364:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6364:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12589, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12571, + "src": "6592:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 12590, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6612:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6592:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12596, + "nodeType": "IfStatement", + "src": "6588:51:12", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 12594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12592, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6628:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 12593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6638:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6628:11:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12595, + "nodeType": "ExpressionStatement", + "src": "6628:11:12" + } + }, + "id": 12597, + "nodeType": "IfStatement", + "src": "6360:279:12", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 12587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12583, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6416:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12584, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12553, + "src": "6426:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13190, + "src": "6426:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 12586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6426:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "6416:39:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12588, + "nodeType": "ExpressionStatement", + "src": "6416:39:12" + } + }, + { + "assignments": [ + 12599 + ], + "declarations": [ + { + "constant": false, + "id": 12599, + "mutability": "mutable", + "name": "converterFactory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6652:34:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + }, + "typeName": { + "contractScope": null, + "id": 12598, + "name": "IConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13389, + "src": "6652:17:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12605, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12602, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21536, + "src": "6717:17:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12601, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "6707:9:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 12603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6707:28:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 12600, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "6689:17:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 12604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6689:47:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6652:84:12" + }, + { + "assignments": [ + 12607 + ], + "declarations": [ + { + "constant": false, + "id": 12607, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12623, + "src": "6747:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12606, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "6747:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12615, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12610, + "name": "newType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "6803:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 12611, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12559, + "src": "6812:6:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 12612, + "name": "registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21562, + "src": "6820:8:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 12613, + "name": "maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12565, + "src": "6830:16:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12608, + "name": "converterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12599, + "src": "6770:16:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 12609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 13381, + "src": "6770:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) external returns (contract IConverter)" + } + }, + "id": 12614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6770:77:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6747:100:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12616, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12607, + "src": "6860:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22846, + "src": "6860:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 12619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6860:27:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12620, + "nodeType": "ExpressionStatement", + "src": "6860:27:12" + }, + { + "expression": { + "argumentTypes": null, + "id": 12621, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12607, + "src": "6905:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 12557, + "id": 12622, + "nodeType": "Return", + "src": "6898:16:12" + } + ] + }, + "documentation": { + "id": 12551, + "nodeType": "StructuredDocumentation", + "src": "5602:322:12", + "text": " @dev creates a new converter with same basic data as the original old converter\n the newly created converter will have no reserves at this step.\n @param _oldConverter old converter contract address\n @return the new converter new converter contract address" + }, + "id": 12624, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12554, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12553, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12624, + "src": "5955:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12552, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5955:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5954:26:12" + }, + "returnParameters": { + "id": 12557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12556, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12624, + "src": "5998:10:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12555, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5998:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5997:12:12" + }, + "scope": 13009, + "src": "5930:992:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12696, + "nodeType": "Block", + "src": "7349:801:12", + "statements": [ + { + "assignments": [ + 12633 + ], + "declarations": [ + { + "constant": false, + "id": 12633, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12696, + "src": "7360:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12632, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7360:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12637, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12634, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7387:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "7387:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7387:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7360:62:12" + }, + { + "body": { + "id": 12694, + "nodeType": "Block", + "src": "7482:661:12", + "statements": [ + { + "assignments": [ + 12649 + ], + "declarations": [ + { + "constant": false, + "id": 12649, + "mutability": "mutable", + "name": "reserveAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12694, + "src": "7497:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12648, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "7497:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12654, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12652, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7556:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12650, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7526:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "7526:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7526:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7497:61:12" + }, + { + "assignments": [ + null, + 12656, + null, + null, + null + ], + "declarations": [ + null, + { + "constant": false, + "id": 12656, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12694, + "src": "7576:13:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12655, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7576:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + null, + null, + null + ], + "id": 12661, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12659, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7624:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 12657, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12627, + "src": "7599:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7599:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 12660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7599:40:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7573:66:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12662, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7690:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12663, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7708:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "7690:37:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12673, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "7876:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12674, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "7894:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "7876:28:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 12691, + "nodeType": "Block", + "src": "8049:83:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12687, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12649, + "src": "8093:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12688, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "8109:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12684, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "8068:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "8068:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8068:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12690, + "nodeType": "ExpressionStatement", + "src": "8068:48:12" + } + ] + }, + "id": 12692, + "nodeType": "IfStatement", + "src": "7872:260:12", + "trueBody": { + "id": 12683, + "nodeType": "Block", + "src": "7906:88:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12679, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7950:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12680, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "7971:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12676, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "7925:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "7925:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7925:53:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12682, + "nodeType": "ExpressionStatement", + "src": "7925:53:12" + } + ] + } + }, + "id": 12693, + "nodeType": "IfStatement", + "src": "7686:446:12", + "trueBody": { + "id": 12672, + "nodeType": "Block", + "src": "7729:88:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12668, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "7773:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12669, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12656, + "src": "7794:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12665, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12629, + "src": "7748:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 13292, + "src": "7748:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32) external" + } + }, + "id": 12670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7748:53:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12671, + "nodeType": "ExpressionStatement", + "src": "7748:53:12" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12642, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7454:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12643, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12633, + "src": "7458:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "7454:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12695, + "initializationExpression": { + "assignments": [ + 12639 + ], + "declarations": [ + { + "constant": false, + "id": 12639, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12695, + "src": "7440:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12638, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "7440:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12641, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12640, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7451:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7440:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "7477:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12645, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12639, + "src": "7477:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12647, + "nodeType": "ExpressionStatement", + "src": "7477:3:12" + }, + "nodeType": "ForStatement", + "src": "7435:708:12" + } + ] + }, + "documentation": { + "id": 12625, + "nodeType": "StructuredDocumentation", + "src": "6930:331:12", + "text": " @dev copies the reserves from the old converter to the new one.\n note that this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12697, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "copyReserves", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12630, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12627, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12697, + "src": "7289:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12626, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "7289:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12629, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12697, + "src": "7315:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12628, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "7315:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7288:52:12" + }, + "returnParameters": { + "id": 12631, + "nodeType": "ParameterList", + "parameters": [], + "src": "7349:0:12" + }, + "scope": 13009, + "src": "7267:883:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12717, + "nodeType": "Block", + "src": "8477:127:12", + "statements": [ + { + "assignments": [ + 12706 + ], + "declarations": [ + { + "constant": false, + "id": 12706, + "mutability": "mutable", + "name": "conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12717, + "src": "8488:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 12705, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "8488:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12710, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12707, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12700, + "src": "8511:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8511:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 12709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8511:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8488:52:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12714, + "name": "conversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12706, + "src": "8582:13:12", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 12711, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12702, + "src": "8551:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setConversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13266, + "src": "8551:30:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint32_$returns$__$", + "typeString": "function (uint32) external" + } + }, + "id": 12715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8551:45:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12716, + "nodeType": "ExpressionStatement", + "src": "8551:45:12" + } + ] + }, + "documentation": { + "id": 12698, + "nodeType": "StructuredDocumentation", + "src": "8158:226:12", + "text": " @dev copies the conversion fee from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12718, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "copyConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12700, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12718, + "src": "8417:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12699, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "8417:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12702, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12718, + "src": "8443:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12701, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "8443:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8416:52:12" + }, + "returnParameters": { + "id": 12704, + "nodeType": "ParameterList", + "parameters": [], + "src": "8477:0:12" + }, + "scope": 13009, + "src": "8390:214:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12830, + "nodeType": "Block", + "src": "9154:1092:12", + "statements": [ + { + "assignments": [ + 12727 + ], + "declarations": [ + { + "constant": false, + "id": 12727, + "mutability": "mutable", + "name": "reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12830, + "src": "9165:22:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9165:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12728, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9165:22:12" + }, + { + "assignments": [ + 12730 + ], + "declarations": [ + { + "constant": false, + "id": 12730, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12830, + "src": "9198:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12729, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "9198:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12734, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12731, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9225:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "9225:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9225:35:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9198:62:12" + }, + { + "body": { + "id": 12828, + "nodeType": "Block", + "src": "9320:919:12", + "statements": [ + { + "assignments": [ + 12746 + ], + "declarations": [ + { + "constant": false, + "id": 12746, + "mutability": "mutable", + "name": "reserveAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12828, + "src": "9335:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12745, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9335:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12751, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12749, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9394:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12747, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9364:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "9364:29:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9364:32:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9335:61:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12752, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "9445:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12753, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12343, + "src": "9463:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "9445:37:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 12767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12765, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "9627:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 12766, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9645:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "src": "9627:28:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 12825, + "nodeType": "Block", + "src": "9978:250:12", + "statements": [ + { + "assignments": [ + 12801 + ], + "declarations": [ + { + "constant": false, + "id": 12801, + "mutability": "mutable", + "name": "connector", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12825, + "src": "9997:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12800, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9997:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12803, + "initialValue": { + "argumentTypes": null, + "id": 12802, + "name": "reserveAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12746, + "src": "10021:14:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9997:38:12" + }, + { + "expression": { + "argumentTypes": null, + "id": 12812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12804, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "10054:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12809, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "10099:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10091:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10091:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10091:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12805, + "name": "connector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12801, + "src": "10071:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 12806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "10071:19:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 12811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10071:43:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10054:60:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12813, + "nodeType": "ExpressionStatement", + "src": "10054:60:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12817, + "name": "connector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12801, + "src": "10162:9:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12820, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "10181:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10173:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12818, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10173:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 12822, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "10197:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12814, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "10133:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13280, + "src": "10133:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 12823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10133:79:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12824, + "nodeType": "ExpressionStatement", + "src": "10133:79:12" + } + ] + }, + "id": 12826, + "nodeType": "IfStatement", + "src": "9623:605:12", + "trueBody": { + "id": 12799, + "nodeType": "Block", + "src": "9657:266:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 12776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 12768, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9676:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12773, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9722:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9714:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9714:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9714:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12769, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9693:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "9693:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 12775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9693:44:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9676:61:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 12777, + "nodeType": "ExpressionStatement", + "src": "9676:61:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12781, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9785:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12784, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9805:4:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ConverterUpgrader_$13009", + "typeString": "contract ConverterUpgrader" + } + ], + "id": 12783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9797:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9797:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9797:13:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 12786, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9812:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12778, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9756:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13280, + "src": "9756:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256) external" + } + }, + "id": 12787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9756:71:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12788, + "nodeType": "ExpressionStatement", + "src": "9756:71:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12794, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "9876:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9868:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9868:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9868:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 12796, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12727, + "src": "9892:14:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12789, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12345, + "src": "9846:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 12791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "9846:21:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 12797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9846:61:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12798, + "nodeType": "ExpressionStatement", + "src": "9846:61:12" + } + ] + } + }, + "id": 12827, + "nodeType": "IfStatement", + "src": "9441:787:12", + "trueBody": { + "id": 12764, + "nodeType": "Block", + "src": "9484:84:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12760, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12723, + "src": "9537:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12758, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9529:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9529:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 12755, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12721, + "src": "9503:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 13285, + "src": "9503:25:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$returns$__$", + "typeString": "function (address payable) external" + } + }, + "id": 12762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9503:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12763, + "nodeType": "ExpressionStatement", + "src": "9503:49:12" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12739, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9292:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12740, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12730, + "src": "9296:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "9292:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12829, + "initializationExpression": { + "assignments": [ + 12736 + ], + "declarations": [ + { + "constant": false, + "id": 12736, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12829, + "src": "9278:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12735, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "9278:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12738, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9289:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "9278:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9315:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12742, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12736, + "src": "9315:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12744, + "nodeType": "ExpressionStatement", + "src": "9315:3:12" + }, + "nodeType": "ForStatement", + "src": "9273:966:12" + } + ] + }, + "documentation": { + "id": 12719, + "nodeType": "StructuredDocumentation", + "src": "8612:443:12", + "text": " @dev transfers the balance of each reserve in the old converter to the new one.\n note that the function assumes that the new converter already has the exact same number of\n also, this will not work for an unlimited number of reserves due to block gas limit constraints.\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address" + }, + "id": 12831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferReserveBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12724, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12721, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12831, + "src": "9094:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12720, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "9094:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12723, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12831, + "src": "9120:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12722, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "9120:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9093:52:12" + }, + "returnParameters": { + "id": 12725, + "nodeType": "ParameterList", + "parameters": [], + "src": "9154:0:12" + }, + "scope": 13009, + "src": "9061:1185:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 12952, + "nodeType": "Block", + "src": "10674:1454:12", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 12844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10689:38:12", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12842, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10713:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12841, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13008, + "src": "10690:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 12843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10690:37:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12846, + "nodeType": "IfStatement", + "src": "10685:64:12", + "trueBody": { + "expression": null, + "functionReturnParameters": 12840, + "id": 12845, + "nodeType": "Return", + "src": "10742:7:12" + } + }, + { + "assignments": [ + 12848 + ], + "declarations": [ + { + "constant": false, + "id": 12848, + "mutability": "mutable", + "name": "converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12952, + "src": "10761:20:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12847, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "10761:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12852, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12849, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10784:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 12850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "converterType", + "nodeType": "MemberAccess", + "referencedDeclaration": 13190, + "src": "10784:27:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_uint16_$", + "typeString": "function () pure external returns (uint16)" + } + }, + "id": 12851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10784:29:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:52:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12853, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12848, + "src": "10828:13:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 12854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10845:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10828:18:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12951, + "nodeType": "IfStatement", + "src": "10824:1297:12", + "trueBody": { + "id": 12950, + "nodeType": "Block", + "src": "10848:1273:12", + "statements": [ + { + "assignments": [ + 12857 + ], + "declarations": [ + { + "constant": false, + "id": 12857, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "10863:38:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + }, + "typeName": { + "contractScope": null, + "id": 12856, + "name": "ILiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18765, + "src": "10863:25:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12864, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12861, + "name": "_oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12834, + "src": "10938:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10930:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10930:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10930:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12858, + "name": "ILiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18765, + "src": "10904:25:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$", + "typeString": "type(contract ILiquidityPoolV2Converter)" + } + }, + "id": 12863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10863:90:12" + }, + { + "assignments": [ + 12866 + ], + "declarations": [ + { + "constant": false, + "id": 12866, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "10968:38:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + }, + "typeName": { + "contractScope": null, + "id": 12865, + "name": "ILiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18765, + "src": "10968:25:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12873, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12870, + "name": "_newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12836, + "src": "11043:13:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11035:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11035:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11035:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 12867, + "name": "ILiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18765, + "src": "11009:25:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILiquidityPoolV2Converter_$18765_$", + "typeString": "type(contract ILiquidityPoolV2Converter)" + } + }, + "id": 12872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11009:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10968:90:12" + }, + { + "assignments": [ + 12875 + ], + "declarations": [ + { + "constant": false, + "id": 12875, + "mutability": "mutable", + "name": "reserveTokenCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11075:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12874, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "11075:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12879, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12876, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11102:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "11102:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 12878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11102:34:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11075:61:12" + }, + { + "body": { + "id": 12911, + "nodeType": "Block", + "src": "11198:324:12", + "statements": [ + { + "assignments": [ + 12891 + ], + "declarations": [ + { + "constant": false, + "id": 12891, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12911, + "src": "11265:31:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12890, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11265:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12896, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12894, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11328:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "id": 12892, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11299:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "11299:28:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 12895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11299:31:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11265:65:12" + }, + { + "assignments": [ + 12898 + ], + "declarations": [ + { + "constant": false, + "id": 12898, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12911, + "src": "11349:15:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 12897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11349:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12903, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12901, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12891, + "src": "11401:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 12899, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11367:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "reserveStakedBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 18738, + "src": "11367:33:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 12902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11367:54:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11349:72:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12907, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12891, + "src": "11477:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12908, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12898, + "src": "11498:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 12904, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12866, + "src": "11440:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setReserveStakedBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 18745, + "src": "11440:36:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,uint256) external" + } + }, + "id": 12909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11440:66:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12910, + "nodeType": "ExpressionStatement", + "src": "11440:66:12" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 12886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12884, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11170:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 12885, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12875, + "src": "11174:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "11170:21:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 12912, + "initializationExpression": { + "assignments": [ + 12881 + ], + "declarations": [ + { + "constant": false, + "id": 12881, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12912, + "src": "11156:8:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 12880, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "11156:6:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12883, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 12882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11167:1:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11156:12:12" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 12888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11193:3:12", + "subExpression": { + "argumentTypes": null, + "id": 12887, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12881, + "src": "11193:1:12", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 12889, + "nodeType": "ExpressionStatement", + "src": "11193:3:12" + }, + "nodeType": "ForStatement", + "src": "11151:371:12" + }, + { + "condition": { + "argumentTypes": null, + "id": 12914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11542:10:12", + "subExpression": { + "argumentTypes": null, + "id": 12913, + "name": "_activate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12838, + "src": "11543:9:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 12917, + "nodeType": "IfStatement", + "src": "11538:57:12", + "trueBody": { + "id": 12916, + "nodeType": "Block", + "src": "11554:41:12", + "statements": [ + { + "expression": null, + "functionReturnParameters": 12840, + "id": 12915, + "nodeType": "Return", + "src": "11573:7:12" + } + ] + } + }, + { + "assignments": [ + 12919 + ], + "declarations": [ + { + "constant": false, + "id": 12919, + "mutability": "mutable", + "name": "primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11657:31:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 12918, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "11657:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12923, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12920, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11691:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "primaryReserveToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 18750, + "src": "11691:32:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 12922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11691:34:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11657:68:12" + }, + { + "assignments": [ + 12925 + ], + "declarations": [ + { + "constant": false, + "id": 12925, + "mutability": "mutable", + "name": "priceOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11790:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12924, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "11790:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12929, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12926, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12857, + "src": "11817:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "priceOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 18755, + "src": "11817:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPriceOracle_$22891_$", + "typeString": "function () view external returns (contract IPriceOracle)" + } + }, + "id": 12928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11817:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11790:53:12" + }, + { + "assignments": [ + 12931 + ], + "declarations": [ + { + "constant": false, + "id": 12931, + "mutability": "mutable", + "name": "oracleA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11858:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12930, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "11858:21:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12935, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12932, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12925, + "src": "11890:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 12933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenAOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 22856, + "src": "11890:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "function () view external returns (contract IChainlinkPriceOracle)" + } + }, + "id": 12934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11890:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11858:58:12" + }, + { + "assignments": [ + 12937 + ], + "declarations": [ + { + "constant": false, + "id": 12937, + "mutability": "mutable", + "name": "oracleB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12950, + "src": "11931:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 12936, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "11931:21:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12941, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 12938, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12925, + "src": "11963:11:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 12939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenBOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 22861, + "src": "11963:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "function () view external returns (contract IChainlinkPriceOracle)" + } + }, + "id": 12940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11963:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11931:58:12" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12945, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12919, + "src": "12071:19:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 12946, + "name": "oracleA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12931, + "src": "12092:7:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 12947, + "name": "oracleB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12937, + "src": "12101:7:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "expression": { + "argumentTypes": null, + "id": 12942, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12866, + "src": "12049:12:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILiquidityPoolV2Converter_$18765", + "typeString": "contract ILiquidityPoolV2Converter" + } + }, + "id": 12944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "activate", + "nodeType": "MemberAccess", + "referencedDeclaration": 18764, + "src": "12049:21:12", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$__$", + "typeString": "function (contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external" + } + }, + "id": 12948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12049:60:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 12949, + "nodeType": "ExpressionStatement", + "src": "12049:60:12" + } + ] + } + } + ] + }, + "documentation": { + "id": 12832, + "nodeType": "StructuredDocumentation", + "src": "10254:306:12", + "text": " @dev handles upgrading custom (type specific) data from the old converter to the new one\n @param _oldConverter old converter contract address\n @param _newConverter new converter contract address\n @param _activate activate the new converter" + }, + "id": 12953, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTypeSpecificData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12839, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12834, + "mutability": "mutable", + "name": "_oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10598:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12833, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "10598:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12836, + "mutability": "mutable", + "name": "_newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10624:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12835, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "10624:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12838, + "mutability": "mutable", + "name": "_activate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 12953, + "src": "10650:14:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12837, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10650:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10597:68:12" + }, + "returnParameters": { + "id": 12840, + "nodeType": "ParameterList", + "parameters": [], + "src": "10674:0:12" + }, + "scope": 13009, + "src": "10566:1562:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 12961, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13009, + "src": "12136:93:12", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 12954, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12136:6:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 12958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12210:17:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 12957, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "12200:9:12", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 12959, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12200:28:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 12956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12193:6:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 12955, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "12193:6:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12193:36:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 13007, + "nodeType": "Block", + "src": "12486:336:12", + "statements": [ + { + "assignments": [ + 12969 + ], + "declarations": [ + { + "constant": false, + "id": 12969, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12497:17:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 12968, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12497:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12974, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12972, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12961, + "src": "12540:30:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 12970, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "12517:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 12971, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12517:22:12", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 12973, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12517:54:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12497:74:12" + }, + { + "assignments": [ + 12976, + 12978 + ], + "declarations": [ + { + "constant": false, + "id": 12976, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12583:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12975, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12583:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 12978, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13007, + "src": "12597:23:12", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 12977, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "12597:5:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 12988, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12986, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12969, + "src": "12668:4:12", + "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": 12981, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12963, + "src": "12632:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 12980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12624:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 12979, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12624:7:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 12982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12624:19:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 12983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12624:30:12", + "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": 12985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 12984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12661:4:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "12624:43:12", + "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": 12987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12624:49:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12582:91:12" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 12994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 12989, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12976, + "src": "12690:7:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 12990, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12978, + "src": "12701:10:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 12991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12701:17:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 12992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12722:2:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "12701:23:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12690:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13004, + "nodeType": "IfStatement", + "src": "12686:104:12", + "trueBody": { + "id": 13003, + "nodeType": "Block", + "src": "12726:64:12", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 12997, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12978, + "src": "12759:10:12", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 12999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12772:4:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 12998, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12772:4:12", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 13000, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12771:6:12", + "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": 12995, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "12748:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 12996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12748:10:12", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 13001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12748:30:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 12967, + "id": 13002, + "nodeType": "Return", + "src": "12741:37:12" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 13005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12809:5:12", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 12967, + "id": 13006, + "nodeType": "Return", + "src": "12802:12:12" + } + ] + }, + "documentation": null, + "id": 13008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 12964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12963, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13008, + "src": "12434:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 12962, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "12434:10:12", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12433:23:12" + }, + "returnParameters": { + "id": 12967, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12966, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13008, + "src": "12480:4:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 12965, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12480:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12479:6:12" + }, + "scope": 13009, + "src": "12402:420:12", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 13010, + "src": "1251:11574:12" + } + ], + "src": "52:12775:12" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.737Z", + "devdoc": { + "details": "Converter Upgrader The converter upgrader contract allows upgrading an older converter contract (0.4 and up) to the latest version. To begin the upgrade process, simply execute the 'upgrade' function. At the end of the process, the ownership of the newly upgraded converter will be transferred back to the original owner and the original owner will need to execute the 'acceptOwnership' function. The address of the new converter is available in the ConverterUpgrade event. Note that for older converters that don't yet have the 'upgrade' function, ownership should first be transferred manually to the ConverterUpgrader contract using the 'transferOwnership' function and then the upgrader 'upgrade' function should be executed directly.", + "events": { + "ConverterOwned(address,address)": { + "details": "triggered when the contract accept a converter ownership", + "params": { + "_converter": "converter address", + "_owner": "new owner - local upgrader address" + } + }, + "ConverterUpgrade(address,address)": { + "details": "triggered when the upgrading process is done", + "params": { + "_newConverter": "new converter address", + "_oldConverter": "old converter address" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new ConverterUpgrader instance", + "params": { + "_registry": "address of a contract registry contract" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade(bytes32)": { + "details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter", + "params": { + "_version": "old converter version" + } + }, + "upgrade(uint16)": { + "details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success. can only be called by a converter", + "params": { + "_version": "old converter version" + } + }, + "upgradeOld(address,bytes32)": { + "details": "upgrades an old converter to the latest version will throw if ownership wasn't transferred to the upgrader before calling this function. ownership of the new converter will be transferred back to the original owner. fires the ConverterUpgrade event upon success.", + "params": { + "_converter": "old converter contract address", + "_version": "old converter version" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithFallback.json b/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithFallback.json new file mode 100644 index 00000000..ca7adbfc --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithFallback.json @@ -0,0 +1,6022 @@ +{ + "contractName": "ConverterV27OrLowerWithFallback", + "abi": [ + { + "stateMutability": "payable", + "type": "receive" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"ConverterV27OrLowerWithFallback\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50604580601d6000396000f3fe608060405236600a57005b600080fdfea264697066735822122000408c37ec536c8e38e5f9ce277dd7a7b3f9f809ad188140b7fdb2560294ac4d64736f6c634300060c0033", + "deployedBytecode": "0x608060405236600a57005b600080fdfea264697066735822122000408c37ec536c8e38e5f9ce277dd7a7b3f9f809ad188140b7fdb2560294ac4d64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "927:83:36:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "927:83:36:-:0;;;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.792Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithoutFallback.json b/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithoutFallback.json new file mode 100644 index 00000000..53604264 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterV27OrLowerWithoutFallback.json @@ -0,0 +1,6017 @@ +{ + "contractName": "ConverterV27OrLowerWithoutFallback", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"ConverterV27OrLowerWithoutFallback\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122022a7c5c2a80bdc9fed978b23a4f37466b1534c0d237bbef5455709689907057e64736f6c634300060c0033", + "deployedBytecode": "0x6080604052600080fdfea264697066735822122022a7c5c2a80bdc9fed978b23a4f37466b1534c0d237bbef5455709689907057e64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "878:47:36:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "878:47:36:-:0;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.793Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithFallback.json b/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithFallback.json new file mode 100644 index 00000000..28eb8165 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithFallback.json @@ -0,0 +1,6035 @@ +{ + "contractName": "ConverterV28OrHigherWithFallback", + "abi": [ + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"ConverterV28OrHigherWithFallback\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50608e8061001e6000396000f3fe608060405260043610601f5760003560e01c8063d260529c14602d576028565b36602857600080fd5b600080fd5b348015603857600080fd5b50603f6053565b604080519115158252519081900360200190f35b60019056fea2646970667358221220b80e987dba636105e5c650ce4665dd28a11ca7d9868629219b09e646c560b2c664736f6c634300060c0033", + "deployedBytecode": "0x608060405260043610601f5760003560e01c8063d260529c14602d576028565b36602857600080fd5b600080fd5b348015603857600080fd5b50603f6053565b604080519115158252519081900360200190f35b60019056fea2646970667358221220b80e987dba636105e5c650ce4665dd28a11ca7d9868629219b09e646c560b2c664736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1147:188:36:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "1147:188:36:-:0;;;;;;;;;;;;;;;;;;;;;;;1318:8;;;1147:188;;;;1195:80;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1264:4;1195:80;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.796Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithoutFallback.json b/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithoutFallback.json new file mode 100644 index 00000000..c4f18798 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ConverterV28OrHigherWithoutFallback.json @@ -0,0 +1,6031 @@ +{ + "contractName": "ConverterV28OrHigherWithoutFallback", + "abi": [ + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"ConverterV28OrHigherWithoutFallback\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b5060828061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063d260529c14602d575b600080fd5b60336047565b604080519115158252519081900360200190f35b60019056fea26469706673582212201bd4eae8421fd6275338dbc4a9f4ce11231d4088a6f7a718a5101a8e73c0e6e564736f6c634300060c0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063d260529c14602d575b600080fd5b60336047565b604080519115158252519081900360200190f35b60019056fea26469706673582212201bd4eae8421fd6275338dbc4a9f4ce11231d4088a6f7a718a5101a8e73c0e6e564736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1012:133:36:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "1012:133:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1063:80;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1132:4;1063:80;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.798Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ERC20Token.json b/apps/cic-eth/tests/testdata/bancor/ERC20Token.json new file mode 100644 index 00000000..96e4d76b --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ERC20Token.json @@ -0,0 +1,7601 @@ +{ + "contractName": "ERC20Token", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + } + ], + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_totalSupply\",\"type\":\"uint256\"}],\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"ERC20 Standard Token implementation\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"triggered when a wallet allows another wallet to transfer tokens from on its behalf\",\"params\":{\"_owner\":\"wallet that approves the allowance\",\"_spender\":\"wallet that receives the allowance\",\"_value\":\"allowance amount\"}},\"Transfer(address,address,uint256)\":{\"details\":\"triggered when tokens are transferred between wallets\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\",\"params\":{\"_spender\":\"approved address\",\"_value\":\"allowance amount\"},\"returns\":{\"_0\":\"true if the approval was successful, false if it wasn't\"}},\"constructor\":{\"details\":\"initializes a new ERC20Token instance\",\"params\":{\"_decimals\":\"decimal points, for display purposes\",\"_name\":\"token name\",\"_symbol\":\"token symbol\",\"_totalSupply\":\"total supply of token units\"}},\"transfer(address,uint256)\":{\"details\":\"transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":\"ERC20Token\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610a6a380380610a6a8339818101604052608081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020820151910151855191935091506101e1576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600083511161022c576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835161023f906000906020870190610286565b508251610253906001906020860190610286565b506002805460ff191660ff9390931692909217909155600381905533600090815260046020526040902055506103199050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102c757805160ff19168380011785556102f4565b828001600101855582156102f4579182015b828111156102f45782518255916020019190600101906102d9565b50610300929150610304565b5090565b5b808211156103005760008155600101610305565b610742806103286000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b0381351690602001356102d9565b604080519115158252519081900360200190f35b61015d6103c1565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356103c7565b6101ad6104d8565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b03166104e1565b6100a06104f3565b6101416004803603604081101561020757600080fd5b506001600160a01b03813516906020013561054d565b61015d6004803603604081101561023357600080fd5b506001600160a01b03813581169160200135166105fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b820191906000526020600020905b8154815290600101906020018083116102b457829003601f168201915b505050505081565b6000826102e58161061b565b82158061031357503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610359576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b6000836103d38161061b565b836103dd8161061b565b6001600160a01b038616600090815260056020908152604080832033845290915290205461040b908561066f565b6001600160a01b038716600081815260056020908152604080832033845282528083209490945591815260049091522054610446908561066f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461047590856106bc565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b6000826105598161061b565b33600090815260046020526040902054610573908461066f565b33600090815260046020526040808220929092556001600160a01b0386168152205461059f90846106bc565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661066c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156106b6576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082820183811015610705576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea264697066735822122050025f32ef5957f1bca195d1ac8abbb20fa23e1ab2cae628b4abe327e7790d8b64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101a557806370a08231146101c357806395d89b41146101e9578063a9059cbb146101f1578063dd62ed3e1461021d57610093565b806306fdde0314610098578063095ea7b31461011557806318160ddd1461015557806323b872dd1461016f575b600080fd5b6100a061024b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100da5781810151838201526020016100c2565b50505050905090810190601f1680156101075780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101416004803603604081101561012b57600080fd5b506001600160a01b0381351690602001356102d9565b604080519115158252519081900360200190f35b61015d6103c1565b60408051918252519081900360200190f35b6101416004803603606081101561018557600080fd5b506001600160a01b038135811691602081013590911690604001356103c7565b6101ad6104d8565b6040805160ff9092168252519081900360200190f35b61015d600480360360208110156101d957600080fd5b50356001600160a01b03166104e1565b6100a06104f3565b6101416004803603604081101561020757600080fd5b506001600160a01b03813516906020013561054d565b61015d6004803603604081101561023357600080fd5b506001600160a01b03813581169160200135166105fe565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b820191906000526020600020905b8154815290600101906020018083116102b457829003601f168201915b505050505081565b6000826102e58161061b565b82158061031357503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610359576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b6000836103d38161061b565b836103dd8161061b565b6001600160a01b038616600090815260056020908152604080832033845290915290205461040b908561066f565b6001600160a01b038716600081815260056020908152604080832033845282528083209490945591815260049091522054610446908561066f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461047590856106bc565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102d15780601f106102a6576101008083540402835291602001916102d1565b6000826105598161061b565b33600090815260046020526040902054610573908461066f565b33600090815260046020526040808220929092556001600160a01b0386168152205461059f90846106bc565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661066c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156106b6576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082820183811015610705576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea264697066735822122050025f32ef5957f1bca195d1ac8abbb20fa23e1ab2cae628b4abe327e7790d8b64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "241:4565:48:-:0;;;1577:434;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1577:434:48;;;;;;;;;;;1725:19;;1577:434;;-1:-1:-1;1577:434:48;-1:-1:-1;1717:52:48;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;;;;1812:1;1794:7;1788:21;:25;1780:56;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;;;;1849:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1872:16:48;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1899:8:48;:20;;-1:-1:-1;;1899:20:48;;;;;;;;;;;;;1930:11;:26;;;1977:10;-1:-1:-1;1967:21:48;;;:9;:21;;;;;:36;-1:-1:-1;241:4565:48;;-1:-1:-1;241:4565:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;241:4565:48;;;-1:-1:-1;241:4565:48;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "241:4565:48:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;327:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4284:519;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4284:519:48;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;434:35;;;:::i;:::-;;;;;;;;;;;;;;;;3099:470;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3099:470:48;;;;;;;;;;;;;;;;;:::i;397:30::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;476:54;;;;;;;;;;;;;;;;-1:-1:-1;476:54:48;-1:-1:-1;;;;;476:54:48;;:::i;361:29::-;;;:::i;2343:355::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2343:355:48;;;;;;;;:::i;537:75::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;537:75:48;;;;;;;;;;:::i;327:27::-;;;;;;;;;;;;;;;-1:-1:-1;;327:27:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4284:519::-;4436:4;4408:8;594:23:65;608:8;594:13;:23::i;:::-;4592:11:48;;;:51:::1;;-1:-1:-1::0;4617:10:48::1;4607:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4607:31:48;::::1;::::0;;;;;;;;:36;4592:51:::1;4584:82;;;::::0;;-1:-1:-1;;;4584:82:48;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4584:82:48;;;;;;;;;;;;;::::1;;4689:10;4679:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4679:31:48;::::1;::::0;;;;;;;;;;:40;;;4735:38;;;;;;;4679:31;;4689:10;4735:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;4791:4:48::1;::::0;4284:519;-1:-1:-1;;;4284:519:48:o;434:35::-;;;;:::o;3099:470::-;3290:4;3238:5;594:23:65;608:8;594:13;:23::i;:::-;3267:3:48::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3343:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3360:10:::2;3343:28:::0;;;;;;;;:40:::2;::::0;3376:6;3343:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3312:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3329:10:::2;3312:28:::0;;;;;;;:71;;;;3413:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3434:6;3413:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3394:16:48;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3469:14;;::::2;::::0;;;;:26:::2;::::0;3488:6;3469:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3452:14:48;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;3511:28;;;;;;;3452:14;;3511:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;-1:-1:-1::0;3557:4:48::2;::::0;3099:470;-1:-1:-1;;;;;3099:470:48:o;397:30::-;;;;;;:::o;476:54::-;;;;;;;;;;;;;:::o;361:29::-;;;;;;;;;;;;;;;-1:-1:-1;;361:29:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2343:355;2486:4;2463:3;594:23:65;608:8;594:13;:23::i;:::-;2542:10:48::1;2532:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;2558:6;2532:25:::1;:33::i;:::-;2518:10;2508:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;2593:14:48;::::1;::::0;;;;:26:::1;::::0;2612:6;2593:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;2576:14:48;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;2635:33;;;;;;;2576:14;;2644:10:::1;::::0;2635:33:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;2686:4:48::1;::::0;2343:355;-1:-1:-1;;;2343:355:48:o;537:75::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;778:147:61:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:61:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IERC20Token.sol\";\r\nimport \"../utility/Utils.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\n/**\r\n * @dev ERC20 Standard Token implementation\r\n*/\r\ncontract ERC20Token is IERC20Token, Utils {\r\n using SafeMath for uint256;\r\n\r\n\r\n string public override name;\r\n string public override symbol;\r\n uint8 public override decimals;\r\n uint256 public override totalSupply;\r\n mapping (address => uint256) public override balanceOf;\r\n mapping (address => mapping (address => uint256)) public override allowance;\r\n\r\n /**\r\n * @dev triggered when tokens are transferred between wallets\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n */\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n\r\n /**\r\n * @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\r\n *\r\n * @param _owner wallet that approves the allowance\r\n * @param _spender wallet that receives the allowance\r\n * @param _value allowance amount\r\n */\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n\r\n /**\r\n * @dev initializes a new ERC20Token instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token symbol\r\n * @param _decimals decimal points, for display purposes\r\n * @param _totalSupply total supply of token units\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public {\r\n // validate input\r\n require(bytes(_name).length > 0, \"ERR_INVALID_NAME\");\r\n require(bytes(_symbol).length > 0, \"ERR_INVALID_SYMBOL\");\r\n\r\n name = _name;\r\n symbol = _symbol;\r\n decimals = _decimals;\r\n totalSupply = _totalSupply;\r\n balanceOf[msg.sender] = _totalSupply;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(msg.sender, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address on behalf of another address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_from)\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\r\n balanceOf[_from] = balanceOf[_from].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(_from, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev allows another account/contract to transfers tokens on behalf of the caller\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * also, to minimize the risk of the approve/transferFrom attack vector\r\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\r\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\r\n *\r\n * @param _spender approved address\r\n * @param _value allowance amount\r\n *\r\n * @return true if the approval was successful, false if it wasn't\r\n */\r\n function approve(address _spender, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_spender)\r\n returns (bool)\r\n {\r\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\r\n require(_value == 0 || allowance[msg.sender][_spender] == 0, \"ERR_INVALID_AMOUNT\");\r\n\r\n allowance[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value);\r\n return true;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "exportedSymbols": { + "ERC20Token": [ + 20617 + ] + }, + "id": 20618, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20341, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:48" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./interfaces/IERC20Token.sol", + "id": 20342, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 21463, + "src": "77:38:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 20343, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 22997, + "src": "117:30:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20344, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 22690, + "src": "149:33:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20346, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "264:11:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + "id": 20347, + "nodeType": "InheritanceSpecifier", + "src": "264:11:48" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20348, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22996, + "src": "277:5:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22996", + "typeString": "contract Utils" + } + }, + "id": 20349, + "nodeType": "InheritanceSpecifier", + "src": "277:5:48" + } + ], + "contractDependencies": [ + 21462, + 22996 + ], + "contractKind": "contract", + "documentation": { + "id": 20345, + "nodeType": "StructuredDocumentation", + "src": "186:53:48", + "text": " @dev ERC20 Standard Token implementation" + }, + "fullyImplemented": true, + "id": 20617, + "linearizedBaseContracts": [ + 20617, + 22996, + 21462 + ], + "name": "ERC20Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20352, + "libraryName": { + "contractScope": null, + "id": 20350, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "296:8:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "290:27:48", + "typeName": { + "id": 20351, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "309:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "baseFunctions": [ + 21401 + ], + "constant": false, + "functionSelector": "06fdde03", + "id": 20355, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20354, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "341:8:48" + }, + "scope": 20617, + "src": "327:27:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20353, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "327:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21406 + ], + "constant": false, + "functionSelector": "95d89b41", + "id": 20358, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20357, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "375:8:48" + }, + "scope": 20617, + "src": "361:29:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20356, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "361:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21411 + ], + "constant": false, + "functionSelector": "313ce567", + "id": 20361, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20360, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:48" + }, + "scope": 20617, + "src": "397:30:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20359, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "397:5:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21416 + ], + "constant": false, + "functionSelector": "18160ddd", + "id": 20364, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20363, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "449:8:48" + }, + "scope": 20617, + "src": "434:35:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20362, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "434:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21423 + ], + "constant": false, + "functionSelector": "70a08231", + "id": 20369, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "512:8:48" + }, + "scope": 20617, + "src": "476:54:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 20367, + "keyType": { + "id": 20365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "485:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "476:28:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "496:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21432 + ], + "constant": false, + "functionSelector": "dd62ed3e", + "id": 20376, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20375, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "594:8:48" + }, + "scope": 20617, + "src": "537:75:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 20374, + "keyType": { + "id": 20370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "546:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "537:49:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 20373, + "keyType": { + "id": 20371, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "566:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "557:28:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "577:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 20377, + "nodeType": "StructuredDocumentation", + "src": "621:209:48", + "text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 20385, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 20384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20379, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "851:21:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20378, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "851:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20381, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "874:19:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20380, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "874:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20383, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "895:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "895:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "850:60:48" + }, + "src": "836:75:48" + }, + { + "anonymous": false, + "documentation": { + "id": 20386, + "nodeType": "StructuredDocumentation", + "src": "919:280:48", + "text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount" + }, + "id": 20394, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 20393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20388, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1220:22:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1220:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20390, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1244:24:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1244:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20392, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1270:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1270:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1219:66:48" + }, + "src": "1205:81:48" + }, + { + "body": { + "id": 20451, + "nodeType": "Block", + "src": "1679:332:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20409, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20397, + "src": "1731:5:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1725:5:48", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20407, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1725:5:48", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1725:12:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1725:19:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1747:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1725:23:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 20414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1750:18:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 20406, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1717:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1717:52:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20416, + "nodeType": "ExpressionStatement", + "src": "1717:52:48" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20420, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20399, + "src": "1794:7:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1788:5:48", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20418, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1788:5:48", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1788:14:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1788:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1812:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1788:25:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 20425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1815:20:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 20417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1780:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:56:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20427, + "nodeType": "ExpressionStatement", + "src": "1780:56:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20428, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20355, + "src": "1849:4:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20429, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20397, + "src": "1856:5:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1849:12:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20431, + "nodeType": "ExpressionStatement", + "src": "1849:12:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20432, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20358, + "src": "1872:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20433, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20399, + "src": "1881:7:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1872:16:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20435, + "nodeType": "ExpressionStatement", + "src": "1872:16:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20436, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20361, + "src": "1899:8:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20437, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20401, + "src": "1910:9:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1899:20:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20439, + "nodeType": "ExpressionStatement", + "src": "1899:20:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20440, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1930:11:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20441, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20403, + "src": "1944:12:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1930:26:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20443, + "nodeType": "ExpressionStatement", + "src": "1930:26:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20444, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1967:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20447, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20445, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1977:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1977:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1967:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20448, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20403, + "src": "1991:12:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1967:36:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20450, + "nodeType": "ExpressionStatement", + "src": "1967:36:48" + } + ] + }, + "documentation": { + "id": 20395, + "nodeType": "StructuredDocumentation", + "src": "1294:277:48", + "text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _totalSupply total supply of token units" + }, + "id": 20452, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20397, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1589:19:48", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20396, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1589:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20399, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1610:21:48", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20398, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1610:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20401, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1633:15:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20400, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1633:5:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20403, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1650:20:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20402, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1650:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1588:83:48" + }, + "returnParameters": { + "id": 20405, + "nodeType": "ParameterList", + "parameters": [], + "src": "1679:0:48" + }, + "scope": 20617, + "src": "1577:434:48", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21441 + ], + "body": { + "id": 20499, + "nodeType": "Block", + "src": "2497:201:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20466, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2508:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20469, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20467, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2518:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2518:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2508:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20475, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2558:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20470, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2532:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20473, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20471, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2542:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2542:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2532:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2532:25:48", + "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": 20476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2532:33:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2508:57:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20478, + "nodeType": "ExpressionStatement", + "src": "2508:57:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20479, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2576:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20481, + "indexExpression": { + "argumentTypes": null, + "id": 20480, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2586:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2576:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20486, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2612:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20482, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2593:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20484, + "indexExpression": { + "argumentTypes": null, + "id": 20483, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2603:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2593:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2593:18:48", + "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": 20487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2593:26:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2576:43:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20489, + "nodeType": "ExpressionStatement", + "src": "2576:43:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20491, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2644:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2644:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20493, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2656:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20494, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2661:6:48", + "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": 20490, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2635:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2635:33:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20496, + "nodeType": "EmitStatement", + "src": "2630:38:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2686:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20465, + "id": 20498, + "nodeType": "Return", + "src": "2679:11:48" + } + ] + }, + "documentation": { + "id": 20453, + "nodeType": "StructuredDocumentation", + "src": "2019:318:48", + "text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 20500, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20461, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2463:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20462, + "modifierName": { + "argumentTypes": null, + "id": 20460, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "2450:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2450:17:48" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20459, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2432:8:48" + }, + "parameters": { + "id": 20458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20455, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2361:11:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2361:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20457, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2374:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2374:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2360:29:48" + }, + "returnParameters": { + "id": 20465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20464, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2486:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20463, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2486:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2485:6:48" + }, + "scope": 20617, + "src": "2343:355:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21452 + ], + "body": { + "id": 20566, + "nodeType": "Block", + "src": "3301:268:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20519, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "3312:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20523, + "indexExpression": { + "argumentTypes": null, + "id": 20520, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3322:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3312:16:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20524, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20521, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3329:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3329:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3312:28:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20532, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3376:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20525, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "3343:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20527, + "indexExpression": { + "argumentTypes": null, + "id": 20526, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3353:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:16:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20530, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20528, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3360:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3360:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:28:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3343:32:48", + "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": 20533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3343:40:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3312:71:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20535, + "nodeType": "ExpressionStatement", + "src": "3312:71:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20536, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3394:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20538, + "indexExpression": { + "argumentTypes": null, + "id": 20537, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3404:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3394:16:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20543, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3434:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20539, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3413:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20541, + "indexExpression": { + "argumentTypes": null, + "id": 20540, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3423:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3413:16:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3413:20:48", + "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": 20544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3413:28:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3394:47:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20546, + "nodeType": "ExpressionStatement", + "src": "3394:47:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20547, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3452:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20549, + "indexExpression": { + "argumentTypes": null, + "id": 20548, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3462:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3452:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20554, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3488:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20550, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3469:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20552, + "indexExpression": { + "argumentTypes": null, + "id": 20551, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3479:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3469:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "3469:18:48", + "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": 20555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3469:26:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3452:43:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20557, + "nodeType": "ExpressionStatement", + "src": "3452:43:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20559, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3520:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20560, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3527:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20561, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3532:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20558, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "3511:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3511:28:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20563, + "nodeType": "EmitStatement", + "src": "3506:33:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3557:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20518, + "id": 20565, + "nodeType": "Return", + "src": "3550:11:48" + } + ] + }, + "documentation": { + "id": 20501, + "nodeType": "StructuredDocumentation", + "src": "2706:387:48", + "text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 20567, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20511, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3238:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20512, + "modifierName": { + "argumentTypes": null, + "id": 20510, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "3225:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3225:19:48" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 20514, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3267:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20515, + "modifierName": { + "argumentTypes": null, + "id": 20513, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "3254:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:17:48" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20509, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3207:8:48" + }, + "parameters": { + "id": 20508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20503, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3121:13:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3121:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20505, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3136:11:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20507, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3149:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20506, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3149:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3120:44:48" + }, + "returnParameters": { + "id": 20518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20517, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3290:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20516, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3290:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3289:6:48" + }, + "scope": 20617, + "src": "3099:470:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21461 + ], + "body": { + "id": 20615, + "nodeType": "Block", + "src": "4447:356:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 20593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 20582, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4592:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4602:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4592:11:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20585, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "4607:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20588, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4617:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4617:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4607:21:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20590, + "indexExpression": { + "argumentTypes": null, + "id": 20589, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4629:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4607:31:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4642:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4607:36:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4592:51:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 20594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4645:20:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 20581, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4584:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4584:82:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20596, + "nodeType": "ExpressionStatement", + "src": "4584:82:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20597, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "4679:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20601, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4689:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4689:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4679:21:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20602, + "indexExpression": { + "argumentTypes": null, + "id": 20600, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4701:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4679:31:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20603, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4713:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4679:40:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20605, + "nodeType": "ExpressionStatement", + "src": "4679:40:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20607, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4744:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4744:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20609, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4756:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20610, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4766:6:48", + "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": 20606, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20394, + "src": "4735:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4735:38:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20612, + "nodeType": "EmitStatement", + "src": "4730:43:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4791:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20580, + "id": 20614, + "nodeType": "Return", + "src": "4784:11:48" + } + ] + }, + "documentation": { + "id": 20568, + "nodeType": "StructuredDocumentation", + "src": "3577:701:48", + "text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't" + }, + "functionSelector": "095ea7b3", + "id": 20616, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20576, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4408:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20577, + "modifierName": { + "argumentTypes": null, + "id": 20575, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "4395:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4395:22:48" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20574, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4377:8:48" + }, + "parameters": { + "id": 20573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20570, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4301:16:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4301:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20572, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4319:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20571, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4319:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4300:34:48" + }, + "returnParameters": { + "id": 20580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20579, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4436:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4436:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4435:6:48" + }, + "scope": 20617, + "src": "4284:519:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 20618, + "src": "241:4565:48" + } + ], + "src": "52:4756:48" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "exportedSymbols": { + "ERC20Token": [ + 20617 + ] + }, + "id": 20618, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20341, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:48" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./interfaces/IERC20Token.sol", + "id": 20342, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 21463, + "src": "77:38:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 20343, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 22997, + "src": "117:30:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20344, + "nodeType": "ImportDirective", + "scope": 20618, + "sourceUnit": 22690, + "src": "149:33:48", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20346, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "264:11:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + "id": 20347, + "nodeType": "InheritanceSpecifier", + "src": "264:11:48" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20348, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22996, + "src": "277:5:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22996", + "typeString": "contract Utils" + } + }, + "id": 20349, + "nodeType": "InheritanceSpecifier", + "src": "277:5:48" + } + ], + "contractDependencies": [ + 21462, + 22996 + ], + "contractKind": "contract", + "documentation": { + "id": 20345, + "nodeType": "StructuredDocumentation", + "src": "186:53:48", + "text": " @dev ERC20 Standard Token implementation" + }, + "fullyImplemented": true, + "id": 20617, + "linearizedBaseContracts": [ + 20617, + 22996, + 21462 + ], + "name": "ERC20Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20352, + "libraryName": { + "contractScope": null, + "id": 20350, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "296:8:48", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "290:27:48", + "typeName": { + "id": 20351, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "309:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "baseFunctions": [ + 21401 + ], + "constant": false, + "functionSelector": "06fdde03", + "id": 20355, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20354, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "341:8:48" + }, + "scope": 20617, + "src": "327:27:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20353, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "327:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21406 + ], + "constant": false, + "functionSelector": "95d89b41", + "id": 20358, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20357, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "375:8:48" + }, + "scope": 20617, + "src": "361:29:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20356, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "361:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21411 + ], + "constant": false, + "functionSelector": "313ce567", + "id": 20361, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20360, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:48" + }, + "scope": 20617, + "src": "397:30:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20359, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "397:5:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21416 + ], + "constant": false, + "functionSelector": "18160ddd", + "id": 20364, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20363, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "449:8:48" + }, + "scope": 20617, + "src": "434:35:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20362, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "434:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21423 + ], + "constant": false, + "functionSelector": "70a08231", + "id": 20369, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "512:8:48" + }, + "scope": 20617, + "src": "476:54:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 20367, + "keyType": { + "id": 20365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "485:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "476:28:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "496:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21432 + ], + "constant": false, + "functionSelector": "dd62ed3e", + "id": 20376, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20375, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "594:8:48" + }, + "scope": 20617, + "src": "537:75:48", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 20374, + "keyType": { + "id": 20370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "546:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "537:49:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 20373, + "keyType": { + "id": 20371, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "566:7:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "557:28:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "577:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 20377, + "nodeType": "StructuredDocumentation", + "src": "621:209:48", + "text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 20385, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 20384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20379, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "851:21:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20378, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "851:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20381, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "874:19:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20380, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "874:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20383, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20385, + "src": "895:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "895:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "850:60:48" + }, + "src": "836:75:48" + }, + { + "anonymous": false, + "documentation": { + "id": 20386, + "nodeType": "StructuredDocumentation", + "src": "919:280:48", + "text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount" + }, + "id": 20394, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 20393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20388, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1220:22:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1220:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20390, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1244:24:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1244:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20392, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20394, + "src": "1270:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1270:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1219:66:48" + }, + "src": "1205:81:48" + }, + { + "body": { + "id": 20451, + "nodeType": "Block", + "src": "1679:332:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20409, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20397, + "src": "1731:5:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20408, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1725:5:48", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20407, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1725:5:48", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1725:12:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1725:19:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1747:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1725:23:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 20414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1750:18:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 20406, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1717:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1717:52:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20416, + "nodeType": "ExpressionStatement", + "src": "1717:52:48" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20420, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20399, + "src": "1794:7:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1788:5:48", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20418, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1788:5:48", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1788:14:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1788:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1812:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1788:25:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 20425, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1815:20:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 20417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1780:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:56:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20427, + "nodeType": "ExpressionStatement", + "src": "1780:56:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20428, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20355, + "src": "1849:4:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20429, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20397, + "src": "1856:5:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1849:12:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20431, + "nodeType": "ExpressionStatement", + "src": "1849:12:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20432, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20358, + "src": "1872:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20433, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20399, + "src": "1881:7:48", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1872:16:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20435, + "nodeType": "ExpressionStatement", + "src": "1872:16:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20436, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20361, + "src": "1899:8:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20437, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20401, + "src": "1910:9:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1899:20:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20439, + "nodeType": "ExpressionStatement", + "src": "1899:20:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20440, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1930:11:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20441, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20403, + "src": "1944:12:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1930:26:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20443, + "nodeType": "ExpressionStatement", + "src": "1930:26:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20444, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1967:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20447, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20445, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1977:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1977:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1967:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20448, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20403, + "src": "1991:12:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1967:36:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20450, + "nodeType": "ExpressionStatement", + "src": "1967:36:48" + } + ] + }, + "documentation": { + "id": 20395, + "nodeType": "StructuredDocumentation", + "src": "1294:277:48", + "text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _totalSupply total supply of token units" + }, + "id": 20452, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20404, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20397, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1589:19:48", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20396, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1589:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20399, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1610:21:48", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20398, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1610:6:48", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20401, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1633:15:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20400, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1633:5:48", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20403, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20452, + "src": "1650:20:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20402, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1650:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1588:83:48" + }, + "returnParameters": { + "id": 20405, + "nodeType": "ParameterList", + "parameters": [], + "src": "1679:0:48" + }, + "scope": 20617, + "src": "1577:434:48", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21441 + ], + "body": { + "id": 20499, + "nodeType": "Block", + "src": "2497:201:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20466, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2508:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20469, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20467, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2518:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2518:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2508:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20475, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2558:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20470, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2532:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20473, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20471, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2542:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2542:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2532:21:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2532:25:48", + "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": 20476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2532:33:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2508:57:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20478, + "nodeType": "ExpressionStatement", + "src": "2508:57:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20479, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2576:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20481, + "indexExpression": { + "argumentTypes": null, + "id": 20480, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2586:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2576:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20486, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2612:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20482, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2593:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20484, + "indexExpression": { + "argumentTypes": null, + "id": 20483, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2603:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2593:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2593:18:48", + "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": 20487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2593:26:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2576:43:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20489, + "nodeType": "ExpressionStatement", + "src": "2576:43:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20491, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2644:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2644:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20493, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2656:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20494, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20457, + "src": "2661:6:48", + "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": 20490, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2635:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2635:33:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20496, + "nodeType": "EmitStatement", + "src": "2630:38:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2686:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20465, + "id": 20498, + "nodeType": "Return", + "src": "2679:11:48" + } + ] + }, + "documentation": { + "id": 20453, + "nodeType": "StructuredDocumentation", + "src": "2019:318:48", + "text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 20500, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20461, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20455, + "src": "2463:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20462, + "modifierName": { + "argumentTypes": null, + "id": 20460, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "2450:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2450:17:48" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20459, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2432:8:48" + }, + "parameters": { + "id": 20458, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20455, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2361:11:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2361:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20457, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2374:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2374:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2360:29:48" + }, + "returnParameters": { + "id": 20465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20464, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20500, + "src": "2486:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20463, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2486:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2485:6:48" + }, + "scope": 20617, + "src": "2343:355:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21452 + ], + "body": { + "id": 20566, + "nodeType": "Block", + "src": "3301:268:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20519, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "3312:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20523, + "indexExpression": { + "argumentTypes": null, + "id": 20520, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3322:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3312:16:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20524, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20521, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3329:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3329:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3312:28:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20532, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3376:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20525, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "3343:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20527, + "indexExpression": { + "argumentTypes": null, + "id": 20526, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3353:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:16:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20530, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20528, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3360:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3360:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3343:28:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3343:32:48", + "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": 20533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3343:40:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3312:71:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20535, + "nodeType": "ExpressionStatement", + "src": "3312:71:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20536, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3394:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20538, + "indexExpression": { + "argumentTypes": null, + "id": 20537, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3404:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3394:16:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20543, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3434:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20539, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3413:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20541, + "indexExpression": { + "argumentTypes": null, + "id": 20540, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3423:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3413:16:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3413:20:48", + "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": 20544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3413:28:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3394:47:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20546, + "nodeType": "ExpressionStatement", + "src": "3394:47:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20547, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3452:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20549, + "indexExpression": { + "argumentTypes": null, + "id": 20548, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3462:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3452:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20554, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3488:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20550, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "3469:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20552, + "indexExpression": { + "argumentTypes": null, + "id": 20551, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3479:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3469:14:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "3469:18:48", + "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": 20555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3469:26:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3452:43:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20557, + "nodeType": "ExpressionStatement", + "src": "3452:43:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20559, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3520:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20560, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3527:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20561, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20507, + "src": "3532:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20558, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "3511:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3511:28:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20563, + "nodeType": "EmitStatement", + "src": "3506:33:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3557:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20518, + "id": 20565, + "nodeType": "Return", + "src": "3550:11:48" + } + ] + }, + "documentation": { + "id": 20501, + "nodeType": "StructuredDocumentation", + "src": "2706:387:48", + "text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 20567, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20511, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20503, + "src": "3238:5:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20512, + "modifierName": { + "argumentTypes": null, + "id": 20510, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "3225:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3225:19:48" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 20514, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20505, + "src": "3267:3:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20515, + "modifierName": { + "argumentTypes": null, + "id": 20513, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "3254:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3254:17:48" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20509, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3207:8:48" + }, + "parameters": { + "id": 20508, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20503, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3121:13:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3121:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20505, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3136:11:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20507, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3149:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20506, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3149:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3120:44:48" + }, + "returnParameters": { + "id": 20518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20517, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20567, + "src": "3290:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20516, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3290:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3289:6:48" + }, + "scope": 20617, + "src": "3099:470:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21461 + ], + "body": { + "id": 20615, + "nodeType": "Block", + "src": "4447:356:48", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 20593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 20582, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4592:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20583, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4602:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4592:11:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20585, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "4607:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20588, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4617:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4617:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4607:21:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20590, + "indexExpression": { + "argumentTypes": null, + "id": 20589, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4629:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4607:31:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4642:1:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4607:36:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4592:51:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 20594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4645:20:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 20581, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4584:7:48", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4584:82:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20596, + "nodeType": "ExpressionStatement", + "src": "4584:82:48" + }, + { + "expression": { + "argumentTypes": null, + "id": 20604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20597, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20376, + "src": "4679:9:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 20601, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4689:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4689:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4679:21:48", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20602, + "indexExpression": { + "argumentTypes": null, + "id": 20600, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4701:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4679:31:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20603, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4713:6:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4679:40:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20605, + "nodeType": "ExpressionStatement", + "src": "4679:40:48" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20607, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4744:3:48", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4744:10:48", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20609, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4756:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20610, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20572, + "src": "4766:6:48", + "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": 20606, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20394, + "src": "4735:8:48", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4735:38:48", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20612, + "nodeType": "EmitStatement", + "src": "4730:43:48" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4791:4:48", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 20580, + "id": 20614, + "nodeType": "Return", + "src": "4784:11:48" + } + ] + }, + "documentation": { + "id": 20568, + "nodeType": "StructuredDocumentation", + "src": "3577:701:48", + "text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't" + }, + "functionSelector": "095ea7b3", + "id": 20616, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20576, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20570, + "src": "4408:8:48", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20577, + "modifierName": { + "argumentTypes": null, + "id": 20575, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "4395:12:48", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4395:22:48" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20574, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4377:8:48" + }, + "parameters": { + "id": 20573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20570, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4301:16:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4301:7:48", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20572, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4319:14:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20571, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4319:7:48", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4300:34:48" + }, + "returnParameters": { + "id": 20580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20579, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20616, + "src": "4436:4:48", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20578, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4436:4:48", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4435:6:48" + }, + "scope": 20617, + "src": "4284:519:48", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 20618, + "src": "241:4565:48" + } + ], + "src": "52:4756:48" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.727Z", + "networkType": "ethereum", + "devdoc": { + "details": "ERC20 Standard Token implementation", + "events": { + "Approval(address,address,uint256)": { + "details": "triggered when a wallet allows another wallet to transfer tokens from on its behalf", + "params": { + "_owner": "wallet that approves the allowance", + "_spender": "wallet that receives the allowance", + "_value": "allowance amount" + } + }, + "Transfer(address,address,uint256)": { + "details": "triggered when tokens are transferred between wallets", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + } + } + }, + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value", + "params": { + "_spender": "approved address", + "_value": "allowance amount" + }, + "returns": { + "_0": "true if the approval was successful, false if it wasn't" + } + }, + "constructor": { + "details": "initializes a new ERC20Token instance", + "params": { + "_decimals": "decimal points, for display purposes", + "_name": "token name", + "_symbol": "token symbol", + "_totalSupply": "total supply of token units" + } + }, + "transfer(address,uint256)": { + "details": "transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors", + "params": { + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "transferFrom(address,address,uint256)": { + "details": "transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/EtherToken.json b/apps/cic-eth/tests/testdata/bancor/EtherToken.json new file mode 100644 index 00000000..b2468133 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/EtherToken.json @@ -0,0 +1,6043 @@ +{ + "contractName": "EtherToken", + "abi": [ + { + "inputs": [ + { + "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": "_spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Destruction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Issuance", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"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\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Destruction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Issuance\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Ether tokenization contract 'Owned' is specified here for readability reasons\",\"events\":{\"Destruction(uint256)\":{\"details\":\"triggered when the total supply is decreased\",\"params\":{\"_amount\":\"amount that gets removed from the supply\"}},\"Issuance(uint256)\":{\"details\":\"triggered when the total supply is increased\",\"params\":{\"_amount\":\"amount that gets added to the supply\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\",\"params\":{\"_spender\":\"approved address\",\"_value\":\"allowance amount\"},\"returns\":{\"_0\":\"true if the approval was successful, false if it wasn't\"}},\"constructor\":{\"details\":\"initializes a new EtherToken instance\",\"params\":{\"_name\":\"token name\",\"_symbol\":\"token symbol\"}},\"deposit()\":{\"details\":\"deposit ether on behalf of the sender\"},\"depositTo(address)\":{\"details\":\"deposit ether to be entitled for a given account\",\"params\":{\"_to\":\"account to be entitled for the ether\"}},\"transfer(address,uint256)\":{\"details\":\"send coins throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"withdraw(uint256)\":{\"details\":\"withdraw ether to the sender's account\",\"params\":{\"_amount\":\"amount of ether to withdraw\"}},\"withdrawTo(address,uint256)\":{\"details\":\"withdraw ether entitled by the sender to a given account\",\"params\":{\"_amount\":\"amount of ether to withdraw\",\"_to\":\"account to receive the ether\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/EtherToken.sol\":\"EtherToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/EtherToken.sol\":{\"keccak256\":\"0x8c7f758cc26d6a2c9623cde478baf93b5de1ef66fe441b45cc006ed75738ca10\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://adcc6fdd76dabbbb77451742843251d34ceebdcbc8274513ee6c3b8419597b24\",\"dweb:/ipfs/QmWjf3NWqE7pDkFynN2MQfhyrsYdpdoU6vP5KM6FKQUtVq\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000e0738038062000e07833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405250505081816012600080845111620001ee576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200023a576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b83516200024f9060009060208701906200029b565b508251620002659060019060208601906200029b565b506002805460ff191660ff9390931692909217909155600381905533600090815260046020526040902055506200033792505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002de57805160ff19168380011785556200030e565b828001600101855582156200030e579182015b828111156200030e578251825591602001919060010190620002f1565b506200031c92915062000320565b5090565b5b808211156200031c576000815560010162000321565b610ac080620003476000396000f3fe6080604052600436106100c65760003560e01c8063313ce5671161007f578063a9059cbb11610059578063a9059cbb146102f1578063b760faf91461032a578063d0e30db014610350578063dd62ed3e14610358576100d5565b8063313ce5671461027e57806370a08231146102a957806395d89b41146102dc576100d5565b806306fdde03146100da578063095ea7b31461016457806318160ddd146101b1578063205c2878146101d857806323b872dd146102115780632e1a7d4d14610254576100d5565b366100d5576100d3610393565b005b600080fd5b3480156100e657600080fd5b506100ef61039e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610129578181015183820152602001610111565b50505050905090810190601f1680156101565780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017057600080fd5b5061019d6004803603604081101561018757600080fd5b506001600160a01b03813516906020013561042c565b604080519115158252519081900360200190f35b3480156101bd57600080fd5b506101c6610514565b60408051918252519081900360200190f35b3480156101e457600080fd5b506100d3600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013561051a565b34801561021d57600080fd5b5061019d6004803603606081101561023457600080fd5b506001600160a01b038135811691602081013590911690604001356105f2565b34801561026057600080fd5b506100d36004803603602081101561027757600080fd5b5035610612565b34801561028a57600080fd5b5061029361061f565b6040805160ff9092168252519081900360200190f35b3480156102b557600080fd5b506101c6600480360360208110156102cc57600080fd5b50356001600160a01b0316610628565b3480156102e857600080fd5b506100ef61063a565b3480156102fd57600080fd5b5061019d6004803603604081101561031457600080fd5b506001600160a01b038135169060200135610694565b6100d36004803603602081101561034057600080fd5b50356001600160a01b03166106b2565b6100d3610393565b34801561036457600080fd5b506101c66004803603604081101561037b57600080fd5b506001600160a01b038135811691602001351661076d565b61039c336106b2565b565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b505050505081565b6000826104388161078a565b82158061046657503360009081526005602090815260408083206001600160a01b0388168452909152902054155b6104ac576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b81610524816107db565b3360009081526004602052604090205461053e908361082f565b3360009081526004602052604090205560035461055b908361082f565b6003556040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610594573d6000803e3d6000fd5b5060408051838152905130913391600080516020610a6b8339815191529181900360200190a36040805183815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a1505050565b6000826105fe816107db565b61060985858561087c565b95945050505050565b61061c338261051a565b50565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b6000826106a0816107db565b6106aa848461097b565b949350505050565b806106bc816107db565b6001600160a01b0382166000908152600460205260409020546106df9034610a1a565b6001600160a01b0383166000908152600460205260409020556003546107059034610a1a565b6003556040805134815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc39181900360200190a16040805134815290516001600160a01b038416913091600080516020610a6b8339815191529181900360200190a35050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661061c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6001600160a01b03811630141561061c576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600081831015610876576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000836108888161078a565b836108928161078a565b6001600160a01b03861660009081526005602090815260408083203384529091529020546108c0908561082f565b6001600160a01b0387166000818152600560209081526040808320338452825280832094909455918152600490915220546108fb908561082f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461092a9085610a1a565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a1692600080516020610a6b83398151915292918290030190a350600195945050505050565b6000826109878161078a565b336000908152600460205260409020546109a1908461082f565b33600090815260046020526040808220929092556001600160a01b038616815220546109cd9084610a1a565b6001600160a01b038516600081815260046020908152604091829020939093558051868152905191923392600080516020610a6b8339815191529281900390910190a35060019392505050565b600082820183811015610a63576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122029c1e8ed4c9efa01a428c8f35f0d8c72b801cc0161065977203a80395ce1976664736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106100c65760003560e01c8063313ce5671161007f578063a9059cbb11610059578063a9059cbb146102f1578063b760faf91461032a578063d0e30db014610350578063dd62ed3e14610358576100d5565b8063313ce5671461027e57806370a08231146102a957806395d89b41146102dc576100d5565b806306fdde03146100da578063095ea7b31461016457806318160ddd146101b1578063205c2878146101d857806323b872dd146102115780632e1a7d4d14610254576100d5565b366100d5576100d3610393565b005b600080fd5b3480156100e657600080fd5b506100ef61039e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610129578181015183820152602001610111565b50505050905090810190601f1680156101565780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017057600080fd5b5061019d6004803603604081101561018757600080fd5b506001600160a01b03813516906020013561042c565b604080519115158252519081900360200190f35b3480156101bd57600080fd5b506101c6610514565b60408051918252519081900360200190f35b3480156101e457600080fd5b506100d3600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013561051a565b34801561021d57600080fd5b5061019d6004803603606081101561023457600080fd5b506001600160a01b038135811691602081013590911690604001356105f2565b34801561026057600080fd5b506100d36004803603602081101561027757600080fd5b5035610612565b34801561028a57600080fd5b5061029361061f565b6040805160ff9092168252519081900360200190f35b3480156102b557600080fd5b506101c6600480360360208110156102cc57600080fd5b50356001600160a01b0316610628565b3480156102e857600080fd5b506100ef61063a565b3480156102fd57600080fd5b5061019d6004803603604081101561031457600080fd5b506001600160a01b038135169060200135610694565b6100d36004803603602081101561034057600080fd5b50356001600160a01b03166106b2565b6100d3610393565b34801561036457600080fd5b506101c66004803603604081101561037b57600080fd5b506001600160a01b038135811691602001351661076d565b61039c336106b2565b565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b505050505081565b6000826104388161078a565b82158061046657503360009081526005602090815260408083206001600160a01b0388168452909152902054155b6104ac576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b81610524816107db565b3360009081526004602052604090205461053e908361082f565b3360009081526004602052604090205560035461055b908361082f565b6003556040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610594573d6000803e3d6000fd5b5060408051838152905130913391600080516020610a6b8339815191529181900360200190a36040805183815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a1505050565b6000826105fe816107db565b61060985858561087c565b95945050505050565b61061c338261051a565b50565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b6000826106a0816107db565b6106aa848461097b565b949350505050565b806106bc816107db565b6001600160a01b0382166000908152600460205260409020546106df9034610a1a565b6001600160a01b0383166000908152600460205260409020556003546107059034610a1a565b6003556040805134815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc39181900360200190a16040805134815290516001600160a01b038416913091600080516020610a6b8339815191529181900360200190a35050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661061c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6001600160a01b03811630141561061c576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600081831015610876576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000836108888161078a565b836108928161078a565b6001600160a01b03861660009081526005602090815260408083203384529091529020546108c0908561082f565b6001600160a01b0387166000818152600560209081526040808320338452825280832094909455918152600490915220546108fb908561082f565b6001600160a01b03808816600090815260046020526040808220939093559087168152205461092a9085610a1a565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a1692600080516020610a6b83398151915292918290030190a350600195945050505050565b6000826109878161078a565b336000908152600460205260409020546109a1908461082f565b33600090815260046020526040808220929092556001600160a01b038616815220546109cd9084610a1a565b6001600160a01b038516600081815260046020908152604091829020939093558051868152905191923392600080516020610a6b8339815191529281900390910190a35060019392505050565b600082820183811015610a63576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122029c1e8ed4c9efa01a428c8f35f0d8c72b801cc0161065977203a80395ce1976664736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "289:3737:49:-:0;;;919:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;919:123:49;;;;;;;;;;-1:-1:-1;919:123:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;919:123:49;;;;;;;;;;-1:-1:-1;919:123:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1011:5;1018:7;1027:2;1031:1;1747::48;1731:5;1725:19;:23;1717:52;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;;;;1812:1;1794:7;1788:21;:25;1780:56;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;;;;1849:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1872:16:48;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1899:8:48;:20;;-1:-1:-1;;1899:20:48;;;;;;;;;;;;;1930:11;:26;;;1977:10;-1:-1:-1;1967:21:48;;;:9;:21;;;;;:36;-1:-1:-1;289:3737:49;;-1:-1:-1;;;289:3737:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;289:3737:49;;;-1:-1:-1;289:3737:49;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "289:3737:49:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4006:9;:7;:9::i;:::-;289:3737;;;;;327:27:48;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4284:519;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4284:519:48;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;434:35;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2201:491:49;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2201:491:49;;;;;;;;:::i;3660:240::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3660:240:49;;;;;;;;;;;;;;;;;:::i;1342:101::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1342:101:49;;:::i;397:30:48:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;476:54;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;476:54:48;-1:-1:-1;;;;;476:54:48;;:::i;361:29::-;;;;;;;;;;;;;:::i;3068:210:49:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3068:210:49;;;;;;;;:::i;1602:387::-;;;;;;;;;;;;;;;;-1:-1:-1;1602:387:49;-1:-1:-1;;;;;1602:387:49;;:::i;1119:83::-;;;:::i;537:75:48:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;537:75:48;;;;;;;;;;:::i;1119:83:49:-;1173:21;1183:10;1173:9;:21::i;:::-;1119:83::o;327:27:48:-;;;;;;;;;;;;;;;-1:-1:-1;;327:27:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4284:519::-;4436:4;4408:8;594:23:65;608:8;594:13;:23::i;:::-;4592:11:48;;;:51:::1;;-1:-1:-1::0;4617:10:48::1;4607:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4607:31:48;::::1;::::0;;;;;;;;:36;4592:51:::1;4584:82;;;::::0;;-1:-1:-1;;;4584:82:48;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4584:82:48;;;;;;;;;;;;;::::1;;4689:10;4679:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4679:31:48;::::1;::::0;;;;;;;;;;:40;;;4735:38;;;;;;;4679:31;;4689:10;4735:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;4791:4:48::1;::::0;4284:519;-1:-1:-1;;;4284:519:48:o;434:35::-;;;;:::o;2201:491:49:-;2310:3;948:18:65;957:8;948;:18::i;:::-;2365:10:49::1;2355:21;::::0;;;:9:::1;:21;::::0;;;;;:34:::1;::::0;2381:7;2355:25:::1;:34::i;:::-;2341:10;2331:21;::::0;;;:9:::1;:21;::::0;;;;:58;2460:11:::1;::::0;:24:::1;::::0;2476:7;2460:15:::1;:24::i;:::-;2446:11;:38:::0;2524:21:::1;::::0;-1:-1:-1;;;;;2524:12:49;::::1;::::0;:21;::::1;;;::::0;2537:7;;2524:21:::1;::::0;;;2537:7;2524:12;:21;::::1;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;2604:44:49::1;::::0;;;;;;;2633:4:::1;::::0;2613:10:::1;::::0;-1:-1:-1;;;;;;;;;;;2604:44:49;;;;::::1;::::0;;::::1;2664:20;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;2201:491:::0;;;:::o;3660:240::-;3825:4;3802:3;948:18:65;957:8;948;:18::i;:::-;3854:38:49::1;3873:5;3880:3;3885:6;3854:18;:38::i;:::-;3847:45:::0;3660:240;-1:-1:-1;;;;;3660:240:49:o;1342:101::-;1404:31;1415:10;1427:7;1404:10;:31::i;:::-;1342:101;:::o;397:30:48:-;;;;;;:::o;476:54::-;;;;;;;;;;;;;:::o;361:29::-;;;;;;;;;;;;;;;-1:-1:-1;;361:29:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3068:210:49;3214:4;3191:3;948:18:65;957:8;948;:18::i;:::-;3243:27:49::1;3258:3;3263:6;3243:14;:27::i;:::-;3236:34:::0;3068:210;-1:-1:-1;;;;3068:210:49:o;1602:387::-;1702:3;948:18:65;957:8;948;:18::i;:::-;-1:-1:-1;;;;;1740:14:49;::::1;;::::0;;;:9:::1;:14;::::0;;;;;:29:::1;::::0;1759:9:::1;1740:18;:29::i;:::-;-1:-1:-1::0;;;;;1723:14:49;::::1;;::::0;;;:9:::1;:14;::::0;;;;:46;1834:11:::1;::::0;:26:::1;::::0;1850:9:::1;1834:15;:26::i;:::-;1820:11;:40:::0;1907:19:::1;::::0;;1916:9:::1;1907:19:::0;;;;::::1;::::0;;;;::::1;::::0;;::::1;1942:39;::::0;;1971:9:::1;1942:39:::0;;;;-1:-1:-1;;;;;1942:39:49;::::1;::::0;1959:4:::1;::::0;-1:-1:-1;;;;;;;;;;;1942:39:49;;;;::::1;::::0;;::::1;1602:387:::0;;:::o;537:75:48:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;1041:126;-1:-1:-1;;;;;1110:25:65;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;778:147:61;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;3099:470:48:-;3290:4;3238:5;594:23:65;608:8;594:13;:23::i;:::-;3267:3:48::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3343:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3360:10:::2;3343:28:::0;;;;;;;;:40:::2;::::0;3376:6;3343:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3312:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3329:10:::2;3312:28:::0;;;;;;;:71;;;;3413:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3434:6;3413:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3394:16:48;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3469:14;;::::2;::::0;;;;:26:::2;::::0;3488:6;3469:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3452:14:48;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;3511:28;;;;;;;3452:14;;3511:28;;::::2;::::0;-1:-1:-1;;;;;;;;;;;3511:28:48;;;;;;;::::2;-1:-1:-1::0;3557:4:48::2;::::0;3099:470;-1:-1:-1;;;;;3099:470:48:o;2343:355::-;2486:4;2463:3;594:23:65;608:8;594:13;:23::i;:::-;2542:10:48::1;2532:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;2558:6;2532:25:::1;:33::i;:::-;2518:10;2508:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;2593:14:48;::::1;::::0;;;;:26:::1;::::0;2612:6;2593:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;2576:14:48;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;2635:33;;;;;;;2576:14;;2644:10:::1;::::0;-1:-1:-1;;;;;;;;;;;2635:33:48;;;;;;;;::::1;-1:-1:-1::0;2686:4:48::1;::::0;2343:355;-1:-1:-1;;;2343:355:48:o;386:169:61:-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:61:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./ERC20Token.sol\";\r\nimport \"./interfaces/IEtherToken.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\n/**\r\n * @dev Ether tokenization contract\r\n *\r\n * 'Owned' is specified here for readability reasons\r\n*/\r\ncontract EtherToken is IEtherToken, ERC20Token {\r\n using SafeMath for uint256;\r\n\r\n /**\r\n * @dev triggered when the total supply is increased\r\n *\r\n * @param _amount amount that gets added to the supply\r\n */\r\n event Issuance(uint256 _amount);\r\n\r\n /**\r\n * @dev triggered when the total supply is decreased\r\n *\r\n * @param _amount amount that gets removed from the supply\r\n */\r\n event Destruction(uint256 _amount);\r\n\r\n /**\r\n * @dev initializes a new EtherToken instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token symbol\r\n */\r\n constructor(string memory _name, string memory _symbol)\r\n public\r\n ERC20Token(_name, _symbol, 18, 0) {\r\n }\r\n\r\n /**\r\n * @dev deposit ether on behalf of the sender\r\n */\r\n function deposit() public override payable {\r\n depositTo(msg.sender);\r\n }\r\n\r\n /**\r\n * @dev withdraw ether to the sender's account\r\n *\r\n * @param _amount amount of ether to withdraw\r\n */\r\n function withdraw(uint256 _amount) public override {\r\n withdrawTo(msg.sender, _amount);\r\n }\r\n\r\n /**\r\n * @dev deposit ether to be entitled for a given account\r\n *\r\n * @param _to account to be entitled for the ether\r\n */\r\n function depositTo(address _to)\r\n public\r\n override\r\n payable\r\n notThis(_to)\r\n {\r\n balanceOf[_to] = balanceOf[_to].add(msg.value); // add the value to the account balance\r\n totalSupply = totalSupply.add(msg.value); // increase the total supply\r\n\r\n emit Issuance(msg.value);\r\n emit Transfer(address(this), _to, msg.value);\r\n }\r\n\r\n /**\r\n * @dev withdraw ether entitled by the sender to a given account\r\n *\r\n * @param _to account to receive the ether\r\n * @param _amount amount of ether to withdraw\r\n */\r\n function withdrawTo(address payable _to, uint256 _amount)\r\n public\r\n override\r\n notThis(_to)\r\n {\r\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_amount); // deduct the amount from the account balance\r\n totalSupply = totalSupply.sub(_amount); // decrease the total supply\r\n _to.transfer(_amount); // send the amount to the target account\r\n\r\n emit Transfer(msg.sender, address(this), _amount);\r\n emit Destruction(_amount);\r\n }\r\n\r\n // ERC20 standard method overrides with some extra protection\r\n\r\n /**\r\n * @dev send coins\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n override(IERC20Token, ERC20Token)\r\n notThis(_to)\r\n returns (bool)\r\n {\r\n return super.transfer(_to, _value);\r\n }\r\n\r\n /**\r\n * @dev an account/contract attempts to get the coins\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n override(IERC20Token, ERC20Token)\r\n notThis(_to)\r\n returns (bool)\r\n {\r\n return super.transferFrom(_from, _to, _value);\r\n }\r\n\r\n /**\r\n * @dev deposit ether in the account\r\n */\r\n receive() external payable {\r\n deposit();\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/EtherToken.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/EtherToken.sol", + "exportedSymbols": { + "EtherToken": [ + 20837 + ] + }, + "id": 20838, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20619, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:49" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "file": "./ERC20Token.sol", + "id": 20620, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 20618, + "src": "77:26:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./interfaces/IEtherToken.sol", + "id": 20621, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 21489, + "src": "105:38:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20622, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 22690, + "src": "145:33:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20624, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21488, + "src": "312:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21488", + "typeString": "contract IEtherToken" + } + }, + "id": 20625, + "nodeType": "InheritanceSpecifier", + "src": "312:11:49" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20626, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "325:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + }, + "id": 20627, + "nodeType": "InheritanceSpecifier", + "src": "325:10:49" + } + ], + "contractDependencies": [ + 20617, + 21462, + 21488, + 22996 + ], + "contractKind": "contract", + "documentation": { + "id": 20623, + "nodeType": "StructuredDocumentation", + "src": "182:105:49", + "text": " @dev Ether tokenization contract\n 'Owned' is specified here for readability reasons" + }, + "fullyImplemented": true, + "id": 20837, + "linearizedBaseContracts": [ + 20837, + 20617, + 22996, + 21488, + 21462 + ], + "name": "EtherToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20630, + "libraryName": { + "contractScope": null, + "id": 20628, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "349:8:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "343:27:49", + "typeName": { + "id": 20629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "362:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": { + "id": 20631, + "nodeType": "StructuredDocumentation", + "src": "378:141:49", + "text": " @dev triggered when the total supply is increased\n @param _amount amount that gets added to the supply" + }, + "id": 20635, + "name": "Issuance", + "nodeType": "EventDefinition", + "parameters": { + "id": 20634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20633, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20635, + "src": "540:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "540:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "539:17:49" + }, + "src": "525:32:49" + }, + { + "anonymous": false, + "documentation": { + "id": 20636, + "nodeType": "StructuredDocumentation", + "src": "565:145:49", + "text": " @dev triggered when the total supply is decreased\n @param _amount amount that gets removed from the supply" + }, + "id": 20640, + "name": "Destruction", + "nodeType": "EventDefinition", + "parameters": { + "id": 20639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20638, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20640, + "src": "734:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "734:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "733:17:49" + }, + "src": "716:35:49" + }, + { + "body": { + "id": 20654, + "nodeType": "Block", + "src": "1034:8:49", + "statements": [] + }, + "documentation": { + "id": 20641, + "nodeType": "StructuredDocumentation", + "src": "759:154:49", + "text": " @dev initializes a new EtherToken instance\n @param _name token name\n @param _symbol token symbol" + }, + "id": 20655, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20648, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20643, + "src": "1011:5:49", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20649, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20645, + "src": "1018:7:49", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "hexValue": "3138", + "id": 20650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1027:2:49", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 20651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1031:1:49", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 20652, + "modifierName": { + "argumentTypes": null, + "id": 20647, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20617, + "src": "1000:10:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$20617_$", + "typeString": "type(contract ERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1000:33:49" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20643, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20655, + "src": "931:19:49", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20642, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "931:6:49", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20645, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20655, + "src": "952:21:49", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "952:6:49", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:44:49" + }, + "returnParameters": { + "id": 20653, + "nodeType": "ParameterList", + "parameters": [], + "src": "1034:0:49" + }, + "scope": 20837, + "src": "919:123:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21470 + ], + "body": { + "id": 20665, + "nodeType": "Block", + "src": "1162:40:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20661, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1183:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1183:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 20660, + "name": "depositTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20726, + "src": "1173:9:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 20663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1173:21:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20664, + "nodeType": "ExpressionStatement", + "src": "1173:21:49" + } + ] + }, + "documentation": { + "id": 20656, + "nodeType": "StructuredDocumentation", + "src": "1050:63:49", + "text": " @dev deposit ether on behalf of the sender" + }, + "functionSelector": "d0e30db0", + "id": 20666, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20658, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1145:8:49" + }, + "parameters": { + "id": 20657, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:2:49" + }, + "returnParameters": { + "id": 20659, + "nodeType": "ParameterList", + "parameters": [], + "src": "1162:0:49" + }, + "scope": 20837, + "src": "1119:83:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21475 + ], + "body": { + "id": 20679, + "nodeType": "Block", + "src": "1393:50:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20674, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1415:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1415:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20676, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20669, + "src": "1427:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20673, + "name": "withdrawTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20779, + "src": "1404:10:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 20677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1404:31:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20678, + "nodeType": "ExpressionStatement", + "src": "1404:31:49" + } + ] + }, + "documentation": { + "id": 20667, + "nodeType": "StructuredDocumentation", + "src": "1210:126:49", + "text": " @dev withdraw ether to the sender's account\n @param _amount amount of ether to withdraw" + }, + "functionSelector": "2e1a7d4d", + "id": 20680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20671, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1384:8:49" + }, + "parameters": { + "id": 20670, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20669, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20680, + "src": "1360:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20668, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1360:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1359:17:49" + }, + "returnParameters": { + "id": 20672, + "nodeType": "ParameterList", + "parameters": [], + "src": "1393:0:49" + }, + "scope": 20837, + "src": "1342:101:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21480 + ], + "body": { + "id": 20725, + "nodeType": "Block", + "src": "1712:277:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20690, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1723:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20692, + "indexExpression": { + "argumentTypes": null, + "id": 20691, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1733:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1723:14:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20697, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1759:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1759:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20693, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1740:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20695, + "indexExpression": { + "argumentTypes": null, + "id": 20694, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1750:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1740:14:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "1740:18:49", + "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": 20699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1740:29:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1723:46:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20701, + "nodeType": "ExpressionStatement", + "src": "1723:46:49" + }, + { + "expression": { + "argumentTypes": null, + "id": 20708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20702, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1820:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20705, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1850:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1850:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20703, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1834:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "1834:15:49", + "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": 20707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1834:26:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1820:40:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20709, + "nodeType": "ExpressionStatement", + "src": "1820:40:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20711, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1916:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1916:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20710, + "name": "Issuance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20635, + "src": "1907:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1907:19:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20714, + "nodeType": "EmitStatement", + "src": "1902:24:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20718, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1959:4:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + ], + "id": 20717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1951:7:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20716, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1951:7:49", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1951:13:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20720, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1966:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20721, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1971:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1971:9:49", + "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": 20715, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "1942:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:39:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20724, + "nodeType": "EmitStatement", + "src": "1937:44:49" + } + ] + }, + "documentation": { + "id": 20681, + "nodeType": "StructuredDocumentation", + "src": "1451:145:49", + "text": " @dev deposit ether to be entitled for a given account\n @param _to account to be entitled for the ether" + }, + "functionSelector": "b760faf9", + "id": 20726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20687, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1702:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20688, + "modifierName": { + "argumentTypes": null, + "id": 20686, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "1694:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1694:12:49" + } + ], + "name": "depositTo", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20685, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1659:8:49" + }, + "parameters": { + "id": 20684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20683, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20726, + "src": "1621:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20682, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1621:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1620:13:49" + }, + "returnParameters": { + "id": 20689, + "nodeType": "ParameterList", + "parameters": [], + "src": "1712:0:49" + }, + "scope": 20837, + "src": "1602:387:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21487 + ], + "body": { + "id": 20778, + "nodeType": "Block", + "src": "2320:372:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20738, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2331:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20741, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20739, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2341:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2341:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2331:21:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20747, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2381:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20742, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2355:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20745, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20743, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2365:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2365:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2355:21:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2355:25:49", + "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": 20748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2355:34:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2331:58:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20750, + "nodeType": "ExpressionStatement", + "src": "2331:58:49" + }, + { + "expression": { + "argumentTypes": null, + "id": 20756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20751, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2446:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20754, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2476:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20752, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2460:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2460:15:49", + "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": 20755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:24:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2446:38:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20757, + "nodeType": "ExpressionStatement", + "src": "2446:38:49" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20761, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2537:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20758, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20729, + "src": "2524:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 20760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2524:12:49", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2524:21:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20763, + "nodeType": "ExpressionStatement", + "src": "2524:21:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20765, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2613:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2613:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20769, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2633:4:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + ], + "id": 20768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2625:7:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2625:7:49", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2625:13:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20771, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2640:7:49", + "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" + } + ], + "id": 20764, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2604:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2604:44:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20773, + "nodeType": "EmitStatement", + "src": "2599:49:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20775, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2676:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20774, + "name": "Destruction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20640, + "src": "2664:11:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2664:20:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20777, + "nodeType": "EmitStatement", + "src": "2659:25:49" + } + ] + }, + "documentation": { + "id": 20727, + "nodeType": "StructuredDocumentation", + "src": "1997:198:49", + "text": " @dev withdraw ether entitled by the sender to a given account\n @param _to account to receive the ether\n @param _amount amount of ether to withdraw" + }, + "functionSelector": "205c2878", + "id": 20779, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20735, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20729, + "src": "2310:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "id": 20736, + "modifierName": { + "argumentTypes": null, + "id": 20734, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "2302:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2302:12:49" + } + ], + "name": "withdrawTo", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20733, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2284:8:49" + }, + "parameters": { + "id": 20732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20729, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20779, + "src": "2221:19:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 20728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2221:15:49", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20731, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20779, + "src": "2242:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20730, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2242:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2220:38:49" + }, + "returnParameters": { + "id": 20737, + "nodeType": "ParameterList", + "parameters": [], + "src": "2320:0:49" + }, + "scope": 20837, + "src": "2201:491:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20500, + 21441 + ], + "body": { + "id": 20801, + "nodeType": "Block", + "src": "3225:53:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20797, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20782, + "src": "3258:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20798, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20784, + "src": "3263:6:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20795, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3243:5:49", + "typeDescriptions": { + "typeIdentifier": "t_super$_EtherToken_$20837", + "typeString": "contract super EtherToken" + } + }, + "id": 20796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 20500, + "src": "3243:14:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 20799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3243:27:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20794, + "id": 20800, + "nodeType": "Return", + "src": "3236:34:49" + } + ] + }, + "documentation": { + "id": 20780, + "nodeType": "StructuredDocumentation", + "src": "2769:293:49", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 20802, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20790, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20782, + "src": "3191:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20791, + "modifierName": { + "argumentTypes": null, + "id": 20789, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "3183:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3183:12:49" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20788, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 20786, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3149:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 20787, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3162:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3140:33:49" + }, + "parameters": { + "id": 20785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20782, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3086:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3086:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20784, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3099:14:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3099:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3085:29:49" + }, + "returnParameters": { + "id": 20794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3214:4:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20792, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3214:4:49", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3213:6:49" + }, + "scope": 20837, + "src": "3068:210:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20567, + 21452 + ], + "body": { + "id": 20827, + "nodeType": "Block", + "src": "3836:64:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20822, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20805, + "src": "3873:5:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20823, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20807, + "src": "3880:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20824, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20809, + "src": "3885:6:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20820, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3854:5:49", + "typeDescriptions": { + "typeIdentifier": "t_super$_EtherToken_$20837", + "typeString": "contract super EtherToken" + } + }, + "id": 20821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 20567, + "src": "3854:18:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 20825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3854:38:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20819, + "id": 20826, + "nodeType": "Return", + "src": "3847:45:49" + } + ] + }, + "documentation": { + "id": 20803, + "nodeType": "StructuredDocumentation", + "src": "3286:368:49", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 20828, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20815, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20807, + "src": "3802:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20816, + "modifierName": { + "argumentTypes": null, + "id": 20814, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "3794:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3794:12:49" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20813, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 20811, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3760:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 20812, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3773:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3751:33:49" + }, + "parameters": { + "id": 20810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20805, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3682:13:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20804, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3682:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20807, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3697:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20806, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3697:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20809, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3710:14:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20808, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3710:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3681:44:49" + }, + "returnParameters": { + "id": 20819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20818, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3825:4:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20817, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3825:4:49", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3824:6:49" + }, + "scope": 20837, + "src": "3660:240:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20835, + "nodeType": "Block", + "src": "3995:28:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20832, + "name": "deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20666, + "src": "4006:7:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 20833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4006:9:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20834, + "nodeType": "ExpressionStatement", + "src": "4006:9:49" + } + ] + }, + "documentation": { + "id": 20829, + "nodeType": "StructuredDocumentation", + "src": "3908:54:49", + "text": " @dev deposit ether in the account" + }, + "id": 20836, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20830, + "nodeType": "ParameterList", + "parameters": [], + "src": "3975:2:49" + }, + "returnParameters": { + "id": 20831, + "nodeType": "ParameterList", + "parameters": [], + "src": "3995:0:49" + }, + "scope": 20837, + "src": "3968:55:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 20838, + "src": "289:3737:49" + } + ], + "src": "52:3976:49" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/EtherToken.sol", + "exportedSymbols": { + "EtherToken": [ + 20837 + ] + }, + "id": 20838, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20619, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:49" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "file": "./ERC20Token.sol", + "id": 20620, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 20618, + "src": "77:26:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./interfaces/IEtherToken.sol", + "id": 20621, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 21489, + "src": "105:38:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20622, + "nodeType": "ImportDirective", + "scope": 20838, + "sourceUnit": 22690, + "src": "145:33:49", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20624, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21488, + "src": "312:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21488", + "typeString": "contract IEtherToken" + } + }, + "id": 20625, + "nodeType": "InheritanceSpecifier", + "src": "312:11:49" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20626, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "325:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + }, + "id": 20627, + "nodeType": "InheritanceSpecifier", + "src": "325:10:49" + } + ], + "contractDependencies": [ + 20617, + 21462, + 21488, + 22996 + ], + "contractKind": "contract", + "documentation": { + "id": 20623, + "nodeType": "StructuredDocumentation", + "src": "182:105:49", + "text": " @dev Ether tokenization contract\n 'Owned' is specified here for readability reasons" + }, + "fullyImplemented": true, + "id": 20837, + "linearizedBaseContracts": [ + 20837, + 20617, + 22996, + 21488, + 21462 + ], + "name": "EtherToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20630, + "libraryName": { + "contractScope": null, + "id": 20628, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "349:8:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "343:27:49", + "typeName": { + "id": 20629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "362:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": { + "id": 20631, + "nodeType": "StructuredDocumentation", + "src": "378:141:49", + "text": " @dev triggered when the total supply is increased\n @param _amount amount that gets added to the supply" + }, + "id": 20635, + "name": "Issuance", + "nodeType": "EventDefinition", + "parameters": { + "id": 20634, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20633, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20635, + "src": "540:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "540:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "539:17:49" + }, + "src": "525:32:49" + }, + { + "anonymous": false, + "documentation": { + "id": 20636, + "nodeType": "StructuredDocumentation", + "src": "565:145:49", + "text": " @dev triggered when the total supply is decreased\n @param _amount amount that gets removed from the supply" + }, + "id": 20640, + "name": "Destruction", + "nodeType": "EventDefinition", + "parameters": { + "id": 20639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20638, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20640, + "src": "734:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "734:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "733:17:49" + }, + "src": "716:35:49" + }, + { + "body": { + "id": 20654, + "nodeType": "Block", + "src": "1034:8:49", + "statements": [] + }, + "documentation": { + "id": 20641, + "nodeType": "StructuredDocumentation", + "src": "759:154:49", + "text": " @dev initializes a new EtherToken instance\n @param _name token name\n @param _symbol token symbol" + }, + "id": 20655, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20648, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20643, + "src": "1011:5:49", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20649, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20645, + "src": "1018:7:49", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "hexValue": "3138", + "id": 20650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1027:2:49", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 20651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1031:1:49", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 20652, + "modifierName": { + "argumentTypes": null, + "id": 20647, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20617, + "src": "1000:10:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$20617_$", + "typeString": "type(contract ERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1000:33:49" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20643, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20655, + "src": "931:19:49", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20642, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "931:6:49", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20645, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20655, + "src": "952:21:49", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "952:6:49", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:44:49" + }, + "returnParameters": { + "id": 20653, + "nodeType": "ParameterList", + "parameters": [], + "src": "1034:0:49" + }, + "scope": 20837, + "src": "919:123:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21470 + ], + "body": { + "id": 20665, + "nodeType": "Block", + "src": "1162:40:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20661, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1183:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1183:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 20660, + "name": "depositTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20726, + "src": "1173:9:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 20663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1173:21:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20664, + "nodeType": "ExpressionStatement", + "src": "1173:21:49" + } + ] + }, + "documentation": { + "id": 20656, + "nodeType": "StructuredDocumentation", + "src": "1050:63:49", + "text": " @dev deposit ether on behalf of the sender" + }, + "functionSelector": "d0e30db0", + "id": 20666, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20658, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1145:8:49" + }, + "parameters": { + "id": 20657, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:2:49" + }, + "returnParameters": { + "id": 20659, + "nodeType": "ParameterList", + "parameters": [], + "src": "1162:0:49" + }, + "scope": 20837, + "src": "1119:83:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21475 + ], + "body": { + "id": 20679, + "nodeType": "Block", + "src": "1393:50:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20674, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1415:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1415:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20676, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20669, + "src": "1427:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20673, + "name": "withdrawTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20779, + "src": "1404:10:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 20677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1404:31:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20678, + "nodeType": "ExpressionStatement", + "src": "1404:31:49" + } + ] + }, + "documentation": { + "id": 20667, + "nodeType": "StructuredDocumentation", + "src": "1210:126:49", + "text": " @dev withdraw ether to the sender's account\n @param _amount amount of ether to withdraw" + }, + "functionSelector": "2e1a7d4d", + "id": 20680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20671, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1384:8:49" + }, + "parameters": { + "id": 20670, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20669, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20680, + "src": "1360:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20668, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1360:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1359:17:49" + }, + "returnParameters": { + "id": 20672, + "nodeType": "ParameterList", + "parameters": [], + "src": "1393:0:49" + }, + "scope": 20837, + "src": "1342:101:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21480 + ], + "body": { + "id": 20725, + "nodeType": "Block", + "src": "1712:277:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20690, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1723:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20692, + "indexExpression": { + "argumentTypes": null, + "id": 20691, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1733:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1723:14:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20697, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1759:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1759:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20693, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "1740:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20695, + "indexExpression": { + "argumentTypes": null, + "id": 20694, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1750:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1740:14:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "1740:18:49", + "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": 20699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1740:29:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1723:46:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20701, + "nodeType": "ExpressionStatement", + "src": "1723:46:49" + }, + { + "expression": { + "argumentTypes": null, + "id": 20708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20702, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1820:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20705, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1850:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1850:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20703, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "1834:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "1834:15:49", + "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": 20707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1834:26:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1820:40:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20709, + "nodeType": "ExpressionStatement", + "src": "1820:40:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20711, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1916:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1916:9:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20710, + "name": "Issuance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20635, + "src": "1907:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1907:19:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20714, + "nodeType": "EmitStatement", + "src": "1902:24:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20718, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1959:4:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + ], + "id": 20717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1951:7:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20716, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1951:7:49", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1951:13:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20720, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1966:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20721, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1971:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1971:9:49", + "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": 20715, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "1942:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:39:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20724, + "nodeType": "EmitStatement", + "src": "1937:44:49" + } + ] + }, + "documentation": { + "id": 20681, + "nodeType": "StructuredDocumentation", + "src": "1451:145:49", + "text": " @dev deposit ether to be entitled for a given account\n @param _to account to be entitled for the ether" + }, + "functionSelector": "b760faf9", + "id": 20726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20687, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20683, + "src": "1702:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20688, + "modifierName": { + "argumentTypes": null, + "id": 20686, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "1694:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1694:12:49" + } + ], + "name": "depositTo", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20685, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1659:8:49" + }, + "parameters": { + "id": 20684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20683, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20726, + "src": "1621:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20682, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1621:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1620:13:49" + }, + "returnParameters": { + "id": 20689, + "nodeType": "ParameterList", + "parameters": [], + "src": "1712:0:49" + }, + "scope": 20837, + "src": "1602:387:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21487 + ], + "body": { + "id": 20778, + "nodeType": "Block", + "src": "2320:372:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20738, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2331:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20741, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20739, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2341:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2341:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2331:21:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20747, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2381:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20742, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2355:9:49", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20745, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20743, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2365:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2365:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2355:21:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2355:25:49", + "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": 20748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2355:34:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2331:58:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20750, + "nodeType": "ExpressionStatement", + "src": "2331:58:49" + }, + { + "expression": { + "argumentTypes": null, + "id": 20756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20751, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2446:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20754, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2476:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20752, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2460:11:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2460:15:49", + "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": 20755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2460:24:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2446:38:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20757, + "nodeType": "ExpressionStatement", + "src": "2446:38:49" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20761, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2537:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20758, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20729, + "src": "2524:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 20760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2524:12:49", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2524:21:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20763, + "nodeType": "ExpressionStatement", + "src": "2524:21:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20765, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2613:3:49", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2613:10:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20769, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2633:4:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_EtherToken_$20837", + "typeString": "contract EtherToken" + } + ], + "id": 20768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2625:7:49", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2625:7:49", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2625:13:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 20771, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2640:7:49", + "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" + } + ], + "id": 20764, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2604:8:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2604:44:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20773, + "nodeType": "EmitStatement", + "src": "2599:49:49" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20775, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20731, + "src": "2676:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20774, + "name": "Destruction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20640, + "src": "2664:11:49", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 20776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2664:20:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20777, + "nodeType": "EmitStatement", + "src": "2659:25:49" + } + ] + }, + "documentation": { + "id": 20727, + "nodeType": "StructuredDocumentation", + "src": "1997:198:49", + "text": " @dev withdraw ether entitled by the sender to a given account\n @param _to account to receive the ether\n @param _amount amount of ether to withdraw" + }, + "functionSelector": "205c2878", + "id": 20779, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20735, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20729, + "src": "2310:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "id": 20736, + "modifierName": { + "argumentTypes": null, + "id": 20734, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "2302:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2302:12:49" + } + ], + "name": "withdrawTo", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20733, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2284:8:49" + }, + "parameters": { + "id": 20732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20729, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20779, + "src": "2221:19:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 20728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2221:15:49", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20731, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20779, + "src": "2242:15:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20730, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2242:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2220:38:49" + }, + "returnParameters": { + "id": 20737, + "nodeType": "ParameterList", + "parameters": [], + "src": "2320:0:49" + }, + "scope": 20837, + "src": "2201:491:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20500, + 21441 + ], + "body": { + "id": 20801, + "nodeType": "Block", + "src": "3225:53:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20797, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20782, + "src": "3258:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20798, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20784, + "src": "3263:6:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20795, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3243:5:49", + "typeDescriptions": { + "typeIdentifier": "t_super$_EtherToken_$20837", + "typeString": "contract super EtherToken" + } + }, + "id": 20796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 20500, + "src": "3243:14:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 20799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3243:27:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20794, + "id": 20800, + "nodeType": "Return", + "src": "3236:34:49" + } + ] + }, + "documentation": { + "id": 20780, + "nodeType": "StructuredDocumentation", + "src": "2769:293:49", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 20802, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20790, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20782, + "src": "3191:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20791, + "modifierName": { + "argumentTypes": null, + "id": 20789, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "3183:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3183:12:49" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20788, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 20786, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3149:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 20787, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3162:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3140:33:49" + }, + "parameters": { + "id": 20785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20782, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3086:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3086:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20784, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3099:14:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3099:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3085:29:49" + }, + "returnParameters": { + "id": 20794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20802, + "src": "3214:4:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20792, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3214:4:49", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3213:6:49" + }, + "scope": 20837, + "src": "3068:210:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20567, + 21452 + ], + "body": { + "id": 20827, + "nodeType": "Block", + "src": "3836:64:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20822, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20805, + "src": "3873:5:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20823, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20807, + "src": "3880:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20824, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20809, + "src": "3885:6:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 20820, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3854:5:49", + "typeDescriptions": { + "typeIdentifier": "t_super$_EtherToken_$20837", + "typeString": "contract super EtherToken" + } + }, + "id": 20821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 20567, + "src": "3854:18:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 20825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3854:38:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20819, + "id": 20826, + "nodeType": "Return", + "src": "3847:45:49" + } + ] + }, + "documentation": { + "id": 20803, + "nodeType": "StructuredDocumentation", + "src": "3286:368:49", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 20828, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20815, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20807, + "src": "3802:3:49", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20816, + "modifierName": { + "argumentTypes": null, + "id": 20814, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "3794:7:49", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3794:12:49" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20813, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 20811, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3760:11:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 20812, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3773:10:49", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3751:33:49" + }, + "parameters": { + "id": 20810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20805, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3682:13:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20804, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3682:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20807, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3697:11:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20806, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3697:7:49", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20809, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3710:14:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20808, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3710:7:49", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3681:44:49" + }, + "returnParameters": { + "id": 20819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20818, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20828, + "src": "3825:4:49", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20817, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3825:4:49", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3824:6:49" + }, + "scope": 20837, + "src": "3660:240:49", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20835, + "nodeType": "Block", + "src": "3995:28:49", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20832, + "name": "deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20666, + "src": "4006:7:49", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 20833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4006:9:49", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20834, + "nodeType": "ExpressionStatement", + "src": "4006:9:49" + } + ] + }, + "documentation": { + "id": 20829, + "nodeType": "StructuredDocumentation", + "src": "3908:54:49", + "text": " @dev deposit ether in the account" + }, + "id": 20836, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20830, + "nodeType": "ParameterList", + "parameters": [], + "src": "3975:2:49" + }, + "returnParameters": { + "id": 20831, + "nodeType": "ParameterList", + "parameters": [], + "src": "3995:0:49" + }, + "scope": 20837, + "src": "3968:55:49", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 20838, + "src": "289:3737:49" + } + ], + "src": "52:3976:49" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "1604964387852": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd3453": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Destruction", + "type": "event" + }, + "0x9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Issuance", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x3ca82B266Eb2A5E7D3ff0443A3E77dcFd3FCd951", + "transactionHash": "0x5e1c72f8309ca075596126269006d74a8ec61048c8734c393b5e3dadf17c0c50" + }, + "1604964469407": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd3453": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Destruction", + "type": "event" + }, + "0x9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Issuance", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x86839ff49c3eAb7aB85A136883C378E97990C787", + "transactionHash": "0xd86501bcab8952303093ff4814e23edd93484236a1a59c1821cdbe16c425a12c" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:45.584Z", + "networkType": "ethereum", + "devdoc": { + "details": "Ether tokenization contract 'Owned' is specified here for readability reasons", + "events": { + "Destruction(uint256)": { + "details": "triggered when the total supply is decreased", + "params": { + "_amount": "amount that gets removed from the supply" + } + }, + "Issuance(uint256)": { + "details": "triggered when the total supply is increased", + "params": { + "_amount": "amount that gets added to the supply" + } + } + }, + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value", + "params": { + "_spender": "approved address", + "_value": "allowance amount" + }, + "returns": { + "_0": "true if the approval was successful, false if it wasn't" + } + }, + "constructor": { + "details": "initializes a new EtherToken instance", + "params": { + "_name": "token name", + "_symbol": "token symbol" + } + }, + "deposit()": { + "details": "deposit ether on behalf of the sender" + }, + "depositTo(address)": { + "details": "deposit ether to be entitled for a given account", + "params": { + "_to": "account to be entitled for the ether" + } + }, + "transfer(address,uint256)": { + "details": "send coins throws on any error rather then return a false flag to minimize user errors", + "params": { + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "transferFrom(address,address,uint256)": { + "details": "an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "withdraw(uint256)": { + "details": "withdraw ether to the sender's account", + "params": { + "_amount": "amount of ether to withdraw" + } + }, + "withdrawTo(address,uint256)": { + "details": "withdraw ether entitled by the sender to a given account", + "params": { + "_amount": "amount of ether to withdraw", + "_to": "account to receive the ether" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/GiftableToken.json b/apps/cic-eth/tests/testdata/bancor/GiftableToken.json new file mode 100644 index 00000000..27064ab6 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/GiftableToken.json @@ -0,0 +1,9682 @@ +{ + "contractName": "GiftableToken", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_initialSupply", + "type": "uint256" + } + ], + "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": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "gift", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_initialSupply\",\"type\":\"uint256\"}],\"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\":false,\"internalType\":\"uint256\",\"name\":\"_oldTotal\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newTotal\",\"type\":\"uint256\"}],\"name\":\"ChangedSupply\",\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"gift\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"triggered when a wallet allows another wallet to transfer tokens from on its behalf\",\"params\":{\"_owner\":\"wallet that approves the allowance\",\"_spender\":\"wallet that receives the allowance\",\"_value\":\"allowance amount\"}},\"Transfer(address,address,uint256)\":{\"details\":\"triggered when tokens are transferred between wallets\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\",\"params\":{\"_spender\":\"approved address\",\"_value\":\"allowance amount\"},\"returns\":{\"_0\":\"true if the approval was successful, false if it wasn't\"}},\"constructor\":{\"details\":\"initializes a new ERC20Token instance\",\"params\":{\"_decimals\":\"decimal points, for display purposes\",\"_initialSupply\":\"total supply of token units\",\"_name\":\"token name\",\"_symbol\":\"token symbol\"}},\"transfer(address,uint256)\":{\"details\":\"transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol\":\"GiftableToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol\":{\"keccak256\":\"0x0d4d8909d3720b29564992be7d8438d920407d801d8c0775e9556f556279b0be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a63d9486f37b7c5b31b517fb3322c0858a2e69f28338f0253497d48ffb0e17a4\",\"dweb:/ipfs/QmWNig4757rhjS4yKSqezvm85TYtSS7gfGnh1oBFaKTpTu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405162000b5e38038062000b5e8339818101604052608081101561003557600080fd5b810190808051604051939291908464010000000082111561005557600080fd5b90830190602082018581111561006a57600080fd5b825164010000000081118282018810171561008457600080fd5b82525081516020918201929091019080838360005b838110156100b1578181015183820152602001610099565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b506040526020018051604051939291908464010000000082111561010157600080fd5b90830190602082018581111561011657600080fd5b825164010000000081118282018810171561013057600080fd5b82525081516020918201929091019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b5060409081526020820151910151855191935091506101e3576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b600083511161022e576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b8351610241906000906020870190610288565b508251610255906001906020860190610288565b506002805460ff191660ff93909316929092179091556003819055336000908152600460205260409020555061031b9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102c957805160ff19168380011785556102f6565b828001600101855582156102f6579182015b828111156102f65782518255916020019190600101906102db565b50610302929150610306565b5090565b5b808211156103025760008155600101610307565b610833806200032b6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a08231146101ce57806395d89b41146101f4578063a9059cbb146101fc578063cbce4c9714610228578063dd62ed3e146102545761009e565b806306fdde03146100a3578063095ea7b31461012057806318160ddd1461016057806323b872dd1461017a578063313ce567146101b0575b600080fd5b6100ab610282565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e55781810151838201526020016100cd565b50505050905090810190601f1680156101125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014c6004803603604081101561013657600080fd5b506001600160a01b038135169060200135610310565b604080519115158252519081900360200190f35b6101686103f8565b60408051918252519081900360200190f35b61014c6004803603606081101561019057600080fd5b506001600160a01b038135811691602081013590911690604001356103fe565b6101b861050f565b6040805160ff9092168252519081900360200190f35b610168600480360360208110156101e457600080fd5b50356001600160a01b0316610518565b6100ab61052a565b61014c6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610584565b61014c6004803603604081101561023e57600080fd5b506001600160a01b038135169060200135610635565b6101686004803603604081101561026a57600080fd5b506001600160a01b03813581169160200135166106ef565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b820191906000526020600020905b8154815290600101906020018083116102eb57829003601f168201915b505050505081565b60008261031c8161070c565b82158061034a57503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610390576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b60008361040a8161070c565b836104148161070c565b6001600160a01b03861660009081526005602090815260408083203384529091529020546104429085610760565b6001600160a01b03871660008181526005602090815260408083203384528252808320949094559181526004909152205461047d9085610760565b6001600160a01b0380881660009081526004602052604080822093909355908716815220546104ac90856107ad565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b6000826105908161070c565b336000908152600460205260409020546105aa9084610760565b33600090815260046020526040808220929092556001600160a01b038616815220546105d690846107ad565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b6000826106418161070c565b60038054840190556001600160a01b038416600090815260046020908152604091829020805480870191829055835181815292830191909152825190927f5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e928290030190a16040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505092915050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661075d576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156107a7576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107f6576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220644eb3a30aaa221921cdec2760f5f3994cae5532951555edfed3499ba643345e64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a08231146101ce57806395d89b41146101f4578063a9059cbb146101fc578063cbce4c9714610228578063dd62ed3e146102545761009e565b806306fdde03146100a3578063095ea7b31461012057806318160ddd1461016057806323b872dd1461017a578063313ce567146101b0575b600080fd5b6100ab610282565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e55781810151838201526020016100cd565b50505050905090810190601f1680156101125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61014c6004803603604081101561013657600080fd5b506001600160a01b038135169060200135610310565b604080519115158252519081900360200190f35b6101686103f8565b60408051918252519081900360200190f35b61014c6004803603606081101561019057600080fd5b506001600160a01b038135811691602081013590911690604001356103fe565b6101b861050f565b6040805160ff9092168252519081900360200190f35b610168600480360360208110156101e457600080fd5b50356001600160a01b0316610518565b6100ab61052a565b61014c6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610584565b61014c6004803603604081101561023e57600080fd5b506001600160a01b038135169060200135610635565b6101686004803603604081101561026a57600080fd5b506001600160a01b03813581169160200135166106ef565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b820191906000526020600020905b8154815290600101906020018083116102eb57829003601f168201915b505050505081565b60008261031c8161070c565b82158061034a57503360009081526005602090815260408083206001600160a01b0388168452909152902054155b610390576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526005602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035481565b60008361040a8161070c565b836104148161070c565b6001600160a01b03861660009081526005602090815260408083203384529091529020546104429085610760565b6001600160a01b03871660008181526005602090815260408083203384528252808320949094559181526004909152205461047d9085610760565b6001600160a01b0380881660009081526004602052604080822093909355908716815220546104ac90856107ad565b6001600160a01b0380871660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600195945050505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103085780601f106102dd57610100808354040283529160200191610308565b6000826105908161070c565b336000908152600460205260409020546105aa9084610760565b33600090815260046020526040808220929092556001600160a01b038616815220546105d690846107ad565b6001600160a01b0385166000818152600460209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b6000826106418161070c565b60038054840190556001600160a01b038416600090815260046020908152604091829020805480870191829055835181815292830191909152825190927f5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e928290030190a16040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505092915050565b600560209081526000928352604080842090915290825290205481565b6001600160a01b03811661075d576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000818310156107a7576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107f6576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220644eb3a30aaa221921cdec2760f5f3994cae5532951555edfed3499ba643345e64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "307:4981:50:-:0;;;1714:440;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1714:440:50;;;;;;;;;;;1864:19;;1714:440;;-1:-1:-1;1714:440:50;-1:-1:-1;1856:52:50;;;;;-1:-1:-1;;;1856:52:50;;;;;;;;;;;;-1:-1:-1;;;1856:52:50;;;;;;;;;;;;;;;1951:1;1933:7;1927:21;:25;1919:56;;;;;-1:-1:-1;;;1919:56:50;;;;;;;;;;;;-1:-1:-1;;;1919:56:50;;;;;;;;;;;;;;;1988:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;2011:16:50;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;2038:8:50;:20;;-1:-1:-1;;2038:20:50;;;;;;;;;;;;;2069:11;:28;;;2118:10;-1:-1:-1;2108:21:50;;;:9;:21;;;;;:38;-1:-1:-1;307:4981:50;;-1:-1:-1;307:4981:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;307:4981:50;;;-1:-1:-1;307:4981:50;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "307:4981:50:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;396:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4766:519;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4766:519:50;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;503:35;;;:::i;:::-;;;;;;;;;;;;;;;;3581:470;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3581:470:50;;;;;;;;;;;;;;;;;:::i;466:30::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;545:54;;;;;;;;;;;;;;;;-1:-1:-1;545:54:50;-1:-1:-1;;;;;545:54:50;;:::i;430:29::-;;;:::i;2825:355::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2825:355:50;;;;;;;;:::i;2162:331::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2162:331:50;;;;;;;;:::i;606:75::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;606:75:50;;;;;;;;;;:::i;396:27::-;;;;;;;;;;;;;;;-1:-1:-1;;396:27:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4766:519::-;4918:4;4890:8;594:23:65;608:8;594:13;:23::i;:::-;5074:11:50;;;:51:::1;;-1:-1:-1::0;5099:10:50::1;5089:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;5089:31:50;::::1;::::0;;;;;;;;:36;5074:51:::1;5066:82;;;::::0;;-1:-1:-1;;;5066:82:50;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5066:82:50;;;;;;;;;;;;;::::1;;5171:10;5161:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;5161:31:50;::::1;::::0;;;;;;;;;;:40;;;5217:38;;;;;;;5161:31;;5171:10;5217:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;5273:4:50::1;::::0;4766:519;-1:-1:-1;;;4766:519:50:o;503:35::-;;;;:::o;3581:470::-;3772:4;3720:5;594:23:65;608:8;594:13;:23::i;:::-;3749:3:50::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3825:16:50;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3842:10:::2;3825:28:::0;;;;;;;;:40:::2;::::0;3858:6;3825:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3794:16:50;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3811:10:::2;3794:28:::0;;;;;;;:71;;;;3895:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3916:6;3895:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3876:16:50;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3951:14;;::::2;::::0;;;;:26:::2;::::0;3970:6;3951:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3934:14:50;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;3993:28;;;;;;;3934:14;;3993:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;-1:-1:-1::0;4039:4:50::2;::::0;3581:470;-1:-1:-1;;;;;3581:470:50:o;466:30::-;;;;;;:::o;545:54::-;;;;;;;;;;;;;:::o;430:29::-;;;;;;;;;;;;;;;-1:-1:-1;;430:29:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2825:355;2968:4;2945:3;594:23:65;608:8;594:13;:23::i;:::-;3024:10:50::1;3014:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;3040:6;3014:25:::1;:33::i;:::-;3000:10;2990:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;3075:14:50;::::1;::::0;;;;:26:::1;::::0;3094:6;3075:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;3058:14:50;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;3117:33;;;;;;;3058:14;;3126:10:::1;::::0;3117:33:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;3168:4:50::1;::::0;2825:355;-1:-1:-1;;;2825:355:50:o;2162:331::-;2256:4;2240:3;594:23:65;608:8;594:13;:23::i;:::-;2289:11:50::1;::::0;;:20;::::1;2275:34:::0;;-1:-1:-1;;;;;2333:14:50;::::1;-1:-1:-1::0;2333:14:50;;;:9:::1;:14;::::0;;;;;;;;;;2368:23;;::::1;2351:40:::0;;;;2400;;;;;;;::::1;::::0;;;;;;2333:14;;2400:40:::1;::::0;;;;;;::::1;2449:36;::::0;;;;;;;-1:-1:-1;;;;;2449:36:50;::::1;::::0;2466:4:::1;::::0;2449:36:::1;::::0;;;;::::1;::::0;;::::1;628:1:65;2162:331:50::0;;;;;:::o;606:75::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;778:147:61:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:61:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IERC20Token.sol\";\r\nimport \"../utility/Utils.sol\";\r\nimport \"../utility/SafeMath.sol\";\r\n\r\n/*\r\n * This is a MOCK token used for DEVELOPMENT PURPOSES ONLY.\r\n *\r\n * @dev ERC20 Standard Token implementation\r\n*/\r\ncontract GiftableToken is IERC20Token, Utils {\r\n using SafeMath for uint256;\r\n\r\n\r\n string public override name;\r\n string public override symbol;\r\n uint8 public override decimals;\r\n uint256 public override totalSupply;\r\n mapping (address => uint256) public override balanceOf;\r\n mapping (address => mapping (address => uint256)) public override allowance;\r\n\r\n /**\r\n * @dev triggered when tokens are transferred between wallets\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n */\r\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\r\n\r\n /**\r\n * @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\r\n *\r\n * @param _owner wallet that approves the allowance\r\n * @param _spender wallet that receives the allowance\r\n * @param _value allowance amount\r\n */\r\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\r\n\r\n event ChangedSupply(uint256 _oldTotal, uint256 _newTotal);\r\n\r\n /**\r\n * @dev initializes a new ERC20Token instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token symbol\r\n * @param _decimals decimal points, for display purposes\r\n * @param _initialSupply total supply of token units\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _initialSupply) public {\r\n // validate input\r\n require(bytes(_name).length > 0, \"ERR_INVALID_NAME\");\r\n require(bytes(_symbol).length > 0, \"ERR_INVALID_SYMBOL\");\r\n\r\n name = _name;\r\n symbol = _symbol;\r\n decimals = _decimals;\r\n totalSupply = _initialSupply;\r\n balanceOf[msg.sender] = _initialSupply;\r\n }\r\n\r\n function gift(address _to, uint256 _value) \r\n\tpublic\r\n\tvirtual\r\n\tvalidAddress(_to)\r\n\treturns (bool)\r\n {\r\n\ttotalSupply = totalSupply + _value;\r\n\tuint256 oldSupply = balanceOf[_to];\r\n\tbalanceOf[_to] = balanceOf[_to] + _value;\r\n\temit ChangedSupply(oldSupply, balanceOf[_to]);\r\n\temit Transfer(address(0x00), _to, _value);\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(msg.sender, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev transfers tokens to a given address on behalf of another address\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_from)\r\n validAddress(_to)\r\n returns (bool)\r\n {\r\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\r\n balanceOf[_from] = balanceOf[_from].sub(_value);\r\n balanceOf[_to] = balanceOf[_to].add(_value);\r\n emit Transfer(_from, _to, _value);\r\n return true;\r\n }\r\n\r\n /**\r\n * @dev allows another account/contract to transfers tokens on behalf of the caller\r\n * throws on any error rather then return a false flag to minimize user errors\r\n *\r\n * also, to minimize the risk of the approve/transferFrom attack vector\r\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\r\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\r\n *\r\n * @param _spender approved address\r\n * @param _value allowance amount\r\n *\r\n * @return true if the approval was successful, false if it wasn't\r\n */\r\n function approve(address _spender, uint256 _value)\r\n public\r\n virtual\r\n override\r\n validAddress(_spender)\r\n returns (bool)\r\n {\r\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\r\n require(_value == 0 || allowance[msg.sender][_spender] == 0, \"ERR_INVALID_AMOUNT\");\r\n\r\n allowance[msg.sender][_spender] = _value;\r\n emit Approval(msg.sender, _spender, _value);\r\n return true;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol", + "exportedSymbols": { + "GiftableToken": [ + 21171 + ] + }, + "id": 21172, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20839, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:50" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./interfaces/IERC20Token.sol", + "id": 20840, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 21462, + "src": "77:38:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 20841, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 22996, + "src": "117:30:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20842, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 22689, + "src": "149:33:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20843, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "333:11:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 20844, + "nodeType": "InheritanceSpecifier", + "src": "333:11:50" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20845, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22995, + "src": "346:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22995", + "typeString": "contract Utils" + } + }, + "id": 20846, + "nodeType": "InheritanceSpecifier", + "src": "346:5:50" + } + ], + "contractDependencies": [ + 21461, + 22995 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 21171, + "linearizedBaseContracts": [ + 21171, + 22995, + 21461 + ], + "name": "GiftableToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20849, + "libraryName": { + "contractScope": null, + "id": 20847, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22688, + "src": "365:8:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22688", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "359:27:50", + "typeName": { + "id": 20848, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "baseFunctions": [ + 21400 + ], + "constant": false, + "functionSelector": "06fdde03", + "id": 20852, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20851, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:50" + }, + "scope": 21171, + "src": "396:27:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20850, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "396:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21405 + ], + "constant": false, + "functionSelector": "95d89b41", + "id": 20855, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20854, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "444:8:50" + }, + "scope": 21171, + "src": "430:29:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20853, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "430:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21410 + ], + "constant": false, + "functionSelector": "313ce567", + "id": 20858, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20857, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "479:8:50" + }, + "scope": 21171, + "src": "466:30:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20856, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "466:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21415 + ], + "constant": false, + "functionSelector": "18160ddd", + "id": 20861, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "518:8:50" + }, + "scope": 21171, + "src": "503:35:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "503:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21422 + ], + "constant": false, + "functionSelector": "70a08231", + "id": 20866, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "581:8:50" + }, + "scope": 21171, + "src": "545:54:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 20864, + "keyType": { + "id": 20862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "545:28:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "565:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21431 + ], + "constant": false, + "functionSelector": "dd62ed3e", + "id": 20873, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20872, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "663:8:50" + }, + "scope": 21171, + "src": "606:75:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 20871, + "keyType": { + "id": 20867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "615:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "606:49:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 20870, + "keyType": { + "id": 20868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "635:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "626:28:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "646:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 20874, + "nodeType": "StructuredDocumentation", + "src": "690:209:50", + "text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 20882, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 20881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20876, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "920:21:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20875, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "920:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20878, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "943:19:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20877, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "943:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20880, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "964:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "964:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "919:60:50" + }, + "src": "905:75:50" + }, + { + "anonymous": false, + "documentation": { + "id": 20883, + "nodeType": "StructuredDocumentation", + "src": "988:280:50", + "text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount" + }, + "id": 20891, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 20890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20885, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1289:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1289:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20887, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1313:24:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1313:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20889, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1339:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1339:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1288:66:50" + }, + "src": "1274:81:50" + }, + { + "anonymous": false, + "documentation": null, + "id": 20897, + "name": "ChangedSupply", + "nodeType": "EventDefinition", + "parameters": { + "id": 20896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20893, + "indexed": false, + "mutability": "mutable", + "name": "_oldTotal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20897, + "src": "1383:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20892, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20895, + "indexed": false, + "mutability": "mutable", + "name": "_newTotal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20897, + "src": "1402:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20894, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1402:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:38:50" + }, + "src": "1363:58:50" + }, + { + "body": { + "id": 20954, + "nodeType": "Block", + "src": "1818:336:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20912, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20900, + "src": "1870:5:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1864:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20910, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1864:5:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1864:12:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:19:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1886:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1864:23:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 20917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1889:18:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 20909, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1856:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1856:52:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20919, + "nodeType": "ExpressionStatement", + "src": "1856:52:50" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20923, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20902, + "src": "1933:7:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1927:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20921, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1927:5:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1927:14:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1927:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1951:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1927:25:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 20928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1954:20:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 20920, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1919:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1919:56:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20930, + "nodeType": "ExpressionStatement", + "src": "1919:56:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20931, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20852, + "src": "1988:4:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20932, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20900, + "src": "1995:5:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1988:12:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20934, + "nodeType": "ExpressionStatement", + "src": "1988:12:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20935, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20855, + "src": "2011:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20936, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20902, + "src": "2020:7:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2011:16:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20938, + "nodeType": "ExpressionStatement", + "src": "2011:16:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20939, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20858, + "src": "2038:8:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20940, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20904, + "src": "2049:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2038:20:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20942, + "nodeType": "ExpressionStatement", + "src": "2038:20:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20943, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2069:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20944, + "name": "_initialSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20906, + "src": "2083:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2069:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20946, + "nodeType": "ExpressionStatement", + "src": "2069:28:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20947, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2108:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20950, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20948, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2118:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2118:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2108:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20951, + "name": "_initialSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20906, + "src": "2132:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2108:38:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20953, + "nodeType": "ExpressionStatement", + "src": "2108:38:50" + } + ] + }, + "documentation": { + "id": 20898, + "nodeType": "StructuredDocumentation", + "src": "1429:279:50", + "text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _initialSupply total supply of token units" + }, + "id": 20955, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20900, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1726:19:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20899, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1726:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20902, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1747:21:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1747:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20904, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1770:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20903, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1770:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20906, + "mutability": "mutable", + "name": "_initialSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1787:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1787:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1725:85:50" + }, + "returnParameters": { + "id": 20908, + "nodeType": "ParameterList", + "parameters": [], + "src": "1818:0:50" + }, + "scope": 21171, + "src": "1714:440:50", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21005, + "nodeType": "Block", + "src": "2271:222:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20967, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2275:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 20968, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2289:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 20969, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2303:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2289:20:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2275:34:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20972, + "nodeType": "ExpressionStatement", + "src": "2275:34:50" + }, + { + "assignments": [ + 20974 + ], + "declarations": [ + { + "constant": false, + "id": 20974, + "mutability": "mutable", + "name": "oldSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21005, + "src": "2313:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2313:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 20978, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20975, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2333:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20977, + "indexExpression": { + "argumentTypes": null, + "id": 20976, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2343:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2333:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:34:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20979, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2351:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20981, + "indexExpression": { + "argumentTypes": null, + "id": 20980, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2361:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2351:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20982, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2368:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20984, + "indexExpression": { + "argumentTypes": null, + "id": 20983, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2378:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2368:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 20985, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2385:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2368:23:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2351:40:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20988, + "nodeType": "ExpressionStatement", + "src": "2351:40:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20990, + "name": "oldSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20974, + "src": "2414:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20991, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2425:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20993, + "indexExpression": { + "argumentTypes": null, + "id": 20992, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2435:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2425:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20989, + "name": "ChangedSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20897, + "src": "2400:13:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 20994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2400:40:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20995, + "nodeType": "EmitStatement", + "src": "2395:45:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783030", + "id": 20999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2466:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x00" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 20998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2458:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20997, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2458:7:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2458:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21001, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2473:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21002, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2478:6:50", + "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": 20996, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "2449:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2449:36:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21004, + "nodeType": "EmitStatement", + "src": "2444:41:50" + } + ] + }, + "documentation": null, + "functionSelector": "cbce4c97", + "id": 21006, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20962, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2240:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20963, + "modifierName": { + "argumentTypes": null, + "id": 20961, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "2227:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2227:17:50" + } + ], + "name": "gift", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20957, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2176:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20956, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2176:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20959, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2189:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20958, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2189:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2175:29:50" + }, + "returnParameters": { + "id": 20966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20965, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2256:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20964, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2256:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:6:50" + }, + "scope": 21171, + "src": "2162:331:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21440 + ], + "body": { + "id": 21053, + "nodeType": "Block", + "src": "2979:201:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21020, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2990:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21023, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21021, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3000:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3000:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2990:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21029, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3040:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21024, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3014:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21027, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3024:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3024:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3014:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3014:25:50", + "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": 21030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3014:33:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2990:57:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21032, + "nodeType": "ExpressionStatement", + "src": "2990:57:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21033, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3058:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21035, + "indexExpression": { + "argumentTypes": null, + "id": 21034, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3068:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3058:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21040, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3094:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21036, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3075:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21038, + "indexExpression": { + "argumentTypes": null, + "id": 21037, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3085:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3075:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "3075:18:50", + "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": 21041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3075:26:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3058:43:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21043, + "nodeType": "ExpressionStatement", + "src": "3058:43:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21045, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3126:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3126:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21047, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3138:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21048, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3143:6:50", + "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": 21044, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "3117:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3117:33:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21050, + "nodeType": "EmitStatement", + "src": "3112:38:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3168:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21019, + "id": 21052, + "nodeType": "Return", + "src": "3161:11:50" + } + ] + }, + "documentation": { + "id": 21007, + "nodeType": "StructuredDocumentation", + "src": "2501:318:50", + "text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 21054, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21015, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "2945:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21016, + "modifierName": { + "argumentTypes": null, + "id": 21014, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "2932:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2932:17:50" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21013, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2914:8:50" + }, + "parameters": { + "id": 21012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21009, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2843:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21008, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2843:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21011, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2856:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21010, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2856:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2842:29:50" + }, + "returnParameters": { + "id": 21019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21018, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2968:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21017, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2968:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2967:6:50" + }, + "scope": 21171, + "src": "2825:355:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21451 + ], + "body": { + "id": 21120, + "nodeType": "Block", + "src": "3783:268:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21073, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "3794:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21077, + "indexExpression": { + "argumentTypes": null, + "id": 21074, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3804:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3794:16:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21078, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21075, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3811:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3811:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3794:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21086, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3858:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21079, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "3825:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21081, + "indexExpression": { + "argumentTypes": null, + "id": 21080, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3835:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3825:16:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21084, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21082, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3842:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3842:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3825:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3825:32:50", + "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": 21087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3825:40:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3794:71:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21089, + "nodeType": "ExpressionStatement", + "src": "3794:71:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21090, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3876:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21092, + "indexExpression": { + "argumentTypes": null, + "id": 21091, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3886:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3876:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21097, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3916:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21093, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3895:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21095, + "indexExpression": { + "argumentTypes": null, + "id": 21094, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3905:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3895:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3895:20:50", + "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": 21098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3895:28:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3876:47:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21100, + "nodeType": "ExpressionStatement", + "src": "3876:47:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21101, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3934:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21103, + "indexExpression": { + "argumentTypes": null, + "id": 21102, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3944:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3934:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21108, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3970:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21104, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3951:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21106, + "indexExpression": { + "argumentTypes": null, + "id": 21105, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3961:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3951:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "3951:18:50", + "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": 21109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3951:26:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3934:43:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21111, + "nodeType": "ExpressionStatement", + "src": "3934:43:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21113, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "4002:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21114, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "4009:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21115, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "4014:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21112, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "3993:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3993:28:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21117, + "nodeType": "EmitStatement", + "src": "3988:33:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4039:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21072, + "id": 21119, + "nodeType": "Return", + "src": "4032:11:50" + } + ] + }, + "documentation": { + "id": 21055, + "nodeType": "StructuredDocumentation", + "src": "3188:387:50", + "text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 21121, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21065, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3720:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21066, + "modifierName": { + "argumentTypes": null, + "id": 21064, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "3707:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3707:19:50" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21068, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3749:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21069, + "modifierName": { + "argumentTypes": null, + "id": 21067, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "3736:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3736:17:50" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21063, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3689:8:50" + }, + "parameters": { + "id": 21062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21057, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3603:13:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21056, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3603:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21059, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3618:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3618:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21061, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3631:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3631:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3602:44:50" + }, + "returnParameters": { + "id": 21072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21071, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3772:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21070, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3772:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3771:6:50" + }, + "scope": 21171, + "src": "3581:470:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21460 + ], + "body": { + "id": 21169, + "nodeType": "Block", + "src": "4929:356:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21136, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5074:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5084:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5074:11:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21139, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "5089:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21142, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21140, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5099:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5099:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5089:21:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21144, + "indexExpression": { + "argumentTypes": null, + "id": 21143, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5111:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5089:31:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5124:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5089:36:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5074:51:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 21148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5127:20:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 21135, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5066:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5066:82:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21150, + "nodeType": "ExpressionStatement", + "src": "5066:82:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21151, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "5161:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21155, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21152, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5171:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5171:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5161:21:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21156, + "indexExpression": { + "argumentTypes": null, + "id": 21154, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5183:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5161:31:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21157, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5195:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5161:40:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21159, + "nodeType": "ExpressionStatement", + "src": "5161:40:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21161, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5226:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5226:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21163, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5238:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21164, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5248:6:50", + "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": 21160, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20891, + "src": "5217:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5217:38:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21166, + "nodeType": "EmitStatement", + "src": "5212:43:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5273:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21134, + "id": 21168, + "nodeType": "Return", + "src": "5266:11:50" + } + ] + }, + "documentation": { + "id": 21122, + "nodeType": "StructuredDocumentation", + "src": "4059:701:50", + "text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't" + }, + "functionSelector": "095ea7b3", + "id": 21170, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21130, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "4890:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21131, + "modifierName": { + "argumentTypes": null, + "id": 21129, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4877:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4877:22:50" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4859:8:50" + }, + "parameters": { + "id": 21127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21124, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4783:16:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4783:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21126, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4801:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4782:34:50" + }, + "returnParameters": { + "id": 21134, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21133, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4918:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21132, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4918:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4917:6:50" + }, + "scope": 21171, + "src": "4766:519:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 21172, + "src": "307:4981:50" + } + ], + "src": "52:5238:50" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/GiftableToken.sol", + "exportedSymbols": { + "GiftableToken": [ + 21171 + ] + }, + "id": 21172, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20839, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:50" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./interfaces/IERC20Token.sol", + "id": 20840, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 21462, + "src": "77:38:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 20841, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 22996, + "src": "117:30:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 20842, + "nodeType": "ImportDirective", + "scope": 21172, + "sourceUnit": 22689, + "src": "149:33:50", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20843, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "333:11:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 20844, + "nodeType": "InheritanceSpecifier", + "src": "333:11:50" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20845, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22995, + "src": "346:5:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22995", + "typeString": "contract Utils" + } + }, + "id": 20846, + "nodeType": "InheritanceSpecifier", + "src": "346:5:50" + } + ], + "contractDependencies": [ + 21461, + 22995 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 21171, + "linearizedBaseContracts": [ + 21171, + 22995, + 21461 + ], + "name": "GiftableToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 20849, + "libraryName": { + "contractScope": null, + "id": 20847, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22688, + "src": "365:8:50", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22688", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "359:27:50", + "typeName": { + "id": 20848, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "baseFunctions": [ + 21400 + ], + "constant": false, + "functionSelector": "06fdde03", + "id": 20852, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20851, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:50" + }, + "scope": 21171, + "src": "396:27:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20850, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "396:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21405 + ], + "constant": false, + "functionSelector": "95d89b41", + "id": 20855, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20854, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "444:8:50" + }, + "scope": 21171, + "src": "430:29:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20853, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "430:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21410 + ], + "constant": false, + "functionSelector": "313ce567", + "id": 20858, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20857, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "479:8:50" + }, + "scope": 21171, + "src": "466:30:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20856, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "466:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21415 + ], + "constant": false, + "functionSelector": "18160ddd", + "id": 20861, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "518:8:50" + }, + "scope": 21171, + "src": "503:35:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "503:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21422 + ], + "constant": false, + "functionSelector": "70a08231", + "id": 20866, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "581:8:50" + }, + "scope": 21171, + "src": "545:54:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 20864, + "keyType": { + "id": 20862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "554:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "545:28:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "565:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 21431 + ], + "constant": false, + "functionSelector": "dd62ed3e", + "id": 20873, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 20872, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "663:8:50" + }, + "scope": 21171, + "src": "606:75:50", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 20871, + "keyType": { + "id": 20867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "615:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "606:49:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 20870, + "keyType": { + "id": 20868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "635:7:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "626:28:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 20869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "646:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 20874, + "nodeType": "StructuredDocumentation", + "src": "690:209:50", + "text": " @dev triggered when tokens are transferred between wallets\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 20882, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 20881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20876, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "920:21:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20875, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "920:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20878, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "943:19:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20877, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "943:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20880, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20882, + "src": "964:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "964:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "919:60:50" + }, + "src": "905:75:50" + }, + { + "anonymous": false, + "documentation": { + "id": 20883, + "nodeType": "StructuredDocumentation", + "src": "988:280:50", + "text": " @dev triggered when a wallet allows another wallet to transfer tokens from on its behalf\n @param _owner wallet that approves the allowance\n @param _spender wallet that receives the allowance\n @param _value allowance amount" + }, + "id": 20891, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 20890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20885, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1289:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1289:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20887, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1313:24:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1313:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20889, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20891, + "src": "1339:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1339:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1288:66:50" + }, + "src": "1274:81:50" + }, + { + "anonymous": false, + "documentation": null, + "id": 20897, + "name": "ChangedSupply", + "nodeType": "EventDefinition", + "parameters": { + "id": 20896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20893, + "indexed": false, + "mutability": "mutable", + "name": "_oldTotal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20897, + "src": "1383:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20892, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1383:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20895, + "indexed": false, + "mutability": "mutable", + "name": "_newTotal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20897, + "src": "1402:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20894, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1402:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:38:50" + }, + "src": "1363:58:50" + }, + { + "body": { + "id": 20954, + "nodeType": "Block", + "src": "1818:336:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20912, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20900, + "src": "1870:5:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1864:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20910, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1864:5:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1864:12:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1864:19:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20915, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1886:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1864:23:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 20917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1889:18:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 20909, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1856:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1856:52:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20919, + "nodeType": "ExpressionStatement", + "src": "1856:52:50" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20923, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20902, + "src": "1933:7:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 20922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1927:5:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 20921, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1927:5:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 20924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1927:14:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 20925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1927:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 20926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1951:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1927:25:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 20928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1954:20:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 20920, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1919:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 20929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1919:56:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20930, + "nodeType": "ExpressionStatement", + "src": "1919:56:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20931, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20852, + "src": "1988:4:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20932, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20900, + "src": "1995:5:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1988:12:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20934, + "nodeType": "ExpressionStatement", + "src": "1988:12:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20935, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20855, + "src": "2011:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20936, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20902, + "src": "2020:7:50", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2011:16:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20938, + "nodeType": "ExpressionStatement", + "src": "2011:16:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20939, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20858, + "src": "2038:8:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20940, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20904, + "src": "2049:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2038:20:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20942, + "nodeType": "ExpressionStatement", + "src": "2038:20:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20943, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2069:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20944, + "name": "_initialSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20906, + "src": "2083:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2069:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20946, + "nodeType": "ExpressionStatement", + "src": "2069:28:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20947, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2108:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20950, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20948, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2118:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2118:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2108:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20951, + "name": "_initialSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20906, + "src": "2132:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2108:38:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20953, + "nodeType": "ExpressionStatement", + "src": "2108:38:50" + } + ] + }, + "documentation": { + "id": 20898, + "nodeType": "StructuredDocumentation", + "src": "1429:279:50", + "text": " @dev initializes a new ERC20Token instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points, for display purposes\n @param _initialSupply total supply of token units" + }, + "id": 20955, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20900, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1726:19:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20899, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1726:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20902, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1747:21:50", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1747:6:50", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20904, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1770:15:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20903, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1770:5:50", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20906, + "mutability": "mutable", + "name": "_initialSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20955, + "src": "1787:22:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1787:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1725:85:50" + }, + "returnParameters": { + "id": 20908, + "nodeType": "ParameterList", + "parameters": [], + "src": "1818:0:50" + }, + "scope": 21171, + "src": "1714:440:50", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21005, + "nodeType": "Block", + "src": "2271:222:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20967, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2275:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 20968, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20861, + "src": "2289:11:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 20969, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2303:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2289:20:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2275:34:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20972, + "nodeType": "ExpressionStatement", + "src": "2275:34:50" + }, + { + "assignments": [ + 20974 + ], + "declarations": [ + { + "constant": false, + "id": 20974, + "mutability": "mutable", + "name": "oldSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21005, + "src": "2313:17:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2313:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 20978, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20975, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2333:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20977, + "indexExpression": { + "argumentTypes": null, + "id": 20976, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2343:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2333:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2313:34:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 20987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20979, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2351:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20981, + "indexExpression": { + "argumentTypes": null, + "id": 20980, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2361:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2351:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 20986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20982, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2368:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20984, + "indexExpression": { + "argumentTypes": null, + "id": 20983, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2378:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2368:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 20985, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2385:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2368:23:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2351:40:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 20988, + "nodeType": "ExpressionStatement", + "src": "2351:40:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20990, + "name": "oldSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20974, + "src": "2414:9:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 20991, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2425:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 20993, + "indexExpression": { + "argumentTypes": null, + "id": 20992, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2435:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2425:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20989, + "name": "ChangedSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20897, + "src": "2400:13:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 20994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2400:40:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20995, + "nodeType": "EmitStatement", + "src": "2395:45:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30783030", + "id": 20999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2466:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x00" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 20998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2458:7:50", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 20997, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2458:7:50", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21000, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2458:13:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21001, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2473:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21002, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20959, + "src": "2478:6:50", + "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": 20996, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "2449:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2449:36:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21004, + "nodeType": "EmitStatement", + "src": "2444:41:50" + } + ] + }, + "documentation": null, + "functionSelector": "cbce4c97", + "id": 21006, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20962, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20957, + "src": "2240:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 20963, + "modifierName": { + "argumentTypes": null, + "id": 20961, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "2227:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2227:17:50" + } + ], + "name": "gift", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20957, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2176:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20956, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2176:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20959, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2189:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20958, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2189:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2175:29:50" + }, + "returnParameters": { + "id": 20966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20965, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21006, + "src": "2256:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20964, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2256:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:6:50" + }, + "scope": 21171, + "src": "2162:331:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21440 + ], + "body": { + "id": 21053, + "nodeType": "Block", + "src": "2979:201:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21020, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "2990:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21023, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21021, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3000:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3000:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2990:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21029, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3040:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21024, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3014:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21027, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3024:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3024:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3014:21:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3014:25:50", + "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": 21030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3014:33:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2990:57:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21032, + "nodeType": "ExpressionStatement", + "src": "2990:57:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21033, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3058:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21035, + "indexExpression": { + "argumentTypes": null, + "id": 21034, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3068:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3058:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21040, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3094:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21036, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3075:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21038, + "indexExpression": { + "argumentTypes": null, + "id": 21037, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3085:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3075:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "3075:18:50", + "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": 21041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3075:26:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3058:43:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21043, + "nodeType": "ExpressionStatement", + "src": "3058:43:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21045, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3126:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3126:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21047, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "3138:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21048, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21011, + "src": "3143:6:50", + "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": 21044, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "3117:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3117:33:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21050, + "nodeType": "EmitStatement", + "src": "3112:38:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3168:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21019, + "id": 21052, + "nodeType": "Return", + "src": "3161:11:50" + } + ] + }, + "documentation": { + "id": 21007, + "nodeType": "StructuredDocumentation", + "src": "2501:318:50", + "text": " @dev transfers tokens to a given address\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 21054, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21015, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21009, + "src": "2945:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21016, + "modifierName": { + "argumentTypes": null, + "id": 21014, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "2932:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2932:17:50" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21013, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2914:8:50" + }, + "parameters": { + "id": 21012, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21009, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2843:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21008, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2843:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21011, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2856:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21010, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2856:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2842:29:50" + }, + "returnParameters": { + "id": 21019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21018, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21054, + "src": "2968:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21017, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2968:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2967:6:50" + }, + "scope": 21171, + "src": "2825:355:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21451 + ], + "body": { + "id": 21120, + "nodeType": "Block", + "src": "3783:268:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21073, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "3794:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21077, + "indexExpression": { + "argumentTypes": null, + "id": 21074, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3804:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3794:16:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21078, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21075, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3811:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3811:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3794:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21086, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3858:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21079, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "3825:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21081, + "indexExpression": { + "argumentTypes": null, + "id": 21080, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3835:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3825:16:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21084, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21082, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3842:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3842:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3825:28:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3825:32:50", + "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": 21087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3825:40:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3794:71:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21089, + "nodeType": "ExpressionStatement", + "src": "3794:71:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21090, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3876:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21092, + "indexExpression": { + "argumentTypes": null, + "id": 21091, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3886:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3876:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21097, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3916:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21093, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3895:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21095, + "indexExpression": { + "argumentTypes": null, + "id": 21094, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3905:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3895:16:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "3895:20:50", + "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": 21098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3895:28:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3876:47:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21100, + "nodeType": "ExpressionStatement", + "src": "3876:47:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21101, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3934:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21103, + "indexExpression": { + "argumentTypes": null, + "id": 21102, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3944:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3934:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21108, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "3970:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21104, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20866, + "src": "3951:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21106, + "indexExpression": { + "argumentTypes": null, + "id": 21105, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3961:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3951:14:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "3951:18:50", + "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": 21109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3951:26:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3934:43:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21111, + "nodeType": "ExpressionStatement", + "src": "3934:43:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21113, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "4002:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21114, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "4009:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21115, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21061, + "src": "4014:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21112, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20882, + "src": "3993:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3993:28:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21117, + "nodeType": "EmitStatement", + "src": "3988:33:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4039:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21072, + "id": 21119, + "nodeType": "Return", + "src": "4032:11:50" + } + ] + }, + "documentation": { + "id": 21055, + "nodeType": "StructuredDocumentation", + "src": "3188:387:50", + "text": " @dev transfers tokens to a given address on behalf of another address\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 21121, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21065, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21057, + "src": "3720:5:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21066, + "modifierName": { + "argumentTypes": null, + "id": 21064, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "3707:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3707:19:50" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21068, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21059, + "src": "3749:3:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21069, + "modifierName": { + "argumentTypes": null, + "id": 21067, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "3736:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3736:17:50" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21063, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3689:8:50" + }, + "parameters": { + "id": 21062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21057, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3603:13:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21056, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3603:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21059, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3618:11:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3618:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21061, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3631:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3631:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3602:44:50" + }, + "returnParameters": { + "id": 21072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21071, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21121, + "src": "3772:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21070, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3772:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3771:6:50" + }, + "scope": 21171, + "src": "3581:470:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 21460 + ], + "body": { + "id": 21169, + "nodeType": "Block", + "src": "4929:356:50", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 21147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21136, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5074:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5084:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5074:11:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 21146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21139, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "5089:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21142, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21140, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5099:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5099:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5089:21:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21144, + "indexExpression": { + "argumentTypes": null, + "id": 21143, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5111:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5089:31:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 21145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5124:1:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5089:36:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5074:51:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 21148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5127:20:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 21135, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5066:7:50", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5066:82:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21150, + "nodeType": "ExpressionStatement", + "src": "5066:82:50" + }, + { + "expression": { + "argumentTypes": null, + "id": 21158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21151, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20873, + "src": "5161:9:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 21155, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21152, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5171:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5171:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5161:21:50", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21156, + "indexExpression": { + "argumentTypes": null, + "id": 21154, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5183:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5161:31:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21157, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5195:6:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5161:40:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21159, + "nodeType": "ExpressionStatement", + "src": "5161:40:50" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21161, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5226:3:50", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5226:10:50", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21163, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "5238:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21164, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21126, + "src": "5248:6:50", + "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": 21160, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20891, + "src": "5217:8:50", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5217:38:50", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21166, + "nodeType": "EmitStatement", + "src": "5212:43:50" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5273:4:50", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 21134, + "id": 21168, + "nodeType": "Return", + "src": "5266:11:50" + } + ] + }, + "documentation": { + "id": 21122, + "nodeType": "StructuredDocumentation", + "src": "4059:701:50", + "text": " @dev allows another account/contract to transfers tokens on behalf of the caller\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount\n @return true if the approval was successful, false if it wasn't" + }, + "functionSelector": "095ea7b3", + "id": 21170, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21130, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21124, + "src": "4890:8:50", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21131, + "modifierName": { + "argumentTypes": null, + "id": 21129, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4877:12:50", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4877:22:50" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4859:8:50" + }, + "parameters": { + "id": 21127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21124, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4783:16:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4783:7:50", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21126, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4801:14:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4801:7:50", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4782:34:50" + }, + "returnParameters": { + "id": 21134, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21133, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21170, + "src": "4918:4:50", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21132, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4918:4:50", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4917:6:50" + }, + "scope": 21171, + "src": "4766:519:50", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 21172, + "src": "307:4981:50" + } + ], + "src": "52:5238:50" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x36Bd1f197E2b3D2b8213d4A1Dc20a6d949B8C273", + "transactionHash": "0x5e0087e503ed1cc3355766d1a602280bebab8a890a5bc21f48be592f9d42c117" + }, + "8995": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x36Bd1f197E2b3D2b8213d4A1Dc20a6d949B8C273", + "transactionHash": "0x5e0087e503ed1cc3355766d1a602280bebab8a890a5bc21f48be592f9d42c117" + }, + "1604965528035": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x4311840b91390d4eD6fC416FcF32Eaf46674eA4e", + "transactionHash": "0x6cfdc8c53a7ee778906525bbb725dddbccaea9d223377a811aec26effa04ce7a" + }, + "1604965645554": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0xf31c222514B2CE1942A9FA6c520Ca7f2010Ee02c", + "transactionHash": "0xa9b401c404db3bd7e34695a2464a0a3fe20086f982d0ccce4203b732cb13e2dc" + }, + "1604965679541": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x691073f906c9d3B310a1794019FD2B400fEaf066", + "transactionHash": "0xc08502d20e63f29510f0eaf06350221395d2880130f53cead379d884fbe60e22" + }, + "1604965719492": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x77d44866C0D23C093C22f8BBAbE58c8bb3901056", + "transactionHash": "0x78fb6185d5e09dcab8b0ace28dc2459d96111121fa46a9c9801ed0f6214ed663" + }, + "1604965760834": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "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" + }, + "0x5f8b22485eeda034e9b3b8726a34dbff9aeea5105cbefd66dac32e2890de592e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_oldTotal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newTotal", + "type": "uint256" + } + ], + "name": "ChangedSupply", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "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" + } + }, + "links": {}, + "address": "0x9a355cAc652e473E31673Af852D31946B83Af60A", + "transactionHash": "0xd380af58b57596ba08c775d7d333862779a3e0e3f897626c6c22838f194f76e4" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.724Z", + "networkType": "ethereum", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "triggered when a wallet allows another wallet to transfer tokens from on its behalf", + "params": { + "_owner": "wallet that approves the allowance", + "_spender": "wallet that receives the allowance", + "_value": "allowance amount" + } + }, + "Transfer(address,address,uint256)": { + "details": "triggered when tokens are transferred between wallets", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + } + } + }, + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value", + "params": { + "_spender": "approved address", + "_value": "allowance amount" + }, + "returns": { + "_0": "true if the approval was successful, false if it wasn't" + } + }, + "constructor": { + "details": "initializes a new ERC20Token instance", + "params": { + "_decimals": "decimal points, for display purposes", + "_initialSupply": "total supply of token units", + "_name": "token name", + "_symbol": "token symbol" + } + }, + "transfer(address,uint256)": { + "details": "transfers tokens to a given address throws on any error rather then return a false flag to minimize user errors", + "params": { + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "transferFrom(address,address,uint256)": { + "details": "transfers tokens to a given address on behalf of another address throws on any error rather then return a false flag to minimize user errors", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IBancorFormula.json b/apps/cic-eth/tests/testdata/bancor/IBancorFormula.json new file mode 100644 index 00000000..b5c3c0c4 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IBancorFormula.json @@ -0,0 +1,2929 @@ +{ + "contractName": "IBancorFormula", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "purchaseTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "saleTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "crossReserveTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundSupplyAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidateReserveAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_primaryReserveStakedBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_primaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_secondaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateDenominator", + "type": "uint256" + } + ], + "name": "balancedWeights", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_primaryReserveStakedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_primaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_secondaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateDenominator\",\"type\":\"uint256\"}],\"name\":\"balancedWeights\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"crossReserveTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundSupplyAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidateReserveAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"purchaseTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"saleTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":\"IBancorFormula\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Bancor Formula interface\n*/\ninterface IBancorFormula {\n function purchaseTargetAmount(uint256 _supply,\n uint256 _reserveBalance,\n uint32 _reserveWeight,\n uint256 _amount)\n external view returns (uint256);\n\n function saleTargetAmount(uint256 _supply,\n uint256 _reserveBalance,\n uint32 _reserveWeight,\n uint256 _amount)\n external view returns (uint256);\n\n function crossReserveTargetAmount(uint256 _sourceReserveBalance,\n uint32 _sourceReserveWeight,\n uint256 _targetReserveBalance,\n uint32 _targetReserveWeight,\n uint256 _amount)\n external view returns (uint256);\n\n function fundCost(uint256 _supply,\n uint256 _reserveBalance,\n uint32 _reserveRatio,\n uint256 _amount)\n external view returns (uint256);\n\n function fundSupplyAmount(uint256 _supply,\n uint256 _reserveBalance,\n uint32 _reserveRatio,\n uint256 _amount)\n external view returns (uint256);\n\n function liquidateReserveAmount(uint256 _supply,\n uint256 _reserveBalance,\n uint32 _reserveRatio,\n uint256 _amount)\n external view returns (uint256);\n\n function balancedWeights(uint256 _primaryReserveStakedBalance,\n uint256 _primaryReserveBalance,\n uint256 _secondaryReserveBalance,\n uint256 _reserveRateNumerator,\n uint256 _reserveRateDenominator)\n external view returns (uint32, uint32);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "exportedSymbols": { + "IBancorFormula": [ + 13177 + ] + }, + "id": 13178, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13079, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13177, + "linearizedBaseContracts": [ + 13177 + ], + "name": "IBancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "f3250fe2", + "id": 13092, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13081, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "172:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13080, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "172:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13083, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "223:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13082, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "223:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13085, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "282:21:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13084, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "282:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13087, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "339:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "171:184:14" + }, + "returnParameters": { + "id": 13091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13090, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "413:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13089, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "413:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "412:9:14" + }, + "scope": 13177, + "src": "142:280:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "76cf0b56", + "id": 13105, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13094, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "454:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "454:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13096, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "501:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13095, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "501:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13098, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "556:21:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13097, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "556:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13100, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "609:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "609:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "453:172:14" + }, + "returnParameters": { + "id": 13104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13103, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "679:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "679:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "678:9:14" + }, + "scope": 13177, + "src": "428:260:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "94491fab", + "id": 13120, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "crossReserveTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13107, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "728:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "728:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13109, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "797:27:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13108, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "797:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13111, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "864:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13110, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "864:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13113, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "933:27:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13112, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "933:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13115, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "1000:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1000:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "727:289:14" + }, + "returnParameters": { + "id": 13119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13118, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "1078:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1078:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1077:9:14" + }, + "scope": 13177, + "src": "694:393:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ebbb2158", + "id": 13133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "fundCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13122, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1111:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1111:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13124, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1150:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13123, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1150:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13126, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1197:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13125, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1197:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13128, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1241:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1241:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1110:147:14" + }, + "returnParameters": { + "id": 13132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13131, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1303:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1303:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1302:9:14" + }, + "scope": 13177, + "src": "1093:219:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2f55bdb5", + "id": 13146, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "fundSupplyAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13135, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1344:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1344:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13137, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1391:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1391:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13139, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1446:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13138, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1446:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13141, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1498:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1498:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1343:171:14" + }, + "returnParameters": { + "id": 13145, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13144, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1568:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1568:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1567:9:14" + }, + "scope": 13177, + "src": "1318:259:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "8074590a", + "id": 13159, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "liquidateReserveAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13148, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1615:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1615:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13150, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1668:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13152, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1729:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13151, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1729:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13154, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1787:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13153, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1787:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1614:189:14" + }, + "returnParameters": { + "id": 13158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13157, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1863:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13156, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1863:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1862:9:14" + }, + "scope": 13177, + "src": "1583:289:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a11aa1b4", + "id": 13176, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balancedWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13161, + "mutability": "mutable", + "name": "_primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "1903:36:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13163, + "mutability": "mutable", + "name": "_primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "1970:30:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1970:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13165, + "mutability": "mutable", + "name": "_secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2031:32:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13164, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2031:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13167, + "mutability": "mutable", + "name": "_reserveRateNumerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2094:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2094:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13169, + "mutability": "mutable", + "name": "_reserveRateDenominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2154:31:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13168, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2154:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1902:284:14" + }, + "returnParameters": { + "id": 13175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13172, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2239:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13171, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2239:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2247:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13173, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2247:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2238:16:14" + }, + "scope": 13177, + "src": "1878:377:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13178, + "src": "111:2146:14" + } + ], + "src": "51:2207:14" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "exportedSymbols": { + "IBancorFormula": [ + 13177 + ] + }, + "id": 13178, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13079, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13177, + "linearizedBaseContracts": [ + 13177 + ], + "name": "IBancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "f3250fe2", + "id": 13092, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13081, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "172:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13080, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "172:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13083, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "223:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13082, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "223:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13085, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "282:21:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13084, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "282:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13087, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "339:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "171:184:14" + }, + "returnParameters": { + "id": 13091, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13090, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13092, + "src": "413:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13089, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "413:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "412:9:14" + }, + "scope": 13177, + "src": "142:280:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "76cf0b56", + "id": 13105, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13094, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "454:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "454:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13096, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "501:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13095, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "501:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13098, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "556:21:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13097, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "556:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13100, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "609:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "609:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "453:172:14" + }, + "returnParameters": { + "id": 13104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13103, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13105, + "src": "679:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "679:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "678:9:14" + }, + "scope": 13177, + "src": "428:260:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "94491fab", + "id": 13120, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "crossReserveTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13107, + "mutability": "mutable", + "name": "_sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "728:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "728:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13109, + "mutability": "mutable", + "name": "_sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "797:27:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13108, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "797:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13111, + "mutability": "mutable", + "name": "_targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "864:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13110, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "864:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13113, + "mutability": "mutable", + "name": "_targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "933:27:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13112, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "933:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13115, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "1000:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1000:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "727:289:14" + }, + "returnParameters": { + "id": 13119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13118, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13120, + "src": "1078:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1078:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1077:9:14" + }, + "scope": 13177, + "src": "694:393:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ebbb2158", + "id": 13133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "fundCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13122, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1111:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1111:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13124, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1150:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13123, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1150:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13126, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1197:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13125, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1197:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13128, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1241:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1241:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1110:147:14" + }, + "returnParameters": { + "id": 13132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13131, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13133, + "src": "1303:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1303:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1302:9:14" + }, + "scope": 13177, + "src": "1093:219:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2f55bdb5", + "id": 13146, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "fundSupplyAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13135, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1344:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1344:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13137, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1391:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1391:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13139, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1446:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13138, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1446:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13141, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1498:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1498:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1343:171:14" + }, + "returnParameters": { + "id": 13145, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13144, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13146, + "src": "1568:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1568:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1567:9:14" + }, + "scope": 13177, + "src": "1318:259:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "8074590a", + "id": 13159, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "liquidateReserveAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13148, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1615:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1615:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13150, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1668:23:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13152, + "mutability": "mutable", + "name": "_reserveRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1729:20:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13151, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1729:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13154, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1787:15:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13153, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1787:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1614:189:14" + }, + "returnParameters": { + "id": 13158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13157, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13159, + "src": "1863:7:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13156, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1863:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1862:9:14" + }, + "scope": 13177, + "src": "1583:289:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a11aa1b4", + "id": 13176, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balancedWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13161, + "mutability": "mutable", + "name": "_primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "1903:36:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13163, + "mutability": "mutable", + "name": "_primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "1970:30:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13162, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1970:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13165, + "mutability": "mutable", + "name": "_secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2031:32:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13164, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2031:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13167, + "mutability": "mutable", + "name": "_reserveRateNumerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2094:29:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2094:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13169, + "mutability": "mutable", + "name": "_reserveRateDenominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2154:31:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13168, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2154:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1902:284:14" + }, + "returnParameters": { + "id": 13175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13172, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2239:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13171, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2239:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13176, + "src": "2247:6:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13173, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2247:6:14", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2238:16:14" + }, + "scope": 13177, + "src": "1878:377:14", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13178, + "src": "111:2146:14" + } + ], + "src": "51:2207:14" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.742Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IBancorX.json b/apps/cic-eth/tests/testdata/bancor/IBancorX.json new file mode 100644 index 00000000..4e4a8644 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IBancorX.json @@ -0,0 +1,837 @@ +{ + "contractName": "IBancorX", + "abi": [ + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_toBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "xTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_xTransferId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_for", + "type": "address" + } + ], + "name": "getXTransferAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_xTransferId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_for\",\"type\":\"address\"}],\"name\":\"getXTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"xTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":\"IBancorX\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../token/interfaces/IERC20Token.sol\";\n\ninterface IBancorX {\n function token() external view returns (IERC20Token);\n function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount, uint256 _id) external;\n function getXTransferAmount(uint256 _xTransferId, address _for) external view returns (uint256);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "exportedSymbols": { + "IBancorX": [ + 3551 + ] + }, + "id": 3552, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3524, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:5" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 3525, + "nodeType": "ImportDirective", + "scope": 3552, + "sourceUnit": 21128, + "src": "75:48:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 3551, + "linearizedBaseContracts": [ + 3551 + ], + "name": "IBancorX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "fc0c546a", + "id": 3530, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3526, + "nodeType": "ParameterList", + "parameters": [], + "src": "164:2:5" + }, + "returnParameters": { + "id": 3529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3528, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3530, + "src": "190:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 3527, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "190:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "189:13:5" + }, + "scope": 3551, + "src": "150:53:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "427c0374", + "id": 3541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3532, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "227:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "227:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3534, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "250:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3533, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "250:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3536, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "263:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3538, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "280:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "280:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "226:66:5" + }, + "returnParameters": { + "id": 3540, + "nodeType": "ParameterList", + "parameters": [], + "src": "301:0:5" + }, + "scope": 3551, + "src": "208:94:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "aafd6b76", + "id": 3550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getXTransferAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3543, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "335:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "335:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3545, + "mutability": "mutable", + "name": "_for", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "357:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3544, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "357:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "334:36:5" + }, + "returnParameters": { + "id": 3549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3548, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "394:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3547, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "394:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "393:9:5" + }, + "scope": 3551, + "src": "307:96:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3552, + "src": "125:280:5" + } + ], + "src": "51:355:5" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "exportedSymbols": { + "IBancorX": [ + 3551 + ] + }, + "id": 3552, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3524, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:5" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 3525, + "nodeType": "ImportDirective", + "scope": 3552, + "sourceUnit": 21128, + "src": "75:48:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 3551, + "linearizedBaseContracts": [ + 3551 + ], + "name": "IBancorX", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "fc0c546a", + "id": 3530, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3526, + "nodeType": "ParameterList", + "parameters": [], + "src": "164:2:5" + }, + "returnParameters": { + "id": 3529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3528, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3530, + "src": "190:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 3527, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "190:11:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "189:13:5" + }, + "scope": 3551, + "src": "150:53:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "427c0374", + "id": 3541, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3532, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "227:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3531, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "227:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3534, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "250:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3533, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "250:7:5", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3536, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "263:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3538, + "mutability": "mutable", + "name": "_id", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3541, + "src": "280:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "280:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "226:66:5" + }, + "returnParameters": { + "id": 3540, + "nodeType": "ParameterList", + "parameters": [], + "src": "301:0:5" + }, + "scope": 3551, + "src": "208:94:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "aafd6b76", + "id": 3550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getXTransferAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3543, + "mutability": "mutable", + "name": "_xTransferId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "335:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "335:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3545, + "mutability": "mutable", + "name": "_for", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "357:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3544, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "357:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "334:36:5" + }, + "returnParameters": { + "id": 3549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3548, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3550, + "src": "394:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3547, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "394:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "393:9:5" + }, + "scope": 3551, + "src": "307:96:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3552, + "src": "125:280:5" + } + ], + "src": "51:355:5" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.669Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IBancorXUpgrader.json b/apps/cic-eth/tests/testdata/bancor/IBancorXUpgrader.json new file mode 100644 index 00000000..f1183360 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IBancorXUpgrader.json @@ -0,0 +1,326 @@ +{ + "contractName": "IBancorXUpgrader", + "abi": [ + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "address[]", + "name": "_reporters", + "type": "address[]" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"address[]\",\"name\":\"_reporters\",\"type\":\"address[]\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol\":\"IBancorXUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol\":{\"keccak256\":\"0x5292f6484aafd5e225b0d4f7fe61235ebee69ada5044a84e3f94014053d8a373\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f796012a45f7d9c47239725ad638f8636146686a5a390bd85892e889a20459b2\",\"dweb:/ipfs/QmRbfxfYCssyj1PkQMdv1rsjUz35BDTLag4wrxnq4SAy2j\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Bancor X Upgrader interface\n*/\ninterface IBancorXUpgrader {\n function upgrade(uint16 _version, address[] memory _reporters) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol", + "exportedSymbols": { + "IBancorXUpgrader": [ + 3562 + ] + }, + "id": 3563, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3553, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 3562, + "linearizedBaseContracts": [ + 3562 + ], + "name": "IBancorXUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "546872cc", + "id": 3561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3555, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3561, + "src": "164:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3554, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "164:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3558, + "mutability": "mutable", + "name": "_reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3561, + "src": "181:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3556, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "181:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3557, + "length": null, + "nodeType": "ArrayTypeName", + "src": "181:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "163:46:6" + }, + "returnParameters": { + "id": 3560, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:0:6" + }, + "scope": 3562, + "src": "147:72:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3563, + "src": "114:107:6" + } + ], + "src": "51:171:6" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol", + "exportedSymbols": { + "IBancorXUpgrader": [ + 3562 + ] + }, + "id": 3563, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3553, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 3562, + "linearizedBaseContracts": [ + 3562 + ], + "name": "IBancorXUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "546872cc", + "id": 3561, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3555, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3561, + "src": "164:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 3554, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "164:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3558, + "mutability": "mutable", + "name": "_reporters", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3561, + "src": "181:27:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3556, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "181:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3557, + "length": null, + "nodeType": "ArrayTypeName", + "src": "181:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "163:46:6" + }, + "returnParameters": { + "id": 3560, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:0:6" + }, + "scope": 3562, + "src": "147:72:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3563, + "src": "114:107:6" + } + ], + "src": "51:171:6" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.670Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IChainlinkPriceOracle.json b/apps/cic-eth/tests/testdata/bancor/IChainlinkPriceOracle.json new file mode 100644 index 00000000..89282f87 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IChainlinkPriceOracle.json @@ -0,0 +1,372 @@ +{ + "contractName": "IChainlinkPriceOracle", + "abi": [ + { + "inputs": [], + "name": "latestAnswer", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":\"IChainlinkPriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Chainlink Price Oracle interface\n*/\ninterface IChainlinkPriceOracle {\n function latestAnswer() external view returns (int256);\n function latestTimestamp() external view returns (uint256);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "exportedSymbols": { + "IChainlinkPriceOracle": [ + 22821 + ] + }, + "id": 22822, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22810, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:66" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22821, + "linearizedBaseContracts": [ + 22821 + ], + "name": "IChainlinkPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "50d25bcd", + "id": 22815, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22811, + "nodeType": "ParameterList", + "parameters": [], + "src": "178:2:66" + }, + "returnParameters": { + "id": 22814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22813, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22815, + "src": "204:6:66", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 22812, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "204:6:66", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "203:8:66" + }, + "scope": 22821, + "src": "157:55:66", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "8205bf6a", + "id": 22820, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22816, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:2:66" + }, + "returnParameters": { + "id": 22819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22818, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22820, + "src": "267:7:66", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "267:7:66", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "266:9:66" + }, + "scope": 22821, + "src": "217:59:66", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22822, + "src": "119:159:66" + } + ], + "src": "51:228:66" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "exportedSymbols": { + "IChainlinkPriceOracle": [ + 22821 + ] + }, + "id": 22822, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22810, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:66" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22821, + "linearizedBaseContracts": [ + 22821 + ], + "name": "IChainlinkPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "50d25bcd", + "id": 22815, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22811, + "nodeType": "ParameterList", + "parameters": [], + "src": "178:2:66" + }, + "returnParameters": { + "id": 22814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22813, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22815, + "src": "204:6:66", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 22812, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "204:6:66", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "203:8:66" + }, + "scope": 22821, + "src": "157:55:66", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "8205bf6a", + "id": 22820, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22816, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:2:66" + }, + "returnParameters": { + "id": 22819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22818, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22820, + "src": "267:7:66", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "267:7:66", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "266:9:66" + }, + "scope": 22821, + "src": "217:59:66", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22822, + "src": "119:159:66" + } + ], + "src": "51:228:66" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.849Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IContractRegistry.json b/apps/cic-eth/tests/testdata/bancor/IContractRegistry.json new file mode 100644 index 00000000..626fb75c --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IContractRegistry.json @@ -0,0 +1,309 @@ +{ + "contractName": "IContractRegistry", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + } + ], + "name": "addressOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"addressOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":\"IContractRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Contract Registry interface\n*/\ninterface IContractRegistry {\n function addressOf(bytes32 _contractName) external view returns (address);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "exportedSymbols": { + "IContractRegistry": [ + 22831 + ] + }, + "id": 22832, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22823, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:67" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22831, + "linearizedBaseContracts": [ + 22831 + ], + "name": "IContractRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "bb34534c", + "id": 22830, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22825, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22830, + "src": "167:21:67", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 22824, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "167:7:67", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "166:23:67" + }, + "returnParameters": { + "id": 22829, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22828, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22830, + "src": "213:7:67", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "213:7:67", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "212:9:67" + }, + "scope": 22831, + "src": "148:74:67", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22832, + "src": "114:110:67" + } + ], + "src": "51:174:67" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "exportedSymbols": { + "IContractRegistry": [ + 22831 + ] + }, + "id": 22832, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22823, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:67" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22831, + "linearizedBaseContracts": [ + 22831 + ], + "name": "IContractRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "bb34534c", + "id": 22830, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addressOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22825, + "mutability": "mutable", + "name": "_contractName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22830, + "src": "167:21:67", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 22824, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "167:7:67", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "166:23:67" + }, + "returnParameters": { + "id": 22829, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22828, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22830, + "src": "213:7:67", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "213:7:67", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "212:9:67" + }, + "scope": 22831, + "src": "148:74:67", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22832, + "src": "114:110:67" + } + ], + "src": "51:174:67" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.850Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConversionPathFinder.json b/apps/cic-eth/tests/testdata/bancor/IConversionPathFinder.json new file mode 100644 index 00000000..a9194f2e --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConversionPathFinder.json @@ -0,0 +1,420 @@ +{ + "contractName": "IConversionPathFinder", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + } + ], + "name": "findPath", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"}],\"name\":\"findPath\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":\"IConversionPathFinder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./token/interfaces/IERC20Token.sol\";\n\n/*\n Conversion Path Finder interface\n*/\ninterface IConversionPathFinder {\n function findPath(IERC20Token _sourceToken, IERC20Token _targetToken) external view returns (address[] memory);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "exportedSymbols": { + "IConversionPathFinder": [ + 2546 + ] + }, + "id": 2547, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2534, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:2" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./token/interfaces/IERC20Token.sol", + "id": 2535, + "nodeType": "ImportDirective", + "scope": 2547, + "sourceUnit": 21128, + "src": "75:44:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 2546, + "linearizedBaseContracts": [ + 2546 + ], + "name": "IConversionPathFinder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "a1c421cd", + "id": 2545, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "findPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2537, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "220:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2536, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "220:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2539, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "246:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2538, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "246:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "219:52:2" + }, + "returnParameters": { + "id": 2544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "295:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2542, + "length": null, + "nodeType": "ArrayTypeName", + "src": "295:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "294:18:2" + }, + "scope": 2546, + "src": "202:111:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2547, + "src": "164:151:2" + } + ], + "src": "51:265:2" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "exportedSymbols": { + "IConversionPathFinder": [ + 2546 + ] + }, + "id": 2547, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2534, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:2" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./token/interfaces/IERC20Token.sol", + "id": 2535, + "nodeType": "ImportDirective", + "scope": 2547, + "sourceUnit": 21128, + "src": "75:44:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 2546, + "linearizedBaseContracts": [ + 2546 + ], + "name": "IConversionPathFinder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "a1c421cd", + "id": 2545, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "findPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2537, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "220:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2536, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "220:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2539, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "246:24:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 2538, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "246:11:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "219:52:2" + }, + "returnParameters": { + "id": 2544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2545, + "src": "295:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2542, + "length": null, + "nodeType": "ArrayTypeName", + "src": "295:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "294:18:2" + }, + "scope": 2546, + "src": "202:111:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2547, + "src": "164:151:2" + } + ], + "src": "51:265:2" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.662Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverter.json b/apps/cic-eth/tests/testdata/bancor/IConverter.json new file mode 100644 index 00000000..7f380934 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverter.json @@ -0,0 +1,4484 @@ +{ + "contractName": "IConverter", + "abi": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_ratio", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_ratio\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":\"IConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverterAnchor.sol\";\nimport \"../../token/interfaces/IERC20Token.sol\";\nimport \"../../utility/interfaces/IOwned.sol\";\nimport \"../../utility/interfaces/IWhitelist.sol\";\n\n/*\n Converter interface\n*/\ninterface IConverter is IOwned {\n function converterType() external pure returns (uint16);\n function anchor() external view returns (IConverterAnchor);\n function isActive() external view returns (bool);\n\n function targetAmountAndFee(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256);\n function convert(IERC20Token _sourceToken,\n IERC20Token _targetToken,\n uint256 _amount,\n address _trader,\n address payable _beneficiary) external payable returns (uint256);\n\n function conversionWhitelist() external view returns (IWhitelist);\n function conversionFee() external view returns (uint32);\n function maxConversionFee() external view returns (uint32);\n function reserveBalance(IERC20Token _reserveToken) external view returns (uint256);\n receive() external payable;\n\n function transferAnchorOwnership(address _newOwner) external;\n function acceptAnchorOwnership() external;\n function setConversionFee(uint32 _conversionFee) external;\n function setConversionWhitelist(IWhitelist _whitelist) external;\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) external;\n function withdrawETH(address payable _to) external;\n function addReserve(IERC20Token _token, uint32 _ratio) external;\n\n // deprecated, backward compatibility\n function token() external view returns (IConverterAnchor);\n function transferTokenOwnership(address _newOwner) external;\n function acceptTokenOwnership() external;\n function connectors(IERC20Token _address) external view returns (uint256, uint32, bool, bool, bool);\n function getConnectorBalance(IERC20Token _connectorToken) external view returns (uint256);\n function connectorTokens(uint256 _index) external view returns (IERC20Token);\n function connectorTokenCount() external view returns (uint16);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "exportedSymbols": { + "IConverter": [ + 13340 + ] + }, + "id": 13341, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13179, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:15" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13180, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 13350, + "src": "75:32:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 13181, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 21128, + "src": "108:48:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 13182, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 22848, + "src": "157:45:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "../../utility/interfaces/IWhitelist.sol", + "id": 13183, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 22918, + "src": "203:49:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13184, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "308:6:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 13185, + "nodeType": "InheritanceSpecifier", + "src": "308:6:15" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13340, + "linearizedBaseContracts": [ + 13340, + 22847 + ], + "name": "IConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13190, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13186, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:15" + }, + "returnParameters": { + "id": 13189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13188, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13190, + "src": "369:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13187, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "369:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "368:8:15" + }, + "scope": 13340, + "src": "321:56:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d3fb73b4", + "id": 13195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "anchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13191, + "nodeType": "ParameterList", + "parameters": [], + "src": "397:2:15" + }, + "returnParameters": { + "id": 13194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13193, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13195, + "src": "423:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13192, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "423:16:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "422:18:15" + }, + "scope": 13340, + "src": "382:59:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "22f3e2d4", + "id": 13200, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13196, + "nodeType": "ParameterList", + "parameters": [], + "src": "463:2:15" + }, + "returnParameters": { + "id": 13199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13198, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13200, + "src": "489:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "489:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "488:6:15" + }, + "scope": 13340, + "src": "446:49:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "af94b8d8", + "id": 13213, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13202, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "529:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13201, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "529:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13204, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "555:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13203, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "555:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13206, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "581:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "581:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "528:69:15" + }, + "returnParameters": { + "id": 13212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13209, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "621:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "621:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13211, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "630:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "620:18:15" + }, + "scope": 13340, + "src": "501:138:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e8dc12ff", + "id": 13228, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13215, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "661:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13214, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "661:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13217, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "708:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13216, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "708:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13219, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "755:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13221, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "793:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13220, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "793:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13223, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "831:28:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "831:15:15", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "660:200:15" + }, + "returnParameters": { + "id": 13227, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13226, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "887:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "887:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "886:9:15" + }, + "scope": 13340, + "src": "644:252:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c45d3d92", + "id": 13233, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "conversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13229, + "nodeType": "ParameterList", + "parameters": [], + "src": "930:2:15" + }, + "returnParameters": { + "id": 13232, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13231, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13233, + "src": "956:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 13230, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "956:10:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "955:12:15" + }, + "scope": 13340, + "src": "902:66:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "579cd3ca", + "id": 13238, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "conversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13234, + "nodeType": "ParameterList", + "parameters": [], + "src": "995:2:15" + }, + "returnParameters": { + "id": 13237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13236, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13238, + "src": "1021:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13235, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1021:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1020:8:15" + }, + "scope": 13340, + "src": "973:56:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "94c275ad", + "id": 13243, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "maxConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13239, + "nodeType": "ParameterList", + "parameters": [], + "src": "1059:2:15" + }, + "returnParameters": { + "id": 13242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13241, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13243, + "src": "1085:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13240, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1085:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1084:8:15" + }, + "scope": 13340, + "src": "1034:59:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "dc8de379", + "id": 13250, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "reserveBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13245, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13250, + "src": "1122:25:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13244, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1122:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:27:15" + }, + "returnParameters": { + "id": 13249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13248, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13250, + "src": "1172:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1171:9:15" + }, + "scope": 13340, + "src": "1098:83:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 13253, + "implemented": false, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13251, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:2:15" + }, + "returnParameters": { + "id": 13252, + "nodeType": "ParameterList", + "parameters": [], + "src": "1212:0:15" + }, + "scope": 13340, + "src": "1186:27:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "67b6d57c", + "id": 13258, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13255, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13258, + "src": "1252:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13254, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1252:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1251:19:15" + }, + "returnParameters": { + "id": 13257, + "nodeType": "ParameterList", + "parameters": [], + "src": "1279:0:15" + }, + "scope": 13340, + "src": "1219:61:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "cdc91c69", + "id": 13261, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13259, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:15" + }, + "returnParameters": { + "id": 13260, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:0:15" + }, + "scope": 13340, + "src": "1285:42:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ecbca55d", + "id": 13266, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13263, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13266, + "src": "1358:21:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13262, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1358:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1357:23:15" + }, + "returnParameters": { + "id": 13265, + "nodeType": "ParameterList", + "parameters": [], + "src": "1389:0:15" + }, + "scope": 13340, + "src": "1332:58:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4af80f0e", + "id": 13271, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setConversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13268, + "mutability": "mutable", + "name": "_whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13271, + "src": "1427:21:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 13267, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "1427:10:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1426:23:15" + }, + "returnParameters": { + "id": 13270, + "nodeType": "ParameterList", + "parameters": [], + "src": "1458:0:15" + }, + "scope": 13340, + "src": "1395:64:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5e35359e", + "id": 13280, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13273, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1488:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13272, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1488:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13275, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1508:11:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13274, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1508:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13277, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1521:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13276, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1521:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1487:50:15" + }, + "returnParameters": { + "id": 13279, + "nodeType": "ParameterList", + "parameters": [], + "src": "1546:0:15" + }, + "scope": 13340, + "src": "1464:83:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "690d8320", + "id": 13285, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawETH", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13282, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13285, + "src": "1573:19:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1573:15:15", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1572:21:15" + }, + "returnParameters": { + "id": 13284, + "nodeType": "ParameterList", + "parameters": [], + "src": "1602:0:15" + }, + "scope": 13340, + "src": "1552:51:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "6a49d2c4", + "id": 13292, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13287, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13292, + "src": "1628:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13286, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1628:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13289, + "mutability": "mutable", + "name": "_ratio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13292, + "src": "1648:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13288, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1648:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1627:35:15" + }, + "returnParameters": { + "id": 13291, + "nodeType": "ParameterList", + "parameters": [], + "src": "1671:0:15" + }, + "scope": 13340, + "src": "1608:64:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "fc0c546a", + "id": 13297, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13293, + "nodeType": "ParameterList", + "parameters": [], + "src": "1734:2:15" + }, + "returnParameters": { + "id": 13296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13295, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13297, + "src": "1760:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13294, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1760:16:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1759:18:15" + }, + "scope": 13340, + "src": "1720:58:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "21e6b53d", + "id": 13302, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13299, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13302, + "src": "1815:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1815:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1814:19:15" + }, + "returnParameters": { + "id": 13301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1842:0:15" + }, + "scope": 13340, + "src": "1783:60:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "38a5e016", + "id": 13305, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1877:2:15" + }, + "returnParameters": { + "id": 13304, + "nodeType": "ParameterList", + "parameters": [], + "src": "1888:0:15" + }, + "scope": 13340, + "src": "1848:41:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "0e53aae9", + "id": 13320, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13307, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1914:20:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13306, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1914:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1913:22:15" + }, + "returnParameters": { + "id": 13319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13310, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1959:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1959:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1968:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13311, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1968:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13314, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1976:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13313, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1976:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13316, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1982:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13315, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1982:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13318, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1988:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13317, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1988:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1958:35:15" + }, + "scope": 13340, + "src": "1894:100:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d8959512", + "id": 13327, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConnectorBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13322, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13327, + "src": "2028:27:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13321, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2028:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2027:29:15" + }, + "returnParameters": { + "id": 13326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13325, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13327, + "src": "2080:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2080:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2079:9:15" + }, + "scope": 13340, + "src": "1999:90:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "19b64015", + "id": 13334, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectorTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13329, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13334, + "src": "2119:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2119:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2118:16:15" + }, + "returnParameters": { + "id": 13333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13332, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13334, + "src": "2158:11:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13331, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2158:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2157:13:15" + }, + "scope": 13340, + "src": "2094:77:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "71f52bf3", + "id": 13339, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectorTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13335, + "nodeType": "ParameterList", + "parameters": [], + "src": "2204:2:15" + }, + "returnParameters": { + "id": 13338, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13337, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13339, + "src": "2230:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13336, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2230:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2229:8:15" + }, + "scope": 13340, + "src": "2176:62:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13341, + "src": "284:1956:15" + } + ], + "src": "51:2190:15" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "exportedSymbols": { + "IConverter": [ + 13340 + ] + }, + "id": 13341, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13179, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:15" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13180, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 13350, + "src": "75:32:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 13181, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 21128, + "src": "108:48:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 13182, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 22848, + "src": "157:45:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "../../utility/interfaces/IWhitelist.sol", + "id": 13183, + "nodeType": "ImportDirective", + "scope": 13341, + "sourceUnit": 22918, + "src": "203:49:15", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13184, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "308:6:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 13185, + "nodeType": "InheritanceSpecifier", + "src": "308:6:15" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13340, + "linearizedBaseContracts": [ + 13340, + 22847 + ], + "name": "IConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13190, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13186, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:15" + }, + "returnParameters": { + "id": 13189, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13188, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13190, + "src": "369:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13187, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "369:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "368:8:15" + }, + "scope": 13340, + "src": "321:56:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d3fb73b4", + "id": 13195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "anchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13191, + "nodeType": "ParameterList", + "parameters": [], + "src": "397:2:15" + }, + "returnParameters": { + "id": 13194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13193, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13195, + "src": "423:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13192, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "423:16:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "422:18:15" + }, + "scope": 13340, + "src": "382:59:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "22f3e2d4", + "id": 13200, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13196, + "nodeType": "ParameterList", + "parameters": [], + "src": "463:2:15" + }, + "returnParameters": { + "id": 13199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13198, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13200, + "src": "489:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "489:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "488:6:15" + }, + "scope": 13340, + "src": "446:49:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "af94b8d8", + "id": 13213, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13202, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "529:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13201, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "529:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13204, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "555:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13203, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "555:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13206, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "581:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "581:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "528:69:15" + }, + "returnParameters": { + "id": 13212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13209, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "621:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "621:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13211, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13213, + "src": "630:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "620:18:15" + }, + "scope": 13340, + "src": "501:138:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e8dc12ff", + "id": 13228, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13224, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13215, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "661:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13214, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "661:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13217, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "708:24:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13216, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "708:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13219, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "755:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "755:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13221, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "793:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13220, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "793:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13223, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "831:28:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "831:15:15", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "660:200:15" + }, + "returnParameters": { + "id": 13227, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13226, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13228, + "src": "887:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "887:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "886:9:15" + }, + "scope": 13340, + "src": "644:252:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c45d3d92", + "id": 13233, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "conversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13229, + "nodeType": "ParameterList", + "parameters": [], + "src": "930:2:15" + }, + "returnParameters": { + "id": 13232, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13231, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13233, + "src": "956:10:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 13230, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "956:10:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "955:12:15" + }, + "scope": 13340, + "src": "902:66:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "579cd3ca", + "id": 13238, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "conversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13234, + "nodeType": "ParameterList", + "parameters": [], + "src": "995:2:15" + }, + "returnParameters": { + "id": 13237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13236, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13238, + "src": "1021:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13235, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1021:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1020:8:15" + }, + "scope": 13340, + "src": "973:56:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "94c275ad", + "id": 13243, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "maxConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13239, + "nodeType": "ParameterList", + "parameters": [], + "src": "1059:2:15" + }, + "returnParameters": { + "id": 13242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13241, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13243, + "src": "1085:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13240, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1085:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1084:8:15" + }, + "scope": 13340, + "src": "1034:59:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "dc8de379", + "id": 13250, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "reserveBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13245, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13250, + "src": "1122:25:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13244, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1122:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1121:27:15" + }, + "returnParameters": { + "id": 13249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13248, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13250, + "src": "1172:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1171:9:15" + }, + "scope": 13340, + "src": "1098:83:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 13253, + "implemented": false, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13251, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:2:15" + }, + "returnParameters": { + "id": 13252, + "nodeType": "ParameterList", + "parameters": [], + "src": "1212:0:15" + }, + "scope": 13340, + "src": "1186:27:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "67b6d57c", + "id": 13258, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13255, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13258, + "src": "1252:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13254, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1252:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1251:19:15" + }, + "returnParameters": { + "id": 13257, + "nodeType": "ParameterList", + "parameters": [], + "src": "1279:0:15" + }, + "scope": 13340, + "src": "1219:61:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "cdc91c69", + "id": 13261, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13259, + "nodeType": "ParameterList", + "parameters": [], + "src": "1315:2:15" + }, + "returnParameters": { + "id": 13260, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:0:15" + }, + "scope": 13340, + "src": "1285:42:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ecbca55d", + "id": 13266, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setConversionFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13263, + "mutability": "mutable", + "name": "_conversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13266, + "src": "1358:21:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13262, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1358:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1357:23:15" + }, + "returnParameters": { + "id": 13265, + "nodeType": "ParameterList", + "parameters": [], + "src": "1389:0:15" + }, + "scope": 13340, + "src": "1332:58:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4af80f0e", + "id": 13271, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setConversionWhitelist", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13268, + "mutability": "mutable", + "name": "_whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13271, + "src": "1427:21:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 13267, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "1427:10:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1426:23:15" + }, + "returnParameters": { + "id": 13270, + "nodeType": "ParameterList", + "parameters": [], + "src": "1458:0:15" + }, + "scope": 13340, + "src": "1395:64:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5e35359e", + "id": 13280, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13273, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1488:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13272, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1488:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13275, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1508:11:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13274, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1508:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13277, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13280, + "src": "1521:15:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13276, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1521:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1487:50:15" + }, + "returnParameters": { + "id": 13279, + "nodeType": "ParameterList", + "parameters": [], + "src": "1546:0:15" + }, + "scope": 13340, + "src": "1464:83:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "690d8320", + "id": 13285, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawETH", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13282, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13285, + "src": "1573:19:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1573:15:15", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1572:21:15" + }, + "returnParameters": { + "id": 13284, + "nodeType": "ParameterList", + "parameters": [], + "src": "1602:0:15" + }, + "scope": 13340, + "src": "1552:51:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "6a49d2c4", + "id": 13292, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13290, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13287, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13292, + "src": "1628:18:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13286, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1628:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13289, + "mutability": "mutable", + "name": "_ratio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13292, + "src": "1648:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13288, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1648:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1627:35:15" + }, + "returnParameters": { + "id": 13291, + "nodeType": "ParameterList", + "parameters": [], + "src": "1671:0:15" + }, + "scope": 13340, + "src": "1608:64:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "fc0c546a", + "id": 13297, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "token", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13293, + "nodeType": "ParameterList", + "parameters": [], + "src": "1734:2:15" + }, + "returnParameters": { + "id": 13296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13295, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13297, + "src": "1760:16:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13294, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1760:16:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1759:18:15" + }, + "scope": 13340, + "src": "1720:58:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "21e6b53d", + "id": 13302, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13299, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13302, + "src": "1815:17:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1815:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1814:19:15" + }, + "returnParameters": { + "id": 13301, + "nodeType": "ParameterList", + "parameters": [], + "src": "1842:0:15" + }, + "scope": 13340, + "src": "1783:60:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "38a5e016", + "id": 13305, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptTokenOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13303, + "nodeType": "ParameterList", + "parameters": [], + "src": "1877:2:15" + }, + "returnParameters": { + "id": 13304, + "nodeType": "ParameterList", + "parameters": [], + "src": "1888:0:15" + }, + "scope": 13340, + "src": "1848:41:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "0e53aae9", + "id": 13320, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13307, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1914:20:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13306, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1914:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1913:22:15" + }, + "returnParameters": { + "id": 13319, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13310, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1959:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1959:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1968:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13311, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1968:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13314, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1976:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13313, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1976:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13316, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1982:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13315, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1982:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13318, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13320, + "src": "1988:4:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13317, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1988:4:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1958:35:15" + }, + "scope": 13340, + "src": "1894:100:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d8959512", + "id": 13327, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConnectorBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13323, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13322, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13327, + "src": "2028:27:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13321, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2028:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2027:29:15" + }, + "returnParameters": { + "id": 13326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13325, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13327, + "src": "2080:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2080:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2079:9:15" + }, + "scope": 13340, + "src": "1999:90:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "19b64015", + "id": 13334, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectorTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13329, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13334, + "src": "2119:14:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2119:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2118:16:15" + }, + "returnParameters": { + "id": 13333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13332, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13334, + "src": "2158:11:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13331, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2158:11:15", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2157:13:15" + }, + "scope": 13340, + "src": "2094:77:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "71f52bf3", + "id": 13339, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "connectorTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13335, + "nodeType": "ParameterList", + "parameters": [], + "src": "2204:2:15" + }, + "returnParameters": { + "id": 13338, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13337, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13339, + "src": "2230:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13336, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2230:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2229:8:15" + }, + "scope": 13340, + "src": "2176:62:15", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13341, + "src": "284:1956:15" + } + ], + "src": "51:2190:15" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.743Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverterAnchor.json b/apps/cic-eth/tests/testdata/bancor/IConverterAnchor.json new file mode 100644 index 00000000..8fd23b11 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverterAnchor.json @@ -0,0 +1,296 @@ +{ + "contractName": "IConverterAnchor", + "abi": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":\"IConverterAnchor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../utility/interfaces/IOwned.sol\";\nimport \"../../utility/interfaces/ITokenHolder.sol\";\n\n/*\n Converter Anchor interface\n*/\ninterface IConverterAnchor is IOwned, ITokenHolder {\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "exportedSymbols": { + "IConverterAnchor": [ + 13349 + ] + }, + "id": 13350, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13342, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:16" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 13343, + "nodeType": "ImportDirective", + "scope": 13350, + "sourceUnit": 22848, + "src": "75:45:16", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "file": "../../utility/interfaces/ITokenHolder.sol", + "id": 13344, + "nodeType": "ImportDirective", + "scope": 13350, + "sourceUnit": 22908, + "src": "121:51:16", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13345, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "241:6:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 13346, + "nodeType": "InheritanceSpecifier", + "src": "241:6:16" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13347, + "name": "ITokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22907, + "src": "249:12:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITokenHolder_$22907", + "typeString": "contract ITokenHolder" + } + }, + "id": 13348, + "nodeType": "InheritanceSpecifier", + "src": "249:12:16" + } + ], + "contractDependencies": [ + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13349, + "linearizedBaseContracts": [ + 13349, + 22907, + 22847 + ], + "name": "IConverterAnchor", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 13350, + "src": "211:54:16" + } + ], + "src": "51:215:16" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "exportedSymbols": { + "IConverterAnchor": [ + 13349 + ] + }, + "id": 13350, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13342, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:16" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 13343, + "nodeType": "ImportDirective", + "scope": 13350, + "sourceUnit": 22848, + "src": "75:45:16", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "file": "../../utility/interfaces/ITokenHolder.sol", + "id": 13344, + "nodeType": "ImportDirective", + "scope": 13350, + "sourceUnit": 22908, + "src": "121:51:16", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13345, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "241:6:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 13346, + "nodeType": "InheritanceSpecifier", + "src": "241:6:16" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13347, + "name": "ITokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22907, + "src": "249:12:16", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITokenHolder_$22907", + "typeString": "contract ITokenHolder" + } + }, + "id": 13348, + "nodeType": "InheritanceSpecifier", + "src": "249:12:16" + } + ], + "contractDependencies": [ + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13349, + "linearizedBaseContracts": [ + 13349, + 22907, + 22847 + ], + "name": "IConverterAnchor", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 13350, + "src": "211:54:16" + } + ], + "src": "51:215:16" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.744Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/IConverterFactory.json new file mode 100644 index 00000000..a16f15b9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverterFactory.json @@ -0,0 +1,1167 @@ +{ + "contractName": "IConverterFactory", + "abi": [ + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + } + ], + "name": "customFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterCustomFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"}],\"name\":\"customFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterCustomFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":\"IConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverter.sol\";\nimport \"./IConverterAnchor.sol\";\nimport \"./ITypedConverterCustomFactory.sol\";\nimport \"../../utility/interfaces/IContractRegistry.sol\";\n\n/*\n Converter Factory interface\n*/\ninterface IConverterFactory {\n function createAnchor(uint16 _type, string memory _name, string memory _symbol, uint8 _decimals) external returns (IConverterAnchor);\n function createConverter(uint16 _type, IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external returns (IConverter);\n\n function customFactories(uint16 _type) external view returns (ITypedConverterCustomFactory);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "exportedSymbols": { + "IConverterFactory": [ + 13389 + ] + }, + "id": 13390, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13351, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:17" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./IConverter.sol", + "id": 13352, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13341, + "src": "75:26:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13353, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13350, + "src": "102:32:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "./ITypedConverterCustomFactory.sol", + "id": 13354, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13689, + "src": "135:44:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../../utility/interfaces/IContractRegistry.sol", + "id": 13355, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 22832, + "src": "180:56:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13389, + "linearizedBaseContracts": [ + 13389 + ], + "name": "IConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "2e9ab7b3", + "id": 13368, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13357, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "332:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13356, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "332:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13359, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "346:19:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13358, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "346:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13361, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "367:21:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13360, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "367:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13363, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "390:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 13362, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "390:5:17", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "331:75:17" + }, + "returnParameters": { + "id": 13367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13366, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "425:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13365, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "425:16:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "424:18:17" + }, + "scope": 13389, + "src": "310:133:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "15f64b6a", + "id": 13381, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13370, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "473:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13369, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "473:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13372, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "487:24:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13371, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "487:16:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13374, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "513:27:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13373, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "513:17:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13376, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "542:24:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13375, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "542:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "472:95:17" + }, + "returnParameters": { + "id": 13380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13379, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "586:10:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 13378, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "586:10:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "585:12:17" + }, + "scope": 13389, + "src": "448:150:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c977aed2", + "id": 13388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "customFactories", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13383, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13388, + "src": "629:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13382, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "629:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "628:14:17" + }, + "returnParameters": { + "id": 13387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13386, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13388, + "src": "666:28:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 13385, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "666:28:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:30:17" + }, + "scope": 13389, + "src": "604:92:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13390, + "src": "276:422:17" + } + ], + "src": "51:648:17" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "exportedSymbols": { + "IConverterFactory": [ + 13389 + ] + }, + "id": 13390, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13351, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:17" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./IConverter.sol", + "id": 13352, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13341, + "src": "75:26:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13353, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13350, + "src": "102:32:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "./ITypedConverterCustomFactory.sol", + "id": 13354, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 13689, + "src": "135:44:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../../utility/interfaces/IContractRegistry.sol", + "id": 13355, + "nodeType": "ImportDirective", + "scope": 13390, + "sourceUnit": 22832, + "src": "180:56:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13389, + "linearizedBaseContracts": [ + 13389 + ], + "name": "IConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "2e9ab7b3", + "id": 13368, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13357, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "332:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13356, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "332:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13359, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "346:19:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13358, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "346:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13361, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "367:21:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13360, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "367:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13363, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "390:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 13362, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "390:5:17", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "331:75:17" + }, + "returnParameters": { + "id": 13367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13366, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13368, + "src": "425:16:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13365, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "425:16:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "424:18:17" + }, + "scope": 13389, + "src": "310:133:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "15f64b6a", + "id": 13381, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13370, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "473:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13369, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "473:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13372, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "487:24:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13371, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "487:16:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13374, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "513:27:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13373, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "513:17:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13376, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "542:24:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13375, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "542:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "472:95:17" + }, + "returnParameters": { + "id": 13380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13379, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13381, + "src": "586:10:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 13378, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "586:10:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "585:12:17" + }, + "scope": 13389, + "src": "448:150:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c977aed2", + "id": 13388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "customFactories", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13383, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13388, + "src": "629:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13382, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "629:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "628:14:17" + }, + "returnParameters": { + "id": 13387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13386, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13388, + "src": "666:28:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 13385, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "666:28:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:30:17" + }, + "scope": 13389, + "src": "604:92:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13390, + "src": "276:422:17" + } + ], + "src": "51:648:17" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.744Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverterRegistry.json b/apps/cic-eth/tests/testdata/bancor/IConverterRegistry.json new file mode 100644 index 00000000..be958636 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverterRegistry.json @@ -0,0 +1,3090 @@ +{ + "contractName": "IConverterRegistry", + "abi": [ + { + "inputs": [], + "name": "getAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isLiquidityPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPoolCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isLiquidityPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol\":\"IConverterRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol\":{\"keccak256\":\"0x827d22d6c52b3e5128595090a3694847e9c54a760abf0e47a8870a7235537723\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://edae6c2f9f6fde390032189dda1b7f720521a31df5eb98e001d04bbf44dcfa02\",\"dweb:/ipfs/QmRz2EG3tcKeKXwHizciEr19ZEH2SidtQ9rkprKc6iR5Tz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./IConverterAnchor.sol\";\r\n\r\ninterface IConverterRegistry {\r\n function getAnchorCount() external view returns (uint256);\r\n function getAnchors() external view returns (address[] memory);\r\n function getAnchor(uint256 _index) external view returns (IConverterAnchor);\r\n function isAnchor(address _value) external view returns (bool);\r\n\r\n function getLiquidityPoolCount() external view returns (uint256);\r\n function getLiquidityPools() external view returns (address[] memory);\r\n function getLiquidityPool(uint256 _index) external view returns (IConverterAnchor);\r\n function isLiquidityPool(address _value) external view returns (bool);\r\n\r\n function getConvertibleTokenCount() external view returns (uint256);\r\n function getConvertibleTokens() external view returns (address[] memory);\r\n function getConvertibleToken(uint256 _index) external view returns (IERC20Token);\r\n function isConvertibleToken(address _value) external view returns (bool);\r\n\r\n function getConvertibleTokenAnchorCount(IERC20Token _convertibleToken) external view returns (uint256);\r\n function getConvertibleTokenAnchors(IERC20Token _convertibleToken) external view returns (address[] memory);\r\n function getConvertibleTokenAnchor(IERC20Token _convertibleToken, uint256 _index) external view returns (IConverterAnchor);\r\n function isConvertibleTokenAnchor(IERC20Token _convertibleToken, address _value) external view returns (bool);\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "exportedSymbols": { + "IConverterRegistry": [ + 13501 + ] + }, + "id": 13502, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13391, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:18" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13392, + "nodeType": "ImportDirective", + "scope": 13502, + "sourceUnit": 13350, + "src": "77:32:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13501, + "linearizedBaseContracts": [ + 13501 + ], + "name": "IConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "d3182bed", + "id": 13397, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13393, + "nodeType": "ParameterList", + "parameters": [], + "src": "172:2:18" + }, + "returnParameters": { + "id": 13396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13395, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13397, + "src": "198:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13394, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "198:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "197:9:18" + }, + "scope": 13501, + "src": "149:58:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "effb3c6e", + "id": 13403, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13398, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:18" + }, + "returnParameters": { + "id": 13402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13401, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13403, + "src": "258:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13399, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "258:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13400, + "length": null, + "nodeType": "ArrayTypeName", + "src": "258:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:18:18" + }, + "scope": 13501, + "src": "213:63:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4c7df18f", + "id": 13410, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13405, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13410, + "src": "301:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "301:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "300:16:18" + }, + "returnParameters": { + "id": 13409, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13408, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13410, + "src": "340:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13407, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "340:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "339:18:18" + }, + "scope": 13501, + "src": "282:76:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d8cced2a", + "id": 13417, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13412, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13417, + "src": "382:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "382:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "381:16:18" + }, + "returnParameters": { + "id": 13416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13415, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13417, + "src": "421:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13414, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "421:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "420:6:18" + }, + "scope": 13501, + "src": "364:63:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7a5f0ffd", + "id": 13422, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13418, + "nodeType": "ParameterList", + "parameters": [], + "src": "465:2:18" + }, + "returnParameters": { + "id": 13421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13420, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13422, + "src": "491:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13419, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "491:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "490:9:18" + }, + "scope": 13501, + "src": "435:65:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7f45c4c3", + "id": 13428, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13423, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:18" + }, + "returnParameters": { + "id": 13427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13426, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13428, + "src": "558:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13424, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "558:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13425, + "length": null, + "nodeType": "ArrayTypeName", + "src": "558:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:18:18" + }, + "scope": 13501, + "src": "506:70:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a74498aa", + "id": 13435, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13430, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13435, + "src": "608:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13429, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "608:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:16:18" + }, + "returnParameters": { + "id": 13434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13433, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13435, + "src": "647:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13432, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "647:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "646:18:18" + }, + "scope": 13501, + "src": "582:83:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e85455d7", + "id": 13442, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13437, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13442, + "src": "696:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "696:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "695:16:18" + }, + "returnParameters": { + "id": 13441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13440, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13442, + "src": "735:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13439, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "735:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "734:6:18" + }, + "scope": 13501, + "src": "671:70:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "69be4784", + "id": 13447, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13443, + "nodeType": "ParameterList", + "parameters": [], + "src": "782:2:18" + }, + "returnParameters": { + "id": 13446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13445, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13447, + "src": "808:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13444, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "808:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "807:9:18" + }, + "scope": 13501, + "src": "749:68:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5f1b50fe", + "id": 13453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13448, + "nodeType": "ParameterList", + "parameters": [], + "src": "852:2:18" + }, + "returnParameters": { + "id": 13452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13451, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13453, + "src": "878:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13449, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "878:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13450, + "length": null, + "nodeType": "ArrayTypeName", + "src": "878:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "877:18:18" + }, + "scope": 13501, + "src": "823:73:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "865cf194", + "id": 13460, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13455, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13460, + "src": "931:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13454, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "931:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:16:18" + }, + "returnParameters": { + "id": 13459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13458, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13460, + "src": "970:11:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13457, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "970:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "969:13:18" + }, + "scope": 13501, + "src": "902:81:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "3ab8857c", + "id": 13467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13462, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13467, + "src": "1017:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1017:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1016:16:18" + }, + "returnParameters": { + "id": 13466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13465, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13467, + "src": "1056:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1055:6:18" + }, + "scope": 13501, + "src": "989:73:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "49c5f32b", + "id": 13474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13469, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13474, + "src": "1110:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13468, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1110:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1109:31:18" + }, + "returnParameters": { + "id": 13473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13472, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13474, + "src": "1164:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1164:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1163:9:18" + }, + "scope": 13501, + "src": "1070:103:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "11839064", + "id": 13482, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13476, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13482, + "src": "1215:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13475, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1215:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1214:31:18" + }, + "returnParameters": { + "id": 13481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13482, + "src": "1269:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1269:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13479, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1269:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1268:18:18" + }, + "scope": 13501, + "src": "1179:108:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "603f51e4", + "id": 13491, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13487, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13484, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1328:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13483, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1328:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13486, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1359:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13485, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1359:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1327:47:18" + }, + "returnParameters": { + "id": 13490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13489, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1398:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13488, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1398:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1397:18:18" + }, + "scope": 13501, + "src": "1293:123:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b4c4197a", + "id": 13500, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13493, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1456:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13492, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1456:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13495, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1487:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1487:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1455:47:18" + }, + "returnParameters": { + "id": 13499, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13498, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1526:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13497, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1526:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1525:6:18" + }, + "scope": 13501, + "src": "1422:110:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13502, + "src": "113:1422:18" + } + ], + "src": "52:1485:18" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol", + "exportedSymbols": { + "IConverterRegistry": [ + 13501 + ] + }, + "id": 13502, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13391, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:18" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13392, + "nodeType": "ImportDirective", + "scope": 13502, + "sourceUnit": 13350, + "src": "77:32:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13501, + "linearizedBaseContracts": [ + 13501 + ], + "name": "IConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "d3182bed", + "id": 13397, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13393, + "nodeType": "ParameterList", + "parameters": [], + "src": "172:2:18" + }, + "returnParameters": { + "id": 13396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13395, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13397, + "src": "198:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13394, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "198:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "197:9:18" + }, + "scope": 13501, + "src": "149:58:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "effb3c6e", + "id": 13403, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13398, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:18" + }, + "returnParameters": { + "id": 13402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13401, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13403, + "src": "258:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13399, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "258:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13400, + "length": null, + "nodeType": "ArrayTypeName", + "src": "258:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:18:18" + }, + "scope": 13501, + "src": "213:63:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4c7df18f", + "id": 13410, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13405, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13410, + "src": "301:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13404, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "301:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "300:16:18" + }, + "returnParameters": { + "id": 13409, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13408, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13410, + "src": "340:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13407, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "340:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "339:18:18" + }, + "scope": 13501, + "src": "282:76:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d8cced2a", + "id": 13417, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13412, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13417, + "src": "382:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "382:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "381:16:18" + }, + "returnParameters": { + "id": 13416, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13415, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13417, + "src": "421:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13414, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "421:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "420:6:18" + }, + "scope": 13501, + "src": "364:63:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7a5f0ffd", + "id": 13422, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13418, + "nodeType": "ParameterList", + "parameters": [], + "src": "465:2:18" + }, + "returnParameters": { + "id": 13421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13420, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13422, + "src": "491:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13419, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "491:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "490:9:18" + }, + "scope": 13501, + "src": "435:65:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7f45c4c3", + "id": 13428, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13423, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:18" + }, + "returnParameters": { + "id": 13427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13426, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13428, + "src": "558:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13424, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "558:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13425, + "length": null, + "nodeType": "ArrayTypeName", + "src": "558:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:18:18" + }, + "scope": 13501, + "src": "506:70:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a74498aa", + "id": 13435, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13430, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13435, + "src": "608:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13429, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "608:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:16:18" + }, + "returnParameters": { + "id": 13434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13433, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13435, + "src": "647:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13432, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "647:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "646:18:18" + }, + "scope": 13501, + "src": "582:83:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e85455d7", + "id": 13442, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13437, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13442, + "src": "696:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "696:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "695:16:18" + }, + "returnParameters": { + "id": 13441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13440, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13442, + "src": "735:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13439, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "735:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "734:6:18" + }, + "scope": 13501, + "src": "671:70:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "69be4784", + "id": 13447, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13443, + "nodeType": "ParameterList", + "parameters": [], + "src": "782:2:18" + }, + "returnParameters": { + "id": 13446, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13445, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13447, + "src": "808:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13444, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "808:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "807:9:18" + }, + "scope": 13501, + "src": "749:68:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5f1b50fe", + "id": 13453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13448, + "nodeType": "ParameterList", + "parameters": [], + "src": "852:2:18" + }, + "returnParameters": { + "id": 13452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13451, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13453, + "src": "878:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13449, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "878:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13450, + "length": null, + "nodeType": "ArrayTypeName", + "src": "878:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "877:18:18" + }, + "scope": 13501, + "src": "823:73:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "865cf194", + "id": 13460, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13455, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13460, + "src": "931:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13454, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "931:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "930:16:18" + }, + "returnParameters": { + "id": 13459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13458, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13460, + "src": "970:11:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13457, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "970:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "969:13:18" + }, + "scope": 13501, + "src": "902:81:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "3ab8857c", + "id": 13467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13462, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13467, + "src": "1017:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1017:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1016:16:18" + }, + "returnParameters": { + "id": 13466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13465, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13467, + "src": "1056:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1055:6:18" + }, + "scope": 13501, + "src": "989:73:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "49c5f32b", + "id": 13474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchorCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13469, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13474, + "src": "1110:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13468, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1110:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1109:31:18" + }, + "returnParameters": { + "id": 13473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13472, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13474, + "src": "1164:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1164:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1163:9:18" + }, + "scope": 13501, + "src": "1070:103:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "11839064", + "id": 13482, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchors", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13476, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13482, + "src": "1215:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13475, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1215:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1214:31:18" + }, + "returnParameters": { + "id": 13481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13482, + "src": "1269:16:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1269:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13479, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1269:9:18", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1268:18:18" + }, + "scope": 13501, + "src": "1179:108:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "603f51e4", + "id": 13491, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13487, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13484, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1328:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13483, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1328:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13486, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1359:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13485, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1359:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1327:47:18" + }, + "returnParameters": { + "id": 13490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13489, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13491, + "src": "1398:16:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13488, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1398:16:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1397:18:18" + }, + "scope": 13501, + "src": "1293:123:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b4c4197a", + "id": 13500, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13493, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1456:29:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13492, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1456:11:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13495, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1487:14:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13494, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1487:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1455:47:18" + }, + "returnParameters": { + "id": 13499, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13498, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13500, + "src": "1526:4:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13497, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1526:4:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1525:6:18" + }, + "scope": 13501, + "src": "1422:110:18", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13502, + "src": "113:1422:18" + } + ], + "src": "52:1485:18" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.744Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverterRegistryData.json b/apps/cic-eth/tests/testdata/bancor/IConverterRegistryData.json new file mode 100644 index 00000000..644bed0d --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverterRegistryData.json @@ -0,0 +1,4018 @@ +{ + "contractName": "IConverterRegistryData", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "addSmartToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "removeSmartToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_liquidityPoolAnchor", + "type": "address" + } + ], + "name": "addLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_liquidityPoolAnchor", + "type": "address" + } + ], + "name": "removeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "addConvertibleToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "removeConvertibleToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isLiquidityPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"addConvertibleToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPoolAnchor\",\"type\":\"address\"}],\"name\":\"addLiquidityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"addSmartToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPoolCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isLiquidityPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"removeConvertibleToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPoolAnchor\",\"type\":\"address\"}],\"name\":\"removeLiquidityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"removeSmartToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol\":\"IConverterRegistryData\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol\":{\"keccak256\":\"0xc2b8e75bf4d69b34f9687d90d8eb31e8462bfcf25565f5ca399151648624c73a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e3825b1ccce31117c984a7605376ec2e6f18b15cdd61e9d5624667332a935dd7\",\"dweb:/ipfs/QmeRHtWU1oZJtL8UxJQMbwmTyMhf8Z3DJz6XubFxbP5xQx\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./IConverterAnchor.sol\";\r\n\r\ninterface IConverterRegistryData {\r\n function addSmartToken(IConverterAnchor _anchor) external;\r\n function removeSmartToken(IConverterAnchor _anchor) external;\r\n\r\n function addLiquidityPool(IConverterAnchor _liquidityPoolAnchor) external;\r\n function removeLiquidityPool(IConverterAnchor _liquidityPoolAnchor) external;\r\n\r\n function addConvertibleToken(IERC20Token _convertibleToken, IConverterAnchor _anchor) external;\r\n function removeConvertibleToken(IERC20Token _convertibleToken, IConverterAnchor _anchor) external;\r\n\r\n function getSmartTokenCount() external view returns (uint256);\r\n function getSmartTokens() external view returns (address[] memory);\r\n function getSmartToken(uint256 _index) external view returns (IConverterAnchor);\r\n function isSmartToken(address _value) external view returns (bool);\r\n\r\n function getLiquidityPoolCount() external view returns (uint256);\r\n function getLiquidityPools() external view returns (address[] memory);\r\n function getLiquidityPool(uint256 _index) external view returns (IConverterAnchor);\r\n function isLiquidityPool(address _value) external view returns (bool);\r\n\r\n function getConvertibleTokenCount() external view returns (uint256);\r\n function getConvertibleTokens() external view returns (address[] memory);\r\n function getConvertibleToken(uint256 _index) external view returns (IERC20Token);\r\n function isConvertibleToken(address _value) external view returns (bool);\r\n\r\n function getConvertibleTokenSmartTokenCount(IERC20Token _convertibleToken) external view returns (uint256);\r\n function getConvertibleTokenSmartTokens(IERC20Token _convertibleToken) external view returns (address[] memory);\r\n function getConvertibleTokenSmartToken(IERC20Token _convertibleToken, uint256 _index) external view returns (IConverterAnchor);\r\n function isConvertibleTokenSmartToken(IERC20Token _convertibleToken, address _value) external view returns (bool);\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "exportedSymbols": { + "IConverterRegistryData": [ + 13647 + ] + }, + "id": 13648, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13503, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:19" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13504, + "nodeType": "ImportDirective", + "scope": 13648, + "sourceUnit": 13350, + "src": "77:32:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13647, + "linearizedBaseContracts": [ + 13647 + ], + "name": "IConverterRegistryData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "8de6c3eb", + "id": 13509, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13506, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13509, + "src": "176:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13505, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "176:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:26:19" + }, + "returnParameters": { + "id": 13508, + "nodeType": "ParameterList", + "parameters": [], + "src": "210:0:19" + }, + "scope": 13647, + "src": "153:58:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ceb9838c", + "id": 13514, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13512, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13511, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13514, + "src": "243:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13510, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "243:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "242:26:19" + }, + "returnParameters": { + "id": 13513, + "nodeType": "ParameterList", + "parameters": [], + "src": "277:0:19" + }, + "scope": 13647, + "src": "217:61:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ee6a934c", + "id": 13519, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13516, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13519, + "src": "312:37:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13515, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "312:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "311:39:19" + }, + "returnParameters": { + "id": 13518, + "nodeType": "ParameterList", + "parameters": [], + "src": "359:0:19" + }, + "scope": 13647, + "src": "286:74:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ae22107f", + "id": 13524, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13521, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13524, + "src": "395:37:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13520, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "395:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "394:39:19" + }, + "returnParameters": { + "id": 13523, + "nodeType": "ParameterList", + "parameters": [], + "src": "442:0:19" + }, + "scope": 13647, + "src": "366:77:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "36900c11", + "id": 13531, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13526, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13531, + "src": "480:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13525, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "480:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13528, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13531, + "src": "511:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13527, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "511:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "479:57:19" + }, + "returnParameters": { + "id": 13530, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:19" + }, + "scope": 13647, + "src": "451:95:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "fba8f031", + "id": 13538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13533, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13538, + "src": "584:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13532, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "584:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13535, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13538, + "src": "615:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13534, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "615:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "583:57:19" + }, + "returnParameters": { + "id": 13537, + "nodeType": "ParameterList", + "parameters": [], + "src": "649:0:19" + }, + "scope": 13647, + "src": "552:98:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e571049b", + "id": 13543, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13539, + "nodeType": "ParameterList", + "parameters": [], + "src": "685:2:19" + }, + "returnParameters": { + "id": 13542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13541, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13543, + "src": "711:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "711:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "710:9:19" + }, + "scope": 13647, + "src": "658:62:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "04ceaf41", + "id": 13549, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13544, + "nodeType": "ParameterList", + "parameters": [], + "src": "749:2:19" + }, + "returnParameters": { + "id": 13548, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13547, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13549, + "src": "775:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "775:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13546, + "length": null, + "nodeType": "ArrayTypeName", + "src": "775:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "774:18:19" + }, + "scope": 13647, + "src": "726:67:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a109d214", + "id": 13556, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13551, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13556, + "src": "822:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "822:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "821:16:19" + }, + "returnParameters": { + "id": 13555, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13554, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13556, + "src": "861:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13553, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "861:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "860:18:19" + }, + "scope": 13647, + "src": "799:80:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4123ef60", + "id": 13563, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13558, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13563, + "src": "907:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13557, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "907:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "906:16:19" + }, + "returnParameters": { + "id": 13562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13561, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13563, + "src": "946:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13560, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "946:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "945:6:19" + }, + "scope": 13647, + "src": "885:67:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7a5f0ffd", + "id": 13568, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13564, + "nodeType": "ParameterList", + "parameters": [], + "src": "990:2:19" + }, + "returnParameters": { + "id": 13567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13566, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13568, + "src": "1016:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1016:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1015:9:19" + }, + "scope": 13647, + "src": "960:65:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7f45c4c3", + "id": 13574, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13569, + "nodeType": "ParameterList", + "parameters": [], + "src": "1057:2:19" + }, + "returnParameters": { + "id": 13573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13572, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13574, + "src": "1083:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13570, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1083:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1083:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1082:18:19" + }, + "scope": 13647, + "src": "1031:70:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a74498aa", + "id": 13581, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13576, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13581, + "src": "1133:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1133:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1132:16:19" + }, + "returnParameters": { + "id": 13580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13579, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13581, + "src": "1172:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13578, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1172:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1171:18:19" + }, + "scope": 13647, + "src": "1107:83:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e85455d7", + "id": 13588, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13583, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13588, + "src": "1221:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13582, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1221:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1220:16:19" + }, + "returnParameters": { + "id": 13587, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13586, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13588, + "src": "1260:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13585, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1260:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1259:6:19" + }, + "scope": 13647, + "src": "1196:70:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "69be4784", + "id": 13593, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13589, + "nodeType": "ParameterList", + "parameters": [], + "src": "1307:2:19" + }, + "returnParameters": { + "id": 13592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13591, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13593, + "src": "1333:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1332:9:19" + }, + "scope": 13647, + "src": "1274:68:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5f1b50fe", + "id": 13599, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13594, + "nodeType": "ParameterList", + "parameters": [], + "src": "1377:2:19" + }, + "returnParameters": { + "id": 13598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13597, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13599, + "src": "1403:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13595, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1403:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13596, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1403:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1402:18:19" + }, + "scope": 13647, + "src": "1348:73:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "865cf194", + "id": 13606, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13601, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13606, + "src": "1456:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1456:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1455:16:19" + }, + "returnParameters": { + "id": 13605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13604, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13606, + "src": "1495:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13603, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1495:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1494:13:19" + }, + "scope": 13647, + "src": "1427:81:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "3ab8857c", + "id": 13613, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13609, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13608, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13613, + "src": "1542:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1542:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1541:16:19" + }, + "returnParameters": { + "id": 13612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13611, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13613, + "src": "1581:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13610, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1581:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1580:6:19" + }, + "scope": 13647, + "src": "1514:73:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a43d5e94", + "id": 13620, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13615, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13620, + "src": "1639:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13614, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1639:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1638:31:19" + }, + "returnParameters": { + "id": 13619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13618, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13620, + "src": "1693:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13617, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1693:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1692:9:19" + }, + "scope": 13647, + "src": "1595:107:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f4fb86c0", + "id": 13628, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13622, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13628, + "src": "1748:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13621, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1748:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1747:31:19" + }, + "returnParameters": { + "id": 13627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13626, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13628, + "src": "1802:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1802:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13625, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1802:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1801:18:19" + }, + "scope": 13647, + "src": "1708:112:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d6c4b5b2", + "id": 13637, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13630, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1865:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13629, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1865:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13632, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1896:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1896:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1864:47:19" + }, + "returnParameters": { + "id": 13636, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13635, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1935:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13634, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1935:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1934:18:19" + }, + "scope": 13647, + "src": "1826:127:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "725b8786", + "id": 13646, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13639, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "1997:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13638, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1997:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13641, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "2028:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2028:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1996:47:19" + }, + "returnParameters": { + "id": 13645, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13644, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "2067:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13643, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2067:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2066:6:19" + }, + "scope": 13647, + "src": "1959:114:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13648, + "src": "113:1963:19" + } + ], + "src": "52:2026:19" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol", + "exportedSymbols": { + "IConverterRegistryData": [ + 13647 + ] + }, + "id": 13648, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13503, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:19" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13504, + "nodeType": "ImportDirective", + "scope": 13648, + "sourceUnit": 13350, + "src": "77:32:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13647, + "linearizedBaseContracts": [ + 13647 + ], + "name": "IConverterRegistryData", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "8de6c3eb", + "id": 13509, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13506, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13509, + "src": "176:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13505, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "176:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:26:19" + }, + "returnParameters": { + "id": 13508, + "nodeType": "ParameterList", + "parameters": [], + "src": "210:0:19" + }, + "scope": 13647, + "src": "153:58:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ceb9838c", + "id": 13514, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13512, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13511, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13514, + "src": "243:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13510, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "243:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "242:26:19" + }, + "returnParameters": { + "id": 13513, + "nodeType": "ParameterList", + "parameters": [], + "src": "277:0:19" + }, + "scope": 13647, + "src": "217:61:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ee6a934c", + "id": 13519, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13516, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13519, + "src": "312:37:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13515, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "312:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "311:39:19" + }, + "returnParameters": { + "id": 13518, + "nodeType": "ParameterList", + "parameters": [], + "src": "359:0:19" + }, + "scope": 13647, + "src": "286:74:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ae22107f", + "id": 13524, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13521, + "mutability": "mutable", + "name": "_liquidityPoolAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13524, + "src": "395:37:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13520, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "395:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "394:39:19" + }, + "returnParameters": { + "id": 13523, + "nodeType": "ParameterList", + "parameters": [], + "src": "442:0:19" + }, + "scope": 13647, + "src": "366:77:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "36900c11", + "id": 13531, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "addConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13526, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13531, + "src": "480:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13525, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "480:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13528, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13531, + "src": "511:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13527, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "511:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "479:57:19" + }, + "returnParameters": { + "id": 13530, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:19" + }, + "scope": 13647, + "src": "451:95:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "fba8f031", + "id": 13538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "removeConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13533, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13538, + "src": "584:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13532, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "584:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13535, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13538, + "src": "615:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13534, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "615:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "583:57:19" + }, + "returnParameters": { + "id": 13537, + "nodeType": "ParameterList", + "parameters": [], + "src": "649:0:19" + }, + "scope": 13647, + "src": "552:98:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e571049b", + "id": 13543, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13539, + "nodeType": "ParameterList", + "parameters": [], + "src": "685:2:19" + }, + "returnParameters": { + "id": 13542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13541, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13543, + "src": "711:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "711:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "710:9:19" + }, + "scope": 13647, + "src": "658:62:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "04ceaf41", + "id": 13549, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13544, + "nodeType": "ParameterList", + "parameters": [], + "src": "749:2:19" + }, + "returnParameters": { + "id": 13548, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13547, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13549, + "src": "775:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "775:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13546, + "length": null, + "nodeType": "ArrayTypeName", + "src": "775:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "774:18:19" + }, + "scope": 13647, + "src": "726:67:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a109d214", + "id": 13556, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13551, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13556, + "src": "822:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "822:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "821:16:19" + }, + "returnParameters": { + "id": 13555, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13554, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13556, + "src": "861:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13553, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "861:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "860:18:19" + }, + "scope": 13647, + "src": "799:80:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "4123ef60", + "id": 13563, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13558, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13563, + "src": "907:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13557, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "907:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "906:16:19" + }, + "returnParameters": { + "id": 13562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13561, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13563, + "src": "946:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13560, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "946:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "945:6:19" + }, + "scope": 13647, + "src": "885:67:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7a5f0ffd", + "id": 13568, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPoolCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13564, + "nodeType": "ParameterList", + "parameters": [], + "src": "990:2:19" + }, + "returnParameters": { + "id": 13567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13566, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13568, + "src": "1016:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1016:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1015:9:19" + }, + "scope": 13647, + "src": "960:65:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "7f45c4c3", + "id": 13574, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPools", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13569, + "nodeType": "ParameterList", + "parameters": [], + "src": "1057:2:19" + }, + "returnParameters": { + "id": 13573, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13572, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13574, + "src": "1083:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13570, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1083:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1083:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1082:18:19" + }, + "scope": 13647, + "src": "1031:70:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a74498aa", + "id": 13581, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13576, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13581, + "src": "1133:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1133:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1132:16:19" + }, + "returnParameters": { + "id": 13580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13579, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13581, + "src": "1172:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13578, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1172:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1171:18:19" + }, + "scope": 13647, + "src": "1107:83:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e85455d7", + "id": 13588, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isLiquidityPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13584, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13583, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13588, + "src": "1221:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13582, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1221:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1220:16:19" + }, + "returnParameters": { + "id": 13587, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13586, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13588, + "src": "1260:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13585, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1260:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1259:6:19" + }, + "scope": 13647, + "src": "1196:70:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "69be4784", + "id": 13593, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13589, + "nodeType": "ParameterList", + "parameters": [], + "src": "1307:2:19" + }, + "returnParameters": { + "id": 13592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13591, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13593, + "src": "1333:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1332:9:19" + }, + "scope": 13647, + "src": "1274:68:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5f1b50fe", + "id": 13599, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13594, + "nodeType": "ParameterList", + "parameters": [], + "src": "1377:2:19" + }, + "returnParameters": { + "id": 13598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13597, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13599, + "src": "1403:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13595, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1403:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13596, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1403:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1402:18:19" + }, + "scope": 13647, + "src": "1348:73:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "865cf194", + "id": 13606, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13601, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13606, + "src": "1456:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1456:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1455:16:19" + }, + "returnParameters": { + "id": 13605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13604, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13606, + "src": "1495:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13603, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1495:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1494:13:19" + }, + "scope": 13647, + "src": "1427:81:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "3ab8857c", + "id": 13613, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13609, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13608, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13613, + "src": "1542:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1542:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1541:16:19" + }, + "returnParameters": { + "id": 13612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13611, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13613, + "src": "1581:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13610, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1581:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1580:6:19" + }, + "scope": 13647, + "src": "1514:73:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a43d5e94", + "id": 13620, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokenCount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13615, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13620, + "src": "1639:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13614, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1639:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1638:31:19" + }, + "returnParameters": { + "id": 13619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13618, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13620, + "src": "1693:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13617, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1693:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1692:9:19" + }, + "scope": 13647, + "src": "1595:107:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f4fb86c0", + "id": 13628, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13622, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13628, + "src": "1748:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13621, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1748:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1747:31:19" + }, + "returnParameters": { + "id": 13627, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13626, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13628, + "src": "1802:16:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 13624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1802:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 13625, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1802:9:19", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1801:18:19" + }, + "scope": 13647, + "src": "1708:112:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "d6c4b5b2", + "id": 13637, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13633, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13630, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1865:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13629, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1865:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13632, + "mutability": "mutable", + "name": "_index", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1896:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13631, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1896:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1864:47:19" + }, + "returnParameters": { + "id": 13636, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13635, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13637, + "src": "1935:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13634, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1935:16:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1934:18:19" + }, + "scope": 13647, + "src": "1826:127:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "725b8786", + "id": 13646, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isConvertibleTokenSmartToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13642, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13639, + "mutability": "mutable", + "name": "_convertibleToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "1997:29:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13638, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1997:11:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13641, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "2028:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2028:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1996:47:19" + }, + "returnParameters": { + "id": 13645, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13644, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13646, + "src": "2067:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 13643, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2067:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2066:6:19" + }, + "scope": 13647, + "src": "1959:114:19", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13648, + "src": "113:1963:19" + } + ], + "src": "52:2026:19" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.745Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IConverterUpgrader.json b/apps/cic-eth/tests/testdata/bancor/IConverterUpgrader.json new file mode 100644 index 00000000..7cc01934 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IConverterUpgrader.json @@ -0,0 +1,372 @@ +{ + "contractName": "IConverterUpgrader", + "abi": [ + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_version", + "type": "bytes32" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":\"IConverterUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Converter Upgrader interface\n*/\ninterface IConverterUpgrader {\n function upgrade(bytes32 _version) external;\n function upgrade(uint16 _version) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "exportedSymbols": { + "IConverterUpgrader": [ + 13660 + ] + }, + "id": 13661, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13649, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13660, + "linearizedBaseContracts": [ + 13660 + ], + "name": "IConverterUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "bc444e13", + "id": 13654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13652, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13651, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13654, + "src": "167:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 13650, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "167:7:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "166:18:20" + }, + "returnParameters": { + "id": 13653, + "nodeType": "ParameterList", + "parameters": [], + "src": "193:0:20" + }, + "scope": 13660, + "src": "150:44:20", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "90f58c96", + "id": 13659, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13656, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13659, + "src": "216:15:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13655, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "216:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "215:17:20" + }, + "returnParameters": { + "id": 13658, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:0:20" + }, + "scope": 13660, + "src": "199:43:20", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13661, + "src": "115:129:20" + } + ], + "src": "51:194:20" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol", + "exportedSymbols": { + "IConverterUpgrader": [ + 13660 + ] + }, + "id": 13661, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13649, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13660, + "linearizedBaseContracts": [ + 13660 + ], + "name": "IConverterUpgrader", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "bc444e13", + "id": 13654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13652, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13651, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13654, + "src": "167:16:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 13650, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "167:7:20", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "166:18:20" + }, + "returnParameters": { + "id": 13653, + "nodeType": "ParameterList", + "parameters": [], + "src": "193:0:20" + }, + "scope": 13660, + "src": "150:44:20", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "90f58c96", + "id": 13659, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13656, + "mutability": "mutable", + "name": "_version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13659, + "src": "216:15:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13655, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "216:6:20", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "215:17:20" + }, + "returnParameters": { + "id": 13658, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:0:20" + }, + "scope": 13660, + "src": "199:43:20", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13661, + "src": "115:129:20" + } + ], + "src": "51:194:20" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.747Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IERC20Token.json b/apps/cic-eth/tests/testdata/bancor/IERC20Token.json new file mode 100644 index 00000000..f5d8e908 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IERC20Token.json @@ -0,0 +1,1914 @@ +{ + "contractName": "IERC20Token", + "abi": [ + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":\"IERC20Token\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n ERC20 Standard Token interface\n*/\ninterface IERC20Token {\n function name() external view returns (string memory);\n function symbol() external view returns (string memory);\n function decimals() external view returns (uint8);\n function totalSupply() external view returns (uint256);\n function balanceOf(address _owner) external view returns (uint256);\n function allowance(address _owner, address _spender) external view returns (uint256);\n\n function transfer(address _to, uint256 _value) external returns (bool);\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\n function approve(address _spender, uint256 _value) external returns (bool);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "exportedSymbols": { + "IERC20Token": [ + 21127 + ] + }, + "id": 21128, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21061, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:51" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21127, + "linearizedBaseContracts": [ + 21127 + ], + "name": "IERC20Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "06fdde03", + "id": 21066, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21062, + "nodeType": "ParameterList", + "parameters": [], + "src": "158:2:51" + }, + "returnParameters": { + "id": 21065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21066, + "src": "184:13:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21063, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "184:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "183:15:51" + }, + "scope": 21127, + "src": "145:54:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "95d89b41", + "id": 21071, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21067, + "nodeType": "ParameterList", + "parameters": [], + "src": "219:2:51" + }, + "returnParameters": { + "id": 21070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21069, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21071, + "src": "245:13:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "245:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "244:15:51" + }, + "scope": 21127, + "src": "204:56:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "313ce567", + "id": 21076, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21072, + "nodeType": "ParameterList", + "parameters": [], + "src": "282:2:51" + }, + "returnParameters": { + "id": 21075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21076, + "src": "308:5:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21073, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "308:5:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "307:7:51" + }, + "scope": 21127, + "src": "265:50:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "18160ddd", + "id": 21081, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21077, + "nodeType": "ParameterList", + "parameters": [], + "src": "340:2:51" + }, + "returnParameters": { + "id": 21080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21081, + "src": "366:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "366:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "365:9:51" + }, + "scope": 21127, + "src": "320:55:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "70a08231", + "id": 21088, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21083, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21088, + "src": "399:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "399:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:16:51" + }, + "returnParameters": { + "id": 21087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21086, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21088, + "src": "438:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21085, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "438:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "437:9:51" + }, + "scope": 21127, + "src": "380:67:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "dd62ed3e", + "id": 21097, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21090, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "471:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21089, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "471:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21092, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "487:16:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "487:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "470:34:51" + }, + "returnParameters": { + "id": 21096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21095, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "528:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "528:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "527:9:51" + }, + "scope": 21127, + "src": "452:85:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 21106, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21099, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "561:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "561:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21101, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "574:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "574:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "560:29:51" + }, + "returnParameters": { + "id": 21105, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "608:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21103, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "608:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:6:51" + }, + "scope": 21127, + "src": "543:71:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "23b872dd", + "id": 21117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21108, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "641:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21110, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "656:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "656:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21112, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "669:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "640:44:51" + }, + "returnParameters": { + "id": 21116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21115, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "703:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21114, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "703:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "702:6:51" + }, + "scope": 21127, + "src": "619:90:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 21126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21119, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "731:16:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "731:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21121, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "749:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "749:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "730:34:51" + }, + "returnParameters": { + "id": 21125, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21124, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "783:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21123, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "783:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "782:6:51" + }, + "scope": 21127, + "src": "714:75:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21128, + "src": "117:674:51" + } + ], + "src": "51:741:51" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "exportedSymbols": { + "IERC20Token": [ + 21127 + ] + }, + "id": 21128, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21061, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:51" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21127, + "linearizedBaseContracts": [ + 21127 + ], + "name": "IERC20Token", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "06fdde03", + "id": 21066, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21062, + "nodeType": "ParameterList", + "parameters": [], + "src": "158:2:51" + }, + "returnParameters": { + "id": 21065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21066, + "src": "184:13:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21063, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "184:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "183:15:51" + }, + "scope": 21127, + "src": "145:54:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "95d89b41", + "id": 21071, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21067, + "nodeType": "ParameterList", + "parameters": [], + "src": "219:2:51" + }, + "returnParameters": { + "id": 21070, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21069, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21071, + "src": "245:13:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "245:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "244:15:51" + }, + "scope": 21127, + "src": "204:56:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "313ce567", + "id": 21076, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21072, + "nodeType": "ParameterList", + "parameters": [], + "src": "282:2:51" + }, + "returnParameters": { + "id": 21075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21076, + "src": "308:5:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21073, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "308:5:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "307:7:51" + }, + "scope": 21127, + "src": "265:50:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "18160ddd", + "id": 21081, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21077, + "nodeType": "ParameterList", + "parameters": [], + "src": "340:2:51" + }, + "returnParameters": { + "id": 21080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21081, + "src": "366:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "366:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "365:9:51" + }, + "scope": 21127, + "src": "320:55:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "70a08231", + "id": 21088, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21083, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21088, + "src": "399:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "399:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:16:51" + }, + "returnParameters": { + "id": 21087, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21086, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21088, + "src": "438:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21085, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "438:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "437:9:51" + }, + "scope": 21127, + "src": "380:67:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "dd62ed3e", + "id": 21097, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21090, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "471:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21089, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "471:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21092, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "487:16:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "487:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "470:34:51" + }, + "returnParameters": { + "id": 21096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21095, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21097, + "src": "528:7:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "528:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "527:9:51" + }, + "scope": 21127, + "src": "452:85:51", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 21106, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21099, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "561:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "561:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21101, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "574:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21100, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "574:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "560:29:51" + }, + "returnParameters": { + "id": 21105, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21106, + "src": "608:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21103, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "608:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:6:51" + }, + "scope": 21127, + "src": "543:71:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "23b872dd", + "id": 21117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21108, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "641:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21110, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "656:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "656:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21112, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "669:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "640:44:51" + }, + "returnParameters": { + "id": 21116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21115, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21117, + "src": "703:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21114, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "703:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "702:6:51" + }, + "scope": 21127, + "src": "619:90:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 21126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21119, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "731:16:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "731:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21121, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "749:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "749:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "730:34:51" + }, + "returnParameters": { + "id": 21125, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21124, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21126, + "src": "783:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21123, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "783:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "782:6:51" + }, + "scope": 21127, + "src": "714:75:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21128, + "src": "117:674:51" + } + ], + "src": "51:741:51" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.836Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IEtherToken.json b/apps/cic-eth/tests/testdata/bancor/IEtherToken.json new file mode 100644 index 00000000..8ed7c497 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IEtherToken.json @@ -0,0 +1,869 @@ +{ + "contractName": "IEtherToken", + "abi": [ + { + "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": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "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": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":\"IEtherToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IERC20Token.sol\";\n\n/*\n Ether Token interface\n*/\ninterface IEtherToken is IERC20Token {\n function deposit() external payable;\n function withdraw(uint256 _amount) external;\n function depositTo(address _to) external payable;\n function withdrawTo(address payable _to, uint256 _amount) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "exportedSymbols": { + "IEtherToken": [ + 21153 + ] + }, + "id": 21154, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21129, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:52" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./IERC20Token.sol", + "id": 21130, + "nodeType": "ImportDirective", + "scope": 21154, + "sourceUnit": 21128, + "src": "75:27:52", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21131, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "161:11:52", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21132, + "nodeType": "InheritanceSpecifier", + "src": "161:11:52" + } + ], + "contractDependencies": [ + 21127 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21153, + "linearizedBaseContracts": [ + 21153, + 21127 + ], + "name": "IEtherToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "d0e30db0", + "id": 21135, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21133, + "nodeType": "ParameterList", + "parameters": [], + "src": "195:2:52" + }, + "returnParameters": { + "id": 21134, + "nodeType": "ParameterList", + "parameters": [], + "src": "214:0:52" + }, + "scope": 21153, + "src": "179:36:52", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2e1a7d4d", + "id": 21140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21137, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21140, + "src": "238:15:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "238:7:52", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "237:17:52" + }, + "returnParameters": { + "id": 21139, + "nodeType": "ParameterList", + "parameters": [], + "src": "263:0:52" + }, + "scope": 21153, + "src": "220:44:52", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b760faf9", + "id": 21145, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "depositTo", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21142, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21145, + "src": "288:11:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "288:7:52", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:13:52" + }, + "returnParameters": { + "id": 21144, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:52" + }, + "scope": 21153, + "src": "269:49:52", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "205c2878", + "id": 21152, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTo", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21147, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21152, + "src": "343:19:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 21146, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "343:15:52", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21149, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21152, + "src": "364:15:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "364:7:52", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "342:38:52" + }, + "returnParameters": { + "id": 21151, + "nodeType": "ParameterList", + "parameters": [], + "src": "389:0:52" + }, + "scope": 21153, + "src": "323:67:52", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21154, + "src": "136:256:52" + } + ], + "src": "51:342:52" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "exportedSymbols": { + "IEtherToken": [ + 21153 + ] + }, + "id": 21154, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21129, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:52" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./IERC20Token.sol", + "id": 21130, + "nodeType": "ImportDirective", + "scope": 21154, + "sourceUnit": 21128, + "src": "75:27:52", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21131, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "161:11:52", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21132, + "nodeType": "InheritanceSpecifier", + "src": "161:11:52" + } + ], + "contractDependencies": [ + 21127 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21153, + "linearizedBaseContracts": [ + 21153, + 21127 + ], + "name": "IEtherToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "d0e30db0", + "id": 21135, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21133, + "nodeType": "ParameterList", + "parameters": [], + "src": "195:2:52" + }, + "returnParameters": { + "id": 21134, + "nodeType": "ParameterList", + "parameters": [], + "src": "214:0:52" + }, + "scope": 21153, + "src": "179:36:52", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2e1a7d4d", + "id": 21140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21137, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21140, + "src": "238:15:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "238:7:52", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "237:17:52" + }, + "returnParameters": { + "id": 21139, + "nodeType": "ParameterList", + "parameters": [], + "src": "263:0:52" + }, + "scope": 21153, + "src": "220:44:52", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b760faf9", + "id": 21145, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "depositTo", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21142, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21145, + "src": "288:11:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21141, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "288:7:52", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:13:52" + }, + "returnParameters": { + "id": 21144, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:52" + }, + "scope": 21153, + "src": "269:49:52", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "205c2878", + "id": 21152, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTo", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21147, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21152, + "src": "343:19:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 21146, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "343:15:52", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21149, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21152, + "src": "364:15:52", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "364:7:52", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "342:38:52" + }, + "returnParameters": { + "id": 21151, + "nodeType": "ParameterList", + "parameters": [], + "src": "389:0:52" + }, + "scope": 21153, + "src": "323:67:52", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21154, + "src": "136:256:52" + } + ], + "src": "51:342:52" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.836Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json b/apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json new file mode 100644 index 00000000..3ed7bac9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json @@ -0,0 +1,55374 @@ +{ + "contractName": "ILegacyConverter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "change", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"change\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":\"ILegacyConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./IConversionPathFinder.sol\";\r\nimport \"./converter/interfaces/IConverter.sol\";\r\nimport \"./converter/interfaces/IConverterAnchor.sol\";\r\nimport \"./converter/interfaces/IBancorFormula.sol\";\r\nimport \"./utility/ContractRegistryClient.sol\";\r\nimport \"./utility/ReentrancyGuard.sol\";\r\nimport \"./utility/TokenHolder.sol\";\r\nimport \"./utility/SafeMath.sol\";\r\nimport \"./token/interfaces/IEtherToken.sol\";\r\nimport \"./token/interfaces/ISmartToken.sol\";\r\nimport \"./bancorx/interfaces/IBancorX.sol\";\r\n\r\n// interface of older converters for backward compatibility\r\ninterface ILegacyConverter {\r\n function change(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, uint256 _minReturn) external returns (uint256);\r\n}\r\n\r\n/**\r\n * @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\r\n * It also allows for the conversion of any token in the Bancor Network to any other token in a single\r\n * transaction by providing a conversion path.\r\n *\r\n * A note on Conversion Path: Conversion path is a data structure that is used when converting a token\r\n * to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\r\n * converter and might require multiple 'hops'.\r\n * The path defines which converters should be used and what kind of conversion should be done in each step.\r\n *\r\n * The path format doesn't include complex structure; instead, it is represented by a single array\r\n * in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\r\n * In addition, the first element is always the source token.\r\n * The converter anchor is only used as a pointer to a converter (since converter addresses are more\r\n * likely to change as opposed to anchor addresses).\r\n *\r\n * Format:\r\n * [source token, converter anchor, target token, converter anchor, target token...]\r\n*/\r\ncontract BancorNetwork is TokenHolder, ContractRegistryClient, ReentrancyGuard {\r\n using SafeMath for uint256;\r\n\r\n uint256 private constant PPM_RESOLUTION = 1000000;\r\n IERC20Token private constant ETH_RESERVE_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n\r\n struct ConversionStep {\r\n IConverter converter;\r\n IConverterAnchor anchor;\r\n IERC20Token sourceToken;\r\n IERC20Token targetToken;\r\n address payable beneficiary;\r\n bool isV28OrHigherConverter;\r\n bool processAffiliateFee;\r\n }\r\n\r\n uint256 public maxAffiliateFee = 30000; // maximum affiliate-fee\r\n\r\n mapping (IERC20Token => bool) public etherTokens; // list of all supported ether tokens\r\n\r\n /**\r\n * @dev triggered when a conversion between two tokens occurs\r\n *\r\n * @param _smartToken anchor governed by the converter\r\n * @param _fromToken source ERC20 token\r\n * @param _toToken target ERC20 token\r\n * @param _fromAmount amount converted, in the source token\r\n * @param _toAmount amount returned, minus conversion fee\r\n * @param _trader wallet that initiated the trade\r\n */\r\n event Conversion(\r\n IConverterAnchor indexed _smartToken,\r\n IERC20Token indexed _fromToken,\r\n IERC20Token indexed _toToken,\r\n uint256 _fromAmount,\r\n uint256 _toAmount,\r\n address _trader\r\n );\r\n\r\n /**\r\n * @dev initializes a new BancorNetwork instance\r\n *\r\n * @param _registry address of a contract registry contract\r\n */\r\n constructor(IContractRegistry _registry) ContractRegistryClient(_registry) public {\r\n etherTokens[ETH_RESERVE_ADDRESS] = true;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to update the maximum affiliate-fee\r\n *\r\n * @param _maxAffiliateFee maximum affiliate-fee\r\n */\r\n function setMaxAffiliateFee(uint256 _maxAffiliateFee)\r\n public\r\n ownerOnly\r\n {\r\n require(_maxAffiliateFee <= PPM_RESOLUTION, \"ERR_INVALID_AFFILIATE_FEE\");\r\n maxAffiliateFee = _maxAffiliateFee;\r\n }\r\n\r\n /**\r\n * @dev allows the owner to register/unregister ether tokens\r\n *\r\n * @param _token ether token contract address\r\n * @param _register true to register, false to unregister\r\n */\r\n function registerEtherToken(IEtherToken _token, bool _register)\r\n public\r\n ownerOnly\r\n validAddress(address(_token))\r\n notThis(address(_token))\r\n {\r\n etherTokens[_token] = _register;\r\n }\r\n\r\n /**\r\n * @dev returns the conversion path between two tokens in the network\r\n * note that this method is quite expensive in terms of gas and should generally be called off-chain\r\n *\r\n * @param _sourceToken source token address\r\n * @param _targetToken target token address\r\n *\r\n * @return conversion path between the two tokens\r\n */\r\n function conversionPath(IERC20Token _sourceToken, IERC20Token _targetToken) public view returns (address[] memory) {\r\n IConversionPathFinder pathFinder = IConversionPathFinder(addressOf(CONVERSION_PATH_FINDER));\r\n return pathFinder.findPath(_sourceToken, _targetToken);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting a given amount on a given path\r\n * note that there is no support for circular paths\r\n *\r\n * @param _path conversion path (see conversion path format above)\r\n * @param _amount amount of _path[0] tokens received from the sender\r\n *\r\n * @return expected target amount\r\n */\r\n function rateByPath(address[] memory _path, uint256 _amount) public view returns (uint256) {\r\n uint256 amount;\r\n uint256 fee;\r\n uint256 supply;\r\n uint256 balance;\r\n uint32 weight;\r\n IConverter converter;\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n\r\n amount = _amount;\r\n\r\n // verify that the number of elements is larger than 2 and odd\r\n require(_path.length > 2 && _path.length % 2 == 1, \"ERR_INVALID_PATH\");\r\n\r\n // iterate over the conversion path\r\n for (uint256 i = 2; i < _path.length; i += 2) {\r\n IERC20Token sourceToken = IERC20Token(_path[i - 2]);\r\n address anchor = _path[i - 1];\r\n IERC20Token targetToken = IERC20Token(_path[i]);\r\n\r\n converter = IConverter(payable(IConverterAnchor(anchor).owner()));\r\n\r\n // backward compatibility\r\n sourceToken = getConverterTokenAddress(converter, sourceToken);\r\n targetToken = getConverterTokenAddress(converter, targetToken);\r\n\r\n if (address(targetToken) == anchor) { // buy the smart token\r\n // check if the current smart token has changed\r\n if (i < 3 || anchor != _path[i - 3])\r\n supply = ISmartToken(anchor).totalSupply();\r\n\r\n // get the amount & the conversion fee\r\n balance = converter.getConnectorBalance(sourceToken);\r\n (, weight, , , ) = converter.connectors(sourceToken);\r\n amount = formula.purchaseTargetAmount(supply, balance, weight, amount);\r\n fee = amount.mul(converter.conversionFee()).div(PPM_RESOLUTION);\r\n amount -= fee;\r\n\r\n // update the smart token supply for the next iteration\r\n supply = supply.add(amount);\r\n }\r\n else if (address(sourceToken) == anchor) { // sell the smart token\r\n // check if the current smart token has changed\r\n if (i < 3 || anchor != _path[i - 3])\r\n supply = ISmartToken(anchor).totalSupply();\r\n\r\n // get the amount & the conversion fee\r\n balance = converter.getConnectorBalance(targetToken);\r\n (, weight, , , ) = converter.connectors(targetToken);\r\n amount = formula.saleTargetAmount(supply, balance, weight, amount);\r\n fee = amount.mul(converter.conversionFee()).div(PPM_RESOLUTION);\r\n amount -= fee;\r\n\r\n // update the smart token supply for the next iteration\r\n supply = supply.sub(amount);\r\n }\r\n else { // cross reserve conversion\r\n (amount, fee) = getReturn(converter, sourceToken, targetToken, amount);\r\n }\r\n }\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev converts the token to any other token in the bancor network by following\r\n * a predefined conversion path and transfers the result tokens to a target account\r\n * affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\r\n * @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\r\n * @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function convertByPath(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee)\r\n public\r\n payable\r\n protected\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n // verify that the path contrains at least a single 'hop' and that the number of elements is odd\r\n require(_path.length > 2 && _path.length % 2 == 1, \"ERR_INVALID_PATH\");\r\n\r\n // validate msg.value and prepare the source token for the conversion\r\n handleSourceToken(IERC20Token(_path[0]), IConverterAnchor(_path[1]), _amount);\r\n\r\n // check if affiliate fee is enabled\r\n bool affiliateFeeEnabled = false;\r\n if (address(_affiliateAccount) == address(0)) {\r\n require(_affiliateFee == 0, \"ERR_INVALID_AFFILIATE_FEE\");\r\n }\r\n else {\r\n require(0 < _affiliateFee && _affiliateFee <= maxAffiliateFee, \"ERR_INVALID_AFFILIATE_FEE\");\r\n affiliateFeeEnabled = true;\r\n }\r\n\r\n // check if beneficiary is set\r\n address payable beneficiary = msg.sender;\r\n if (_beneficiary != address(0))\r\n beneficiary = _beneficiary;\r\n\r\n // convert and get the resulting amount\r\n ConversionStep[] memory data = createConversionData(_path, beneficiary, affiliateFeeEnabled);\r\n uint256 amount = doConversion(data, _amount, _minReturn, _affiliateAccount, _affiliateFee);\r\n\r\n // handle the conversion target tokens\r\n handleTargetToken(data, amount, beneficiary);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev converts any other token to BNT in the bancor network by following\r\n a predefined conversion path and transfers the result to an account on a different blockchain\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _targetBlockchain blockchain BNT will be issued on\r\n * @param _targetAccount address/account on the target blockchain to send the BNT to\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\r\n *\r\n * @return the amount of BNT received from this conversion\r\n */\r\n function xConvert(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n bytes32 _targetBlockchain,\r\n bytes32 _targetAccount,\r\n uint256 _conversionId\r\n )\r\n public\r\n payable\r\n returns (uint256)\r\n {\r\n return xConvert2(_path, _amount, _minReturn, _targetBlockchain, _targetAccount, _conversionId, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev converts any other token to BNT in the bancor network by following\r\n a predefined conversion path and transfers the result to an account on a different blockchain\r\n * note that the network should already have been given allowance of the source token (if not ETH)\r\n *\r\n * @param _path conversion path, see conversion path format above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _targetBlockchain blockchain BNT will be issued on\r\n * @param _targetAccount address/account on the target blockchain to send the BNT to\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\r\n * @param _affiliateAccount affiliate account\r\n * @param _affiliateFee affiliate fee in PPM\r\n *\r\n * @return the amount of BNT received from this conversion\r\n */\r\n function xConvert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n bytes32 _targetBlockchain,\r\n bytes32 _targetAccount,\r\n uint256 _conversionId,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n IERC20Token targetToken = IERC20Token(_path[_path.length - 1]);\r\n IBancorX bancorX = IBancorX(addressOf(BANCOR_X));\r\n\r\n // verify that the destination token is BNT\r\n require(targetToken == IERC20Token(addressOf(BNT_TOKEN)), \"ERR_INVALID_TARGET_TOKEN\");\r\n\r\n // convert and get the resulting amount\r\n uint256 amount = convertByPath(_path, _amount, _minReturn, payable(address(this)), _affiliateAccount, _affiliateFee);\r\n\r\n // grant BancorX allowance\r\n ensureAllowance(targetToken, address(bancorX), amount);\r\n\r\n // transfer the resulting amount to BancorX\r\n bancorX.xTransfer(_targetBlockchain, _targetAccount, amount, _conversionId);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev allows a user to convert a token that was sent from another blockchain into any other\r\n * token on the BancorNetwork\r\n * ideally this transaction is created before the previous conversion is even complete, so\r\n * so the input amount isn't known at that point - the amount is actually take from the\r\n * BancorX contract directly by specifying the conversion id\r\n *\r\n * @param _path conversion path\r\n * @param _bancorX address of the BancorX contract for the source token\r\n * @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function completeXConversion(address[] memory _path, IBancorX _bancorX, uint256 _conversionId, uint256 _minReturn, address payable _beneficiary)\r\n public returns (uint256)\r\n {\r\n // verify that the source token is the BancorX token\r\n require(IERC20Token(_path[0]) == _bancorX.token(), \"ERR_INVALID_SOURCE_TOKEN\");\r\n\r\n // get conversion amount from BancorX contract\r\n uint256 amount = _bancorX.getXTransferAmount(_conversionId, msg.sender);\r\n\r\n // perform the conversion\r\n return convertByPath(_path, amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev executes the actual conversion by following the conversion path\r\n *\r\n * @param _data conversion data, see ConversionStep struct above\r\n * @param _amount amount to convert from, in the source token\r\n * @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\r\n * @param _affiliateAccount affiliate account\r\n * @param _affiliateFee affiliate fee in PPM\r\n *\r\n * @return amount of tokens received from the conversion\r\n */\r\n function doConversion(\r\n ConversionStep[] memory _data,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n ) private returns (uint256) {\r\n uint256 toAmount;\r\n uint256 fromAmount = _amount;\r\n\r\n // iterate over the conversion data\r\n for (uint256 i = 0; i < _data.length; i++) {\r\n ConversionStep memory stepData = _data[i];\r\n\r\n // newer converter\r\n if (stepData.isV28OrHigherConverter) {\r\n // transfer the tokens to the converter only if the network contract currently holds the tokens\r\n // not needed with ETH or if it's the first conversion step\r\n if (i != 0 && _data[i - 1].beneficiary == address(this) && !etherTokens[stepData.sourceToken])\r\n safeTransfer(stepData.sourceToken, address(stepData.converter), fromAmount);\r\n }\r\n // older converter\r\n // if the source token is the smart token, no need to do any transfers as the converter controls it\r\n else if (stepData.sourceToken != ISmartToken(address(stepData.anchor))) {\r\n // grant allowance for it to transfer the tokens from the network contract\r\n ensureAllowance(stepData.sourceToken, address(stepData.converter), fromAmount);\r\n }\r\n\r\n // do the conversion\r\n if (!stepData.isV28OrHigherConverter)\r\n toAmount = ILegacyConverter(address(stepData.converter)).change(stepData.sourceToken, stepData.targetToken, fromAmount, 1);\r\n else if (etherTokens[stepData.sourceToken])\r\n toAmount = stepData.converter.convert{ value: msg.value }(stepData.sourceToken, stepData.targetToken, fromAmount, msg.sender, stepData.beneficiary);\r\n else\r\n toAmount = stepData.converter.convert(stepData.sourceToken, stepData.targetToken, fromAmount, msg.sender, stepData.beneficiary);\r\n\r\n // pay affiliate-fee if needed\r\n if (stepData.processAffiliateFee) {\r\n uint256 affiliateAmount = toAmount.mul(_affiliateFee).div(PPM_RESOLUTION);\r\n require(stepData.targetToken.transfer(_affiliateAccount, affiliateAmount), \"ERR_FEE_TRANSFER_FAILED\");\r\n toAmount -= affiliateAmount;\r\n }\r\n\r\n emit Conversion(stepData.anchor, stepData.sourceToken, stepData.targetToken, fromAmount, toAmount, msg.sender);\r\n fromAmount = toAmount;\r\n }\r\n\r\n // ensure the trade meets the minimum requested amount\r\n require(toAmount >= _minReturn, \"ERR_RETURN_TOO_LOW\");\r\n\r\n return toAmount;\r\n }\r\n\r\n /**\r\n * @dev validates msg.value and prepares the conversion source token for the conversion\r\n *\r\n * @param _sourceToken source token of the first conversion step\r\n * @param _anchor converter anchor of the first conversion step\r\n * @param _amount amount to convert from, in the source token\r\n */\r\n function handleSourceToken(IERC20Token _sourceToken, IConverterAnchor _anchor, uint256 _amount) private {\r\n IConverter firstConverter = IConverter(payable(_anchor.owner()));\r\n bool isNewerConverter = isV28OrHigherConverter(firstConverter);\r\n\r\n // ETH\r\n if (msg.value > 0) {\r\n // validate msg.value\r\n require(msg.value == _amount, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n\r\n // EtherToken converter - deposit the ETH into the EtherToken\r\n // note that it can still be a non ETH converter if the path is wrong\r\n // but such conversion will simply revert\r\n if (!isNewerConverter)\r\n IEtherToken(address(getConverterEtherTokenAddress(firstConverter))).deposit{ value: msg.value }();\r\n }\r\n // EtherToken\r\n else if (etherTokens[_sourceToken]) {\r\n // claim the tokens - if the source token is ETH reserve, this call will fail\r\n // since in that case the transaction must be sent with msg.value\r\n safeTransferFrom(_sourceToken, msg.sender, address(this), _amount);\r\n\r\n // ETH converter - withdraw the ETH\r\n if (isNewerConverter)\r\n IEtherToken(address(_sourceToken)).withdraw(_amount);\r\n }\r\n // other ERC20 token\r\n else {\r\n // newer converter - transfer the tokens from the sender directly to the converter\r\n // otherwise claim the tokens\r\n if (isNewerConverter)\r\n safeTransferFrom(_sourceToken, msg.sender, address(firstConverter), _amount);\r\n else\r\n safeTransferFrom(_sourceToken, msg.sender, address(this), _amount);\r\n }\r\n }\r\n\r\n /**\r\n * @dev handles the conversion target token if the network still holds it at the end of the conversion\r\n *\r\n * @param _data conversion data, see ConversionStep struct above\r\n * @param _amount conversion target amount\r\n * @param _beneficiary wallet to receive the conversion result\r\n */\r\n function handleTargetToken(ConversionStep[] memory _data, uint256 _amount, address payable _beneficiary) private {\r\n ConversionStep memory stepData = _data[_data.length - 1];\r\n\r\n // network contract doesn't hold the tokens, do nothing\r\n if (stepData.beneficiary != address(this))\r\n return;\r\n\r\n IERC20Token targetToken = stepData.targetToken;\r\n\r\n // ETH / EtherToken\r\n if (etherTokens[targetToken]) {\r\n // newer converter should send ETH directly to the beneficiary\r\n assert(!stepData.isV28OrHigherConverter);\r\n\r\n // EtherToken converter - withdraw the ETH and transfer to the beneficiary\r\n IEtherToken(address(targetToken)).withdrawTo(_beneficiary, _amount);\r\n }\r\n // other ERC20 token\r\n else {\r\n safeTransfer(targetToken, _beneficiary, _amount);\r\n }\r\n }\r\n\r\n /**\r\n * @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\r\n *\r\n * @param _conversionPath conversion path, see conversion path format above\r\n * @param _beneficiary wallet to receive the conversion result\r\n * @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\r\n *\r\n * @return cached conversion data to be ingested later on by the conversion flow\r\n */\r\n function createConversionData(address[] memory _conversionPath, address payable _beneficiary, bool _affiliateFeeEnabled) private view returns (ConversionStep[] memory) {\r\n ConversionStep[] memory data = new ConversionStep[](_conversionPath.length / 2);\r\n\r\n bool affiliateFeeProcessed = false;\r\n IERC20Token bntToken = IERC20Token(addressOf(BNT_TOKEN));\r\n // iterate the conversion path and create the conversion data for each step\r\n uint256 i;\r\n for (i = 0; i < _conversionPath.length - 1; i += 2) {\r\n IConverterAnchor anchor = IConverterAnchor(_conversionPath[i + 1]);\r\n IConverter converter = IConverter(payable(anchor.owner()));\r\n IERC20Token targetToken = IERC20Token(_conversionPath[i + 2]);\r\n\r\n // check if the affiliate fee should be processed in this step\r\n bool processAffiliateFee = _affiliateFeeEnabled && !affiliateFeeProcessed && targetToken == bntToken;\r\n if (processAffiliateFee)\r\n affiliateFeeProcessed = true;\r\n\r\n data[i / 2] = ConversionStep({\r\n // set the converter anchor\r\n anchor: anchor,\r\n\r\n // set the converter\r\n converter: converter,\r\n\r\n // set the source/target tokens\r\n sourceToken: IERC20Token(_conversionPath[i]),\r\n targetToken: targetToken,\r\n\r\n // requires knowledge about the next step, so initialize in the next phase\r\n beneficiary: address(0),\r\n\r\n // set flags\r\n isV28OrHigherConverter: isV28OrHigherConverter(converter),\r\n processAffiliateFee: processAffiliateFee\r\n });\r\n }\r\n\r\n // ETH support\r\n // source is ETH\r\n ConversionStep memory stepData = data[0];\r\n if (etherTokens[stepData.sourceToken]) {\r\n // newer converter - replace the source token address with ETH reserve address\r\n if (stepData.isV28OrHigherConverter)\r\n stepData.sourceToken = ETH_RESERVE_ADDRESS;\r\n // older converter - replace the source token with the EtherToken address used by the converter\r\n else\r\n stepData.sourceToken = getConverterEtherTokenAddress(stepData.converter);\r\n }\r\n\r\n // target is ETH\r\n stepData = data[data.length - 1];\r\n if (etherTokens[stepData.targetToken]) {\r\n // newer converter - replace the target token address with ETH reserve address\r\n if (stepData.isV28OrHigherConverter)\r\n stepData.targetToken = ETH_RESERVE_ADDRESS;\r\n // older converter - replace the target token with the EtherToken address used by the converter\r\n else\r\n stepData.targetToken = getConverterEtherTokenAddress(stepData.converter);\r\n }\r\n\r\n // set the beneficiary for each step\r\n for (i = 0; i < data.length; i++) {\r\n stepData = data[i];\r\n\r\n // first check if the converter in this step is newer as older converters don't even support the beneficiary argument\r\n if (stepData.isV28OrHigherConverter) {\r\n // if affiliate fee is processed in this step, beneficiary is the network contract\r\n if (stepData.processAffiliateFee)\r\n stepData.beneficiary = payable(address(this));\r\n // if it's the last step, beneficiary is the final beneficiary\r\n else if (i == data.length - 1)\r\n stepData.beneficiary = _beneficiary;\r\n // if the converter in the next step is newer, beneficiary is the next converter\r\n else if (data[i + 1].isV28OrHigherConverter)\r\n stepData.beneficiary = address(data[i + 1].converter);\r\n // the converter in the next step is older, beneficiary is the network contract\r\n else\r\n stepData.beneficiary = payable(address(this));\r\n }\r\n else {\r\n // converter in this step is older, beneficiary is the network contract\r\n stepData.beneficiary = payable(address(this));\r\n }\r\n }\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\r\n * Note that we use the non standard erc-20 interface in which `approve` has no return value so that\r\n * this function will work for both standard and non standard tokens\r\n *\r\n * @param _token token to check the allowance in\r\n * @param _spender approved address\r\n * @param _value allowance amount\r\n */\r\n function ensureAllowance(IERC20Token _token, address _spender, uint256 _value) private {\r\n uint256 allowance = _token.allowance(address(this), _spender);\r\n if (allowance < _value) {\r\n if (allowance > 0)\r\n safeApprove(_token, _spender, 0);\r\n safeApprove(_token, _spender, _value);\r\n }\r\n }\r\n\r\n // legacy - returns the address of an EtherToken used by the converter\r\n function getConverterEtherTokenAddress(IConverter _converter) private view returns (IERC20Token) {\r\n uint256 reserveCount = _converter.connectorTokenCount();\r\n for (uint256 i = 0; i < reserveCount; i++) {\r\n IERC20Token reserveTokenAddress = _converter.connectorTokens(i);\r\n if (etherTokens[reserveTokenAddress])\r\n return reserveTokenAddress;\r\n }\r\n\r\n return ETH_RESERVE_ADDRESS;\r\n }\r\n\r\n // legacy - if the token is an ether token, returns the ETH reserve address\r\n // used by the converter, otherwise returns the input token address\r\n function getConverterTokenAddress(IConverter _converter, IERC20Token _token) private view returns (IERC20Token) {\r\n if (!etherTokens[_token])\r\n return _token;\r\n\r\n if (isV28OrHigherConverter(_converter))\r\n return ETH_RESERVE_ADDRESS;\r\n\r\n return getConverterEtherTokenAddress(_converter);\r\n }\r\n\r\n bytes4 private constant GET_RETURN_FUNC_SELECTOR = bytes4(keccak256(\"getReturn(address,address,uint256)\"));\r\n\r\n // using a static call to get the return from older converters\r\n function getReturn(IConverter _dest, IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) internal view returns (uint256, uint256) {\r\n bytes memory data = abi.encodeWithSelector(GET_RETURN_FUNC_SELECTOR, _sourceToken, _targetToken, _amount);\r\n (bool success, bytes memory returnData) = address(_dest).staticcall(data);\r\n\r\n if (success) {\r\n if (returnData.length == 64) {\r\n return abi.decode(returnData, (uint256, uint256));\r\n }\r\n\r\n if (returnData.length == 32) {\r\n return (abi.decode(returnData, (uint256)), 0);\r\n }\r\n }\r\n\r\n return (0, 0);\r\n }\r\n\r\n bytes4 private constant IS_V28_OR_HIGHER_FUNC_SELECTOR = bytes4(keccak256(\"isV28OrHigher()\"));\r\n\r\n // using a static call to identify converter version\r\n // can't rely on the version number since the function had a different signature in older converters\r\n function isV28OrHigherConverter(IConverter _converter) internal view returns (bool) {\r\n bytes memory data = abi.encodeWithSelector(IS_V28_OR_HIGHER_FUNC_SELECTOR);\r\n (bool success, bytes memory returnData) = address(_converter).staticcall{ gas: 4000 }(data);\r\n\r\n if (success && returnData.length == 32) {\r\n return abi.decode(returnData, (bool));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function getReturnByPath(address[] memory _path, uint256 _amount) public view returns (uint256, uint256) {\r\n return (rateByPath(_path, _amount), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convert(address[] memory _path, uint256 _amount, uint256 _minReturn) public payable returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, address(0), address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, address(0), _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convertFor(address[] memory _path, uint256 _amount, uint256 _minReturn, address payable _beneficiary) public payable returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function convertFor2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n payable\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvert(address[] memory _path, uint256 _amount, uint256 _minReturn) public returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, address(0), address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvert2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, address(0), _affiliateAccount, _affiliateFee);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvertFor(address[] memory _path, uint256 _amount, uint256 _minReturn, address payable _beneficiary) public returns (uint256) {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, address(0), 0);\r\n }\r\n\r\n /**\r\n * @dev deprecated, backward compatibility\r\n */\r\n function claimAndConvertFor2(\r\n address[] memory _path,\r\n uint256 _amount,\r\n uint256 _minReturn,\r\n address payable _beneficiary,\r\n address _affiliateAccount,\r\n uint256 _affiliateFee\r\n )\r\n public\r\n returns (uint256)\r\n {\r\n return convertByPath(_path, _amount, _minReturn, _beneficiary, _affiliateAccount, _affiliateFee);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "exportedSymbols": { + "BancorNetwork": [ + 1976 + ], + "ILegacyConverter": [ + 26 + ] + }, + "id": 1977, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:0" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 2547, + "src": "77:37:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13341, + "src": "116:47:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13350, + "src": "165:53:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./converter/interfaces/IBancorFormula.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13178, + "src": "220:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21720, + "src": "273:46:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "./utility/ReentrancyGuard.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22243, + "src": "321:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "./utility/TokenHolder.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22576, + "src": "362:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./utility/SafeMath.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22355, + "src": "399:32:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./token/interfaces/IEtherToken.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21154, + "src": "433:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./token/interfaces/ISmartToken.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21183, + "src": "479:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./bancorx/interfaces/IBancorX.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 3552, + "src": "525:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 26, + "linearizedBaseContracts": [ + 26 + ], + "name": "ILegacyConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e5144eb", + "id": 25, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "change", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "683:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "683:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "709:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "709:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "735:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "752:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "682:89:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "790:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "789:9:0" + }, + "scope": 26, + "src": "667:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1977, + "src": "633:169:0" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 28, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1982:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 29, + "nodeType": "InheritanceSpecifier", + "src": "1982:11:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 30, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1995:22:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 31, + "nodeType": "InheritanceSpecifier", + "src": "1995:22:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 32, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "2019:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 33, + "nodeType": "InheritanceSpecifier", + "src": "2019:15:0" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 27, + "nodeType": "StructuredDocumentation", + "src": "806:1148:0", + "text": " @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\n It also allows for the conversion of any token in the Bancor Network to any other token in a single\n transaction by providing a conversion path.\n A note on Conversion Path: Conversion path is a data structure that is used when converting a token\n to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\n converter and might require multiple 'hops'.\n The path defines which converters should be used and what kind of conversion should be done in each step.\n The path format doesn't include complex structure; instead, it is represented by a single array\n in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\n In addition, the first element is always the source token.\n The converter anchor is only used as a pointer to a converter (since converter addresses are more\n likely to change as opposed to anchor addresses).\n Format:\n [source token, converter anchor, target token, converter anchor, target token...]" + }, + "fullyImplemented": true, + "id": 1976, + "linearizedBaseContracts": [ + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "BancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 36, + "libraryName": { + "contractScope": null, + "id": 34, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "2048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "2042:27:0", + "typeName": { + "id": 35, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 39, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2077:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 37, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2077:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2119:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 44, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2133:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 40, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2133:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2196:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 41, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2184:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "canonicalName": "BancorNetwork.ConversionStep", + "id": 59, + "members": [ + { + "constant": false, + "id": 46, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2281:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 45, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2312:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2312:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 50, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2346:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 49, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2346:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 52, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2380:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 51, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2380:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2414:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 56, + "mutability": "mutable", + "name": "isV28OrHigherConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2452:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 55, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2452:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 58, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2490:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 57, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2490:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "ConversionStep", + "nodeType": "StructDefinition", + "scope": 1976, + "src": "2248:274:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5d732ff2", + "id": 62, + "mutability": "mutable", + "name": "maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2530:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2530:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3330303030", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2563:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30000_by_1", + "typeString": "int_const 30000" + }, + "value": "30000" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8077ccf7", + "id": 66, + "mutability": "mutable", + "name": "etherTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2606:48:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "typeName": { + "id": 65, + "keyType": { + "contractScope": null, + "id": 63, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2615:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2606:29:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 67, + "nodeType": "StructuredDocumentation", + "src": "2703:441:0", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _smartToken anchor governed by the converter\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _fromAmount amount converted, in the source token\n @param _toAmount amount returned, minus conversion fee\n @param _trader wallet that initiated the trade" + }, + "id": 81, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 80, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 69, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3177:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 68, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3177:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3224:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 70, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3224:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 73, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3265:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 72, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3265:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "indexed": false, + "mutability": "mutable", + "name": "_fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3304:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 74, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3304:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 77, + "indexed": false, + "mutability": "mutable", + "name": "_toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3334:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 79, + "indexed": false, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3362:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 78, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3362:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3166:218:0" + }, + "src": "3150:235:0" + }, + { + "body": { + "id": 96, + "nodeType": "Block", + "src": "3625:58:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "3636:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 92, + "indexExpression": { + "argumentTypes": null, + "id": 91, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "3648:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3636:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3636:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 95, + "nodeType": "ExpressionStatement", + "src": "3636:39:0" + } + ] + }, + "documentation": { + "id": 82, + "nodeType": "StructuredDocumentation", + "src": "3393:144:0", + "text": " @dev initializes a new BancorNetwork instance\n @param _registry address of a contract registry contract" + }, + "id": 97, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "3607:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 88, + "modifierName": { + "argumentTypes": null, + "id": 86, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3584:22:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3584:33:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 97, + "src": "3555:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 83, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3555:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3554:29:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "3625:0:0" + }, + "scope": 1976, + "src": "3543:140:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "3935:136:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 106, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "3954:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 107, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3974:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3954:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3990:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3946:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "3946:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "4029:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "4047:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4029:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "4029:34:0" + } + ] + }, + "documentation": { + "id": 98, + "nodeType": "StructuredDocumentation", + "src": "3691:144:0", + "text": " @dev allows the owner to update the maximum affiliate-fee\n @param _maxAffiliateFee maximum affiliate-fee" + }, + "functionSelector": "f3bc7d2a", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 103, + "modifierName": { + "argumentTypes": null, + "id": 102, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3920:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3920:9:0" + } + ], + "name": "setMaxAffiliateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 100, + "mutability": "mutable", + "name": "_maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 117, + "src": "3869:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3868:26:0" + }, + "returnParameters": { + "id": 104, + "nodeType": "ParameterList", + "parameters": [], + "src": "3935:0:0" + }, + "scope": 1976, + "src": "3841:230:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "4474:50:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 139, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "4485:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 141, + "indexExpression": { + "argumentTypes": null, + "id": 140, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4497:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4485:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 142, + "name": "_register", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "4507:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4485:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 144, + "nodeType": "ExpressionStatement", + "src": "4485:31:0" + } + ] + }, + "documentation": { + "id": 118, + "nodeType": "StructuredDocumentation", + "src": "4079:212:0", + "text": " @dev allows the owner to register/unregister ether tokens\n @param _token ether token contract address\n @param _register true to register, false to unregister" + }, + "functionSelector": "02ef521e", + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 125, + "modifierName": { + "argumentTypes": null, + "id": 124, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "4386:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4386:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 129, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4418:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 131, + "modifierName": { + "argumentTypes": null, + "id": 126, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "4405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4405:29:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 135, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 133, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4452:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 137, + "modifierName": { + "argumentTypes": null, + "id": 132, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "4444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4444:24:0" + } + ], + "name": "registerEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4325:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 119, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "4325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 122, + "mutability": "mutable", + "name": "_register", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4345:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 121, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4324:36:0" + }, + "returnParameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4474:0:0" + }, + "scope": 1976, + "src": "4297:227:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 171, + "nodeType": "Block", + "src": "5021:175:0", + "statements": [ + { + "assignments": [ + 158 + ], + "declarations": [ + { + "constant": false, + "id": 158, + "mutability": "mutable", + "name": "pathFinder", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 171, + "src": "5032:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + }, + "typeName": { + "contractScope": null, + "id": 157, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "5032:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 164, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "name": "CONVERSION_PATH_FINDER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21539, + "src": "5099:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 160, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5089:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5089:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 159, + "name": "IConversionPathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2546, + "src": "5067:21:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConversionPathFinder_$2546_$", + "typeString": "type(contract IConversionPathFinder)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5067:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5032:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "5161:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 168, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "5175:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 165, + "name": "pathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "5141:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPath", + "nodeType": "MemberAccess", + "referencedDeclaration": 2545, + "src": "5141:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 156, + "id": 170, + "nodeType": "Return", + "src": "5134:54:0" + } + ] + }, + "documentation": { + "id": 147, + "nodeType": "StructuredDocumentation", + "src": "4532:368:0", + "text": " @dev returns the conversion path between two tokens in the network\n note that this method is quite expensive in terms of gas and should generally be called off-chain\n @param _sourceToken source token address\n @param _targetToken target token address\n @return conversion path between the two tokens" + }, + "functionSelector": "d734fa19", + "id": 172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "conversionPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4930:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 148, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4930:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4956:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 150, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4956:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:52:0" + }, + "returnParameters": { + "id": 156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 155, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "5003:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 154, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5003:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5002:18:0" + }, + "scope": 1976, + "src": "4906:290:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "5682:2762:0", + "statements": [ + { + "assignments": [ + 184 + ], + "declarations": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5693:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 185, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5693:14:0" + }, + { + "assignments": [ + 187 + ], + "declarations": [ + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5718:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5718:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 188, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5718:11:0" + }, + { + "assignments": [ + 190 + ], + "declarations": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5740:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5740:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5740:14:0" + }, + { + "assignments": [ + 193 + ], + "declarations": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5765:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5765:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 194, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5765:15:0" + }, + { + "assignments": [ + 196 + ], + "declarations": [ + { + "constant": false, + "id": 196, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5791:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 195, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5791:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 197, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5791:13:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5815:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 198, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5815:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5815:20:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5846:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 201, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "5846:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 208, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 205, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 204, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 203, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5871:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5846:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "5925:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "5934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5925:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 212, + "nodeType": "ExpressionStatement", + "src": "5925:16:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6034:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6049:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6034:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6054:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6054:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6054:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6074:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6054:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6034:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "6026:70:0" + }, + { + "body": { + "id": 457, + "nodeType": "Block", + "src": "6200:2211:0", + "statements": [ + { + "assignments": [ + 241 + ], + "declarations": [ + { + "constant": false, + "id": 241, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6215:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 249, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 243, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6253:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 244, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6259:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6263:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6253:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 242, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6241:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6241:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6215:51:0" + }, + { + "assignments": [ + 251 + ], + "declarations": [ + { + "constant": false, + "id": 251, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6281:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6281:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 257, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 252, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6298:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 256, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6304:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6308:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6304:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6298:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6281:29:0" + }, + { + "assignments": [ + 259 + ], + "declarations": [ + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6325:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 258, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 265, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 261, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6363:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 263, + "indexExpression": { + "argumentTypes": null, + "id": 262, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6363:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 260, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6325:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6389:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6420:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "6420:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6412:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6412:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6412:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 267, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "6401:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "6389:65:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 278, + "nodeType": "ExpressionStatement", + "src": "6389:65:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 279, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6510:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 281, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6549:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 282, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6560:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 280, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6524:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6524:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6510:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 285, + "nodeType": "ExpressionStatement", + "src": "6510:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 286, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6587:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 288, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6626:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 289, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6637:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 287, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6601:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6601:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6587:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "6587:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 295, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6678:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6670:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 370, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7480:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7472:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 372, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7496:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7472:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 454, + "nodeType": "Block", + "src": "8267:133:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 443, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 444, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8323:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 445, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "8314:13:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8340:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 448, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "8351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 449, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "8364:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 450, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8377:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 446, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "8330:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8330:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "8314:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 453, + "nodeType": "ExpressionStatement", + "src": "8314:70:0" + } + ] + }, + "id": 455, + "nodeType": "IfStatement", + "src": "7468:932:0", + "trueBody": { + "id": 442, + "nodeType": "Block", + "src": "7504:744:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 374, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7616:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7620:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7616:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 377, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7625:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 378, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "7635:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 382, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 379, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7641:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7645:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7641:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7635:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7625:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7616:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 393, + "nodeType": "IfStatement", + "src": "7612:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 385, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7670:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7691:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 386, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "7679:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "7679:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7670:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "7670:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 394, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7789:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 397, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7829:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 395, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7799:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "7799:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7799:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7789:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 400, + "nodeType": "ExpressionStatement", + "src": "7789:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 401, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7863:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 402, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7860:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 405, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7900:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 403, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7879:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7879:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7879:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7860:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "7860:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7931:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7965:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 413, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7973:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 414, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 415, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7990:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7940:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7940:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7940:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7931:66:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 418, + "nodeType": "ExpressionStatement", + "src": "7931:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 419, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8016:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 427, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "8064:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8033:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8033:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8033:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 420, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8022:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "8022:10:0", + "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": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "8022:41:0", + "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": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8016:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 430, + "nodeType": "ExpressionStatement", + "src": "8016:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 431, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8098:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 432, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8098:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 434, + "nodeType": "ExpressionStatement", + "src": "8098:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 435, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 438, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8225:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 436, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8214:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8214:10:0", + "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": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8214:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8205:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 441, + "nodeType": "ExpressionStatement", + "src": "8205:27:0" + } + ] + } + }, + "id": 456, + "nodeType": "IfStatement", + "src": "6666:1734:0", + "trueBody": { + "id": 367, + "nodeType": "Block", + "src": "6702:747:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 299, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6813:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6813:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6822:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 303, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 304, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6838:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6842:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6838:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6832:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6822:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6813:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 318, + "nodeType": "IfStatement", + "src": "6809:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 310, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "6867:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 312, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6888:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 311, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6867:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 317, + "nodeType": "ExpressionStatement", + "src": "6867:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "6986:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 322, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 320, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6996:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "6996:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6996:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 325, + "nodeType": "ExpressionStatement", + "src": "6986:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 326, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 327, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7057:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 330, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7097:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 328, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7076:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7076:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7076:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7057:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 333, + "nodeType": "ExpressionStatement", + "src": "7057:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7128:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 337, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7166:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 338, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7174:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 339, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7191:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7137:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "7137:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7128:70:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "7128:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 344, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7217:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 352, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "7265:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 347, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "7234:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7234:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "7223:10:0", + "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": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "7223:41:0", + "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": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7217:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 355, + "nodeType": "ExpressionStatement", + "src": "7217:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 356, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7299:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 357, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7309:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7299:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ExpressionStatement", + "src": "7299:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7406:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7415:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "7415:10:0", + "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": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7406:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "7406:27:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6174:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6178:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6174:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 458, + "initializationExpression": { + "assignments": [ + 229 + ], + "declarations": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 458, + "src": "6159:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6159:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 231, + "initialValue": { + "argumentTypes": null, + "hexValue": "32", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6159:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 236, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6192:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "6192:6:0" + }, + "nodeType": "ForStatement", + "src": "6154:2257:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 459, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8430:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 182, + "id": 460, + "nodeType": "Return", + "src": "8423:13:0" + } + ] + }, + "documentation": { + "id": 173, + "nodeType": "StructuredDocumentation", + "src": "5204:381:0", + "text": " @dev returns the expected target amount of converting a given amount on a given path\n note that there is no support for circular paths\n @param _path conversion path (see conversion path format above)\n @param _amount amount of _path[0] tokens received from the sender\n @return expected target amount" + }, + "functionSelector": "7f9c0ecd", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rateByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 176, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5611:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5611:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 175, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5611:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5635:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5610:41:0" + }, + "returnParameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5673:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5673:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5672:9:0" + }, + "scope": 1976, + "src": "5591:2853:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 597, + "nodeType": "Block", + "src": "9948:1329:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10073:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10073:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10088:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10073:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 491, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10093:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10093:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10108:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10093:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10093:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10073:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10065:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10065:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 500, + "nodeType": "ExpressionStatement", + "src": "10065:70:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 503, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10257:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 505, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10263:1:0", + "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": "10257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 502, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "10245:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 508, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10285:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10291:1:0", + "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": "10285:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 507, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "10268:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 512, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "10296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 501, + "name": "handleSourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1110, + "src": "10227:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor,uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10227:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 514, + "nodeType": "ExpressionStatement", + "src": "10227:77:0" + }, + { + "assignments": [ + 516 + ], + "declarations": [ + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10363:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 515, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10363:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10390:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "10363:32:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 521, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "10418:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10410:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10448:1:0", + "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": 524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10440:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10410:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 551, + "nodeType": "Block", + "src": "10550:159:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10573:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10577:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10573:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 540, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10594:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "10611:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10594:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10573:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10628:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10565:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "10565:91:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 547, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "10671:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10671:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 550, + "nodeType": "ExpressionStatement", + "src": "10671:26:0" + } + ] + }, + "id": 552, + "nodeType": "IfStatement", + "src": "10406:303:0", + "trueBody": { + "id": 535, + "nodeType": "Block", + "src": "10452:83:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 529, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10475:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10492:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10475:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10495:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 528, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10467:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10467:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10467:56:0" + } + ] + } + }, + { + "assignments": [ + 554 + ], + "declarations": [ + { + "constant": false, + "id": 554, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10761:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10761:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 557, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 555, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10791:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:40:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 558, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10816:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10840:1:0", + "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": 560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10832:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10816:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 568, + "nodeType": "IfStatement", + "src": "10812:71:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 564, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "10857:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 565, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10871:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10857:26:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 567, + "nodeType": "ExpressionStatement", + "src": "10857:26:0" + } + }, + { + "assignments": [ + 572 + ], + "declarations": [ + { + "constant": false, + "id": 572, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10945:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 570, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "10945:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 578, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10997:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "11017:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 573, + "name": "createConversionData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "10976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_address_payable_$_t_bool_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address payable,bool) view returns (struct BancorNetwork.ConversionStep memory[] memory)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10976:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10945:92:0" + }, + { + "assignments": [ + 580 + ], + "declarations": [ + { + "constant": false, + "id": 580, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "11048:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 588, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11078:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "11084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "11093:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 585, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "11105:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 586, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "11124:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 581, + "name": "doConversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "11065:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,uint256,address,uint256) returns (uint256)" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11048:90:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 590, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11217:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 591, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 592, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11231:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 589, + "name": "handleTargetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1174, + "src": "11199:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,address payable)" + } + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11199:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 594, + "nodeType": "ExpressionStatement", + "src": "11199:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 595, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11263:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 485, + "id": 596, + "nodeType": "Return", + "src": "11256:13:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8452:1150:0", + "text": " @dev converts the token to any other token in the bancor network by following\n a predefined conversion path and transfers the result tokens to a target account\n affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\n @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\n @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\n @return amount of tokens received from the conversion" + }, + "functionSelector": "b77d239b", + "id": 598, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 479, + "modifierName": { + "argumentTypes": null, + "id": 478, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9869:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "9904:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 482, + "modifierName": { + "argumentTypes": null, + "id": 480, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9888:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9888:27:0" + } + ], + "name": "convertByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 466, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9641:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9641:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 465, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9674:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 470, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9700:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9700:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 472, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9729:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9729:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 474, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9768:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 473, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9768:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 476, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9804:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9804:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9630:196:0" + }, + "returnParameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9934:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9933:9:0" + }, + "scope": 1976, + "src": "9608:1669:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 631, + "nodeType": "Block", + "src": "12548:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 618, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "12576:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 619, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 604, + "src": "12583:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 620, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "12604:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "12623:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 612, + "src": "12639:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:1:0", + "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": 625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12654:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 617, + "name": "xConvert2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "12566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,bytes32,bytes32,uint256,address,uint256) returns (uint256)" + } + }, + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12566:102:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 616, + "id": 630, + "nodeType": "Return", + "src": "12559:109:0" + } + ] + }, + "documentation": { + "id": 599, + "nodeType": "StructuredDocumentation", + "src": "11285:978:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "c52173de", + "id": 632, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "xConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 602, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12297:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 600, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12297:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 601, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 604, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12330:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 603, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 606, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12356:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 608, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12385:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 607, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12421:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12421:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 612, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12454:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12286:196:0" + }, + "returnParameters": { + "id": 616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 615, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12534:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12533:9:0" + }, + "scope": 1976, + "src": "12269:407:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "14166:739:0", + "statements": [ + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14177:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 658, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14177:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 661, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14215:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 662, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14221:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14221:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14236:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14221:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14215:23:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 660, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14203:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14203:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14177:62:0" + }, + { + "assignments": [ + 670 + ], + "declarations": [ + { + "constant": false, + "id": 670, + "mutability": "mutable", + "name": "bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14250:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 669, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "14250:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 676, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "BANCOR_X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21554, + "src": "14288:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 672, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14278:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14278:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 671, + "name": "IBancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3551, + "src": "14269:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorX_$3551_$", + "typeString": "type(contract IBancorX)" + } + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14269:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14250:48:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 678, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14372:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 681, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "14409:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 680, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14399:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14399:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 679, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14387:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14372:48:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5441524745545f544f4b454e", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14422:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + }, + "value": "ERR_INVALID_TARGET_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + } + ], + "id": 677, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "ExpressionStatement", + "src": "14364:85:0" + }, + { + "assignments": [ + 689 + ], + "declarations": [ + { + "constant": false, + "id": 689, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14511:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 688, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14511:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 704, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 691, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14542:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "14549:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 693, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14558:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14586:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 696, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14578:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14570:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 701, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "14594:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 702, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14613:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 690, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "14528:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14528:99:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14511:116:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 706, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14692:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 709, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + ], + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14705:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 711, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14723:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 705, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14676:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14676:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "14676:54:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "14814:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "14833:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14849:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 720, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "14857:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 714, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3541, + "src": "14796:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14796:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "14796:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 657, + "id": 724, + "nodeType": "Return", + "src": "14884:13:0" + } + ] + }, + "documentation": { + "id": 633, + "nodeType": "StructuredDocumentation", + "src": "12684:1091:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "cb32564e", + "id": 726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 653, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14122:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 654, + "modifierName": { + "argumentTypes": null, + "id": 652, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "14106:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "14106:27:0" + } + ], + "name": "xConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13810:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13810:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 635, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13810:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 638, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13843:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13869:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 642, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13898:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 641, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 644, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13934:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13967:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13999:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13999:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14035:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14035:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13799:264:0" + }, + "returnParameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 656, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14152:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14151:9:0" + }, + "scope": 1976, + "src": "13781:1124:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 777, + "nodeType": "Block", + "src": "16040:423:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 745, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16133:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 747, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16139:1:0", + "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": "16133:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 744, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "16121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16121:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16146:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 3530, + "src": "16146:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16146:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "16121:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f534f555243455f544f4b454e", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16164:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + }, + "value": "ERR_INVALID_SOURCE_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + } + ], + "id": 743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16113:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16113:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 755, + "nodeType": "ExpressionStatement", + "src": "16113:78:0" + }, + { + "assignments": [ + 757 + ], + "declarations": [ + { + "constant": false, + "id": 757, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 777, + "src": "16260:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16260:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 764, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 760, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 734, + "src": "16305:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16320:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16320:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 758, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16277:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getXTransferAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3550, + "src": "16277:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view external returns (uint256)" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16277:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16260:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 766, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16400:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 767, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 757, + "src": "16407:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 768, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "16415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 738, + "src": "16427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:1:0", + "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": 771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 770, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16441:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16453:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 765, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "16386:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16386:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 742, + "id": 776, + "nodeType": "Return", + "src": "16379:76:0" + } + ] + }, + "documentation": { + "id": 727, + "nodeType": "StructuredDocumentation", + "src": "14913:937:0", + "text": " @dev allows a user to convert a token that was sent from another blockchain into any other\n token on the BancorNetwork\n ideally this transaction is created before the previous conversion is even complete, so\n so the input amount isn't known at that point - the amount is actually take from the\n BancorX contract directly by specifying the conversion id\n @param _path conversion path\n @param _bancorX address of the BancorX contract for the source token\n @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received from the conversion" + }, + "functionSelector": "89f9cc61", + "id": 778, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "completeXConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 730, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15885:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15885:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 729, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15885:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 732, + "mutability": "mutable", + "name": "_bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15909:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 731, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "15909:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 734, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15928:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 736, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15951:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 738, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15971:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 737, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15971:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15884:116:0" + }, + "returnParameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "16026:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16025:9:0" + }, + "scope": 1976, + "src": "15856:607:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "17298:2483:0", + "statements": [ + { + "assignments": [ + 796 + ], + "declarations": [ + { + "constant": false, + "id": 796, + "mutability": "mutable", + "name": "toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17309:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 797, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "17309:16:0" + }, + { + "assignments": [ + 799 + ], + "declarations": [ + { + "constant": false, + "id": 799, + "mutability": "mutable", + "name": "fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 801, + "initialValue": { + "argumentTypes": null, + "id": 800, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "17357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17336:28:0" + }, + { + "body": { + "id": 986, + "nodeType": "Block", + "src": "17465:2151:0", + "statements": [ + { + "assignments": [ + 814 + ], + "declarations": [ + { + "constant": false, + "id": 814, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 986, + "src": "17480:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 813, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 818, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17513:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17519:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17480:41:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17574:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "17574:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 855, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 860, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18235:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "18235:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18227:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 857, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "18215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18215:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "18191:61:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 877, + "nodeType": "IfStatement", + "src": "18187:272:0", + "trueBody": { + "id": 876, + "nodeType": "Block", + "src": "18254:205:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18381:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18411:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18411:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18403:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 873, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18432:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 865, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "18365:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18365:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "18365:78:0" + } + ] + } + }, + "id": 878, + "nodeType": "IfStatement", + "src": "17570:889:0", + "trueBody": { + "id": 854, + "nodeType": "Block", + "src": "17607:416:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 821, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17820:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17825:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17820:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17830:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 828, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17836:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17840:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17836:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17830:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "17830:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 832, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17866:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17858:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "17830:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:51:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "17875:34:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 836, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "17876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 837, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 838, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17876:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:89:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 853, + "nodeType": "IfStatement", + "src": "17816:191:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17945:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17945:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 847, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17975:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "17975:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17967:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 850, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "17996:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 842, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "17932:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17932:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "17932:75:0" + } + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18513:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18514:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "18514:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 900, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "18710:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 903, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 901, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18722:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18722:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18710:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 923, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18946:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 927, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18984:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18984:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 929, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19006:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19006:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 931, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19028:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19040:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19040:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 934, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19052:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "19052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 924, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18957:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18957:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18957:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18957:116:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18946:127:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "18946:127:0" + }, + "id": 939, + "nodeType": "IfStatement", + "src": "18706:367:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 904, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18762:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 911, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18820:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18820:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 913, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18842:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 915, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18864:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 916, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18876:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18876:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 918, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "18888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 905, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18773:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18773:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18808:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "18773:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$value", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18773:136:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18762:147:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "18762:147:0" + } + }, + "id": 940, + "nodeType": "IfStatement", + "src": "18509:564:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 882, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18564:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 891, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18628:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18628:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 893, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18650:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18650:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18684:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 886, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18600:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18600:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18592:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 883, + "name": "ILegacyConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "18575:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILegacyConverter_$26_$", + "typeString": "type(contract ILegacyConverter)" + } + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILegacyConverter_$26", + "typeString": "contract ILegacyConverter" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "change", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "18575:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256) external returns (uint256)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:111:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18564:122:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 899, + "nodeType": "ExpressionStatement", + "src": "18564:122:0" + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 941, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19138:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "19138:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 968, + "nodeType": "IfStatement", + "src": "19134:308:0", + "trueBody": { + "id": 967, + "nodeType": "Block", + "src": "19168:274:0", + "statements": [ + { + "assignments": [ + 944 + ], + "declarations": [ + { + "constant": false, + "id": 944, + "mutability": "mutable", + "name": "affiliateAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 967, + "src": "19187:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 950, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "19245:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 947, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "19226:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 945, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19213:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19213:12:0", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19213:31:0", + "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": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19187:73:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 957, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 788, + "src": "19317:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 958, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19336:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 954, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19287:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19287:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 21106, + "src": "19287:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19287:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4645455f5452414e534645525f4641494c4544", + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19354:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + }, + "value": "ERR_FEE_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + } + ], + "id": 953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19279:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19279:101:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 962, + "nodeType": "ExpressionStatement", + "src": "19279:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 963, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19399:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 964, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19411:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19399:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 966, + "nodeType": "ExpressionStatement", + "src": "19399:27:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 970, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19474:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "19474:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 972, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "19491:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 974, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 975, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19513:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 976, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19535:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 977, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19557:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19557:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 969, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "19463:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (contract IConverterAnchor,contract IERC20Token,contract IERC20Token,uint256,uint256,address)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19463:105:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 981, + "nodeType": "EmitStatement", + "src": "19458:110:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19583:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 983, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19596:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19583:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 985, + "nodeType": "ExpressionStatement", + "src": "19583:21:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 806, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17442:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 807, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17446:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17446:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17442:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 987, + "initializationExpression": { + "assignments": [ + 803 + ], + "declarations": [ + { + "constant": false, + "id": 803, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 987, + "src": "17427:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 805, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17439:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17427:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17460:3:0", + "subExpression": { + "argumentTypes": null, + "id": 810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17460:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "17460:3:0" + }, + "nodeType": "ForStatement", + "src": "17422:2194:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 989, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19700:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 786, + "src": "19712:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19700:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19724:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 988, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19692:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 994, + "nodeType": "ExpressionStatement", + "src": "19692:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 995, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19765:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 794, + "id": 996, + "nodeType": "Return", + "src": "19758:15:0" + } + ] + }, + "documentation": { + "id": 779, + "nodeType": "StructuredDocumentation", + "src": "16471:603:0", + "text": " @dev executes the actual conversion by following the conversion path\n @param _data conversion data, see ConversionStep struct above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return amount of tokens received from the conversion" + }, + "id": 998, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17112:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 780, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17112:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 781, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17112:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17178:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17178:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17207:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17207:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17243:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17101:170:0" + }, + "returnParameters": { + "id": 794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17289:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17288:9:0" + }, + "scope": 1976, + "src": "17080:2701:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1109, + "nodeType": "Block", + "src": "20232:1606:0", + "statements": [ + { + "assignments": [ + 1009 + ], + "declarations": [ + { + "constant": false, + "id": 1009, + "mutability": "mutable", + "name": "firstConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20243:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1008, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "20243:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1018, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1013, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1003, + "src": "20290:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "20290:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20282:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20282:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20282:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1010, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "20271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20243:64:0" + }, + { + "assignments": [ + 1020 + ], + "declarations": [ + { + "constant": false, + "id": 1020, + "mutability": "mutable", + "name": "isNewerConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20318:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1024, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1022, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20365:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1021, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "20342:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20342:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20318:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20413:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1055, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "20955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1057, + "indexExpression": { + "argumentTypes": null, + "id": 1056, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "20967:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20955:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1106, + "nodeType": "Block", + "src": "21447:384:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1082, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21605:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1095, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21770:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21784:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21784:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1100, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21804:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21796:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21811:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1094, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21753:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21753:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1104, + "nodeType": "ExpressionStatement", + "src": "21753:66:0" + }, + "id": 1105, + "nodeType": "IfStatement", + "src": "21601:218:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21657:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21671:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21671:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1089, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "21691:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21683:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1091, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1083, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21640:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:76:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "21640:76:0" + } + } + ] + }, + "id": 1107, + "nodeType": "IfStatement", + "src": "20951:880:0", + "trueBody": { + "id": 1081, + "nodeType": "Block", + "src": "20982:420:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21184:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1060, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1064, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21218:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21210:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1066, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21225:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21167:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21167:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1068, + "nodeType": "ExpressionStatement", + "src": "21167:66:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1069, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21303:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1080, + "nodeType": "IfStatement", + "src": "21299:91:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1073, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21358:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21350:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1070, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "21338:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21140, + "src": "21338:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "21338:52:0" + } + } + ] + } + }, + "id": 1108, + "nodeType": "IfStatement", + "src": "20409:1422:0", + "trueBody": { + "id": 1054, + "nodeType": "Block", + "src": "20428:485:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20486:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20486:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1032, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "20499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20486:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20508:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 1029, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20478:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20478:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1036, + "nodeType": "ExpressionStatement", + "src": "20478:56:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20768:17:0", + "subExpression": { + "argumentTypes": null, + "id": 1037, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "20769:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1053, + "nodeType": "IfStatement", + "src": "20764:137:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1043, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20854:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1042, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "20824:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20816:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1039, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "20804:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 21135, + "src": "20804:75:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$", + "typeString": "function () payable external" + } + }, + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20888:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20888:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "20804:95:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$value", + "typeString": "function () payable external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:97:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "20804:97:0" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 999, + "nodeType": "StructuredDocumentation", + "src": "19789:333:0", + "text": " @dev validates msg.value and prepares the conversion source token for the conversion\n @param _sourceToken source token of the first conversion step\n @param _anchor converter anchor of the first conversion step\n @param _amount amount to convert from, in the source token" + }, + "id": 1110, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleSourceToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1001, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20155:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1000, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20181:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1002, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "20181:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1005, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20207:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20207:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20154:69:0" + }, + "returnParameters": { + "id": 1007, + "nodeType": "ParameterList", + "parameters": [], + "src": "20232:0:0" + }, + "scope": 1976, + "src": "20128:1710:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "22295:780:0", + "statements": [ + { + "assignments": [ + 1122 + ], + "declarations": [ + { + "constant": false, + "id": 1122, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22306:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1121, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22306:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1129, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1123, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1128, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1124, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22345:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22345:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22360:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22345:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22339:23:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22306:56:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22444:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "22444:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1134, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "22476:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22468:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22444:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1138, + "nodeType": "IfStatement", + "src": "22440:63:0", + "trueBody": { + "expression": null, + "functionReturnParameters": 1120, + "id": 1137, + "nodeType": "Return", + "src": "22496:7:0" + } + }, + { + "assignments": [ + 1140 + ], + "declarations": [ + { + "constant": false, + "id": 1140, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22515:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1139, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22515:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1143, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1141, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22541:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "22541:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22515:46:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1144, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "22607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1146, + "indexExpression": { + "argumentTypes": null, + "id": 1145, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22619:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22607:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1171, + "nodeType": "Block", + "src": "22993:75:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "23021:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1167, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "23034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1168, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "23048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1165, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "23008:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23008:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1170, + "nodeType": "ExpressionStatement", + "src": "23008:48:0" + } + ] + }, + "id": 1172, + "nodeType": "IfStatement", + "src": "22603:465:0", + "trueBody": { + "id": 1164, + "nodeType": "Block", + "src": "22633:315:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22731:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1148, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "22732:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1147, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "22724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22724:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1152, + "nodeType": "ExpressionStatement", + "src": "22724:40:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1160, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "22914:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1161, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "22928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1156, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22889:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22881:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1153, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "22869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "22869:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1163, + "nodeType": "ExpressionStatement", + "src": "22869:67:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1111, + "nodeType": "StructuredDocumentation", + "src": "21846:330:0", + "text": " @dev handles the conversion target token if the network still holds it at the end of the conversion\n @param _data conversion data, see ConversionStep struct above\n @param _amount conversion target amount\n @param _beneficiary wallet to receive the conversion result" + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTargetToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1114, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22209:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1112, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22209:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1113, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22209:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22240:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1118, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22257:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22257:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22208:78:0" + }, + "returnParameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [], + "src": "22295:0:0" + }, + "scope": 1976, + "src": "22182:893:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1467, + "nodeType": "Block", + "src": "23760:4093:0", + "statements": [ + { + "assignments": [ + 1191 + ], + "declarations": [ + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23771:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1189, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23771:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1190, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23771:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1200, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1195, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "23823:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23823:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23848:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "23823:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "23802:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct BancorNetwork.ConversionStep memory[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1192, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23806:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1193, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23806:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23802:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23771:79:0" + }, + { + "assignments": [ + 1202 + ], + "declarations": [ + { + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "affiliateFeeProcessed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23863:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23863:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1204, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23892:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23863:34:0" + }, + { + "assignments": [ + 1206 + ], + "declarations": [ + { + "constant": false, + "id": 1206, + "mutability": "mutable", + "name": "bntToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23908:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1205, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23908:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1212, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1209, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "23953:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1208, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "23943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23943:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1207, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "23931:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23931:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23908:56:0" + }, + { + "assignments": [ + 1214 + ], + "declarations": [ + { + "constant": false, + "id": 1214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "24060:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1215, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24060:9:0" + }, + { + "body": { + "id": 1303, + "nodeType": "Block", + "src": "24132:1199:0", + "statements": [ + { + "assignments": [ + 1231 + ], + "declarations": [ + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24147:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1230, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24147:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1239, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24190:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24206:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24210:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24206:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24190:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1232, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "24173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24173:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24147:66:0" + }, + { + "assignments": [ + 1241 + ], + "declarations": [ + { + "constant": false, + "id": 1241, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24228:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1240, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "24228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1245, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24270:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "24270:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24270:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24262:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24262:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24262:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1242, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "24251:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24251:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24228:58:0" + }, + { + "assignments": [ + 1252 + ], + "declarations": [ + { + "constant": false, + "id": 1252, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24301:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1251, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24301:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1260, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24339:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1258, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1255, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24355:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24359:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24355:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24339:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1253, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24327:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24327:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24301:61:0" + }, + { + "assignments": [ + 1262 + ], + "declarations": [ + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24455:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1261, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "24455:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1271, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1263, + "name": "_affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "24482:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "24506:22:0", + "subExpression": { + "argumentTypes": null, + "id": 1264, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24507:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1267, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24532:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1268, + "name": "bntToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "24547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "24532:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:73:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24455:100:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1272, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "24574:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1277, + "nodeType": "IfStatement", + "src": "24570:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1273, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24612:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24636:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "24612:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1276, + "nodeType": "ExpressionStatement", + "src": "24612:28:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1278, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "24657:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1282, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1279, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24662:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24662:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24657:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1284, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24758:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 1285, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "24834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1287, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24938:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1289, + "indexExpression": { + "argumentTypes": null, + "id": 1288, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24954:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24938:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1286, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24926:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24989:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25134:1:0", + "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": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25126:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1297, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "25234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1296, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "25211:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25211:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1299, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "25284:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1283, + "name": "ConversionStep", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "24671:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ConversionStep_$59_storage_ptr_$", + "typeString": "type(struct BancorNetwork.ConversionStep storage pointer)" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "anchor", + "converter", + "sourceToken", + "targetToken", + "beneficiary", + "isV28OrHigherConverter", + "processAffiliateFee" + ], + "nodeType": "FunctionCall", + "src": "24671:648:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "24657:662:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "24657:662:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24092:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1221, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24096:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24096:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24096:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24092:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1304, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1216, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24089:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "24085:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24124:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24129:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1229, + "nodeType": "ExpressionStatement", + "src": "24124:6:0" + }, + "nodeType": "ForStatement", + "src": "24080:1251:0" + }, + { + "assignments": [ + 1306 + ], + "declarations": [ + { + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "25393:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1305, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "25393:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1310, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1307, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25426:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1309, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25431:1:0", + "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": "25426:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25393:40:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1311, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "25448:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1314, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1312, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25460:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25448:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1334, + "nodeType": "IfStatement", + "src": "25444:472:0", + "trueBody": { + "id": 1333, + "nodeType": "Block", + "src": "25483:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1315, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25594:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1316, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "25594:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25832:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1327, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "25885:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1326, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "25855:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25855:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25832:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "25832:72:0" + }, + "id": 1332, + "nodeType": "IfStatement", + "src": "25590:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1317, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25644:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "25667:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25644:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1322, + "nodeType": "ExpressionStatement", + "src": "25644:42:0" + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1335, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25954:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1336, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25965:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1341, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1337, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25970:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25984:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25970:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25965:21:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "25954:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "25954:32:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1344, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "26001:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1347, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1345, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26013:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1367, + "nodeType": "IfStatement", + "src": "25997:472:0", + "trueBody": { + "id": 1366, + "nodeType": "Block", + "src": "26036:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1348, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26147:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1356, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26385:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26385:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1360, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26438:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "26438:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1359, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "26408:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26408:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26385:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1364, + "nodeType": "ExpressionStatement", + "src": "26385:72:0" + }, + "id": 1365, + "nodeType": "IfStatement", + "src": "26143:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26197:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1352, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26197:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1353, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "26220:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26197:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1355, + "nodeType": "ExpressionStatement", + "src": "26197:42:0" + } + } + ] + } + }, + { + "body": { + "id": 1463, + "nodeType": "Block", + "src": "26561:1261:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1379, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26576:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1380, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26587:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1382, + "indexExpression": { + "argumentTypes": null, + "id": 1381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "26576:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1384, + "nodeType": "ExpressionStatement", + "src": "26576:18:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1385, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26746:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26746:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1461, + "nodeType": "Block", + "src": "27642:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1449, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27750:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1456, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27789:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27781:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27773:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27773:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27750:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "27750:45:0" + } + ] + }, + "id": 1462, + "nodeType": "IfStatement", + "src": "26742:1069:0", + "trueBody": { + "id": 1448, + "nodeType": "Block", + "src": "26779:844:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1387, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26902:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1388, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "26902:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1401, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27106:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1402, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27111:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27111:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27125:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27111:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1413, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27310:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1417, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1414, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27315:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27319:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27315:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1418, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "27310:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1433, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27562:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27562:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1440, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27601:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27593:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27585:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27585:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27585:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27562:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1444, + "nodeType": "ExpressionStatement", + "src": "27562:45:0" + }, + "id": 1445, + "nodeType": "IfStatement", + "src": "27306:301:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1419, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27367:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27367:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1424, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27398:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1428, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27403:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27407:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27403:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27398:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "27398:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1422, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27390:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27367:53:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1432, + "nodeType": "ExpressionStatement", + "src": "27367:53:0" + } + }, + "id": 1446, + "nodeType": "IfStatement", + "src": "27102:505:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1407, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27149:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27149:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1410, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "27172:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27149:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "27149:35:0" + } + }, + "id": 1447, + "nodeType": "IfStatement", + "src": "26898:709:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1389, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26953:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "26953:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1396, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26992:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26984:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26976:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26976:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26976:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26953:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1400, + "nodeType": "ExpressionStatement", + "src": "26953:45:0" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1372, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26539:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26543:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26539:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1464, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1368, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26532:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26536:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26532:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1371, + "nodeType": "ExpressionStatement", + "src": "26532:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "26556:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1376, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26556:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1378, + "nodeType": "ExpressionStatement", + "src": "26556:3:0" + }, + "nodeType": "ForStatement", + "src": "26527:1295:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1465, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27841:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "functionReturnParameters": 1187, + "id": 1466, + "nodeType": "Return", + "src": "27834:11:0" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "23083:503:0", + "text": " @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\n @param _conversionPath conversion path, see conversion path format above\n @param _beneficiary wallet to receive the conversion result\n @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\n @return cached conversion data to be ingested later on by the conversion flow" + }, + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConversionData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "_conversionPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23622:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23622:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1177, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1180, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23656:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23656:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1182, + "mutability": "mutable", + "name": "_affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23686:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1181, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23686:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23621:91:0" + }, + "returnParameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23735:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1184, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23735:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1185, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23735:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23734:25:0" + }, + "scope": 1976, + "src": "23592:4261:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1510, + "nodeType": "Block", + "src": "28406:261:0", + "statements": [ + { + "assignments": [ + 1479 + ], + "declarations": [ + { + "constant": false, + "id": 1479, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1510, + "src": "28417:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "28462:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28454:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1486, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28469:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1480, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 21097, + "src": "28437:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28437:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28417:61:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1489, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28493:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1490, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28505:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28493:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1509, + "nodeType": "IfStatement", + "src": "28489:171:0", + "trueBody": { + "id": 1508, + "nodeType": "Block", + "src": "28513:147:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1492, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28532:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28544:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28532:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1501, + "nodeType": "IfStatement", + "src": "28528:68:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28576:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1497, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28584:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28594:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1495, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28564:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28564:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "28564:32:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1503, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28623:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1504, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28631:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1505, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1502, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28611:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28611:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1507, + "nodeType": "ExpressionStatement", + "src": "28611:37:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "27861:452:0", + "text": " @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\n Note that we use the non standard erc-20 interface in which `approve` has no return value so that\n this function will work for both standard and non standard tokens\n @param _token token to check the allowance in\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 1511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ensureAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28344:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1470, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28344:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1473, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28364:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28364:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1475, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28343:54:0" + }, + "returnParameters": { + "id": 1477, + "nodeType": "ParameterList", + "parameters": [], + "src": "28406:0:0" + }, + "scope": 1976, + "src": "28319:348:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1551, + "nodeType": "Block", + "src": "28848:352:0", + "statements": [ + { + "assignments": [ + 1519 + ], + "declarations": [ + { + "constant": false, + "id": 1519, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1551, + "src": "28859:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28859:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1523, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1520, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "28882:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "28882:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28882:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28859:55:0" + }, + { + "body": { + "id": 1547, + "nodeType": "Block", + "src": "28968:186:0", + "statements": [ + { + "assignments": [ + 1535 + ], + "declarations": [ + { + "constant": false, + "id": 1535, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1547, + "src": "28983:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1534, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28983:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "29044:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "29017:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "29017:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29017:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28983:63:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1541, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29065:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1543, + "indexExpression": { + "argumentTypes": null, + "id": 1542, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29077:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1546, + "nodeType": "IfStatement", + "src": "29061:81:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1544, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29123:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1545, + "nodeType": "Return", + "src": "29116:26:0" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1528, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28945:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1529, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1519, + "src": "28949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1548, + "initializationExpression": { + "assignments": [ + 1525 + ], + "declarations": [ + { + "constant": false, + "id": 1525, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1548, + "src": "28930:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1527, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28942:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28930:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28963:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1531, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28963:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1533, + "nodeType": "ExpressionStatement", + "src": "28963:3:0" + }, + "nodeType": "ForStatement", + "src": "28925:229:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29173:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1550, + "nodeType": "Return", + "src": "29166:26:0" + } + ] + }, + "documentation": null, + "id": 1552, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterEtherTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1514, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1513, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28790:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1512, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "28790:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28789:23:0" + }, + "returnParameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1516, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28835:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1515, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28835:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28834:13:0" + }, + "scope": 1976, + "src": "28751:449:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1578, + "nodeType": "Block", + "src": "29474:224:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "29489:20:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1561, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29490:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1563, + "indexExpression": { + "argumentTypes": null, + "id": 1562, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29490:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1567, + "nodeType": "IfStatement", + "src": "29485:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1565, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29531:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1566, + "nodeType": "Return", + "src": "29524:13:0" + } + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29577:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1568, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "29554:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29554:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1573, + "nodeType": "IfStatement", + "src": "29550:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1571, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29610:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1572, + "nodeType": "Return", + "src": "29603:26:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1574, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "29649:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29649:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1577, + "nodeType": "Return", + "src": "29642:48:0" + } + ] + }, + "documentation": null, + "id": 1579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1554, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29396:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1553, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29396:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29419:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1555, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29419:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29395:43:0" + }, + "returnParameters": { + "id": 1560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1559, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29461:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1558, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29461:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29460:13:0" + }, + "scope": 1976, + "src": "29362:336:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 1587, + "mutability": "constant", + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "29706:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1580, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "67657452657475726e28616464726573732c616464726573732c75696e7432353629", + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29774:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + }, + "value": "getReturn(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + } + ], + "id": 1583, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "29764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29764:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1581, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29757:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1663, + "nodeType": "Block", + "src": "30036:523:0", + "statements": [ + { + "assignments": [ + 1603 + ], + "declarations": [ + { + "constant": false, + "id": 1603, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30047:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1602, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1606, + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "30090:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 1607, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "30116:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1608, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "30130:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "30144:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1604, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30067:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30067:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30067:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30047:105:0" + }, + { + "assignments": [ + 1613, + 1615 + ], + "declarations": [ + { + "constant": false, + "id": 1613, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30164:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1612, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30164:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1615, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30178:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1614, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1623, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "30231:4:0", + "typeDescriptions": { + "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": 1618, + "name": "_dest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "30213:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30205:25:0", + "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": 1622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30163:73:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1624, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1613, + "src": "30253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1658, + "nodeType": "IfStatement", + "src": "30249:277:0", + "trueBody": { + "id": 1657, + "nodeType": "Block", + "src": "30262:264:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1625, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30281:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30302:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "30281:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1640, + "nodeType": "IfStatement", + "src": "30277:113:0", + "trueBody": { + "id": 1639, + "nodeType": "Block", + "src": "30306:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1631, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30343:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + { + "argumentTypes": null, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1636, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30355:18:0", + "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": 1629, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30332:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30332:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30332:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 1601, + "id": 1638, + "nodeType": "Return", + "src": "30325:49:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1641, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30410:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30410:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30431:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "30410:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1656, + "nodeType": "IfStatement", + "src": "30406:109:0", + "trueBody": { + "id": 1655, + "nodeType": "Block", + "src": "30435:80:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1647, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30473:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1648, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1650, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30485:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 1645, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30462:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30462:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30462:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30497:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30461:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1654, + "nodeType": "Return", + "src": "30454:45:0" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30546:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30549:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$", + "typeString": "tuple(int_const 0,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1662, + "nodeType": "Return", + "src": "30538:13:0" + } + ] + }, + "documentation": null, + "id": 1664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "mutability": "mutable", + "name": "_dest", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29908:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1588, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29908:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29926:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1590, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29952:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1592, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29978:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29978:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29907:87:0" + }, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1598, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30018:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1600, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30027:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30027:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30017:18:0" + }, + "scope": 1976, + "src": "29889:670:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 1672, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "30567:93:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1665, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30567:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 1669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30641:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 1668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "30631:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30631:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1666, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30624:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1718, + "nodeType": "Block", + "src": "30917:336:0", + "statements": [ + { + "assignments": [ + 1680 + ], + "declarations": [ + { + "constant": false, + "id": 1680, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "30928:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1679, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30928:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1685, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1683, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30971:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 1681, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30948:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30948:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30948:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30928:74:0" + }, + { + "assignments": [ + 1687, + 1689 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31014:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1686, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31014:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1689, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31028:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1688, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31028:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1697, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "31099:4:0", + "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": 1692, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "31063:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31055:30:0", + "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": 1696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31092:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "31055:43:0", + "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": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31013:91:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1700, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "31121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1701, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31132:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31153:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "31132:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31121:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1715, + "nodeType": "IfStatement", + "src": "31117:104:0", + "trueBody": { + "id": 1714, + "nodeType": "Block", + "src": "31157:64:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1708, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31190:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 1709, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1711, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31202:6:0", + "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": 1706, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "31179:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31179:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31179:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1678, + "id": 1713, + "nodeType": "Return", + "src": "31172:37:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31240:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1678, + "id": 1717, + "nodeType": "Return", + "src": "31233:12:0" + } + ] + }, + "documentation": null, + "id": 1719, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1673, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "30865:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30864:23:0" + }, + "returnParameters": { + "id": 1678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30911:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1676, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30911:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30910:6:0" + }, + "scope": 1976, + "src": "30833:420:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "31432:57:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1733, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "31462:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1734, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "31469:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1732, + "name": "rateByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "31451:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256) view returns (uint256)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31451:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31479:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1737, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31450:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1731, + "id": 1738, + "nodeType": "Return", + "src": "31443:38:0" + } + ] + }, + "documentation": { + "id": 1720, + "nodeType": "StructuredDocumentation", + "src": "31261:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0c8496cc", + "id": 1740, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1726, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31352:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31352:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1722, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31352:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1725, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31376:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1724, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31351:41:0" + }, + "returnParameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1728, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31414:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1727, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31414:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1730, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31423:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31423:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31413:18:0" + }, + "scope": 1976, + "src": "31327:162:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1768, + "nodeType": "Block", + "src": "31674:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1754, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1744, + "src": "31706:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1755, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1746, + "src": "31713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1756, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "31722:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31742:1:0", + "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": 1758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31734:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31754:1:0", + "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": 1762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1761, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31746:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31758:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1753, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "31692:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31692:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1752, + "id": 1767, + "nodeType": "Return", + "src": "31685:75:0" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "31497:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f3898a97", + "id": 1769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1744, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31580:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31580:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1743, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31580:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1746, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31604:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1745, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31604:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1748, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31621:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31579:61:0" + }, + "returnParameters": { + "id": 1752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31665:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1750, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31664:9:0" + }, + "scope": 1976, + "src": "31563:205:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1798, + "nodeType": "Block", + "src": "32088:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "32120:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "32127:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1789, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1777, + "src": "32136:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32156:1:0", + "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": 1791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32148:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1794, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "32160:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1795, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "32179:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1786, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32106:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32106:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1785, + "id": 1797, + "nodeType": "Return", + "src": "32099:94:0" + } + ] + }, + "documentation": { + "id": 1770, + "nodeType": "StructuredDocumentation", + "src": "31776:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "569706eb", + "id": 1799, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1773, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31870:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31870:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1772, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31870:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1775, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31903:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31929:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1776, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31929:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1779, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31958:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31958:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1781, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31994:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31859:163:0" + }, + "returnParameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1784, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "32074:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32073:9:0" + }, + "scope": 1976, + "src": "31842:359:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1826, + "nodeType": "Block", + "src": "32419:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "32451:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1816, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1805, + "src": "32458:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1817, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1807, + "src": "32467:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1818, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "32479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32501:1:0", + "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": 1820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1819, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32493:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32505:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1814, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32437:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32437:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1813, + "id": 1825, + "nodeType": "Return", + "src": "32430:77:0" + } + ] + }, + "documentation": { + "id": 1800, + "nodeType": "StructuredDocumentation", + "src": "32209:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c98fefed", + "id": 1827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32295:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32295:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1802, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32295:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1805, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32319:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1809, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32356:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1808, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32356:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:91:0" + }, + "returnParameters": { + "id": 1813, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1812, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32410:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32409:9:0" + }, + "scope": 1976, + "src": "32275:240:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1858, + "nodeType": "Block", + "src": "32914:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1850, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1831, + "src": "32946:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1851, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "32953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1852, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32962:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1853, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "32974:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1854, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "32988:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1855, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "33007:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1849, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32932:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32932:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1848, + "id": 1857, + "nodeType": "Return", + "src": "32925:96:0" + } + ] + }, + "documentation": { + "id": 1828, + "nodeType": "StructuredDocumentation", + "src": "32523:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "ab6214ce", + "id": 1859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1844, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1845, + "modifierName": { + "argumentTypes": null, + "id": 1843, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "32854:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "32854:27:0" + } + ], + "name": "convertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32620:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1829, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32620:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1830, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32620:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32653:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32653:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1835, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32679:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32708:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32708:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32747:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32747:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32783:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32609:202:0" + }, + "returnParameters": { + "id": 1848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32900:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32900:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32899:9:0" + }, + "scope": 1976, + "src": "32589:440:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1887, + "nodeType": "Block", + "src": "33214:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1863, + "src": "33246:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1865, + "src": "33253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1875, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1867, + "src": "33262:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33282:1:0", + "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": 1877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33274:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33294:1:0", + "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": 1881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33286:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33298:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1872, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33232:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1871, + "id": 1886, + "nodeType": "Return", + "src": "33225:75:0" + } + ] + }, + "documentation": { + "id": 1860, + "nodeType": "StructuredDocumentation", + "src": "33037:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c7ba24bc", + "id": 1888, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1863, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33128:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1861, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33128:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1862, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33128:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1867, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33169:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33169:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33127:61:0" + }, + "returnParameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33205:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33204:9:0" + }, + "scope": 1976, + "src": "33103:205:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1917, + "nodeType": "Block", + "src": "33619:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1906, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "33651:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1907, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1894, + "src": "33658:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1896, + "src": "33667:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33687:1:0", + "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": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1909, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33679:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1913, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1898, + "src": "33691:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1914, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "33710:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1905, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33637:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33637:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1904, + "id": 1916, + "nodeType": "Return", + "src": "33630:94:0" + } + ] + }, + "documentation": { + "id": 1889, + "nodeType": "StructuredDocumentation", + "src": "33316:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "e57738e5", + "id": 1918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1892, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33418:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33418:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1891, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33418:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33451:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33451:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1896, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33477:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1898, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33506:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33506:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1900, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33542:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33542:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33407:163:0" + }, + "returnParameters": { + "id": 1904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33605:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33605:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33604:9:0" + }, + "scope": 1976, + "src": "33382:350:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1945, + "nodeType": "Block", + "src": "33950:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1934, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1922, + "src": "33982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1935, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1924, + "src": "33989:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1936, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "33998:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1937, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1928, + "src": "34010:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34032:1:0", + "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": 1939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34024:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34036:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1933, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33968:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1932, + "id": 1944, + "nodeType": "Return", + "src": "33961:77:0" + } + ] + }, + "documentation": { + "id": 1919, + "nodeType": "StructuredDocumentation", + "src": "33740:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "b1e9932b", + "id": 1946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33834:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1921, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1924, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1926, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33875:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33875:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1928, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33895:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33895:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33833:91:0" + }, + "returnParameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33941:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33941:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33940:9:0" + }, + "scope": 1976, + "src": "33806:240:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1974, + "nodeType": "Block", + "src": "34399:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "34431:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1967, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "34438:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1968, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "34447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1969, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1956, + "src": "34459:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1970, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "34473:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1971, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "34492:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1965, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "34417:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34417:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1964, + "id": 1973, + "nodeType": "Return", + "src": "34410:96:0" + } + ] + }, + "documentation": { + "id": 1947, + "nodeType": "StructuredDocumentation", + "src": "34054:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "2978c10e", + "id": 1975, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34159:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34159:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1949, + "length": null, + "nodeType": "ArrayTypeName", + "src": "34159:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1952, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34192:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34192:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34218:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34218:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1956, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34247:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34247:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1958, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34286:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34286:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1960, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34322:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34322:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34148:202:0" + }, + "returnParameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34384:9:0" + }, + "scope": 1976, + "src": "34120:394:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1977, + "src": "1956:32561:0" + } + ], + "src": "52:34467:0" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "exportedSymbols": { + "BancorNetwork": [ + 1976 + ], + "ILegacyConverter": [ + 26 + ] + }, + "id": 1977, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:0" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol", + "file": "./IConversionPathFinder.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 2547, + "src": "77:37:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./converter/interfaces/IConverter.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13341, + "src": "116:47:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./converter/interfaces/IConverterAnchor.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13350, + "src": "165:53:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol", + "file": "./converter/interfaces/IBancorFormula.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 13178, + "src": "220:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "./utility/ContractRegistryClient.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21720, + "src": "273:46:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "./utility/ReentrancyGuard.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22243, + "src": "321:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "./utility/TokenHolder.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22576, + "src": "362:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./utility/SafeMath.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 22355, + "src": "399:32:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol", + "file": "./token/interfaces/IEtherToken.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21154, + "src": "433:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./token/interfaces/ISmartToken.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 21183, + "src": "479:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol", + "file": "./bancorx/interfaces/IBancorX.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1977, + "sourceUnit": 3552, + "src": "525:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 26, + "linearizedBaseContracts": [ + 26 + ], + "name": "ILegacyConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e5144eb", + "id": 25, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "change", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "683:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "683:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "709:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "709:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "735:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "735:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "752:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "682:89:0" + }, + "returnParameters": { + "id": 24, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 23, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 25, + "src": "790:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "789:9:0" + }, + "scope": 26, + "src": "667:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1977, + "src": "633:169:0" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 28, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22575, + "src": "1982:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22575", + "typeString": "contract TokenHolder" + } + }, + "id": 29, + "nodeType": "InheritanceSpecifier", + "src": "1982:11:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 30, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "1995:22:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 31, + "nodeType": "InheritanceSpecifier", + "src": "1995:22:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 32, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "2019:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 33, + "nodeType": "InheritanceSpecifier", + "src": "2019:15:0" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 27, + "nodeType": "StructuredDocumentation", + "src": "806:1148:0", + "text": " @dev The BancorNetwork contract is the main entry point for Bancor token conversions.\n It also allows for the conversion of any token in the Bancor Network to any other token in a single\n transaction by providing a conversion path.\n A note on Conversion Path: Conversion path is a data structure that is used when converting a token\n to another token in the Bancor Network, when the conversion cannot necessarily be done by a single\n converter and might require multiple 'hops'.\n The path defines which converters should be used and what kind of conversion should be done in each step.\n The path format doesn't include complex structure; instead, it is represented by a single array\n in which each 'hop' is represented by a 2-tuple - converter anchor & target token.\n In addition, the first element is always the source token.\n The converter anchor is only used as a pointer to a converter (since converter addresses are more\n likely to change as opposed to anchor addresses).\n Format:\n [source token, converter anchor, target token, converter anchor, target token...]" + }, + "fullyImplemented": true, + "id": 1976, + "linearizedBaseContracts": [ + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "BancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 36, + "libraryName": { + "contractScope": null, + "id": 34, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "2048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "2042:27:0", + "typeName": { + "id": 35, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 39, + "mutability": "constant", + "name": "PPM_RESOLUTION", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2077:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 37, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2077:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2119:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 44, + "mutability": "constant", + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2133:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 40, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2133:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2196:42:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 41, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2184:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "canonicalName": "BancorNetwork.ConversionStep", + "id": 59, + "members": [ + { + "constant": false, + "id": 46, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2281:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 45, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "2281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2312:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 47, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2312:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 50, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2346:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 49, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2346:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 52, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2380:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 51, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2380:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2414:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2414:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 56, + "mutability": "mutable", + "name": "isV28OrHigherConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2452:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 55, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2452:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 58, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 59, + "src": "2490:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 57, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2490:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "ConversionStep", + "nodeType": "StructDefinition", + "scope": 1976, + "src": "2248:274:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5d732ff2", + "id": 62, + "mutability": "mutable", + "name": "maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2530:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2530:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3330303030", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2563:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30000_by_1", + "typeString": "int_const 30000" + }, + "value": "30000" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8077ccf7", + "id": 66, + "mutability": "mutable", + "name": "etherTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "2606:48:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "typeName": { + "id": 65, + "keyType": { + "contractScope": null, + "id": 63, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2615:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "2606:29:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 67, + "nodeType": "StructuredDocumentation", + "src": "2703:441:0", + "text": " @dev triggered when a conversion between two tokens occurs\n @param _smartToken anchor governed by the converter\n @param _fromToken source ERC20 token\n @param _toToken target ERC20 token\n @param _fromAmount amount converted, in the source token\n @param _toAmount amount returned, minus conversion fee\n @param _trader wallet that initiated the trade" + }, + "id": 81, + "name": "Conversion", + "nodeType": "EventDefinition", + "parameters": { + "id": 80, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 69, + "indexed": true, + "mutability": "mutable", + "name": "_smartToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3177:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 68, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "3177:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 71, + "indexed": true, + "mutability": "mutable", + "name": "_fromToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3224:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 70, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3224:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 73, + "indexed": true, + "mutability": "mutable", + "name": "_toToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3265:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 72, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3265:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "indexed": false, + "mutability": "mutable", + "name": "_fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3304:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 74, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3304:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 77, + "indexed": false, + "mutability": "mutable", + "name": "_toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3334:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 76, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 79, + "indexed": false, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 81, + "src": "3362:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 78, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3362:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3166:218:0" + }, + "src": "3150:235:0" + }, + { + "body": { + "id": 96, + "nodeType": "Block", + "src": "3625:58:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 90, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "3636:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 92, + "indexExpression": { + "argumentTypes": null, + "id": 91, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "3648:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3636:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3636:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 95, + "nodeType": "ExpressionStatement", + "src": "3636:39:0" + } + ] + }, + "documentation": { + "id": 82, + "nodeType": "StructuredDocumentation", + "src": "3393:144:0", + "text": " @dev initializes a new BancorNetwork instance\n @param _registry address of a contract registry contract" + }, + "id": 97, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 87, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "3607:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 88, + "modifierName": { + "argumentTypes": null, + "id": 86, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "3584:22:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3584:33:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 97, + "src": "3555:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 83, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "3555:17:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3554:29:0" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [], + "src": "3625:0:0" + }, + "scope": 1976, + "src": "3543:140:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 116, + "nodeType": "Block", + "src": "3935:136:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 106, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "3954:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 107, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3974:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3954:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3990:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3946:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3946:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "3946:72:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 112, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "4029:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 113, + "name": "_maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "4047:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4029:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 115, + "nodeType": "ExpressionStatement", + "src": "4029:34:0" + } + ] + }, + "documentation": { + "id": 98, + "nodeType": "StructuredDocumentation", + "src": "3691:144:0", + "text": " @dev allows the owner to update the maximum affiliate-fee\n @param _maxAffiliateFee maximum affiliate-fee" + }, + "functionSelector": "f3bc7d2a", + "id": 117, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 103, + "modifierName": { + "argumentTypes": null, + "id": 102, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "3920:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3920:9:0" + } + ], + "name": "setMaxAffiliateFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 100, + "mutability": "mutable", + "name": "_maxAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 117, + "src": "3869:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 99, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3868:26:0" + }, + "returnParameters": { + "id": 104, + "nodeType": "ParameterList", + "parameters": [], + "src": "3935:0:0" + }, + "scope": 1976, + "src": "3841:230:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 145, + "nodeType": "Block", + "src": "4474:50:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 139, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "4485:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 141, + "indexExpression": { + "argumentTypes": null, + "id": 140, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4497:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4485:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 142, + "name": "_register", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "4507:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4485:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 144, + "nodeType": "ExpressionStatement", + "src": "4485:31:0" + } + ] + }, + "documentation": { + "id": 118, + "nodeType": "StructuredDocumentation", + "src": "4079:212:0", + "text": " @dev allows the owner to register/unregister ether tokens\n @param _token ether token contract address\n @param _register true to register, false to unregister" + }, + "functionSelector": "02ef521e", + "id": 146, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 125, + "modifierName": { + "argumentTypes": null, + "id": 124, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "4386:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4386:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 129, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4418:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4418:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 131, + "modifierName": { + "argumentTypes": null, + "id": 126, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "4405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4405:29:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 135, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "4460:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + ], + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 133, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4452:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4452:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 137, + "modifierName": { + "argumentTypes": null, + "id": 132, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "4444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4444:24:0" + } + ], + "name": "registerEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4325:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 119, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21153, + "src": "4325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 122, + "mutability": "mutable", + "name": "_register", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 146, + "src": "4345:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 121, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4345:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4324:36:0" + }, + "returnParameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [], + "src": "4474:0:0" + }, + "scope": 1976, + "src": "4297:227:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 171, + "nodeType": "Block", + "src": "5021:175:0", + "statements": [ + { + "assignments": [ + 158 + ], + "declarations": [ + { + "constant": false, + "id": 158, + "mutability": "mutable", + "name": "pathFinder", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 171, + "src": "5032:32:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + }, + "typeName": { + "contractScope": null, + "id": 157, + "name": "IConversionPathFinder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2546, + "src": "5032:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 164, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "name": "CONVERSION_PATH_FINDER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21539, + "src": "5099:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 160, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5089:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5089:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 159, + "name": "IConversionPathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2546, + "src": "5067:21:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConversionPathFinder_$2546_$", + "typeString": "type(contract IConversionPathFinder)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5067:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5032:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 149, + "src": "5161:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 168, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "5175:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 165, + "name": "pathFinder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "5141:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConversionPathFinder_$2546", + "typeString": "contract IConversionPathFinder" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPath", + "nodeType": "MemberAccess", + "referencedDeclaration": 2545, + "src": "5141:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (address[] memory)" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5141:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 156, + "id": 170, + "nodeType": "Return", + "src": "5134:54:0" + } + ] + }, + "documentation": { + "id": 147, + "nodeType": "StructuredDocumentation", + "src": "4532:368:0", + "text": " @dev returns the conversion path between two tokens in the network\n note that this method is quite expensive in terms of gas and should generally be called off-chain\n @param _sourceToken source token address\n @param _targetToken target token address\n @return conversion path between the two tokens" + }, + "functionSelector": "d734fa19", + "id": 172, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "conversionPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4930:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 148, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4930:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "4956:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 150, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4956:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4929:52:0" + }, + "returnParameters": { + "id": 156, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 155, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 172, + "src": "5003:16:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 154, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5003:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5002:18:0" + }, + "scope": 1976, + "src": "4906:290:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "5682:2762:0", + "statements": [ + { + "assignments": [ + 184 + ], + "declarations": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5693:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 185, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5693:14:0" + }, + { + "assignments": [ + 187 + ], + "declarations": [ + { + "constant": false, + "id": 187, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5718:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5718:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 188, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5718:11:0" + }, + { + "assignments": [ + 190 + ], + "declarations": [ + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5740:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5740:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 191, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5740:14:0" + }, + { + "assignments": [ + 193 + ], + "declarations": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5765:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 192, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5765:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 194, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5765:15:0" + }, + { + "assignments": [ + 196 + ], + "declarations": [ + { + "constant": false, + "id": 196, + "mutability": "mutable", + "name": "weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5791:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 195, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "5791:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 197, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5791:13:0" + }, + { + "assignments": [ + 199 + ], + "declarations": [ + { + "constant": false, + "id": 199, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5815:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 198, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "5815:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 200, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5815:20:0" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "5846:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 201, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "5846:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 208, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 205, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 204, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5886:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 203, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5871:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5846:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 209, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "5925:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "5934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5925:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 212, + "nodeType": "ExpressionStatement", + "src": "5925:16:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 214, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6034:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6049:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6034:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 218, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6054:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6054:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6054:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6074:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6054:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6034:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6077:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "6026:70:0" + }, + { + "body": { + "id": 457, + "nodeType": "Block", + "src": "6200:2211:0", + "statements": [ + { + "assignments": [ + 241 + ], + "declarations": [ + { + "constant": false, + "id": 241, + "mutability": "mutable", + "name": "sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6215:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 249, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 243, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6253:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 247, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 244, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6259:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6263:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6253:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 242, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6241:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6241:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6215:51:0" + }, + { + "assignments": [ + 251 + ], + "declarations": [ + { + "constant": false, + "id": 251, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6281:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6281:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 257, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 252, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6298:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 256, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 253, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6304:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6308:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6304:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6298:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6281:29:0" + }, + { + "assignments": [ + 259 + ], + "declarations": [ + { + "constant": false, + "id": 259, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 457, + "src": "6325:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 258, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6325:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 265, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 261, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6363:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 263, + "indexExpression": { + "argumentTypes": null, + "id": 262, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6363:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 260, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "6351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6325:47:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 266, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6389:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "6420:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "6420:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6420:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6412:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6412:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6412:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 267, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "6401:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6401:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "6389:65:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 278, + "nodeType": "ExpressionStatement", + "src": "6389:65:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 279, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6510:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 281, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6549:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 282, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "6560:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 280, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6524:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6524:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6510:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 285, + "nodeType": "ExpressionStatement", + "src": "6510:62:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 286, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6587:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 288, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6626:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 289, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6637:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 287, + "name": "getConverterTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1579, + "src": "6601:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter,contract IERC20Token) view returns (contract IERC20Token)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6601:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6587:62:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "6587:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 295, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "6678:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 293, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6670:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6670:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 297, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6694:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6670:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 370, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7480:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7472:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7472:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 372, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7496:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7472:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 454, + "nodeType": "Block", + "src": "8267:133:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 443, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 444, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8323:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 445, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "8314:13:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8340:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "id": 448, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "8351:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 449, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "8364:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 450, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8377:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 446, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "8330:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8330:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "8314:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 453, + "nodeType": "ExpressionStatement", + "src": "8314:70:0" + } + ] + }, + "id": 455, + "nodeType": "IfStatement", + "src": "7468:932:0", + "trueBody": { + "id": 442, + "nodeType": "Block", + "src": "7504:744:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 374, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7616:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7620:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7616:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 377, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7625:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 378, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "7635:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 382, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 379, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "7641:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7645:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "7641:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7635:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7625:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7616:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 393, + "nodeType": "IfStatement", + "src": "7612:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 385, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7670:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "7691:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 386, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "7679:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "7679:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7679:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7670:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "7670:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 394, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7789:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 397, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7829:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 395, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7799:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "7799:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7799:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7789:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 400, + "nodeType": "ExpressionStatement", + "src": "7789:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 401, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7863:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 402, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7860:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 405, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 259, + "src": "7900:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 403, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7879:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7879:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7879:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7860:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "7860:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 409, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7931:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 412, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7965:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 413, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7973:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 414, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 415, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7990:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 410, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7940:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7940:24:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7940:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7931:66:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 418, + "nodeType": "ExpressionStatement", + "src": "7931:66:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 419, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8016:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 427, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "8064:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 422, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "8033:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "8033:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8033:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 420, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8022:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "8022:10:0", + "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": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "8022:41:0", + "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": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8022:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8016:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 430, + "nodeType": "ExpressionStatement", + "src": "8016:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 431, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8098:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 432, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "8108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8098:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 434, + "nodeType": "ExpressionStatement", + "src": "8098:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 435, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8205:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 438, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8225:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 436, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "8214:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8214:10:0", + "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": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8214:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8205:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 441, + "nodeType": "ExpressionStatement", + "src": "8205:27:0" + } + ] + } + }, + "id": 456, + "nodeType": "IfStatement", + "src": "6666:1734:0", + "trueBody": { + "id": 367, + "nodeType": "Block", + "src": "6702:747:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 299, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6813:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6813:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 302, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6822:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 303, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 307, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 304, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6838:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6842:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "6838:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6832:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6822:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6813:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 318, + "nodeType": "IfStatement", + "src": "6809:100:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 310, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "6867:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 312, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 251, + "src": "6888:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 311, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6876:31:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6876:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6867:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 317, + "nodeType": "ExpressionStatement", + "src": "6867:42:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "6986:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 322, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 320, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "6996:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getConnectorBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 13327, + "src": "6996:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view external returns (uint256)" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6996:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6986:52:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 325, + "nodeType": "ExpressionStatement", + "src": "6986:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + null, + { + "argumentTypes": null, + "id": 326, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + null, + null, + null + ], + "id": 327, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7057:16:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$_t_uint32_$__$__$__$", + "typeString": "tuple(,uint32,,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 330, + "name": "sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "7097:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 328, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7076:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectors", + "nodeType": "MemberAccess", + "referencedDeclaration": 13320, + "src": "7076:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "function (contract IERC20Token) view external returns (uint256,uint32,bool,bool,bool)" + } + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7076:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint32_$_t_bool_$_t_bool_$_t_bool_$", + "typeString": "tuple(uint256,uint32,bool,bool,bool)" + } + }, + "src": "7057:52:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 333, + "nodeType": "ExpressionStatement", + "src": "7057:52:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7128:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 337, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7166:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 338, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "7174:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 339, + "name": "weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7191:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 335, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "7137:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "7137:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7128:70:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "7128:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 344, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7217:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 352, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "7265:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 347, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 199, + "src": "7234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "conversionFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 13238, + "src": "7234:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint32_$", + "typeString": "function () view external returns (uint32)" + } + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7234:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 345, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "7223:10:0", + "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": 350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "7223:41:0", + "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": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7223:57:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7217:63:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 355, + "nodeType": "ExpressionStatement", + "src": "7217:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 356, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7299:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 357, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 187, + "src": "7309:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7299:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ExpressionStatement", + "src": "7299:13:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 360, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7406:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 363, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "7426:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "7415:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "7415:10:0", + "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": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:18:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7406:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "7406:27:0" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 232, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6174:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 233, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "6178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6178:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6174:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 458, + "initializationExpression": { + "assignments": [ + 229 + ], + "declarations": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 458, + "src": "6159:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6159:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 231, + "initialValue": { + "argumentTypes": null, + "hexValue": "32", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6171:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6159:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 236, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "6192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6197:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "6192:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "nodeType": "ExpressionStatement", + "src": "6192:6:0" + }, + "nodeType": "ForStatement", + "src": "6154:2257:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 459, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "8430:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 182, + "id": 460, + "nodeType": "Return", + "src": "8423:13:0" + } + ] + }, + "documentation": { + "id": 173, + "nodeType": "StructuredDocumentation", + "src": "5204:381:0", + "text": " @dev returns the expected target amount of converting a given amount on a given path\n note that there is no support for circular paths\n @param _path conversion path (see conversion path format above)\n @param _amount amount of _path[0] tokens received from the sender\n @return expected target amount" + }, + "functionSelector": "7f9c0ecd", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rateByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 176, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5611:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5611:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 175, + "length": null, + "nodeType": "ArrayTypeName", + "src": "5611:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5635:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5610:41:0" + }, + "returnParameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 181, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "5673:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5673:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5672:9:0" + }, + "scope": 1976, + "src": "5591:2853:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 597, + "nodeType": "Block", + "src": "9948:1329:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10073:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10073:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10088:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10073:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 491, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10093:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10093:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10108:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "10093:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10093:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10073:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f50415448", + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10116:18:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + }, + "value": "ERR_INVALID_PATH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_db637d0ca669449dd352e97481d5a38953b8126ef5f657bdd830d33ff33d5b16", + "typeString": "literal_string \"ERR_INVALID_PATH\"" + } + ], + "id": 486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10065:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10065:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 500, + "nodeType": "ExpressionStatement", + "src": "10065:70:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 503, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10257:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 505, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10263:1:0", + "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": "10257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 502, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "10245:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10245:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 508, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10285:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 510, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10291:1:0", + "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": "10285:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 507, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "10268:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10268:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 512, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "10296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 501, + "name": "handleSourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1110, + "src": "10227:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IConverterAnchor_$13349_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IConverterAnchor,uint256)" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10227:77:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 514, + "nodeType": "ExpressionStatement", + "src": "10227:77:0" + }, + { + "assignments": [ + 516 + ], + "declarations": [ + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10363:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 515, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "10363:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 518, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10390:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "10363:32:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 521, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "10418:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10410:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10410:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10448:1:0", + "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": 524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10440:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10440:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10410:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 551, + "nodeType": "Block", + "src": "10550:159:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10573:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 538, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10577:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10573:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 540, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10594:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 541, + "name": "maxAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 62, + "src": "10611:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10594:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10573:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10628:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 536, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10565:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "10565:91:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 547, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "10671:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10671:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 550, + "nodeType": "ExpressionStatement", + "src": "10671:26:0" + } + ] + }, + "id": 552, + "nodeType": "IfStatement", + "src": "10406:303:0", + "trueBody": { + "id": 535, + "nodeType": "Block", + "src": "10452:83:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 529, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "10475:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10492:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10475:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414646494c494154455f464545", + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10495:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + }, + "value": "ERR_INVALID_AFFILIATE_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5421a6ae0116cbc310697cd7899b77d6a7bc1fb10cd896c84c63fd20f8fbd382", + "typeString": "literal_string \"ERR_INVALID_AFFILIATE_FEE\"" + } + ], + "id": 528, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10467:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10467:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10467:56:0" + } + ] + } + }, + { + "assignments": [ + 554 + ], + "declarations": [ + { + "constant": false, + "id": 554, + "mutability": "mutable", + "name": "beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10761:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10761:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 557, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 555, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10791:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10791:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10761:40:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 558, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10816:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10840:1:0", + "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": 560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10832:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10832:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10816:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 568, + "nodeType": "IfStatement", + "src": "10812:71:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 564, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "10857:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 565, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 472, + "src": "10871:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10857:26:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 567, + "nodeType": "ExpressionStatement", + "src": "10857:26:0" + } + }, + { + "assignments": [ + 572 + ], + "declarations": [ + { + "constant": false, + "id": 572, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "10945:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 570, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "10945:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 571, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 578, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 574, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "10997:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 575, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 576, + "name": "affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "11017:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 573, + "name": "createConversionData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1468, + "src": "10976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_address_payable_$_t_bool_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (address[] memory,address payable,bool) view returns (struct BancorNetwork.ConversionStep memory[] memory)" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10976:61:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10945:92:0" + }, + { + "assignments": [ + 580 + ], + "declarations": [ + { + "constant": false, + "id": 580, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 597, + "src": "11048:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 588, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 582, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11078:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 583, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "11084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 584, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "11093:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 585, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "11105:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 586, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "11124:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 581, + "name": "doConversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "11065:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,uint256,address,uint256) returns (uint256)" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11048:90:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 590, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "11217:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + { + "argumentTypes": null, + "id": 591, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11223:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 592, + "name": "beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 554, + "src": "11231:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 589, + "name": "handleTargetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1174, + "src": "11199:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (struct BancorNetwork.ConversionStep memory[] memory,uint256,address payable)" + } + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11199:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 594, + "nodeType": "ExpressionStatement", + "src": "11199:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 595, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "11263:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 485, + "id": 596, + "nodeType": "Return", + "src": "11256:13:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8452:1150:0", + "text": " @dev converts the token to any other token in the bancor network by following\n a predefined conversion path and transfers the result tokens to a target account\n affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees)\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _beneficiary account that will receive the conversion result or 0x0 to send the result to the sender account\n @param _affiliateAccount wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\n @param _affiliateFee affiliate fee in PPM or 0 to disable affiliate fee\n @return amount of tokens received from the conversion" + }, + "functionSelector": "b77d239b", + "id": 598, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 479, + "modifierName": { + "argumentTypes": null, + "id": 478, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "9869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9869:9:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 470, + "src": "9904:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 482, + "modifierName": { + "argumentTypes": null, + "id": 480, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "9888:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9888:27:0" + } + ], + "name": "convertByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 466, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9641:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9641:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 465, + "length": null, + "nodeType": "ArrayTypeName", + "src": "9641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9674:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 470, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9700:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9700:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 472, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9729:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9729:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 474, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9768:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 473, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9768:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 476, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9804:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9804:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9630:196:0" + }, + "returnParameters": { + "id": 485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 598, + "src": "9934:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9933:9:0" + }, + "scope": 1976, + "src": "9608:1669:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 631, + "nodeType": "Block", + "src": "12548:128:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 618, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "12576:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 619, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 604, + "src": "12583:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 620, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 621, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "12604:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "12623:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 612, + "src": "12639:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12662:1:0", + "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": 625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12654:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12654:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 617, + "name": "xConvert2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 726, + "src": "12566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,bytes32,bytes32,uint256,address,uint256) returns (uint256)" + } + }, + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12566:102:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 616, + "id": 630, + "nodeType": "Return", + "src": "12559:109:0" + } + ] + }, + "documentation": { + "id": 599, + "nodeType": "StructuredDocumentation", + "src": "11285:978:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "c52173de", + "id": 632, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "xConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 602, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12297:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 600, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12297:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 601, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12297:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 604, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12330:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 603, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 606, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12356:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 605, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 608, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12385:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 607, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12421:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 609, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12421:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 612, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12454:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 611, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12286:196:0" + }, + "returnParameters": { + "id": 616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 615, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 632, + "src": "12534:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 614, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12533:9:0" + }, + "scope": 1976, + "src": "12269:407:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 725, + "nodeType": "Block", + "src": "14166:739:0", + "statements": [ + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14177:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 658, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "14177:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 661, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14215:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 662, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14221:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14221:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14236:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14221:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14215:23:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 660, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14203:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14203:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14177:62:0" + }, + { + "assignments": [ + 670 + ], + "declarations": [ + { + "constant": false, + "id": 670, + "mutability": "mutable", + "name": "bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14250:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 669, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "14250:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 676, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "BANCOR_X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21554, + "src": "14288:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 672, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14278:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14278:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 671, + "name": "IBancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3551, + "src": "14269:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorX_$3551_$", + "typeString": "type(contract IBancorX)" + } + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14269:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14250:48:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 678, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14372:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 681, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "14409:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 680, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "14399:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14399:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 679, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "14387:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "14372:48:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f5441524745545f544f4b454e", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14422:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + }, + "value": "ERR_INVALID_TARGET_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_506dba30f9da1ed4da3626f556faadafab0575131908ae8223c813a59e0707f3", + "typeString": "literal_string \"ERR_INVALID_TARGET_TOKEN\"" + } + ], + "id": 677, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "ExpressionStatement", + "src": "14364:85:0" + }, + { + "assignments": [ + 689 + ], + "declarations": [ + { + "constant": false, + "id": 689, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 725, + "src": "14511:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 688, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14511:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 704, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 691, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 636, + "src": "14542:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "14549:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 693, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14558:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14586:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 696, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14578:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14578:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14570:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14570:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 701, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "14594:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 702, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "14613:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 690, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "14528:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14528:99:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14511:116:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 706, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14692:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 709, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + ], + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14705:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 711, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14723:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 705, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "14676:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14676:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "14676:54:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 717, + "name": "_targetBlockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 642, + "src": "14814:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 718, + "name": "_targetAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 644, + "src": "14833:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14849:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 720, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 646, + "src": "14857:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 714, + "name": "bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 670, + "src": "14796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3541, + "src": "14796:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,bytes32,uint256,uint256) external" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14796:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 722, + "nodeType": "ExpressionStatement", + "src": "14796:75:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 723, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 689, + "src": "14891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 657, + "id": 724, + "nodeType": "Return", + "src": "14884:13:0" + } + ] + }, + "documentation": { + "id": 633, + "nodeType": "StructuredDocumentation", + "src": "12684:1091:0", + "text": " @dev converts any other token to BNT in the bancor network by following\na predefined conversion path and transfers the result to an account on a different blockchain\n note that the network should already have been given allowance of the source token (if not ETH)\n @param _path conversion path, see conversion path format above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _targetBlockchain blockchain BNT will be issued on\n @param _targetAccount address/account on the target blockchain to send the BNT to\n @param _conversionId pre-determined unique (if non zero) id which refers to this transaction\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return the amount of BNT received from this conversion" + }, + "functionSelector": "cb32564e", + "id": 726, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 653, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 640, + "src": "14122:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 654, + "modifierName": { + "argumentTypes": null, + "id": 652, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "14106:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "14106:27:0" + } + ], + "name": "xConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 636, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13810:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13810:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 635, + "length": null, + "nodeType": "ArrayTypeName", + "src": "13810:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 638, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13843:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 637, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13869:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13869:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 642, + "mutability": "mutable", + "name": "_targetBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13898:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 641, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 644, + "mutability": "mutable", + "name": "_targetAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13934:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 643, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13934:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 646, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13967:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 648, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "13999:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 647, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13999:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 650, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14035:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14035:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13799:264:0" + }, + "returnParameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 656, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 726, + "src": "14152:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14151:9:0" + }, + "scope": 1976, + "src": "13781:1124:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 777, + "nodeType": "Block", + "src": "16040:423:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 745, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16133:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 747, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16139:1:0", + "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": "16133:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 744, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "16121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16121:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 749, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16146:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "token", + "nodeType": "MemberAccess", + "referencedDeclaration": 3530, + "src": "16146:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function () view external returns (contract IERC20Token)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16146:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "16121:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f534f555243455f544f4b454e", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16164:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + }, + "value": "ERR_INVALID_SOURCE_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0f690a2bdb8b25e0198ca38056ef0e9f045e379ec977ffdcb1486f3c53b6e8fa", + "typeString": "literal_string \"ERR_INVALID_SOURCE_TOKEN\"" + } + ], + "id": 743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16113:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16113:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 755, + "nodeType": "ExpressionStatement", + "src": "16113:78:0" + }, + { + "assignments": [ + 757 + ], + "declarations": [ + { + "constant": false, + "id": 757, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 777, + "src": "16260:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16260:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 764, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 760, + "name": "_conversionId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 734, + "src": "16305:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16320:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16320:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 758, + "name": "_bancorX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 732, + "src": "16277:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getXTransferAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3550, + "src": "16277:27:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view external returns (uint256)" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16277:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16260:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 766, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 730, + "src": "16400:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 767, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 757, + "src": "16407:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 768, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "16415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 769, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 738, + "src": "16427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16449:1:0", + "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": 771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 770, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16441:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16441:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16453:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 765, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "16386:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16386:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 742, + "id": 776, + "nodeType": "Return", + "src": "16379:76:0" + } + ] + }, + "documentation": { + "id": 727, + "nodeType": "StructuredDocumentation", + "src": "14913:937:0", + "text": " @dev allows a user to convert a token that was sent from another blockchain into any other\n token on the BancorNetwork\n ideally this transaction is created before the previous conversion is even complete, so\n so the input amount isn't known at that point - the amount is actually take from the\n BancorX contract directly by specifying the conversion id\n @param _path conversion path\n @param _bancorX address of the BancorX contract for the source token\n @param _conversionId pre-determined unique (if non zero) id which refers to this conversion\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received from the conversion" + }, + "functionSelector": "89f9cc61", + "id": 778, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "completeXConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 730, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15885:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 728, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15885:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 729, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15885:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 732, + "mutability": "mutable", + "name": "_bancorX", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15909:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + }, + "typeName": { + "contractScope": null, + "id": 731, + "name": "IBancorX", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3551, + "src": "15909:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorX_$3551", + "typeString": "contract IBancorX" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 734, + "mutability": "mutable", + "name": "_conversionId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15928:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 736, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15951:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 738, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "15971:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 737, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15971:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15884:116:0" + }, + "returnParameters": { + "id": 742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 778, + "src": "16026:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 740, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16026:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16025:9:0" + }, + "scope": 1976, + "src": "15856:607:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 997, + "nodeType": "Block", + "src": "17298:2483:0", + "statements": [ + { + "assignments": [ + 796 + ], + "declarations": [ + { + "constant": false, + "id": 796, + "mutability": "mutable", + "name": "toAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17309:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 797, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "17309:16:0" + }, + { + "assignments": [ + 799 + ], + "declarations": [ + { + "constant": false, + "id": 799, + "mutability": "mutable", + "name": "fromAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 997, + "src": "17336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 801, + "initialValue": { + "argumentTypes": null, + "id": 800, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 784, + "src": "17357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17336:28:0" + }, + { + "body": { + "id": 986, + "nodeType": "Block", + "src": "17465:2151:0", + "statements": [ + { + "assignments": [ + 814 + ], + "declarations": [ + { + "constant": false, + "id": 814, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 986, + "src": "17480:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 813, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 818, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 815, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17513:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 817, + "indexExpression": { + "argumentTypes": null, + "id": 816, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17519:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17480:41:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17574:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "17574:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 855, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 860, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18235:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "18235:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18227:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18227:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 857, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "18215:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18215:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "18191:61:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 877, + "nodeType": "IfStatement", + "src": "18187:272:0", + "trueBody": { + "id": 876, + "nodeType": "Block", + "src": "18254:205:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18381:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18411:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18411:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 868, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18403:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18403:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 873, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18432:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 865, + "name": "ensureAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "18365:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18365:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "18365:78:0" + } + ] + } + }, + "id": 878, + "nodeType": "IfStatement", + "src": "17570:889:0", + "trueBody": { + "id": 854, + "nodeType": "Block", + "src": "17607:416:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 821, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17820:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17825:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17820:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17830:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 828, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17836:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17840:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17836:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17830:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 829, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "17830:24:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 832, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "17866:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17858:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17858:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "17830:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:51:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "17875:34:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 836, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "17876:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 837, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 838, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17876:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "17820:89:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 853, + "nodeType": "IfStatement", + "src": "17816:191:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17945:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "17945:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 847, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "17975:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "17975:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17967:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17967:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 850, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "17996:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 842, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "17932:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17932:75:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 852, + "nodeType": "ExpressionStatement", + "src": "17932:75:0" + } + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "18513:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 879, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18514:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "18514:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 900, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "18710:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 903, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 901, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18722:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 902, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18722:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18710:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 923, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18946:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 927, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18984:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18984:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 929, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19006:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19006:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 931, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19028:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19040:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19040:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 934, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19052:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "19052:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 924, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18957:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 925, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18957:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18957:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18957:116:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18946:127:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "18946:127:0" + }, + "id": 939, + "nodeType": "IfStatement", + "src": "18706:367:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 904, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18762:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 911, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18820:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18820:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 913, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 914, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18842:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 915, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18864:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 916, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18876:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18876:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 918, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18888:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "18888:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 905, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18773:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "convert", + "nodeType": "MemberAccess", + "referencedDeclaration": 13228, + "src": "18773:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18808:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "18773:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$value", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,address,address payable) payable external returns (uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18773:136:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18762:147:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "18762:147:0" + } + }, + "id": 940, + "nodeType": "IfStatement", + "src": "18509:564:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 882, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "18564:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 891, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18628:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 892, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "18628:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 893, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18650:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "18650:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 895, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "18672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18684:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 886, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "18600:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "18600:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18592:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18592:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 883, + "name": "ILegacyConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "18575:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ILegacyConverter_$26_$", + "typeString": "type(contract ILegacyConverter)" + } + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ILegacyConverter_$26", + "typeString": "contract ILegacyConverter" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "change", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "18575:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256) external returns (uint256)" + } + }, + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18575:111:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18564:122:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 899, + "nodeType": "ExpressionStatement", + "src": "18564:122:0" + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 941, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19138:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "19138:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 968, + "nodeType": "IfStatement", + "src": "19134:308:0", + "trueBody": { + "id": 967, + "nodeType": "Block", + "src": "19168:274:0", + "statements": [ + { + "assignments": [ + 944 + ], + "declarations": [ + { + "constant": false, + "id": 944, + "mutability": "mutable", + "name": "affiliateAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 967, + "src": "19187:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 952, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 950, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "19245:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 947, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "19226:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 945, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19213:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "19213:12:0", + "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": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "19213:31:0", + "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": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19213:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19187:73:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 957, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 788, + "src": "19317:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 958, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19336:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 954, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19287:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 955, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19287:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 21106, + "src": "19287:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19287:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4645455f5452414e534645525f4641494c4544", + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19354:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + }, + "value": "ERR_FEE_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_adc6d664872bc68defa0e975019744f9c0f552331af13f5f130791cee181d10c", + "typeString": "literal_string \"ERR_FEE_TRANSFER_FAILED\"" + } + ], + "id": 953, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19279:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19279:101:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 962, + "nodeType": "ExpressionStatement", + "src": "19279:101:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 963, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19399:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "id": 964, + "name": "affiliateAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "19411:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19399:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 966, + "nodeType": "ExpressionStatement", + "src": "19399:27:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 970, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19474:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "anchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 48, + "src": "19474:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 972, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 973, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "19491:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 974, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "19513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 975, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "19513:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 976, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19535:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 977, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19557:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19557:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 969, + "name": "Conversion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 81, + "src": "19463:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (contract IConverterAnchor,contract IERC20Token,contract IERC20Token,uint256,uint256,address)" + } + }, + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19463:105:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 981, + "nodeType": "EmitStatement", + "src": "19458:110:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 982, + "name": "fromAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "19583:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 983, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19596:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19583:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 985, + "nodeType": "ExpressionStatement", + "src": "19583:21:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 806, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17442:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 807, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 782, + "src": "17446:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17446:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17442:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 987, + "initializationExpression": { + "assignments": [ + 803 + ], + "declarations": [ + { + "constant": false, + "id": 803, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 987, + "src": "17427:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 805, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17439:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17427:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17460:3:0", + "subExpression": { + "argumentTypes": null, + "id": 810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "17460:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "17460:3:0" + }, + "nodeType": "ForStatement", + "src": "17422:2194:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 989, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19700:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 990, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 786, + "src": "19712:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19700:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19724:20:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 988, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19692:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 994, + "nodeType": "ExpressionStatement", + "src": "19692:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 995, + "name": "toAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "19765:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 794, + "id": 996, + "nodeType": "Return", + "src": "19758:15:0" + } + ] + }, + "documentation": { + "id": 779, + "nodeType": "StructuredDocumentation", + "src": "16471:603:0", + "text": " @dev executes the actual conversion by following the conversion path\n @param _data conversion data, see ConversionStep struct above\n @param _amount amount to convert from, in the source token\n @param _minReturn if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\n @param _affiliateAccount affiliate account\n @param _affiliateFee affiliate fee in PPM\n @return amount of tokens received from the conversion" + }, + "id": 998, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConversion", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 782, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17112:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 780, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "17112:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 781, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17112:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 784, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 786, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17178:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17178:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 788, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17207:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17207:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 790, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17243:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17101:170:0" + }, + "returnParameters": { + "id": 794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 793, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 998, + "src": "17289:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "17288:9:0" + }, + "scope": 1976, + "src": "17080:2701:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1109, + "nodeType": "Block", + "src": "20232:1606:0", + "statements": [ + { + "assignments": [ + 1009 + ], + "declarations": [ + { + "constant": false, + "id": 1009, + "mutability": "mutable", + "name": "firstConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20243:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1008, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "20243:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1018, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1013, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1003, + "src": "20290:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "20290:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20282:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20282:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20282:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1010, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "20271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20271:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20243:64:0" + }, + { + "assignments": [ + 1020 + ], + "declarations": [ + { + "constant": false, + "id": 1020, + "mutability": "mutable", + "name": "isNewerConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1109, + "src": "20318:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "20318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1024, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1022, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20365:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1021, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "20342:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20342:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20318:62:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20413:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20413:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20425:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20413:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1055, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "20955:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1057, + "indexExpression": { + "argumentTypes": null, + "id": 1056, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "20967:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20955:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1106, + "nodeType": "Block", + "src": "21447:384:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1082, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21605:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1095, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21770:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1096, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21784:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21784:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1100, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21804:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21796:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21796:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21811:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1094, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21753:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21753:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1104, + "nodeType": "ExpressionStatement", + "src": "21753:66:0" + }, + "id": 1105, + "nodeType": "IfStatement", + "src": "21601:218:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1084, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21657:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21671:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21671:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1089, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "21691:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21683:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21683:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1091, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1083, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21640:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:76:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "21640:76:0" + } + } + ] + }, + "id": 1107, + "nodeType": "IfStatement", + "src": "20951:880:0", + "trueBody": { + "id": 1081, + "nodeType": "Block", + "src": "20982:420:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1059, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21184:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1060, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1064, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "21218:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21210:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21210:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1066, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21225:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1058, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "21167:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21167:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1068, + "nodeType": "ExpressionStatement", + "src": "21167:66:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1069, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "21303:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1080, + "nodeType": "IfStatement", + "src": "21299:91:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "21382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1073, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1001, + "src": "21358:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21350:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21350:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1070, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "21338:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21140, + "src": "21338:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21338:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1079, + "nodeType": "ExpressionStatement", + "src": "21338:52:0" + } + } + ] + } + }, + "id": 1108, + "nodeType": "IfStatement", + "src": "20409:1422:0", + "trueBody": { + "id": 1054, + "nodeType": "Block", + "src": "20428:485:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20486:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20486:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1032, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1005, + "src": "20499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20486:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20508:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 1029, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20478:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20478:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1036, + "nodeType": "ExpressionStatement", + "src": "20478:56:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "20768:17:0", + "subExpression": { + "argumentTypes": null, + "id": 1037, + "name": "isNewerConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "20769:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1053, + "nodeType": "IfStatement", + "src": "20764:137:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1043, + "name": "firstConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "20854:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1042, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "20824:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20824:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20816:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20816:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1039, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "20804:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 21135, + "src": "20804:75:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$", + "typeString": "function () payable external" + } + }, + "id": 1050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20888:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20888:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "20804:95:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$__$returns$__$value", + "typeString": "function () payable external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20804:97:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "20804:97:0" + } + } + ] + } + } + ] + }, + "documentation": { + "id": 999, + "nodeType": "StructuredDocumentation", + "src": "19789:333:0", + "text": " @dev validates msg.value and prepares the conversion source token for the conversion\n @param _sourceToken source token of the first conversion step\n @param _anchor converter anchor of the first conversion step\n @param _amount amount to convert from, in the source token" + }, + "id": 1110, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleSourceToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1006, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1001, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20155:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1000, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "20155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20181:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1002, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "20181:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1005, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1110, + "src": "20207:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20207:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20154:69:0" + }, + "returnParameters": { + "id": 1007, + "nodeType": "ParameterList", + "parameters": [], + "src": "20232:0:0" + }, + "scope": 1976, + "src": "20128:1710:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1173, + "nodeType": "Block", + "src": "22295:780:0", + "statements": [ + { + "assignments": [ + 1122 + ], + "declarations": [ + { + "constant": false, + "id": 1122, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22306:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1121, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22306:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1129, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1123, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1128, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1124, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1114, + "src": "22345:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "22345:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22360:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "22345:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22339:23:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22306:56:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1130, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22444:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "22444:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1134, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "22476:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22468:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22468:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22444:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1138, + "nodeType": "IfStatement", + "src": "22440:63:0", + "trueBody": { + "expression": null, + "functionReturnParameters": 1120, + "id": 1137, + "nodeType": "Return", + "src": "22496:7:0" + } + }, + { + "assignments": [ + 1140 + ], + "declarations": [ + { + "constant": false, + "id": 1140, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1173, + "src": "22515:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1139, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "22515:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1143, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1141, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22541:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "22541:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22515:46:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1144, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "22607:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1146, + "indexExpression": { + "argumentTypes": null, + "id": 1145, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22619:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22607:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1171, + "nodeType": "Block", + "src": "22993:75:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1166, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "23021:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1167, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "23034:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1168, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "23048:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1165, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "23008:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23008:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1170, + "nodeType": "ExpressionStatement", + "src": "23008:48:0" + } + ] + }, + "id": 1172, + "nodeType": "IfStatement", + "src": "22603:465:0", + "trueBody": { + "id": 1164, + "nodeType": "Block", + "src": "22633:315:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22731:32:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1148, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1122, + "src": "22732:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "22732:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1147, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "22724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22724:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1152, + "nodeType": "ExpressionStatement", + "src": "22724:40:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1160, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1118, + "src": "22914:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1161, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1116, + "src": "22928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1156, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1140, + "src": "22889:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22881:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22881:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1153, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21153, + "src": "22869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21153_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21153", + "typeString": "contract IEtherToken" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 21152, + "src": "22869:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", + "typeString": "function (address payable,uint256) external" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22869:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1163, + "nodeType": "ExpressionStatement", + "src": "22869:67:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1111, + "nodeType": "StructuredDocumentation", + "src": "21846:330:0", + "text": " @dev handles the conversion target token if the network still holds it at the end of the conversion\n @param _data conversion data, see ConversionStep struct above\n @param _amount conversion target amount\n @param _beneficiary wallet to receive the conversion result" + }, + "id": 1174, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "handleTargetToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1119, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1114, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22209:29:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1112, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "22209:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1113, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22209:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1116, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22240:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1118, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1174, + "src": "22257:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1117, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22257:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22208:78:0" + }, + "returnParameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [], + "src": "22295:0:0" + }, + "scope": 1976, + "src": "22182:893:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1467, + "nodeType": "Block", + "src": "23760:4093:0", + "statements": [ + { + "assignments": [ + 1191 + ], + "declarations": [ + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23771:28:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1189, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23771:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1190, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23771:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1200, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1195, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "23823:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23823:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23848:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "23823:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "23802:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct BancorNetwork.ConversionStep memory[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1192, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23806:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1193, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23806:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23802:48:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23771:79:0" + }, + { + "assignments": [ + 1202 + ], + "declarations": [ + { + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "affiliateFeeProcessed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23863:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1201, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23863:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1204, + "initialValue": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23892:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23863:34:0" + }, + { + "assignments": [ + 1206 + ], + "declarations": [ + { + "constant": false, + "id": 1206, + "mutability": "mutable", + "name": "bntToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "23908:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1205, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "23908:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1212, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1209, + "name": "BNT_TOKEN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21551, + "src": "23953:9:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1208, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "23943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23943:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1207, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "23931:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23931:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23908:56:0" + }, + { + "assignments": [ + 1214 + ], + "declarations": [ + { + "constant": false, + "id": 1214, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "24060:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1215, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "24060:9:0" + }, + { + "body": { + "id": 1303, + "nodeType": "Block", + "src": "24132:1199:0", + "statements": [ + { + "assignments": [ + 1231 + ], + "declarations": [ + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24147:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 1230, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "24147:16:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1239, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1233, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24190:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1237, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1234, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24206:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24210:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24206:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24190:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1232, + "name": "IConverterAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13349, + "src": "24173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "type(contract IConverterAnchor)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24173:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24147:66:0" + }, + { + "assignments": [ + 1241 + ], + "declarations": [ + { + "constant": false, + "id": 1241, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24228:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1240, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "24228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1245, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24270:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 22838, + "src": "24270:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24270:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24262:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24262:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24262:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1242, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "24251:10:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24251:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24228:58:0" + }, + { + "assignments": [ + 1252 + ], + "declarations": [ + { + "constant": false, + "id": 1252, + "mutability": "mutable", + "name": "targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24301:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1251, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "24301:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1260, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1254, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24339:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1258, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1255, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24355:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24359:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24355:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24339:22:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1253, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24327:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24327:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24301:61:0" + }, + { + "assignments": [ + 1262 + ], + "declarations": [ + { + "constant": false, + "id": 1262, + "mutability": "mutable", + "name": "processAffiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1303, + "src": "24455:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1261, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "24455:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1271, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1263, + "name": "_affiliateFeeEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "24482:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "24506:22:0", + "subExpression": { + "argumentTypes": null, + "id": 1264, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24507:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 1269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1267, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24532:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1268, + "name": "bntToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1206, + "src": "24547:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "24532:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24482:73:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24455:100:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1272, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "24574:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1277, + "nodeType": "IfStatement", + "src": "24570:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1273, + "name": "affiliateFeeProcessed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "24612:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24636:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "24612:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1276, + "nodeType": "ExpressionStatement", + "src": "24612:28:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1278, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "24657:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1282, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1279, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24662:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24666:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24662:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24657:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1284, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "24758:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 1285, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "24834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1287, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24938:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1289, + "indexExpression": { + "argumentTypes": null, + "id": 1288, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24954:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24938:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1286, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "24926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24926:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1291, + "name": "targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "24989:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25134:1:0", + "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": 1293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1292, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25126:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25126:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1297, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1241, + "src": "25234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1296, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "25211:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25211:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1299, + "name": "processAffiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "25284:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1283, + "name": "ConversionStep", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "24671:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ConversionStep_$59_storage_ptr_$", + "typeString": "type(struct BancorNetwork.ConversionStep storage pointer)" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "anchor", + "converter", + "sourceToken", + "targetToken", + "beneficiary", + "isV28OrHigherConverter", + "processAffiliateFee" + ], + "nodeType": "FunctionCall", + "src": "24671:648:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "24657:662:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "24657:662:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1220, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24092:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1221, + "name": "_conversionPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1178, + "src": "24096:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24096:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24121:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "24096:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24092:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1304, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1216, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24085:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24089:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "24085:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "24085:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1226, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "24124:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24129:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "24124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1229, + "nodeType": "ExpressionStatement", + "src": "24124:6:0" + }, + "nodeType": "ForStatement", + "src": "24080:1251:0" + }, + { + "assignments": [ + 1306 + ], + "declarations": [ + { + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "stepData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1467, + "src": "25393:30:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + }, + "typeName": { + "contractScope": null, + "id": 1305, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "25393:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1310, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1307, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25426:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1309, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25431:1:0", + "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": "25426:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25393:40:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1311, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "25448:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1314, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1312, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25460:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1313, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25460:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25448:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1334, + "nodeType": "IfStatement", + "src": "25444:472:0", + "trueBody": { + "id": 1333, + "nodeType": "Block", + "src": "25483:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1315, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25594:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1316, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "25594:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1323, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25832:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1327, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25885:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "25885:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1326, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "25855:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25855:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25832:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1331, + "nodeType": "ExpressionStatement", + "src": "25832:72:0" + }, + "id": 1332, + "nodeType": "IfStatement", + "src": "25590:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1317, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "sourceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 50, + "src": "25644:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1320, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "25667:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "25644:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1322, + "nodeType": "ExpressionStatement", + "src": "25644:42:0" + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1335, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "25954:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1336, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25965:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1341, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1337, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "25970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25970:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25984:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "25970:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25965:21:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "25954:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "25954:32:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1344, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "26001:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1347, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1345, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26013:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26013:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26001:33:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1367, + "nodeType": "IfStatement", + "src": "25997:472:0", + "trueBody": { + "id": 1366, + "nodeType": "Block", + "src": "26036:433:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1348, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26147:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1356, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26385:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26385:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1360, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26438:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "26438:18:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1359, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "26408:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26408:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26385:72:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1364, + "nodeType": "ExpressionStatement", + "src": "26385:72:0" + }, + "id": 1365, + "nodeType": "IfStatement", + "src": "26143:314:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26197:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1352, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "targetToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 52, + "src": "26197:20:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1353, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "26220:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "26197:42:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1355, + "nodeType": "ExpressionStatement", + "src": "26197:42:0" + } + } + ] + } + }, + { + "body": { + "id": 1463, + "nodeType": "Block", + "src": "26561:1261:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1379, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26576:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1380, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26587:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1382, + "indexExpression": { + "argumentTypes": null, + "id": 1381, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "src": "26576:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1384, + "nodeType": "ExpressionStatement", + "src": "26576:18:0" + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1385, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26746:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "26746:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1461, + "nodeType": "Block", + "src": "27642:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1449, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27750:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1456, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27789:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1454, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27781:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27781:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27773:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27773:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27750:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "27750:45:0" + } + ] + }, + "id": 1462, + "nodeType": "IfStatement", + "src": "26742:1069:0", + "trueBody": { + "id": 1448, + "nodeType": "Block", + "src": "26779:844:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1387, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26902:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1388, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "processAffiliateFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 58, + "src": "26902:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1401, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27106:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1402, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27111:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27111:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27125:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27111:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1413, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27310:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1417, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1414, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27315:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27319:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27315:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1418, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 56, + "src": "27310:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1433, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27562:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27562:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1440, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "27601:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27593:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27593:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27585:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27585:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27585:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27562:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1444, + "nodeType": "ExpressionStatement", + "src": "27562:45:0" + }, + "id": 1445, + "nodeType": "IfStatement", + "src": "27306:301:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1419, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27367:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27367:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1424, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27398:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1428, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1425, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "27403:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27407:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "27403:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27398:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "converter", + "nodeType": "MemberAccess", + "referencedDeclaration": 46, + "src": "27398:21:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1422, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27390:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27390:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27367:53:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1432, + "nodeType": "ExpressionStatement", + "src": "27367:53:0" + } + }, + "id": 1446, + "nodeType": "IfStatement", + "src": "27102:505:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1407, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "27149:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "27149:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1410, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "27172:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "27149:35:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "27149:35:0" + } + }, + "id": 1447, + "nodeType": "IfStatement", + "src": "26898:709:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1389, + "name": "stepData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "26953:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory" + } + }, + "id": 1391, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "beneficiary", + "nodeType": "MemberAccess", + "referencedDeclaration": 54, + "src": "26953:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1396, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26992:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26984:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26984:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26976:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 1392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26976:8:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26976:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26953:45:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1400, + "nodeType": "ExpressionStatement", + "src": "26953:45:0" + } + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1372, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26539:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1373, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "26543:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26539:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1464, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1368, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26532:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26536:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "26532:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1371, + "nodeType": "ExpressionStatement", + "src": "26532:5:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "26556:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1376, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "26556:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1378, + "nodeType": "ExpressionStatement", + "src": "26556:3:0" + }, + "nodeType": "ForStatement", + "src": "26527:1295:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1465, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "27841:4:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep memory[] memory" + } + }, + "functionReturnParameters": 1187, + "id": 1466, + "nodeType": "Return", + "src": "27834:11:0" + } + ] + }, + "documentation": { + "id": 1175, + "nodeType": "StructuredDocumentation", + "src": "23083:503:0", + "text": " @dev creates a memory cache of all conversion steps data to minimize logic and external calls during conversions\n @param _conversionPath conversion path, see conversion path format above\n @param _beneficiary wallet to receive the conversion result\n @param _affiliateFeeEnabled true if affiliate fee was requested by the sender, false if not\n @return cached conversion data to be ingested later on by the conversion flow" + }, + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConversionData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1178, + "mutability": "mutable", + "name": "_conversionPath", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23622:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23622:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1177, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23622:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1180, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23656:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23656:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1182, + "mutability": "mutable", + "name": "_affiliateFeeEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23686:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1181, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "23686:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23621:91:0" + }, + "returnParameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1468, + "src": "23735:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_memory_ptr_$dyn_memory_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 1184, + "name": "ConversionStep", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 59, + "src": "23735:14:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ConversionStep_$59_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep" + } + }, + "id": 1185, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23735:16:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ConversionStep_$59_storage_$dyn_storage_ptr", + "typeString": "struct BancorNetwork.ConversionStep[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23734:25:0" + }, + "scope": 1976, + "src": "23592:4261:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1510, + "nodeType": "Block", + "src": "28406:261:0", + "statements": [ + { + "assignments": [ + 1479 + ], + "declarations": [ + { + "constant": false, + "id": 1479, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1510, + "src": "28417:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1488, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1484, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "28462:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + ], + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1482, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28454:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28454:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1486, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28469:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1480, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28437:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 21097, + "src": "28437:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28437:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28417:61:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1489, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28493:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1490, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28505:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28493:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1509, + "nodeType": "IfStatement", + "src": "28489:171:0", + "trueBody": { + "id": 1508, + "nodeType": "Block", + "src": "28513:147:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1492, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1479, + "src": "28532:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28544:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28532:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1501, + "nodeType": "IfStatement", + "src": "28528:68:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1496, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28576:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1497, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28584:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28594:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1495, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28564:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28564:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "28564:32:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1503, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "28623:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1504, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1473, + "src": "28631:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1505, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1475, + "src": "28641:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1502, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "28611:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28611:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1507, + "nodeType": "ExpressionStatement", + "src": "28611:37:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "27861:452:0", + "text": " @dev utility, checks whether allowance for the given spender exists and approves one if it doesn't.\n Note that we use the non standard erc-20 interface in which `approve` has no return value so that\n this function will work for both standard and non standard tokens\n @param _token token to check the allowance in\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 1511, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ensureAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28344:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1470, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28344:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1473, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28364:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1472, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28364:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1475, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1511, + "src": "28382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28343:54:0" + }, + "returnParameters": { + "id": 1477, + "nodeType": "ParameterList", + "parameters": [], + "src": "28406:0:0" + }, + "scope": 1976, + "src": "28319:348:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1551, + "nodeType": "Block", + "src": "28848:352:0", + "statements": [ + { + "assignments": [ + 1519 + ], + "declarations": [ + { + "constant": false, + "id": 1519, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1551, + "src": "28859:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1518, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28859:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1523, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1520, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "28882:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokenCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13339, + "src": "28882:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint16_$", + "typeString": "function () view external returns (uint16)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28882:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28859:55:0" + }, + { + "body": { + "id": 1547, + "nodeType": "Block", + "src": "28968:186:0", + "statements": [ + { + "assignments": [ + 1535 + ], + "declarations": [ + { + "constant": false, + "id": 1535, + "mutability": "mutable", + "name": "reserveTokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1547, + "src": "28983:31:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1534, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28983:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1540, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1538, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "29044:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1536, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1513, + "src": "29017:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 1537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "connectorTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 13334, + "src": "29017:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (uint256) view external returns (contract IERC20Token)" + } + }, + "id": 1539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29017:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28983:63:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1541, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29065:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1543, + "indexExpression": { + "argumentTypes": null, + "id": 1542, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29077:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1546, + "nodeType": "IfStatement", + "src": "29061:81:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1544, + "name": "reserveTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1535, + "src": "29123:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1545, + "nodeType": "Return", + "src": "29116:26:0" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1528, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28945:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1529, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1519, + "src": "28949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28945:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1548, + "initializationExpression": { + "assignments": [ + 1525 + ], + "declarations": [ + { + "constant": false, + "id": 1525, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1548, + "src": "28930:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28930:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1527, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28942:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28930:13:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28963:3:0", + "subExpression": { + "argumentTypes": null, + "id": 1531, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1525, + "src": "28963:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1533, + "nodeType": "ExpressionStatement", + "src": "28963:3:0" + }, + "nodeType": "ForStatement", + "src": "28925:229:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1549, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29173:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1517, + "id": 1550, + "nodeType": "Return", + "src": "29166:26:0" + } + ] + }, + "documentation": null, + "id": 1552, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterEtherTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1514, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1513, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28790:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1512, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "28790:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28789:23:0" + }, + "returnParameters": { + "id": 1517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1516, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1552, + "src": "28835:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1515, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "28835:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28834:13:0" + }, + "scope": 1976, + "src": "28751:449:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1578, + "nodeType": "Block", + "src": "29474:224:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 1564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "29489:20:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1561, + "name": "etherTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "29490:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_bool_$", + "typeString": "mapping(contract IERC20Token => bool)" + } + }, + "id": 1563, + "indexExpression": { + "argumentTypes": null, + "id": 1562, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29490:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1567, + "nodeType": "IfStatement", + "src": "29485:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1565, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1556, + "src": "29531:6:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1566, + "nodeType": "Return", + "src": "29524:13:0" + } + }, + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1569, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29577:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1568, + "name": "isV28OrHigherConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1719, + "src": "29554:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 1570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29554:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1573, + "nodeType": "IfStatement", + "src": "29550:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 1571, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "29610:19:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1572, + "nodeType": "Return", + "src": "29603:26:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1575, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1554, + "src": "29679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1574, + "name": "getConverterEtherTokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "29649:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_contract$_IERC20Token_$21127_$", + "typeString": "function (contract IConverter) view returns (contract IERC20Token)" + } + }, + "id": 1576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29649:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "functionReturnParameters": 1560, + "id": 1577, + "nodeType": "Return", + "src": "29642:48:0" + } + ] + }, + "documentation": null, + "id": 1579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getConverterTokenAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1554, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29396:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1553, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29396:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29419:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1555, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29419:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29395:43:0" + }, + "returnParameters": { + "id": 1560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1559, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1579, + "src": "29461:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1558, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29461:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29460:13:0" + }, + "scope": 1976, + "src": "29362:336:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "constant": true, + "id": 1587, + "mutability": "constant", + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "29706:106:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1580, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29706:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "67657452657475726e28616464726573732c616464726573732c75696e7432353629", + "id": 1584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29774:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + }, + "value": "getReturn(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_1e1401f8329fe5eb5c7e76277d3c971ffeee3a41a0eef7c00afeb0a286cef0af", + "typeString": "literal_string \"getReturn(address,address,uint256)\"" + } + ], + "id": 1583, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "29764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29764:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1582, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1581, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "29757:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29757:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1663, + "nodeType": "Block", + "src": "30036:523:0", + "statements": [ + { + "assignments": [ + 1603 + ], + "declarations": [ + { + "constant": false, + "id": 1603, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30047:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1602, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30047:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1611, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1606, + "name": "GET_RETURN_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "30090:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 1607, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "30116:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1608, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "30130:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 1609, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "30144:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1604, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30067:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30067:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30067:85:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30047:105:0" + }, + { + "assignments": [ + 1613, + 1615 + ], + "declarations": [ + { + "constant": false, + "id": 1613, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30164:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1612, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30164:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1615, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1663, + "src": "30178:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1614, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30178:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1623, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1621, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1603, + "src": "30231:4:0", + "typeDescriptions": { + "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": 1618, + "name": "_dest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "30213:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30205:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30205:25:0", + "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": 1622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30205:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30163:73:0" + }, + { + "condition": { + "argumentTypes": null, + "id": 1624, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1613, + "src": "30253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1658, + "nodeType": "IfStatement", + "src": "30249:277:0", + "trueBody": { + "id": 1657, + "nodeType": "Block", + "src": "30262:264:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1625, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30281:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30281:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3634", + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30302:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_64_by_1", + "typeString": "int_const 64" + }, + "value": "64" + }, + "src": "30281:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1640, + "nodeType": "IfStatement", + "src": "30277:113:0", + "trueBody": { + "id": 1639, + "nodeType": "Block", + "src": "30306:84:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1631, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30343:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30356:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + { + "argumentTypes": null, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1634, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30365:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1636, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30355:18:0", + "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": 1629, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30332:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30332:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30332:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 1601, + "id": 1638, + "nodeType": "Return", + "src": "30325:49:0" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1641, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30410:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30410:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30431:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "30410:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1656, + "nodeType": "IfStatement", + "src": "30406:109:0", + "trueBody": { + "id": 1655, + "nodeType": "Block", + "src": "30435:80:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1647, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1615, + "src": "30473:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1648, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30486:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1650, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30485:9:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 1645, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30462:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30462:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30462:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30497:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1653, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30461:38:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1654, + "nodeType": "Return", + "src": "30454:45:0" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30546:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30549:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1661, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "30545:6:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$", + "typeString": "tuple(int_const 0,int_const 0)" + } + }, + "functionReturnParameters": 1601, + "id": 1662, + "nodeType": "Return", + "src": "30538:13:0" + } + ] + }, + "documentation": null, + "id": 1664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1589, + "mutability": "mutable", + "name": "_dest", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29908:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1588, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "29908:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29926:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1590, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29926:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29952:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 1592, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "29952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "29978:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29978:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29907:87:0" + }, + "returnParameters": { + "id": 1601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1598, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30018:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1600, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1664, + "src": "30027:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1599, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30027:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30017:18:0" + }, + "scope": 1976, + "src": "29889:670:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "constant": true, + "id": 1672, + "mutability": "constant", + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1976, + "src": "30567:93:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1665, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30567:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "69735632384f724869676865722829", + "id": 1669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30641:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + }, + "value": "isV28OrHigher()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d260529c8620a59d78f2e58cfd1294673bb6cba228ad1f34ac7731003ab870dd", + "typeString": "literal_string \"isV28OrHigher()\"" + } + ], + "id": 1668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "30631:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 1670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30631:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 1666, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "30624:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30624:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 1718, + "nodeType": "Block", + "src": "30917:336:0", + "statements": [ + { + "assignments": [ + 1680 + ], + "declarations": [ + { + "constant": false, + "id": 1680, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "30928:17:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1679, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "30928:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1685, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1683, + "name": "IS_V28_OR_HIGHER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30971:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 1681, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "30948:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1682, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30948:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 1684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30948:54:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30928:74:0" + }, + { + "assignments": [ + 1687, + 1689 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31014:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1686, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31014:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1689, + "mutability": "mutable", + "name": "returnData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1718, + "src": "31028:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1688, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31028:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1699, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1697, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1680, + "src": "31099:4:0", + "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": 1692, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1674, + "src": "31063:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31055:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:19:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31055:30:0", + "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": 1696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "34303030", + "id": 1695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31092:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4000_by_1", + "typeString": "int_const 4000" + }, + "value": "4000" + } + ], + "src": "31055:43:0", + "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": 1698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31055:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31013:91:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1700, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "31121:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1701, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31132:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31132:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 1703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31153:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "31132:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31121:34:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1715, + "nodeType": "IfStatement", + "src": "31117:104:0", + "trueBody": { + "id": 1714, + "nodeType": "Block", + "src": "31157:64:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1708, + "name": "returnData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1689, + "src": "31190:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 1709, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "31203:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 1711, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31202:6:0", + "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": 1706, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "31179:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31179:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31179:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1678, + "id": 1713, + "nodeType": "Return", + "src": "31172:37:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31240:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1678, + "id": 1717, + "nodeType": "Return", + "src": "31233:12:0" + } + ] + }, + "documentation": null, + "id": 1719, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 1673, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "30865:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30864:23:0" + }, + "returnParameters": { + "id": 1678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1719, + "src": "30911:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1676, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "30911:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30910:6:0" + }, + "scope": 1976, + "src": "30833:420:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "31432:57:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1733, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "31462:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1734, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1725, + "src": "31469:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1732, + "name": "rateByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 462, + "src": "31451:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256) view returns (uint256)" + } + }, + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31451:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31479:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 1737, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31450:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 1731, + "id": 1738, + "nodeType": "Return", + "src": "31443:38:0" + } + ] + }, + "documentation": { + "id": 1720, + "nodeType": "StructuredDocumentation", + "src": "31261:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "0c8496cc", + "id": 1740, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnByPath", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1726, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31352:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31352:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1722, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31352:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1725, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31376:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1724, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31351:41:0" + }, + "returnParameters": { + "id": 1731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1728, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31414:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1727, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31414:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1730, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1740, + "src": "31423:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1729, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31423:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31413:18:0" + }, + "scope": 1976, + "src": "31327:162:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1768, + "nodeType": "Block", + "src": "31674:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1754, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1744, + "src": "31706:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1755, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1746, + "src": "31713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1756, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1748, + "src": "31722:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31742:1:0", + "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": 1758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31734:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31734:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31754:1:0", + "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": 1762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1761, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31746:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31746:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31758:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1753, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "31692:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31692:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1752, + "id": 1767, + "nodeType": "Return", + "src": "31685:75:0" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "31497:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "f3898a97", + "id": 1769, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1744, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31580:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1742, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31580:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1743, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31580:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1746, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31604:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1745, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31604:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1748, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31621:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31579:61:0" + }, + "returnParameters": { + "id": 1752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1769, + "src": "31665:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1750, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31664:9:0" + }, + "scope": 1976, + "src": "31563:205:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1798, + "nodeType": "Block", + "src": "32088:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1787, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "32120:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1788, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "32127:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1789, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1777, + "src": "32136:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32156:1:0", + "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": 1791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32148:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32148:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1794, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1779, + "src": "32160:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1795, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "32179:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1786, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32106:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32106:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1785, + "id": 1797, + "nodeType": "Return", + "src": "32099:94:0" + } + ] + }, + "documentation": { + "id": 1770, + "nodeType": "StructuredDocumentation", + "src": "31776:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "569706eb", + "id": 1799, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1773, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31870:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31870:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1772, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31870:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1775, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31903:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31929:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1776, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31929:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1779, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31958:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31958:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1781, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "31994:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31859:163:0" + }, + "returnParameters": { + "id": 1785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1784, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1799, + "src": "32074:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32073:9:0" + }, + "scope": 1976, + "src": "31842:359:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1826, + "nodeType": "Block", + "src": "32419:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1815, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1803, + "src": "32451:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1816, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1805, + "src": "32458:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1817, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1807, + "src": "32467:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1818, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "32479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32501:1:0", + "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": 1820, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1819, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32493:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32493:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32505:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1814, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32437:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32437:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1813, + "id": 1825, + "nodeType": "Return", + "src": "32430:77:0" + } + ] + }, + "documentation": { + "id": 1800, + "nodeType": "StructuredDocumentation", + "src": "32209:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c98fefed", + "id": 1827, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1803, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32295:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1801, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32295:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1802, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32295:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1805, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32319:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1807, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32336:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32336:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1809, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32356:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1808, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32356:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32294:91:0" + }, + "returnParameters": { + "id": 1813, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1812, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1827, + "src": "32410:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1811, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32409:9:0" + }, + "scope": 1976, + "src": "32275:240:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1858, + "nodeType": "Block", + "src": "32914:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1850, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1831, + "src": "32946:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1851, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "32953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1852, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32962:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1853, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1837, + "src": "32974:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1854, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "32988:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1855, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "33007:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1849, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "32932:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32932:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1848, + "id": 1857, + "nodeType": "Return", + "src": "32925:96:0" + } + ] + }, + "documentation": { + "id": 1828, + "nodeType": "StructuredDocumentation", + "src": "32523:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "ab6214ce", + "id": 1859, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1844, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1835, + "src": "32870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1845, + "modifierName": { + "argumentTypes": null, + "id": 1843, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22595, + "src": "32854:15:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "32854:27:0" + } + ], + "name": "convertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1842, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1831, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32620:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1829, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32620:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1830, + "length": null, + "nodeType": "ArrayTypeName", + "src": "32620:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32653:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32653:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1835, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32679:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1837, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32708:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32708:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32747:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1838, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32747:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32783:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1840, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32609:202:0" + }, + "returnParameters": { + "id": 1848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1859, + "src": "32900:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32900:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32899:9:0" + }, + "scope": 1976, + "src": "32589:440:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1887, + "nodeType": "Block", + "src": "33214:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1873, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1863, + "src": "33246:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1874, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1865, + "src": "33253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1875, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1867, + "src": "33262:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33282:1:0", + "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": 1877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33274:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1879, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33274:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33294:1:0", + "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": 1881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33286:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33298:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1872, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33232:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33232:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1871, + "id": 1886, + "nodeType": "Return", + "src": "33225:75:0" + } + ] + }, + "documentation": { + "id": 1860, + "nodeType": "StructuredDocumentation", + "src": "33037:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "c7ba24bc", + "id": 1888, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1863, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33128:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1861, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33128:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1862, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33128:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1865, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33152:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1864, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33152:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1867, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33169:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33169:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33127:61:0" + }, + "returnParameters": { + "id": 1871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1888, + "src": "33205:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33204:9:0" + }, + "scope": 1976, + "src": "33103:205:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1917, + "nodeType": "Block", + "src": "33619:113:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1906, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1892, + "src": "33651:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1907, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1894, + "src": "33658:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1908, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1896, + "src": "33667:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33687:1:0", + "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": 1910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1909, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33679:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1912, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33679:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1913, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1898, + "src": "33691:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1914, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1900, + "src": "33710:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1905, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33637:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33637:87:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1904, + "id": 1916, + "nodeType": "Return", + "src": "33630:94:0" + } + ] + }, + "documentation": { + "id": 1889, + "nodeType": "StructuredDocumentation", + "src": "33316:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "e57738e5", + "id": 1918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvert2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1892, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33418:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33418:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1891, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33418:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1894, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33451:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1893, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33451:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1896, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33477:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1898, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33506:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33506:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1900, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33542:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33542:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33407:163:0" + }, + "returnParameters": { + "id": 1904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1918, + "src": "33605:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33605:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33604:9:0" + }, + "scope": 1976, + "src": "33382:350:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1945, + "nodeType": "Block", + "src": "33950:96:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1934, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1922, + "src": "33982:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1935, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1924, + "src": "33989:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1936, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1926, + "src": "33998:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1937, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1928, + "src": "34010:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34032:1:0", + "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": 1939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34024:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1941, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34024:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34036:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1933, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "33968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33968:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1932, + "id": 1944, + "nodeType": "Return", + "src": "33961:77:0" + } + ] + }, + "documentation": { + "id": 1919, + "nodeType": "StructuredDocumentation", + "src": "33740:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "b1e9932b", + "id": 1946, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33834:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1921, + "length": null, + "nodeType": "ArrayTypeName", + "src": "33834:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1924, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33858:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33858:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1926, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33875:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33875:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1928, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33895:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33895:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33833:91:0" + }, + "returnParameters": { + "id": 1932, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1931, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1946, + "src": "33941:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33941:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33940:9:0" + }, + "scope": 1976, + "src": "33806:240:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1974, + "nodeType": "Block", + "src": "34399:115:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1966, + "name": "_path", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1950, + "src": "34431:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1967, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "34438:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1968, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "34447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1969, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1956, + "src": "34459:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1970, + "name": "_affiliateAccount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1958, + "src": "34473:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1971, + "name": "_affiliateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1960, + "src": "34492:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1965, + "name": "convertByPath", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 598, + "src": "34417:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address[] memory,uint256,uint256,address payable,address,uint256) returns (uint256)" + } + }, + "id": 1972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34417:89:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1964, + "id": 1973, + "nodeType": "Return", + "src": "34410:96:0" + } + ] + }, + "documentation": { + "id": 1947, + "nodeType": "StructuredDocumentation", + "src": "34054:60:0", + "text": " @dev deprecated, backward compatibility" + }, + "functionSelector": "2978c10e", + "id": 1975, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "claimAndConvertFor2", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1950, + "mutability": "mutable", + "name": "_path", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34159:22:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34159:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1949, + "length": null, + "nodeType": "ArrayTypeName", + "src": "34159:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1952, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34192:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34192:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34218:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34218:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1956, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34247:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1955, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34247:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1958, + "mutability": "mutable", + "name": "_affiliateAccount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34286:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34286:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1960, + "mutability": "mutable", + "name": "_affiliateFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34322:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34322:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34148:202:0" + }, + "returnParameters": { + "id": 1964, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1963, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1975, + "src": "34385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34384:9:0" + }, + "scope": 1976, + "src": "34120:394:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 1977, + "src": "1956:32561:0" + } + ], + "src": "52:34467:0" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.639Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ILiquidityPoolV2Converter.json b/apps/cic-eth/tests/testdata/bancor/ILiquidityPoolV2Converter.json new file mode 100644 index 00000000..c08f361a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ILiquidityPoolV2Converter.json @@ -0,0 +1,1578 @@ +{ + "contractName": "ILiquidityPoolV2Converter", + "abi": [ + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_ratio", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveStakedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_balance", + "type": "uint256" + } + ], + "name": "setReserveStakedBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "primaryReserveToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceOracle", + "outputs": [ + { + "internalType": "contract IPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_primaryReserveToken", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_primaryReserveOracle", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_secondaryReserveOracle", + "type": "address" + } + ], + "name": "activate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_primaryReserveToken\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_primaryReserveOracle\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_secondaryReserveOracle\",\"type\":\"address\"}],\"name\":\"activate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_ratio\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"primaryReserveToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveStakedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_balance\",\"type\":\"uint256\"}],\"name\":\"setReserveStakedBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\":\"ILiquidityPoolV2Converter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol\":{\"keccak256\":\"0x2420b67eec33085ab879f4962fc0b98d14ae227f2afccc85308e6333ca1b49fd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://074f808b01138b47d823eff0a15512005144cab48f450ff35ee41cb36adab3e5\",\"dweb:/ipfs/QmS2hpadJLAJCCavW7Gq8TTo8AUEJgqCe1BSFFUQ2MvGiW\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../../interfaces/IConverter.sol\";\nimport \"../../../../token/interfaces/IERC20Token.sol\";\nimport \"../../../../utility/interfaces/IPriceOracle.sol\";\n\n/*\n Liquidity Pool V2 Converter interface\n*/\ninterface ILiquidityPoolV2Converter is IConverter {\n function reserveStakedBalance(IERC20Token _reserveToken) external view returns (uint256);\n function setReserveStakedBalance(IERC20Token _reserveToken, uint256 _balance) external;\n\n function primaryReserveToken() external view returns (IERC20Token);\n\n function priceOracle() external view returns (IPriceOracle);\n\n function activate(IERC20Token _primaryReserveToken, IChainlinkPriceOracle _primaryReserveOracle, IChainlinkPriceOracle _secondaryReserveOracle) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "exportedSymbols": { + "ILiquidityPoolV2Converter": [ + 18765 + ] + }, + "id": 18766, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18726, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:33" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../../interfaces/IConverter.sol", + "id": 18727, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 13341, + "src": "75:44:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../../../token/interfaces/IERC20Token.sol", + "id": 18728, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 21128, + "src": "120:54:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "../../../../utility/interfaces/IPriceOracle.sol", + "id": 18729, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 22892, + "src": "175:57:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18730, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "321:10:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 18731, + "nodeType": "InheritanceSpecifier", + "src": "321:10:33" + } + ], + "contractDependencies": [ + 13340, + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 18765, + "linearizedBaseContracts": [ + 18765, + 13340, + 22847 + ], + "name": "ILiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "005e319c", + "id": 18738, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "reserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18733, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18738, + "src": "368:25:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18732, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "368:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "367:27:33" + }, + "returnParameters": { + "id": 18737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18736, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18738, + "src": "418:7:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "418:7:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "417:9:33" + }, + "scope": 18765, + "src": "338:89:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "bf7da6ba", + "id": 18745, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setReserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18740, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18745, + "src": "465:25:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18739, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "465:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18742, + "mutability": "mutable", + "name": "_balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18745, + "src": "492:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "492:7:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "464:45:33" + }, + "returnParameters": { + "id": 18744, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:33" + }, + "scope": 18765, + "src": "432:87:33", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "0337e3fb", + "id": 18750, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "primaryReserveToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18746, + "nodeType": "ParameterList", + "parameters": [], + "src": "553:2:33" + }, + "returnParameters": { + "id": 18749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18748, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18750, + "src": "579:11:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18747, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "579:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "578:13:33" + }, + "scope": 18765, + "src": "525:67:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2630c12f", + "id": 18755, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "priceOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18751, + "nodeType": "ParameterList", + "parameters": [], + "src": "618:2:33" + }, + "returnParameters": { + "id": 18754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18753, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18755, + "src": "644:12:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18752, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "644:12:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "643:14:33" + }, + "scope": 18765, + "src": "598:60:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "119b90cd", + "id": 18764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "activate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18757, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "682:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18756, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "682:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18759, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "716:43:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18758, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "716:21:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18761, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "761:45:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18760, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "761:21:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "681:126:33" + }, + "returnParameters": { + "id": 18763, + "nodeType": "ParameterList", + "parameters": [], + "src": "816:0:33" + }, + "scope": 18765, + "src": "664:153:33", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18766, + "src": "282:537:33" + } + ], + "src": "51:769:33" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/ILiquidityPoolV2Converter.sol", + "exportedSymbols": { + "ILiquidityPoolV2Converter": [ + 18765 + ] + }, + "id": 18766, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18726, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:33" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../../interfaces/IConverter.sol", + "id": 18727, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 13341, + "src": "75:44:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../../../token/interfaces/IERC20Token.sol", + "id": 18728, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 21128, + "src": "120:54:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "../../../../utility/interfaces/IPriceOracle.sol", + "id": 18729, + "nodeType": "ImportDirective", + "scope": 18766, + "sourceUnit": 22892, + "src": "175:57:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18730, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "321:10:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 18731, + "nodeType": "InheritanceSpecifier", + "src": "321:10:33" + } + ], + "contractDependencies": [ + 13340, + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 18765, + "linearizedBaseContracts": [ + 18765, + 13340, + 22847 + ], + "name": "ILiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "005e319c", + "id": 18738, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "reserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18734, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18733, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18738, + "src": "368:25:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18732, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "368:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "367:27:33" + }, + "returnParameters": { + "id": 18737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18736, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18738, + "src": "418:7:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "418:7:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "417:9:33" + }, + "scope": 18765, + "src": "338:89:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "bf7da6ba", + "id": 18745, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setReserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18740, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18745, + "src": "465:25:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18739, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "465:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18742, + "mutability": "mutable", + "name": "_balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18745, + "src": "492:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "492:7:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "464:45:33" + }, + "returnParameters": { + "id": 18744, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:33" + }, + "scope": 18765, + "src": "432:87:33", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "0337e3fb", + "id": 18750, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "primaryReserveToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18746, + "nodeType": "ParameterList", + "parameters": [], + "src": "553:2:33" + }, + "returnParameters": { + "id": 18749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18748, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18750, + "src": "579:11:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18747, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "579:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "578:13:33" + }, + "scope": 18765, + "src": "525:67:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "2630c12f", + "id": 18755, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "priceOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18751, + "nodeType": "ParameterList", + "parameters": [], + "src": "618:2:33" + }, + "returnParameters": { + "id": 18754, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18753, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18755, + "src": "644:12:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18752, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "644:12:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "643:14:33" + }, + "scope": 18765, + "src": "598:60:33", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "119b90cd", + "id": 18764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "activate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18757, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "682:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18756, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "682:11:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18759, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "716:43:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18758, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "716:21:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18761, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18764, + "src": "761:45:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18760, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "761:21:33", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "681:126:33" + }, + "returnParameters": { + "id": 18763, + "nodeType": "ParameterList", + "parameters": [], + "src": "816:0:33" + }, + "scope": 18765, + "src": "664:153:33", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18766, + "src": "282:537:33" + } + ], + "src": "51:769:33" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.790Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IOwned.json b/apps/cic-eth/tests/testdata/bancor/IOwned.json new file mode 100644 index 00000000..fe669e2d --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IOwned.json @@ -0,0 +1,441 @@ +{ + "contractName": "IOwned", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":\"IOwned\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Owned contract interface\n*/\ninterface IOwned {\n // this function isn't since the compiler emits automatically generated getter functions as external\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n function acceptOwnership() external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "exportedSymbols": { + "IOwned": [ + 22847 + ] + }, + "id": 22848, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22833, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:68" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22847, + "linearizedBaseContracts": [ + 22847 + ], + "name": "IOwned", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "8da5cb5b", + "id": 22838, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22834, + "nodeType": "ParameterList", + "parameters": [], + "src": "253:2:68" + }, + "returnParameters": { + "id": 22837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22836, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22838, + "src": "279:7:68", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "279:7:68", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:9:68" + }, + "scope": 22847, + "src": "239:49:68", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f2fde38b", + "id": 22843, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22840, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22843, + "src": "321:17:68", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22839, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "321:7:68", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "320:19:68" + }, + "returnParameters": { + "id": 22842, + "nodeType": "ParameterList", + "parameters": [], + "src": "348:0:68" + }, + "scope": 22847, + "src": "294:55:68", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "79ba5097", + "id": 22846, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22844, + "nodeType": "ParameterList", + "parameters": [], + "src": "378:2:68" + }, + "returnParameters": { + "id": 22845, + "nodeType": "ParameterList", + "parameters": [], + "src": "389:0:68" + }, + "scope": 22847, + "src": "354:36:68", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22848, + "src": "111:281:68" + } + ], + "src": "51:342:68" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "exportedSymbols": { + "IOwned": [ + 22847 + ] + }, + "id": 22848, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22833, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:68" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22847, + "linearizedBaseContracts": [ + 22847 + ], + "name": "IOwned", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "8da5cb5b", + "id": 22838, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22834, + "nodeType": "ParameterList", + "parameters": [], + "src": "253:2:68" + }, + "returnParameters": { + "id": 22837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22836, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22838, + "src": "279:7:68", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "279:7:68", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:9:68" + }, + "scope": 22847, + "src": "239:49:68", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f2fde38b", + "id": 22843, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22840, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22843, + "src": "321:17:68", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22839, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "321:7:68", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "320:19:68" + }, + "returnParameters": { + "id": 22842, + "nodeType": "ParameterList", + "parameters": [], + "src": "348:0:68" + }, + "scope": 22847, + "src": "294:55:68", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "79ba5097", + "id": 22846, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22844, + "nodeType": "ParameterList", + "parameters": [], + "src": "378:2:68" + }, + "returnParameters": { + "id": 22845, + "nodeType": "ParameterList", + "parameters": [], + "src": "389:0:68" + }, + "scope": 22847, + "src": "354:36:68", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22848, + "src": "111:281:68" + } + ], + "src": "51:342:68" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.850Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IPoolTokensContainer.json b/apps/cic-eth/tests/testdata/bancor/IPoolTokensContainer.json new file mode 100644 index 00000000..fb1b60e1 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IPoolTokensContainer.json @@ -0,0 +1,1066 @@ +{ + "contractName": "IPoolTokensContainer", + "abi": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "poolTokens", + "outputs": [ + { + "internalType": "contract ISmartToken[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "createToken", + "outputs": [ + { + "internalType": "contract ISmartToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createToken\",\"outputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolTokens\",\"outputs\":[{\"internalType\":\"contract ISmartToken[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":\"IPoolTokensContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../../interfaces/IConverterAnchor.sol\";\nimport \"../../../../token/interfaces/ISmartToken.sol\";\n\n/*\n Pool Tokens Container interface\n*/\ninterface IPoolTokensContainer is IConverterAnchor {\n function poolTokens() external view returns (ISmartToken[] memory);\n function createToken() external returns (ISmartToken);\n function mint(ISmartToken _token, address _to, uint256 _amount) external;\n function burn(ISmartToken _token, address _from, uint256 _amount) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "exportedSymbols": { + "IPoolTokensContainer": [ + 18801 + ] + }, + "id": 18802, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18767, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:34" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../../../interfaces/IConverterAnchor.sol", + "id": 18768, + "nodeType": "ImportDirective", + "scope": 18802, + "sourceUnit": 13350, + "src": "75:50:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../../token/interfaces/ISmartToken.sol", + "id": 18769, + "nodeType": "ImportDirective", + "scope": 18802, + "sourceUnit": 21183, + "src": "126:54:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18770, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "258:16:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 18771, + "nodeType": "InheritanceSpecifier", + "src": "258:16:34" + } + ], + "contractDependencies": [ + 13349, + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 18801, + "linearizedBaseContracts": [ + 18801, + 13349, + 22907, + 22847 + ], + "name": "IPoolTokensContainer", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "6d3e313e", + "id": 18777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "poolTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18772, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:2:34" + }, + "returnParameters": { + "id": 18776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18775, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18777, + "src": "326:20:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21182_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18773, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "326:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 18774, + "length": null, + "nodeType": "ArrayTypeName", + "src": "326:13:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21182_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "325:22:34" + }, + "scope": 18801, + "src": "281:67:34", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "9cbf9e36", + "id": 18782, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18778, + "nodeType": "ParameterList", + "parameters": [], + "src": "373:2:34" + }, + "returnParameters": { + "id": 18781, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18780, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18782, + "src": "394:11:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18779, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "394:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "393:13:34" + }, + "scope": 18801, + "src": "353:54:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c6c3bbe6", + "id": 18791, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18784, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "426:18:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18783, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "426:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18786, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "446:11:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "446:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18788, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "459:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18787, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "459:7:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "425:50:34" + }, + "returnParameters": { + "id": 18790, + "nodeType": "ParameterList", + "parameters": [], + "src": "484:0:34" + }, + "scope": 18801, + "src": "412:73:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f6b911bc", + "id": 18800, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18793, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "504:18:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18792, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "504:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18795, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "524:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18794, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "524:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18797, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "539:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18796, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "539:7:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "503:52:34" + }, + "returnParameters": { + "id": 18799, + "nodeType": "ParameterList", + "parameters": [], + "src": "564:0:34" + }, + "scope": 18801, + "src": "490:75:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18802, + "src": "224:343:34" + } + ], + "src": "51:517:34" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "exportedSymbols": { + "IPoolTokensContainer": [ + 18801 + ] + }, + "id": 18802, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18767, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:34" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../../../interfaces/IConverterAnchor.sol", + "id": 18768, + "nodeType": "ImportDirective", + "scope": 18802, + "sourceUnit": 13350, + "src": "75:50:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../../token/interfaces/ISmartToken.sol", + "id": 18769, + "nodeType": "ImportDirective", + "scope": 18802, + "sourceUnit": 21183, + "src": "126:54:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18770, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "258:16:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 18771, + "nodeType": "InheritanceSpecifier", + "src": "258:16:34" + } + ], + "contractDependencies": [ + 13349, + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 18801, + "linearizedBaseContracts": [ + 18801, + 13349, + 22907, + 22847 + ], + "name": "IPoolTokensContainer", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "6d3e313e", + "id": 18777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "poolTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18772, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:2:34" + }, + "returnParameters": { + "id": 18776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18775, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18777, + "src": "326:20:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21182_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18773, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "326:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 18774, + "length": null, + "nodeType": "ArrayTypeName", + "src": "326:13:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21182_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "325:22:34" + }, + "scope": 18801, + "src": "281:67:34", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "9cbf9e36", + "id": 18782, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18778, + "nodeType": "ParameterList", + "parameters": [], + "src": "373:2:34" + }, + "returnParameters": { + "id": 18781, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18780, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18782, + "src": "394:11:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18779, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "394:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "393:13:34" + }, + "scope": 18801, + "src": "353:54:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c6c3bbe6", + "id": 18791, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18784, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "426:18:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18783, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "426:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18786, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "446:11:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18785, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "446:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18788, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18791, + "src": "459:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18787, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "459:7:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "425:50:34" + }, + "returnParameters": { + "id": 18790, + "nodeType": "ParameterList", + "parameters": [], + "src": "484:0:34" + }, + "scope": 18801, + "src": "412:73:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f6b911bc", + "id": 18800, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18793, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "504:18:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18792, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "504:11:34", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18795, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "524:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18794, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "524:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18797, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18800, + "src": "539:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18796, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "539:7:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "503:52:34" + }, + "returnParameters": { + "id": 18799, + "nodeType": "ParameterList", + "parameters": [], + "src": "564:0:34" + }, + "scope": 18801, + "src": "490:75:34", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18802, + "src": "224:343:34" + } + ], + "src": "51:517:34" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.790Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IPriceOracle.json b/apps/cic-eth/tests/testdata/bancor/IPriceOracle.json new file mode 100644 index 00000000..63198a93 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IPriceOracle.json @@ -0,0 +1,1260 @@ +{ + "contractName": "IPriceOracle", + "abi": [ + { + "inputs": [], + "name": "tokenAOracle", + "outputs": [ + { + "internalType": "contract IChainlinkPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenBOracle", + "outputs": [ + { + "internalType": "contract IChainlinkPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_tokenB", + "type": "address" + } + ], + "name": "latestRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_tokenB", + "type": "address" + } + ], + "name": "latestRateAndUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenA\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenB\",\"type\":\"address\"}],\"name\":\"latestRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenA\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenB\",\"type\":\"address\"}],\"name\":\"latestRateAndUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenAOracle\",\"outputs\":[{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenBOracle\",\"outputs\":[{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":\"IPriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IChainlinkPriceOracle.sol\";\nimport \"../../token/interfaces/IERC20Token.sol\";\n\n/*\n Price Oracle interface\n*/\ninterface IPriceOracle {\n function tokenAOracle() external view returns (IChainlinkPriceOracle);\n function tokenBOracle() external view returns (IChainlinkPriceOracle);\n\n function latestRate(IERC20Token _tokenA, IERC20Token _tokenB) external view returns (uint256, uint256);\n function lastUpdateTime() external view returns (uint256);\n function latestRateAndUpdateTime(IERC20Token _tokenA, IERC20Token _tokenB) external view returns (uint256, uint256, uint256);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "exportedSymbols": { + "IPriceOracle": [ + 22891 + ] + }, + "id": 22892, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22849, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:69" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./IChainlinkPriceOracle.sol", + "id": 22850, + "nodeType": "ImportDirective", + "scope": 22892, + "sourceUnit": 22822, + "src": "75:37:69", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 22851, + "nodeType": "ImportDirective", + "scope": 22892, + "sourceUnit": 21128, + "src": "113:48:69", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22891, + "linearizedBaseContracts": [ + 22891 + ], + "name": "IPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "b9e1715b", + "id": 22856, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenAOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22852, + "nodeType": "ParameterList", + "parameters": [], + "src": "246:2:69" + }, + "returnParameters": { + "id": 22855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22854, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22856, + "src": "272:21:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 22853, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "272:21:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:23:69" + }, + "scope": 22891, + "src": "225:70:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f997fda7", + "id": 22861, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenBOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22857, + "nodeType": "ParameterList", + "parameters": [], + "src": "321:2:69" + }, + "returnParameters": { + "id": 22860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22859, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22861, + "src": "347:21:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 22858, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "347:21:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "346:23:69" + }, + "scope": 22891, + "src": "300:70:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ae818004", + "id": 22872, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22863, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "396:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22862, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "396:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22865, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "417:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22864, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "417:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "395:42:69" + }, + "returnParameters": { + "id": 22871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22868, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "461:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22867, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "470:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "470:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "460:18:69" + }, + "scope": 22891, + "src": "376:103:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c8f33c91", + "id": 22877, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "lastUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22873, + "nodeType": "ParameterList", + "parameters": [], + "src": "507:2:69" + }, + "returnParameters": { + "id": 22876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22875, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22877, + "src": "533:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "533:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "532:9:69" + }, + "scope": 22891, + "src": "484:58:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b1772d7a", + "id": 22890, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestRateAndUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22879, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "580:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22878, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "580:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22881, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "601:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22880, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "601:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "579:42:69" + }, + "returnParameters": { + "id": 22889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22884, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "645:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22883, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "645:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22886, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "654:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22885, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "654:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22888, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "663:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "663:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "644:27:69" + }, + "scope": 22891, + "src": "547:125:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22892, + "src": "196:478:69" + } + ], + "src": "51:624:69" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "exportedSymbols": { + "IPriceOracle": [ + 22891 + ] + }, + "id": 22892, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22849, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:69" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./IChainlinkPriceOracle.sol", + "id": 22850, + "nodeType": "ImportDirective", + "scope": 22892, + "sourceUnit": 22822, + "src": "75:37:69", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 22851, + "nodeType": "ImportDirective", + "scope": 22892, + "sourceUnit": 21128, + "src": "113:48:69", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22891, + "linearizedBaseContracts": [ + 22891 + ], + "name": "IPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "b9e1715b", + "id": 22856, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenAOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22852, + "nodeType": "ParameterList", + "parameters": [], + "src": "246:2:69" + }, + "returnParameters": { + "id": 22855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22854, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22856, + "src": "272:21:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 22853, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "272:21:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:23:69" + }, + "scope": 22891, + "src": "225:70:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f997fda7", + "id": 22861, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenBOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22857, + "nodeType": "ParameterList", + "parameters": [], + "src": "321:2:69" + }, + "returnParameters": { + "id": 22860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22859, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22861, + "src": "347:21:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 22858, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "347:21:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "346:23:69" + }, + "scope": 22891, + "src": "300:70:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "ae818004", + "id": 22872, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22866, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22863, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "396:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22862, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "396:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22865, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "417:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22864, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "417:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "395:42:69" + }, + "returnParameters": { + "id": 22871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22868, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "461:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22867, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22870, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22872, + "src": "470:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "470:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "460:18:69" + }, + "scope": 22891, + "src": "376:103:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c8f33c91", + "id": 22877, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "lastUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22873, + "nodeType": "ParameterList", + "parameters": [], + "src": "507:2:69" + }, + "returnParameters": { + "id": 22876, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22875, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22877, + "src": "533:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22874, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "533:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "532:9:69" + }, + "scope": 22891, + "src": "484:58:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "b1772d7a", + "id": 22890, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "latestRateAndUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22882, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22879, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "580:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22878, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "580:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22881, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "601:19:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22880, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "601:11:69", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "579:42:69" + }, + "returnParameters": { + "id": 22889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22884, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "645:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22883, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "645:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22886, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "654:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22885, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "654:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22888, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22890, + "src": "663:7:69", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "663:7:69", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "644:27:69" + }, + "scope": 22891, + "src": "547:125:69", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22892, + "src": "196:478:69" + } + ], + "src": "51:624:69" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.850Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ISmartToken.json b/apps/cic-eth/tests/testdata/bancor/ISmartToken.json new file mode 100644 index 00000000..7529f4d4 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ISmartToken.json @@ -0,0 +1,1013 @@ +{ + "contractName": "ISmartToken", + "abi": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "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": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "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": "symbol", + "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": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "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 IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_disable", + "type": "bool" + } + ], + "name": "disableTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_disable\",\"type\":\"bool\"}],\"name\":\"disableTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"issue\",\"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\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"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 IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":\"ISmartToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IERC20Token.sol\";\nimport \"../../converter/interfaces/IConverterAnchor.sol\";\nimport \"../../utility/interfaces/IOwned.sol\";\n\n/*\n Smart Token interface\n*/\ninterface ISmartToken is IConverterAnchor, IERC20Token {\n function disableTransfers(bool _disable) external;\n function issue(address _to, uint256 _amount) external;\n function destroy(address _from, uint256 _amount) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "exportedSymbols": { + "ISmartToken": [ + 21182 + ] + }, + "id": 21183, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21155, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:53" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./IERC20Token.sol", + "id": 21156, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 21128, + "src": "75:27:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../../converter/interfaces/IConverterAnchor.sol", + "id": 21157, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 13350, + "src": "103:57:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 21158, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 22848, + "src": "161:45:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21159, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "265:16:53", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 21160, + "nodeType": "InheritanceSpecifier", + "src": "265:16:53" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21161, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "283:11:53", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21162, + "nodeType": "InheritanceSpecifier", + "src": "283:11:53" + } + ], + "contractDependencies": [ + 13349, + 21127, + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21182, + "linearizedBaseContracts": [ + 21182, + 21127, + 13349, + 22907, + 22847 + ], + "name": "ISmartToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "1608f18f", + "id": 21167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "disableTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21165, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21164, + "mutability": "mutable", + "name": "_disable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21167, + "src": "327:13:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21163, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "327:4:53", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "326:15:53" + }, + "returnParameters": { + "id": 21166, + "nodeType": "ParameterList", + "parameters": [], + "src": "350:0:53" + }, + "scope": 21182, + "src": "301:50:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "867904b4", + "id": 21174, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "issue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21169, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21174, + "src": "371:11:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "371:7:53", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21171, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21174, + "src": "384:15:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:53", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "370:30:53" + }, + "returnParameters": { + "id": 21173, + "nodeType": "ParameterList", + "parameters": [], + "src": "409:0:53" + }, + "scope": 21182, + "src": "356:54:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a24835d1", + "id": 21181, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "destroy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21176, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21181, + "src": "432:13:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "432:7:53", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21181, + "src": "447:15:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "447:7:53", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "431:32:53" + }, + "returnParameters": { + "id": 21180, + "nodeType": "ParameterList", + "parameters": [], + "src": "472:0:53" + }, + "scope": 21182, + "src": "415:58:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21183, + "src": "240:235:53" + } + ], + "src": "51:425:53" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "exportedSymbols": { + "ISmartToken": [ + 21182 + ] + }, + "id": 21183, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21155, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:53" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "./IERC20Token.sol", + "id": 21156, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 21128, + "src": "75:27:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../../converter/interfaces/IConverterAnchor.sol", + "id": 21157, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 13350, + "src": "103:57:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "../../utility/interfaces/IOwned.sol", + "id": 21158, + "nodeType": "ImportDirective", + "scope": 21183, + "sourceUnit": 22848, + "src": "161:45:53", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21159, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "265:16:53", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 21160, + "nodeType": "InheritanceSpecifier", + "src": "265:16:53" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21161, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "283:11:53", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21162, + "nodeType": "InheritanceSpecifier", + "src": "283:11:53" + } + ], + "contractDependencies": [ + 13349, + 21127, + 22847, + 22907 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 21182, + "linearizedBaseContracts": [ + 21182, + 21127, + 13349, + 22907, + 22847 + ], + "name": "ISmartToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "1608f18f", + "id": 21167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "disableTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21165, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21164, + "mutability": "mutable", + "name": "_disable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21167, + "src": "327:13:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21163, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "327:4:53", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "326:15:53" + }, + "returnParameters": { + "id": 21166, + "nodeType": "ParameterList", + "parameters": [], + "src": "350:0:53" + }, + "scope": 21182, + "src": "301:50:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "867904b4", + "id": 21174, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "issue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21169, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21174, + "src": "371:11:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "371:7:53", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21171, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21174, + "src": "384:15:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:53", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "370:30:53" + }, + "returnParameters": { + "id": 21173, + "nodeType": "ParameterList", + "parameters": [], + "src": "409:0:53" + }, + "scope": 21182, + "src": "356:54:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a24835d1", + "id": 21181, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "destroy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21179, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21176, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21181, + "src": "432:13:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "432:7:53", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21178, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21181, + "src": "447:15:53", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "447:7:53", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "431:32:53" + }, + "returnParameters": { + "id": 21180, + "nodeType": "ParameterList", + "parameters": [], + "src": "472:0:53" + }, + "scope": 21182, + "src": "415:58:53", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 21183, + "src": "240:235:53" + } + ], + "src": "51:425:53" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.837Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ITokenHolder.json b/apps/cic-eth/tests/testdata/bancor/ITokenHolder.json new file mode 100644 index 00000000..a809cfea --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ITokenHolder.json @@ -0,0 +1,492 @@ +{ + "contractName": "ITokenHolder", + "abi": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":\"ITokenHolder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IOwned.sol\";\nimport \"../../token/interfaces/IERC20Token.sol\";\n\n/*\n Token Holder interface\n*/\ninterface ITokenHolder is IOwned {\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) external;\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "exportedSymbols": { + "ITokenHolder": [ + 22907 + ] + }, + "id": 22908, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22893, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:70" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "./IOwned.sol", + "id": 22894, + "nodeType": "ImportDirective", + "scope": 22908, + "sourceUnit": 22848, + "src": "75:22:70", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 22895, + "nodeType": "ImportDirective", + "scope": 22908, + "sourceUnit": 21128, + "src": "98:48:70", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22896, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "207:6:70", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 22897, + "nodeType": "InheritanceSpecifier", + "src": "207:6:70" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22907, + "linearizedBaseContracts": [ + 22907, + 22847 + ], + "name": "ITokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e35359e", + "id": 22906, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22899, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "244:18:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22898, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "244:11:70", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22901, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "264:11:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "264:7:70", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22903, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "277:15:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "277:7:70", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "243:50:70" + }, + "returnParameters": { + "id": 22905, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:70" + }, + "scope": 22907, + "src": "220:83:70", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22908, + "src": "181:124:70" + } + ], + "src": "51:255:70" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "exportedSymbols": { + "ITokenHolder": [ + 22907 + ] + }, + "id": 22908, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22893, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:70" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "./IOwned.sol", + "id": 22894, + "nodeType": "ImportDirective", + "scope": 22908, + "sourceUnit": 22848, + "src": "75:22:70", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../../token/interfaces/IERC20Token.sol", + "id": 22895, + "nodeType": "ImportDirective", + "scope": 22908, + "sourceUnit": 21128, + "src": "98:48:70", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22896, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "207:6:70", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 22897, + "nodeType": "InheritanceSpecifier", + "src": "207:6:70" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22907, + "linearizedBaseContracts": [ + 22907, + 22847 + ], + "name": "ITokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "5e35359e", + "id": 22906, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22899, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "244:18:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22898, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "244:11:70", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22901, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "264:11:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22900, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "264:7:70", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22903, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22906, + "src": "277:15:70", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "277:7:70", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "243:50:70" + }, + "returnParameters": { + "id": 22905, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:70" + }, + "scope": 22907, + "src": "220:83:70", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22908, + "src": "181:124:70" + } + ], + "src": "51:255:70" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.850Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ITypedConverterAnchorFactory.json b/apps/cic-eth/tests/testdata/bancor/ITypedConverterAnchorFactory.json new file mode 100644 index 00000000..786e311f --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ITypedConverterAnchorFactory.json @@ -0,0 +1,584 @@ +{ + "contractName": "ITypedConverterAnchorFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":\"ITypedConverterAnchorFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverterAnchor.sol\";\n\n/*\n Typed Converter Anchor Factory interface\n*/\ninterface ITypedConverterAnchorFactory {\n function converterType() external pure returns (uint16);\n function createAnchor(string memory _name, string memory _symbol, uint8 _decimals) external returns (IConverterAnchor);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "exportedSymbols": { + "ITypedConverterAnchorFactory": [ + 13680 + ] + }, + "id": 13681, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13662, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:21" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13663, + "nodeType": "ImportDirective", + "scope": 13681, + "sourceUnit": 13350, + "src": "75:32:21", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13680, + "linearizedBaseContracts": [ + 13680 + ], + "name": "ITypedConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13668, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13664, + "nodeType": "ParameterList", + "parameters": [], + "src": "227:2:21" + }, + "returnParameters": { + "id": 13667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13666, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13668, + "src": "253:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13665, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "253:6:21", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:8:21" + }, + "scope": 13680, + "src": "205:56:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a9fd4a2a", + "id": 13679, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13670, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "288:19:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13669, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "288:6:21", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13672, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "309:21:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13671, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "309:6:21", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13674, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "332:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 13673, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "332:5:21", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:61:21" + }, + "returnParameters": { + "id": 13678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "367:16:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13676, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "367:16:21", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "366:18:21" + }, + "scope": 13680, + "src": "266:119:21", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13681, + "src": "160:227:21" + } + ], + "src": "51:337:21" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "exportedSymbols": { + "ITypedConverterAnchorFactory": [ + 13680 + ] + }, + "id": 13681, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13662, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:21" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13663, + "nodeType": "ImportDirective", + "scope": 13681, + "sourceUnit": 13350, + "src": "75:32:21", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13680, + "linearizedBaseContracts": [ + 13680 + ], + "name": "ITypedConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13668, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13664, + "nodeType": "ParameterList", + "parameters": [], + "src": "227:2:21" + }, + "returnParameters": { + "id": 13667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13666, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13668, + "src": "253:6:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13665, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "253:6:21", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:8:21" + }, + "scope": 13680, + "src": "205:56:21", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "a9fd4a2a", + "id": 13679, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13670, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "288:19:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13669, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "288:6:21", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13672, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "309:21:21", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 13671, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "309:6:21", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13674, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "332:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 13673, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "332:5:21", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "287:61:21" + }, + "returnParameters": { + "id": 13678, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13677, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13679, + "src": "367:16:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13676, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "367:16:21", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "366:18:21" + }, + "scope": 13680, + "src": "266:119:21", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13681, + "src": "160:227:21" + } + ], + "src": "51:337:21" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.747Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ITypedConverterCustomFactory.json b/apps/cic-eth/tests/testdata/bancor/ITypedConverterCustomFactory.json new file mode 100644 index 00000000..311d819c --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ITypedConverterCustomFactory.json @@ -0,0 +1,243 @@ +{ + "contractName": "ITypedConverterCustomFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":\"ITypedConverterCustomFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Typed Converter Custom Factory interface\n*/\ninterface ITypedConverterCustomFactory {\n function converterType() external pure returns (uint16);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "exportedSymbols": { + "ITypedConverterCustomFactory": [ + 13688 + ] + }, + "id": 13689, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13682, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13688, + "linearizedBaseContracts": [ + 13688 + ], + "name": "ITypedConverterCustomFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13687, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13683, + "nodeType": "ParameterList", + "parameters": [], + "src": "194:2:22" + }, + "returnParameters": { + "id": 13686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13685, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13687, + "src": "220:6:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13684, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "220:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "219:8:22" + }, + "scope": 13688, + "src": "172:56:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13689, + "src": "127:103:22" + } + ], + "src": "51:180:22" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "exportedSymbols": { + "ITypedConverterCustomFactory": [ + 13688 + ] + }, + "id": 13689, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13682, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13688, + "linearizedBaseContracts": [ + 13688 + ], + "name": "ITypedConverterCustomFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13687, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13683, + "nodeType": "ParameterList", + "parameters": [], + "src": "194:2:22" + }, + "returnParameters": { + "id": 13686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13685, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13687, + "src": "220:6:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13684, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "220:6:22", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "219:8:22" + }, + "scope": 13688, + "src": "172:56:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13689, + "src": "127:103:22" + } + ], + "src": "51:180:22" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.747Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ITypedConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/ITypedConverterFactory.json new file mode 100644 index 00000000..55775d86 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ITypedConverterFactory.json @@ -0,0 +1,636 @@ +{ + "contractName": "ITypedConverterFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":\"ITypedConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverter.sol\";\nimport \"./IConverterAnchor.sol\";\nimport \"../../utility/interfaces/IContractRegistry.sol\";\n\n/*\n Typed Converter Factory interface\n*/\ninterface ITypedConverterFactory {\n function converterType() external pure returns (uint16);\n function createConverter(IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external returns (IConverter);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "exportedSymbols": { + "ITypedConverterFactory": [ + 13710 + ] + }, + "id": 13711, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13690, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:23" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./IConverter.sol", + "id": 13691, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 13341, + "src": "75:26:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13692, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 13350, + "src": "102:32:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../../utility/interfaces/IContractRegistry.sol", + "id": 13693, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 22832, + "src": "135:56:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13710, + "linearizedBaseContracts": [ + 13710 + ], + "name": "ITypedConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13698, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13694, + "nodeType": "ParameterList", + "parameters": [], + "src": "298:2:23" + }, + "returnParameters": { + "id": 13697, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13696, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13698, + "src": "324:6:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13695, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "324:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "323:8:23" + }, + "scope": 13710, + "src": "276:56:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "11413958", + "id": 13709, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13700, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "362:24:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13699, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "362:16:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13702, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "388:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13701, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "388:17:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13704, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "417:24:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13703, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "417:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "361:81:23" + }, + "returnParameters": { + "id": 13708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13707, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "461:10:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 13706, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "461:10:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "460:12:23" + }, + "scope": 13710, + "src": "337:136:23", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13711, + "src": "237:238:23" + } + ], + "src": "51:425:23" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "exportedSymbols": { + "ITypedConverterFactory": [ + 13710 + ] + }, + "id": 13711, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13690, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:23" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "./IConverter.sol", + "id": 13691, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 13341, + "src": "75:26:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "./IConverterAnchor.sol", + "id": 13692, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 13350, + "src": "102:32:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol", + "file": "../../utility/interfaces/IContractRegistry.sol", + "id": 13693, + "nodeType": "ImportDirective", + "scope": 13711, + "sourceUnit": 22832, + "src": "135:56:23", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 13710, + "linearizedBaseContracts": [ + 13710 + ], + "name": "ITypedConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 13698, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13694, + "nodeType": "ParameterList", + "parameters": [], + "src": "298:2:23" + }, + "returnParameters": { + "id": 13697, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13696, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13698, + "src": "324:6:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13695, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "324:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "323:8:23" + }, + "scope": 13710, + "src": "276:56:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "11413958", + "id": 13709, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13700, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "362:24:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13699, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "362:16:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13702, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "388:27:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13701, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "388:17:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13704, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "417:24:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13703, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "417:6:23", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "361:81:23" + }, + "returnParameters": { + "id": 13708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13707, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13709, + "src": "461:10:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 13706, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "461:10:23", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "460:12:23" + }, + "scope": 13710, + "src": "337:136:23", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 13711, + "src": "237:238:23" + } + ], + "src": "51:425:23" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.747Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/IWhitelist.json b/apps/cic-eth/tests/testdata/bancor/IWhitelist.json new file mode 100644 index 00000000..af4749a9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/IWhitelist.json @@ -0,0 +1,309 @@ +{ + "contractName": "IWhitelist", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isWhitelisted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":\"IWhitelist\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Whitelist interface\n*/\ninterface IWhitelist {\n function isWhitelisted(address _address) external view returns (bool);\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "exportedSymbols": { + "IWhitelist": [ + 22917 + ] + }, + "id": 22918, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22909, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:71" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22917, + "linearizedBaseContracts": [ + 22917 + ], + "name": "IWhitelist", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3af32abf", + "id": 22916, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22912, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22911, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22916, + "src": "156:16:71", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22910, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "156:7:71", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "155:18:71" + }, + "returnParameters": { + "id": 22915, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22914, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22916, + "src": "197:4:71", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22913, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "197:4:71", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "196:6:71" + }, + "scope": 22917, + "src": "133:70:71", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22918, + "src": "106:99:71" + } + ], + "src": "51:155:71" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "exportedSymbols": { + "IWhitelist": [ + 22917 + ] + }, + "id": 22918, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22909, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:71" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 22917, + "linearizedBaseContracts": [ + 22917 + ], + "name": "IWhitelist", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "3af32abf", + "id": 22916, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22912, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22911, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22916, + "src": "156:16:71", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22910, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "156:7:71", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "155:18:71" + }, + "returnParameters": { + "id": 22915, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22914, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22916, + "src": "197:4:71", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22913, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "197:4:71", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "196:6:71" + }, + "scope": 22917, + "src": "133:70:71", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 22918, + "src": "106:99:71" + } + ], + "src": "51:155:71" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.850Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json b/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json new file mode 100644 index 00000000..f056bbac --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json @@ -0,0 +1,19724 @@ +{ + "contractName": "LiquidTokenConverter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Liquid Token Converter The liquid token converter is a specialized version of a converter that manages a liquid token. The converters govern a token with a single reserve and allow converting between the two. Liquid tokens usually have fractional reserve (reserve ratio smaller than 100%).\",\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"addReserve(address,uint32)\":{\"details\":\"defines the reserve token for the converter can only be called by the owner while the converter is inactive and the reserve wasn't defined yet\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"constructor\":{\"details\":\"initializes a new LiquidTokenConverter instance\",\"params\":{\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\",\"_token\":\"liquid token governed by the converter\"}},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"converterType()\":{\"details\":\"returns the converter type\",\"returns\":{\"_0\":\"see the converter types in the the main contract doc\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"targetAmountAndFee(address,address,uint256)\":{\"details\":\"returns the expected target amount of converting the source token to the target token along with the fee\",\"params\":{\"_amount\":\"amount of tokens received from the user\",\"_sourceToken\":\"contract address of the source token\",\"_targetToken\":\"contract address of the target token\"},\"returns\":{\"_0\":\"expected target amount\",\"_1\":\"expected fee\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol\":\"LiquidTokenConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol\":{\"keccak256\":\"0x71b0a2afa4f9c0f92b1607326dd1f13397cf11a4098b6580bfd9e83efcd65539\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://cce0ca5c0e627f2455c0fe3bf1148f01c1c58c34f557df148cfa88e8c94bf20e\",\"dweb:/ipfs/QmNUGi7KbbNT6wtKSd6fuySsX9FT21eqkomQZDGK4BoMHy\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b19169055600880546001600160601b03191690553480156200002e57600080fd5b50604051620031db380380620031db833981810160405260608110156200005457600080fd5b5080516020820151604090920151600080546001600160a01b03191633179055909190828282818062000087816200011e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000be816200011e565b81620000ca816200017d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001dc915050565b6001600160a01b0381166200017a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200017a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b612fef80620001ec6000396000f3fe6080604052600436106102765760003560e01c806371f52bf31161014f578063d031370b116100c1578063d89595121161007a578063d8959512146108e7578063dc8de3791461092c578063e8dc12ff1461095f578063ecbca55d146109a5578063f2fde38b146109d5578063fc0c546a14610a085761030d565b8063d031370b14610836578063d260529c14610860578063d3fb73b414610875578063d4ee1d901461088a578063d55ec6971461089f578063d66bd524146108b45761030d565b80639b99a8e2116101135780639b99a8e21461078a578063af94b8d81461079f578063b4a176d3146107e2578063bf754558146107f7578063c45d3d921461080c578063cdc91c69146108215761030d565b806371f52bf31461072157806379ba5097146107365780637b1039991461074b5780638da5cb5b1461076057806394c275ad146107755761030d565b8063395900d4116101e8578063579cd3ca116101ac578063579cd3ca1461060f5780635e35359e1461062457806361cd756e1461066757806367b6d57c1461067c578063690d8320146106af5780636a49d2c4146106e25761030d565b8063395900d4146105435780633e8ff43f1461058657806349d10b64146105b25780634af80f0e146105c757806354fd4d50146105fa5761030d565b80631cfab2901161023a5780631cfab290146104425780631e1401f81461047557806321e6b53d146104d157806322f3e2d4146105045780632fe8a6ad1461051957806338a5e0161461052e5761030d565b8063024c7ec7146103125780630c7d5cd81461033e5780630e53aae91461036c57806312c2aca4146103d357806319b64015146103fc5761030d565b3661030d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661030b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061030b6004803603602081101561033557600080fd5b50351515610a1d565b34801561034a57600080fd5b50610353610a43565b6040805163ffffffff9092168252519081900360200190f35b34801561037857600080fd5b5061039f6004803603602081101561038f57600080fd5b50356001600160a01b0316610a4f565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156103df57600080fd5b506103e8610ae7565b604080519115158252519081900360200190f35b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610b33565b604080516001600160a01b039092168252519081900360200190f35b34801561044e57600080fd5b506103536004803603602081101561046557600080fd5b50356001600160a01b0316610b5d565b34801561048157600080fd5b506104b86004803603606081101561049857600080fd5b506001600160a01b03813581169160208101359091169060400135610b8f565b6040805192835260208301919091528051918290030190f35b3480156104dd57600080fd5b5061030b600480360360208110156104f457600080fd5b50356001600160a01b0316610baa565b34801561051057600080fd5b506103e8610bbe565b34801561052557600080fd5b506103e8610c3d565b34801561053a57600080fd5b5061030b610c4d565b34801561054f57600080fd5b5061030b6004803603606081101561056657600080fd5b506001600160a01b03813581169160208101359091169060400135610c5f565b34801561059257600080fd5b5061059b610ce5565b6040805161ffff9092168252519081900360200190f35b3480156105be57600080fd5b5061030b610cea565b3480156105d357600080fd5b5061030b600480360360208110156105ea57600080fd5b50356001600160a01b0316610ef2565b34801561060657600080fd5b5061059b610f27565b34801561061b57600080fd5b50610353610f2c565b34801561063057600080fd5b5061030b6004803603606081101561064757600080fd5b506001600160a01b03813581169160208101359091169060400135610f3f565b34801561067357600080fd5b50610426611070565b34801561068857600080fd5b5061030b6004803603602081101561069f57600080fd5b50356001600160a01b031661107f565b3480156106bb57600080fd5b5061030b600480360360208110156106d257600080fd5b50356001600160a01b031661112b565b3480156106ee57600080fd5b5061030b6004803603604081101561070557600080fd5b5080356001600160a01b0316906020013563ffffffff1661125e565b34801561072d57600080fd5b5061059b6112ce565b34801561074257600080fd5b5061030b6112dd565b34801561075757600080fd5b50610426611394565b34801561076c57600080fd5b506104266113a3565b34801561078157600080fd5b506103536113b2565b34801561079657600080fd5b5061059b6113c6565b3480156107ab57600080fd5b506104b8600480360360608110156107c257600080fd5b506001600160a01b038135811691602081013590911690604001356113cc565b3480156107ee57600080fd5b5061030b6114b5565b34801561080357600080fd5b506103e86114e1565b34801561081857600080fd5b506104266114e6565b34801561082d57600080fd5b5061030b6114f5565b34801561084257600080fd5b506104266004803603602081101561085957600080fd5b503561154e565b34801561086c57600080fd5b506103e8611575565b34801561088157600080fd5b5061042661157a565b34801561089657600080fd5b50610426611589565b3480156108ab57600080fd5b5061030b611598565b3480156108c057600080fd5b5061039f600480360360208110156108d757600080fd5b50356001600160a01b0316611680565b3480156108f357600080fd5b5061091a6004803603602081101561090a57600080fd5b50356001600160a01b03166116c3565b60408051918252519081900360200190f35b34801561093857600080fd5b5061091a6004803603602081101561094f57600080fd5b50356001600160a01b03166116d4565b61091a600480360360a081101561097557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135821691608090910135166116fd565b3480156109b157600080fd5b5061030b600480360360208110156109c857600080fd5b503563ffffffff1661190d565b3480156109e157600080fd5b5061030b600480360360208110156109f857600080fd5b50356001600160a01b03166119f5565b348015610a1457600080fd5b50610426611a73565b610a25611a82565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000610a5f612f8b565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b600060068281548110610b4257fe5b6000918252602090912001546001600160a01b031692915050565b600081610b6981611ad5565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600080610b9d8585856113cc565b915091505b935093915050565b610bb2611a82565b610bbb8161107f565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b158015610c0257600080fd5b505afa158015610c16573d6000803e3d6000fd5b505050506040513d6020811015610c2c57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b610c55611a82565b610c5d6114f5565b565b610c67611a82565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b50505050505050565b600090565b6000546001600160a01b0316331480610d0d5750600354600160a01b900460ff16155b610d52576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610d706f436f6e7472616374526567697374727960801b611b42565b6002549091506001600160a01b03808316911614801590610d9957506001600160a01b03811615155b610de1576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b03161415610ec2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610efa611a82565b80610f0481611bc0565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b600854600160401b900463ffffffff1681565b610f47611c14565b6003805460ff60a81b1916600160a81b179055610f62611a82565b6000610f87762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580610fc15750610fbf610bbe565b155b80610fd957506000546001600160a01b038281169116145b61101e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611029848484611c64565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff161561105d5761105d84611c95565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611087611a82565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6110ab81611d73565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561110f57600080fd5b505af1158015611123573d6000803e3d6000fd5b505050505050565b611133611c14565b6003805460ff60a81b1916600160a81b17905561114e611a82565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61116c81611ad5565b6000611191762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b905061119b610bbe565b15806111b457506000546001600160a01b038281169116145b6111f9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561122e573d6000803e3d6000fd5b5061124c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee611c95565b50506003805460ff60a81b1916905550565b611266611a82565b61126e6113c6565b61ffff16156112c0576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6112ca8282611dd5565b5050565b60006112d86113c6565b905090565b6001546001600160a01b03163314611330576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60065490565b60045460009081906001600160a01b03858116911614801561141057506001600160a01b038516600090815260076020526040902060010154600160301b900460ff165b156114275761141e83611ff7565b91509150610ba2565b6004546001600160a01b03868116911614801561146657506001600160a01b038416600090815260076020526040902060010154600160301b900460ff165b156114745761141e836121e9565b6040805162461bcd60e51b815260206004820152601160248201527022a9292fa4a72b20a624a22faa27a5a2a760791b604482015290519081900360640190fd5b6114bd611a82565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b6005546001600160a01b031681565b6114fd611a82565b6115056122dd565b6004546001906001600160a01b031661151c610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b6006818154811061155b57fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b6115a0611a82565b60006115c5762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6004549091506000906001600160a01b03166115df610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4611618816119f5565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561166057600080fd5b505af1158015611674573d6000803e3d6000fd5b50505050610bbb6112dd565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006116ce826116d4565b92915050565b6000816116e081611ad5565b50506001600160a01b031660009081526007602052604090205490565b6000611707611c14565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b61173481611d73565b856001600160a01b0316876001600160a01b03161415611794576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b031615806118a1575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156117f457600080fd5b505afa158015611808573d6000803e3d6000fd5b505050506040513d602081101561181e57600080fd5b505180156118a1575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561187457600080fd5b505afa158015611888573d6000803e3d6000fd5b505050506040513d602081101561189e57600080fd5b50515b6118e8576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6118f587878787876123a4565b6003805460ff60a81b19169055979650505050505050565b611915611a82565b60085463ffffffff6401000000009091048116908216111561197e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6119fd611a82565b6000546001600160a01b0382811691161415611a51576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314610c5d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8e57600080fd5b505afa158015611ba2573d6000803e3d6000fd5b505050506040513d6020811015611bb857600080fd5b505192915050565b6001600160a01b038116301415610bbb576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600354600160a81b900460ff1615610c5d576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b611c6c611a82565b82611c768161256d565b82611c808161256d565b83611c8a81611bc0565b6111238686866125be565b80611c9f81611ad5565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611ce4576001600160a01b03821660009081526007602052604090204790556112ca565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015611d2a57600080fd5b505afa158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b611d7c81611b42565b6001600160a01b0316336001600160a01b031614610bbb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611ddd611a82565b611de561271e565b81611def8161256d565b82611df981611bc0565b82611e0381612765565b6004546001600160a01b03868116911614801590611e4457506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b611e8b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115611ef3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff611efe6113c6565b61ffff1610611f50576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6000806120026127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561205257600080fd5b505afa158015612066573d6000803e3d6000fd5b505050506040513d602081101561207c57600080fd5b505160068054919250600091829061209057fe5b6000918252602090912001546001600160a01b03169050816120f9576001600160a01b0381166000908152600760205260409020600101546120ec9063ffffffff908116906120e6908890620f42409061281d16565b90612882565b60009350935050506121e4565b60006121146c42616e636f72466f726d756c6160981b611b42565b6001600160a01b031663f3250fe28461212c856116d4565b6001600160a01b0386166000908152600760209081526040918290206001015482516001600160e01b031960e088901b1681526004810195909552602485019390935263ffffffff9092166044840152606483018b905251608480840193829003018186803b15801561219e57600080fd5b505afa1580156121b2573d6000803e3d6000fd5b505050506040513d60208110156121c857600080fd5b5051905060006121d7826128e1565b9182900395509093505050505b915091565b6000806121f46127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561224457600080fd5b505afa158015612258573d6000803e3d6000fd5b505050506040513d602081101561226e57600080fd5b505160068054919250600091829061228257fe5b6000918252602090912001546001600160a01b03169050818514156122aa576120ec816116d4565b60006122c56c42616e636f72466f726d756c6160981b611b42565b6001600160a01b03166376cf0b568461212c856116d4565b6122e5611a82565b60006122ef6113c6565b61ffff1611612341576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b15801561238457600080fd5b505af1158015612398573d6000803e3d6000fd5b50505050610c5d61290c565b600454600090819081906001600160a01b0388811691161480156123ea57506001600160a01b038816600090815260076020526040902060010154600160301b900460ff165b156124035750866123fc86868661294c565b9150612454565b6004546001600160a01b03898116911614801561244257506001600160a01b038716600090815260076020526040902060010154600160301b900460ff165b156114745750856123fc868686612bc0565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b50516001600160a01b0380841660008181526007602052604090206001015460045493945063ffffffff16929091167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24612534620f424061252e886116d4565b9061281d565b6125478663ffffffff8088169061281d16565b6040805192835260208301919091528051918290030190a3509198975050505050505050565b6001600160a01b038116610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061263b5780518252601f19909201916020918201910161261c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461269d576040519150601f19603f3d011682016040523d82523d6000602084013e6126a2565b606091505b50915091508180156126d05750805115806126d057508080602001905160208110156126cd57600080fd5b50515b612717576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b612726610bbe565b15610c5d576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156127845750620f424063ffffffff821611155b610bbb576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6127dd610bbe565b610c5d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008261282c575060006116ce565b8282028284828161283957fe5b041461287b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b60008082116128cd576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816128d857fe5b04949350505050565b6008546000906116ce90620f4240906120e6908590600160401b900463ffffffff9081169061281d16565b60065460005b818110156112ca576129446006828154811061292a57fe5b6000918252602090912001546001600160a01b0316611c95565b600101612912565b600080600061295a86611ff7565b9150915081600014156129ad576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b600060066000815481106129bd57fe5b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee811415612a4957863414612a44576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b612b20565b34158015612ada575086612ad7612a5f836116d4565b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b158015612aa557600080fd5b505afa158015612ab9573d6000803e3d6000fd5b505050506040513d6020811015612acf57600080fd5b505190612ed5565b10155b612b20576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b612b2981611c95565b600480546040805163219e412d60e21b81526001600160a01b0389811694820194909452602481018790529051929091169163867904b49160448082019260009290919082900301818387803b158015612b8257600080fd5b505af1158015612b96573d6000803e3d6000fd5b5050600454612bb592508391506001600160a01b0316888a8787612f22565b509095945050505050565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015612c0f57600080fd5b505afa158015612c23573d6000803e3d6000fd5b505050506040513d6020811015612c3957600080fd5b5051841115612c84576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600080612c90866121e9565b915091508160001415612ce3576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b60006006600081548110612cf357fe5b600091825260208083209091015460048054604080516318160ddd60e01b815290516001600160a01b03948516975091909316936318160ddd938084019391929190829003018186803b158015612d4957600080fd5b505afa158015612d5d573d6000803e3d6000fd5b505050506040513d6020811015612d7357600080fd5b505190506000612d82836116d4565b905080851080612d9b57508085148015612d9b57508189145b612da157fe5b600480546040805163a24835d160e01b81523093810193909352602483018c9052516001600160a01b039091169163a24835d191604480830192600092919082900301818387803b158015612df557600080fd5b505af1158015612e09573d6000803e3d6000fd5b5050506001600160a01b038416600090815260076020526040902054612e30915086612ed5565b6001600160a01b03841660008181526007602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612ea3576040516001600160a01b0388169086156108fc029087906000818181858888f19350505050158015612e9d573d6000803e3d6000fd5b50612eae565b612eae8388876125be565b600454612ec8906001600160a01b0316848a8c8989612f22565b5092979650505050505050565b600081831015612f1c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600160ff1b8110612f2f57fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea26469706673582212208711a54d3386915a9a6195bc55c1f59166ac4b22284e030f99ce604b01d8b3fd64736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106102765760003560e01c806371f52bf31161014f578063d031370b116100c1578063d89595121161007a578063d8959512146108e7578063dc8de3791461092c578063e8dc12ff1461095f578063ecbca55d146109a5578063f2fde38b146109d5578063fc0c546a14610a085761030d565b8063d031370b14610836578063d260529c14610860578063d3fb73b414610875578063d4ee1d901461088a578063d55ec6971461089f578063d66bd524146108b45761030d565b80639b99a8e2116101135780639b99a8e21461078a578063af94b8d81461079f578063b4a176d3146107e2578063bf754558146107f7578063c45d3d921461080c578063cdc91c69146108215761030d565b806371f52bf31461072157806379ba5097146107365780637b1039991461074b5780638da5cb5b1461076057806394c275ad146107755761030d565b8063395900d4116101e8578063579cd3ca116101ac578063579cd3ca1461060f5780635e35359e1461062457806361cd756e1461066757806367b6d57c1461067c578063690d8320146106af5780636a49d2c4146106e25761030d565b8063395900d4146105435780633e8ff43f1461058657806349d10b64146105b25780634af80f0e146105c757806354fd4d50146105fa5761030d565b80631cfab2901161023a5780631cfab290146104425780631e1401f81461047557806321e6b53d146104d157806322f3e2d4146105045780632fe8a6ad1461051957806338a5e0161461052e5761030d565b8063024c7ec7146103125780630c7d5cd81461033e5780630e53aae91461036c57806312c2aca4146103d357806319b64015146103fc5761030d565b3661030d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661030b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061030b6004803603602081101561033557600080fd5b50351515610a1d565b34801561034a57600080fd5b50610353610a43565b6040805163ffffffff9092168252519081900360200190f35b34801561037857600080fd5b5061039f6004803603602081101561038f57600080fd5b50356001600160a01b0316610a4f565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156103df57600080fd5b506103e8610ae7565b604080519115158252519081900360200190f35b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610b33565b604080516001600160a01b039092168252519081900360200190f35b34801561044e57600080fd5b506103536004803603602081101561046557600080fd5b50356001600160a01b0316610b5d565b34801561048157600080fd5b506104b86004803603606081101561049857600080fd5b506001600160a01b03813581169160208101359091169060400135610b8f565b6040805192835260208301919091528051918290030190f35b3480156104dd57600080fd5b5061030b600480360360208110156104f457600080fd5b50356001600160a01b0316610baa565b34801561051057600080fd5b506103e8610bbe565b34801561052557600080fd5b506103e8610c3d565b34801561053a57600080fd5b5061030b610c4d565b34801561054f57600080fd5b5061030b6004803603606081101561056657600080fd5b506001600160a01b03813581169160208101359091169060400135610c5f565b34801561059257600080fd5b5061059b610ce5565b6040805161ffff9092168252519081900360200190f35b3480156105be57600080fd5b5061030b610cea565b3480156105d357600080fd5b5061030b600480360360208110156105ea57600080fd5b50356001600160a01b0316610ef2565b34801561060657600080fd5b5061059b610f27565b34801561061b57600080fd5b50610353610f2c565b34801561063057600080fd5b5061030b6004803603606081101561064757600080fd5b506001600160a01b03813581169160208101359091169060400135610f3f565b34801561067357600080fd5b50610426611070565b34801561068857600080fd5b5061030b6004803603602081101561069f57600080fd5b50356001600160a01b031661107f565b3480156106bb57600080fd5b5061030b600480360360208110156106d257600080fd5b50356001600160a01b031661112b565b3480156106ee57600080fd5b5061030b6004803603604081101561070557600080fd5b5080356001600160a01b0316906020013563ffffffff1661125e565b34801561072d57600080fd5b5061059b6112ce565b34801561074257600080fd5b5061030b6112dd565b34801561075757600080fd5b50610426611394565b34801561076c57600080fd5b506104266113a3565b34801561078157600080fd5b506103536113b2565b34801561079657600080fd5b5061059b6113c6565b3480156107ab57600080fd5b506104b8600480360360608110156107c257600080fd5b506001600160a01b038135811691602081013590911690604001356113cc565b3480156107ee57600080fd5b5061030b6114b5565b34801561080357600080fd5b506103e86114e1565b34801561081857600080fd5b506104266114e6565b34801561082d57600080fd5b5061030b6114f5565b34801561084257600080fd5b506104266004803603602081101561085957600080fd5b503561154e565b34801561086c57600080fd5b506103e8611575565b34801561088157600080fd5b5061042661157a565b34801561089657600080fd5b50610426611589565b3480156108ab57600080fd5b5061030b611598565b3480156108c057600080fd5b5061039f600480360360208110156108d757600080fd5b50356001600160a01b0316611680565b3480156108f357600080fd5b5061091a6004803603602081101561090a57600080fd5b50356001600160a01b03166116c3565b60408051918252519081900360200190f35b34801561093857600080fd5b5061091a6004803603602081101561094f57600080fd5b50356001600160a01b03166116d4565b61091a600480360360a081101561097557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135821691608090910135166116fd565b3480156109b157600080fd5b5061030b600480360360208110156109c857600080fd5b503563ffffffff1661190d565b3480156109e157600080fd5b5061030b600480360360208110156109f857600080fd5b50356001600160a01b03166119f5565b348015610a1457600080fd5b50610426611a73565b610a25611a82565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000610a5f612f8b565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b600060068281548110610b4257fe5b6000918252602090912001546001600160a01b031692915050565b600081610b6981611ad5565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600080610b9d8585856113cc565b915091505b935093915050565b610bb2611a82565b610bbb8161107f565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b158015610c0257600080fd5b505afa158015610c16573d6000803e3d6000fd5b505050506040513d6020811015610c2c57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b610c55611a82565b610c5d6114f5565b565b610c67611a82565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b50505050505050565b600090565b6000546001600160a01b0316331480610d0d5750600354600160a01b900460ff16155b610d52576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610d706f436f6e7472616374526567697374727960801b611b42565b6002549091506001600160a01b03808316911614801590610d9957506001600160a01b03811615155b610de1576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b03161415610ec2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610efa611a82565b80610f0481611bc0565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b600854600160401b900463ffffffff1681565b610f47611c14565b6003805460ff60a81b1916600160a81b179055610f62611a82565b6000610f87762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580610fc15750610fbf610bbe565b155b80610fd957506000546001600160a01b038281169116145b61101e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611029848484611c64565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff161561105d5761105d84611c95565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611087611a82565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6110ab81611d73565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561110f57600080fd5b505af1158015611123573d6000803e3d6000fd5b505050505050565b611133611c14565b6003805460ff60a81b1916600160a81b17905561114e611a82565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61116c81611ad5565b6000611191762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b905061119b610bbe565b15806111b457506000546001600160a01b038281169116145b6111f9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561122e573d6000803e3d6000fd5b5061124c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee611c95565b50506003805460ff60a81b1916905550565b611266611a82565b61126e6113c6565b61ffff16156112c0576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6112ca8282611dd5565b5050565b60006112d86113c6565b905090565b6001546001600160a01b03163314611330576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60065490565b60045460009081906001600160a01b03858116911614801561141057506001600160a01b038516600090815260076020526040902060010154600160301b900460ff165b156114275761141e83611ff7565b91509150610ba2565b6004546001600160a01b03868116911614801561146657506001600160a01b038416600090815260076020526040902060010154600160301b900460ff165b156114745761141e836121e9565b6040805162461bcd60e51b815260206004820152601160248201527022a9292fa4a72b20a624a22faa27a5a2a760791b604482015290519081900360640190fd5b6114bd611a82565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b6005546001600160a01b031681565b6114fd611a82565b6115056122dd565b6004546001906001600160a01b031661151c610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b6006818154811061155b57fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b6115a0611a82565b60006115c5762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6004549091506000906001600160a01b03166115df610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4611618816119f5565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561166057600080fd5b505af1158015611674573d6000803e3d6000fd5b50505050610bbb6112dd565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006116ce826116d4565b92915050565b6000816116e081611ad5565b50506001600160a01b031660009081526007602052604090205490565b6000611707611c14565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b61173481611d73565b856001600160a01b0316876001600160a01b03161415611794576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b031615806118a1575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156117f457600080fd5b505afa158015611808573d6000803e3d6000fd5b505050506040513d602081101561181e57600080fd5b505180156118a1575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561187457600080fd5b505afa158015611888573d6000803e3d6000fd5b505050506040513d602081101561189e57600080fd5b50515b6118e8576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6118f587878787876123a4565b6003805460ff60a81b19169055979650505050505050565b611915611a82565b60085463ffffffff6401000000009091048116908216111561197e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6119fd611a82565b6000546001600160a01b0382811691161415611a51576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314610c5d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8e57600080fd5b505afa158015611ba2573d6000803e3d6000fd5b505050506040513d6020811015611bb857600080fd5b505192915050565b6001600160a01b038116301415610bbb576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600354600160a81b900460ff1615610c5d576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b611c6c611a82565b82611c768161256d565b82611c808161256d565b83611c8a81611bc0565b6111238686866125be565b80611c9f81611ad5565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611ce4576001600160a01b03821660009081526007602052604090204790556112ca565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015611d2a57600080fd5b505afa158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b611d7c81611b42565b6001600160a01b0316336001600160a01b031614610bbb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611ddd611a82565b611de561271e565b81611def8161256d565b82611df981611bc0565b82611e0381612765565b6004546001600160a01b03868116911614801590611e4457506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b611e8b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115611ef3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff611efe6113c6565b61ffff1610611f50576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6000806120026127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561205257600080fd5b505afa158015612066573d6000803e3d6000fd5b505050506040513d602081101561207c57600080fd5b505160068054919250600091829061209057fe5b6000918252602090912001546001600160a01b03169050816120f9576001600160a01b0381166000908152600760205260409020600101546120ec9063ffffffff908116906120e6908890620f42409061281d16565b90612882565b60009350935050506121e4565b60006121146c42616e636f72466f726d756c6160981b611b42565b6001600160a01b031663f3250fe28461212c856116d4565b6001600160a01b0386166000908152600760209081526040918290206001015482516001600160e01b031960e088901b1681526004810195909552602485019390935263ffffffff9092166044840152606483018b905251608480840193829003018186803b15801561219e57600080fd5b505afa1580156121b2573d6000803e3d6000fd5b505050506040513d60208110156121c857600080fd5b5051905060006121d7826128e1565b9182900395509093505050505b915091565b6000806121f46127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561224457600080fd5b505afa158015612258573d6000803e3d6000fd5b505050506040513d602081101561226e57600080fd5b505160068054919250600091829061228257fe5b6000918252602090912001546001600160a01b03169050818514156122aa576120ec816116d4565b60006122c56c42616e636f72466f726d756c6160981b611b42565b6001600160a01b03166376cf0b568461212c856116d4565b6122e5611a82565b60006122ef6113c6565b61ffff1611612341576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b15801561238457600080fd5b505af1158015612398573d6000803e3d6000fd5b50505050610c5d61290c565b600454600090819081906001600160a01b0388811691161480156123ea57506001600160a01b038816600090815260076020526040902060010154600160301b900460ff165b156124035750866123fc86868661294c565b9150612454565b6004546001600160a01b03898116911614801561244257506001600160a01b038716600090815260076020526040902060010154600160301b900460ff165b156114745750856123fc868686612bc0565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b50516001600160a01b0380841660008181526007602052604090206001015460045493945063ffffffff16929091167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24612534620f424061252e886116d4565b9061281d565b6125478663ffffffff8088169061281d16565b6040805192835260208301919091528051918290030190a3509198975050505050505050565b6001600160a01b038116610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061263b5780518252601f19909201916020918201910161261c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461269d576040519150601f19603f3d011682016040523d82523d6000602084013e6126a2565b606091505b50915091508180156126d05750805115806126d057508080602001905160208110156126cd57600080fd5b50515b612717576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b612726610bbe565b15610c5d576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156127845750620f424063ffffffff821611155b610bbb576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6127dd610bbe565b610c5d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008261282c575060006116ce565b8282028284828161283957fe5b041461287b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b60008082116128cd576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816128d857fe5b04949350505050565b6008546000906116ce90620f4240906120e6908590600160401b900463ffffffff9081169061281d16565b60065460005b818110156112ca576129446006828154811061292a57fe5b6000918252602090912001546001600160a01b0316611c95565b600101612912565b600080600061295a86611ff7565b9150915081600014156129ad576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b600060066000815481106129bd57fe5b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee811415612a4957863414612a44576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b612b20565b34158015612ada575086612ad7612a5f836116d4565b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b158015612aa557600080fd5b505afa158015612ab9573d6000803e3d6000fd5b505050506040513d6020811015612acf57600080fd5b505190612ed5565b10155b612b20576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b612b2981611c95565b600480546040805163219e412d60e21b81526001600160a01b0389811694820194909452602481018790529051929091169163867904b49160448082019260009290919082900301818387803b158015612b8257600080fd5b505af1158015612b96573d6000803e3d6000fd5b5050600454612bb592508391506001600160a01b0316888a8787612f22565b509095945050505050565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015612c0f57600080fd5b505afa158015612c23573d6000803e3d6000fd5b505050506040513d6020811015612c3957600080fd5b5051841115612c84576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600080612c90866121e9565b915091508160001415612ce3576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b60006006600081548110612cf357fe5b600091825260208083209091015460048054604080516318160ddd60e01b815290516001600160a01b03948516975091909316936318160ddd938084019391929190829003018186803b158015612d4957600080fd5b505afa158015612d5d573d6000803e3d6000fd5b505050506040513d6020811015612d7357600080fd5b505190506000612d82836116d4565b905080851080612d9b57508085148015612d9b57508189145b612da157fe5b600480546040805163a24835d160e01b81523093810193909352602483018c9052516001600160a01b039091169163a24835d191604480830192600092919082900301818387803b158015612df557600080fd5b505af1158015612e09573d6000803e3d6000fd5b5050506001600160a01b038416600090815260076020526040902054612e30915086612ed5565b6001600160a01b03841660008181526007602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612ea3576040516001600160a01b0388169086156108fc029087906000818181858888f19350505050158015612e9d573d6000803e3d6000fd5b50612eae565b612eae8388876125be565b600454612ec8906001600160a01b0316848a8c8989612f22565b5092979650505050505050565b600081831015612f1c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600160ff1b8110612f2f57fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea26469706673582212208711a54d3386915a9a6195bc55c1f59166ac4b22284e030f99ce604b01d8b3fd64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "501:10433:24:-:0;;;349:27:59;;;-1:-1:-1;;;;349:27:59;;;2899:30:8;;;-1:-1:-1;;3292:40:8;;;876:211:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;876:211:24;;;;;;;;;;;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;876:211:24;;;;;;;;594:23:64;876:211:24;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;6069:7:8;594:23:64;6069:7:8;594:13:64;:23::i;:::-;6168:17:8;7294:35:::2;6168:17:::0;7294:19:::2;:35::i;:::-;-1:-1:-1::0;;6203:6:8::3;:16:::0;;-1:-1:-1;;;;;;6203:16:8::3;-1:-1:-1::0;;;;;6203:16:8;;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;6230:16:8::3;:36:::0;;-1:-1:-1;;6230:36:8::3;::::0;::::3;::::0;;::::3;::::0;;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;501:10433:24;;-1:-1:-1;;501:10433:24;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;7404:156:8:-;1846:7;7489:32;;;;;7481:71;;;;;-1:-1:-1;;;7481:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;501:10433:24;;;;;;;", + "deployedSourceMap": "501:10433:24:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1924:42:8;8454:29;;:8;:29;;:35;;-1:-1:-1;;;8454:35:8;;;;8446:67;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;;;;501:10433:24;;;;;3655:224:56;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;2899:30:8:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22514:248;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22514:248:8;-1:-1:-1;;;;;22514:248:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17176:113;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;22836:145;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22836:145:8;;:::i;:::-;;;;-1:-1:-1;;;;;22836:145:8;;;;;;;;;;;;;;16300:204;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16300:204:8;-1:-1:-1;;;;;16300:204:8;;:::i;23471:208::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;23471:208:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;22136:130;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22136:130:8;-1:-1:-1;;;;;22136:130:8;;:::i;10641:121::-;;;;;;;;;;;;;:::i;1333:38:56:-;;;;;;;;;;;;;:::i;22340:100:8:-;;;;;;;;;;;;;:::i;12220:157::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12220:157:8;;;;;;;;;;;;;;;;;:::i;1232:90:24:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2300:925:56;;;;;;;;;;;;;:::i;10268:202:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10268:202:8;-1:-1:-1;;;;;10268:202:8;;:::i;2343:35::-;;;;;;;;;;;;;:::i;3292:40::-;;;;;;;;;;;;;:::i;13330:735::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13330:735:8;;;;;;;;;;;;;;;;;:::i;1243:37:56:-;;;;;;;;;;;;;:::i;11112:198:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11112:198:8;-1:-1:-1;;;;;11112:198:8;;:::i;9086:554::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9086:554:8;-1:-1:-1;;;;;9086:554:8;;:::i;2095:272:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2095:272:24;;-1:-1:-1;;;;;2095:272:24;;;;;;;;:::i;23055:114:8:-;;;;;;;;;;;;;:::i;1422:217:57:-;;;;;;;;;;;;;:::i;1154:33:56:-;;;;;;;;;;;;;:::i;219:29:57:-;;;;;;;;;;;;;:::i;3041:43:8:-;;;;;;;;;;;;;:::i;14882:112::-;;;;;;;;;;;;;:::i;2809:499:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2809:499:24;;;;;;;;;;;;;;;;;:::i;3304:137:56:-;;;;;;;;;;;;;:::i;3417:46:8:-;;;;;;;;;;;;;:::i;2473:::-;;;;;;;;;;;;;:::i;1595:166:24:-;;;;;;;;;;;;;:::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2613:34:8;;:::i;9815:82::-;;;;;;;;;;;;;:::i;2387:39::-;;;;;;;;;;;;;:::i;255:23:57:-;;;;;;;;;;;;;:::i;14288:374:8:-;;;;;;;;;;;;;:::i;2754:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2754:48:8;-1:-1:-1;;;;;2754:48:8;;:::i;23243:154::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23243:154:8;-1:-1:-1;;;;;23243:154:8;;:::i;:::-;;;;;;;;;;;;;;;;16773:225;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16773:225:8;-1:-1:-1;;;;;16773:225:8;;:::i;17872:782::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17872:782:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12580:274::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12580:274:8;;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;21965:97:8:-;;;;;;;;;;;;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;2899:30:8:-;;;;;;:::o;22514:248::-;22586:7;22595:6;22603:4;22609;22615;22632:22;;:::i;:::-;-1:-1:-1;;;;;;;;;22657:18:8;;;;;;;;:8;:18;;;;;;;;22632:43;;-1:-1:-1;22632:43:8;;;;;;;;;-1:-1:-1;22632:43:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;-1:-1:-1;22657:18:8;;-1:-1:-1;22657:18:8;;22632:43;22514:248::o;17176:113::-;1924:42;17222:4;17246:29;:8;:29;;:35;;-1:-1:-1;;;17246:35:8;;;;;17176:113::o;22836:145::-;22907:11;22938:27;22966:6;22938:35;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22938:35:8;;;-1:-1:-1;;22836:145:8:o;16300:204::-;16435:6;16402:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16466:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;-1:-1:-1;16466:30:8::1;::::0;::::1;;::::0;16300:204::o;23471:208::-;23580:7;23589;23616:55;23635:12;23649;23663:7;23616:18;:55::i;:::-;23609:62;;;;23471:208;;;;;;;:::o;22136:130::-;726:12:57;:10;:12::i;:::-;22224:34:8::1;22248:9;22224:23;:34::i;:::-;22136:130:::0;:::o;10641:121::-;10723:6;;;:14;;;-1:-1:-1;;;10723:14:8;;;;10699:4;;10749;;-1:-1:-1;;;;;10723:6:8;;-1:-1:-1;;10723:14:8;;;;;;;;;;;:6;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10723:14:8;-1:-1:-1;;;;;10723:31:8;;;10641:121;-1:-1:-1;10641:121:8:o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;22340:100:8:-;726:12:57;:10;:12::i;:::-;22409:23:8::1;:21;:23::i;:::-;22340:100::o:0;12220:157::-;726:12:57;:10;:12::i;:::-;12326:6:8::1;::::0;;:43:::1;::::0;;-1:-1:-1;;;12326:43:8;;-1:-1:-1;;;;;12326:43:8;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;:6;;;::::1;::::0;:21:::1;::::0;:43;;;;;-1:-1:-1;;12326:43:8;;;;;;;;-1:-1:-1;12326:6:8;:43;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12220:157:::0;;;:::o;1232:90:24:-;1287:6;1232:90;:::o;2300:925:56:-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2907:40;;;-1:-1:-1;;;2907:40:56;;-1:-1:-1;;;2907:40:56;;;;;;2959:1;;-1:-1:-1;;;;;2907:21:56;;;;;:40;;;;;;;;;;;;;;;:21;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;10268:202:8:-;726:12:57;:10;:12::i;:::-;10401:10:8::1;948:18:64;957:8;948;:18::i;:::-;-1:-1:-1::0;10430:19:8::2;:32:::0;;-1:-1:-1;;;;;;10430:32:8::2;-1:-1:-1::0;;;;;10430:32:8;;;::::2;::::0;;;::::2;::::0;;10268:202::o;2343:35::-;2376:2;2343:35;:::o;3292:40::-;;;-1:-1:-1;;;3292:40:8;;;;;:::o;13330:735::-;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:59;-1:-1:-1;;;603:13:59;;;726:12:57::1;:10;:12::i;:::-;13517:25:8::2;13545:29;-1:-1:-1::0;;;13545:9:8::2;:29::i;:::-;-1:-1:-1::0;;;;;13765:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13765:22:8::2;::::0;13517:57;;-1:-1:-1;;;;13765:22:8;::::2;;;13764:23;::::0;:38:::2;;;13792:10;:8;:10::i;:::-;13791:11;13764:38;:68;;;-1:-1:-1::0;13806:5:8::2;::::0;-1:-1:-1;;;;;13806:26:8;;::::2;:5:::0;::::2;:26;13764:68;13756:98;;;::::0;;-1:-1:-1;;;13756:98:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13756:98:8;;;;;;;;;;;;;::::2;;13865:42;13886:6;13894:3;13899:7;13865:20;:42::i;:::-;-1:-1:-1::0;;;;;13994:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13994:22:8::2;::::0;-1:-1:-1;;;13994:22:8;::::2;;;13990:67;;;14031:26;14050:6;14031:18;:26::i;:::-;-1:-1:-1::0;;639:6:59;:14;;-1:-1:-1;;;;639:14:59;;;-1:-1:-1;;13330:735:8:o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;11112:198:8:-;726:12:57;:10;:12::i;:::-;-1:-1:-1;;;1627:20:56::1;-1:-1:-1::0;1627:5:56::1;:20::i;:::-;11267:6:8::2;::::0;;:35:::2;::::0;;-1:-1:-1;;;11267:35:8;;-1:-1:-1;;;;;11267:35:8;;::::2;::::0;;::::2;::::0;;;;;;:6;;;::::2;::::0;:24:::2;::::0;:35;;;;;:6:::2;::::0;:35;;;;;;;;:6;;:35;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;749:1:57::1;11112:198:8::0;:::o;9086:554::-;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:59;-1:-1:-1;;;603:13:59;;;726:12:57::1;:10;:12::i;:::-;1924:42:8::2;6959:23;6973:8;6959:13;:23::i;:::-;9259:25:::3;9287:29;-1:-1:-1::0;;;9287:9:8::3;:29::i;:::-;9259:57;;9431:10;:8;:10::i;:::-;9430:11;:41;;;-1:-1:-1::0;9445:5:8::3;::::0;-1:-1:-1;;;;;9445:26:8;;::::3;:5:::0;::::3;:26;9430:41;9422:71;;;::::0;;-1:-1:-1;;;9422:71:8;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;9422:71:8;;;;;;;;;;;;;::::3;;9504:35;::::0;-1:-1:-1;;;;;9504:12:8;::::3;::::0;9517:21:::3;9504:35:::0;::::3;;;::::0;::::3;::::0;;;9517:21;9504:12;:35;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;9593:39;1924:42;9593:18;:39::i;:::-;-1:-1:-1::0;;639:6:59;:14;;-1:-1:-1;;;;639:14:59;;;-1:-1:-1;9086:554:8:o;2095:272:24:-;726:12:57;:10;:12::i;:::-;2261:19:24::1;:17;:19::i;:::-;:24;;::::0;2253:62:::1;;;::::0;;-1:-1:-1;;;2253:62:24;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2253:62:24;;;;;;;;;;;;;::::1;;2326:33;2343:6;2351:7;2326:16;:33::i;:::-;2095:272:::0;;:::o;23055:114:8:-;23116:6;23142:19;:17;:19::i;:::-;23135:26;;23055:114;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;1591:8:57;;-1:-1:-1;;;;;;1583:16:57;;;;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;3041:43:8:-;;;;;;;;;:::o;14882:112::-;14965:13;:20;14882:112;:::o;2809:499:24:-;3005:6;;2936:7;;;;-1:-1:-1;;;;;2969:44:24;;;3005:6;;2969:44;:76;;;;-1:-1:-1;;;;;;3017:22:24;;;;;;:8;:22;;;;;-1:-1:-1;3017:28:24;;-1:-1:-1;;;3017:28:24;;;;2969:76;2965:131;;;3067:29;3088:7;3067:20;:29::i;:::-;3060:36;;;;;;2965:131;3147:6;;-1:-1:-1;;;;;3111:44:24;;;3147:6;;3111:44;:76;;;;-1:-1:-1;;;;;;3159:22:24;;;;;;:8;:22;;;;;-1:-1:-1;3159:28:24;;-1:-1:-1;;;3159:28:24;;;;3111:76;3107:127;;;3209:25;3226:7;3209:16;:25::i;3107:127::-;3273:27;;;-1:-1:-1;;;3273:27:24;;;;;;;;;;;;-1:-1:-1;;;3273:27:24;;;;;;;;;;;;;;3304:137:56;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;3417:46:8:-;3459:4;3417:46;:::o;2473:::-;;;-1:-1:-1;;;;;2473:46:8;;:::o;1595:166:24:-;726:12:57;:10;:12::i;:::-;1665:29:24::1;:27;:29::i;:::-;1740:6;::::0;1748:4:::1;::::0;-1:-1:-1;;;;;1740:6:24::1;1723:15;:13;:15::i;:::-;1712:41;;;;;;;;;;;;1595:166::o:0;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2613:34:8;;-1:-1:-1;2613:34:8;:::o;9815:82::-;9885:4;9815:82;:::o;2387:39::-;;;-1:-1:-1;;;;;2387:39:8;;:::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;14288:374:8:-;726:12:57;:10;:12::i;:::-;14335:36:8::1;14393:29;-1:-1:-1::0;;;14393:9:8::1;:29::i;:::-;14509:6;::::0;14335:88;;-1:-1:-1;14517:5:8::1;::::0;-1:-1:-1;;;;;14509:6:8::1;14492:15;:13;:15::i;:::-;14481:42;;;;;;;;;;;;14536:45;14562:17;14536;:45::i;:::-;14592:34;::::0;;-1:-1:-1;;;14592:34:8;;2376:2:::1;14592:34;::::0;::::1;::::0;;;-1:-1:-1;;;;;14592:25:8;::::1;::::0;::::1;::::0;:34;;;;;-1:-1:-1;;14592:34:8;;;;;;;-1:-1:-1;14592:25:8;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;14637:17;:15;:17::i;2754:48::-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;:::o;23243:154::-;23331:7;23358:31;23373:15;23358:14;:31::i;:::-;23351:38;23243:154;-1:-1:-1;;23243:154:8:o;16773:225::-;16927:7;16894:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16959:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:31;;16773:225::o;17872:782::-;18123:7;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:59;-1:-1:-1;;;603:13:59;;;-1:-1:-1;;;1627:20:56::1;-1:-1:-1::0;1627:5:56::1;:20::i;:::-;-1:-1:-1::0;;;;;18183:28:8;;::::2;::::0;;::::2;;;18175:63;;;::::0;;-1:-1:-1;;;18175:63:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18175:63:8;;;;;;;;;;;;;::::2;;18366:19;::::0;-1:-1:-1;;;;;18366:19:8::2;18358:42:::0;;:158:::2;;-1:-1:-1::0;18422:19:8::2;::::0;:42:::2;::::0;;-1:-1:-1;;;18422:42:8;;-1:-1:-1;;;;;18422:42:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18422:42:8;;;;;::::2;::::0;;;;;;;;:19;:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18422:42:8;:93;::::2;;;-1:-1:-1::0;18468:19:8::2;::::0;:47:::2;::::0;;-1:-1:-1;;;18468:47:8;;-1:-1:-1;;;;;18468:47:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18468:47:8;;;;;::::2;::::0;;;;;;;;:19;:47;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18468:47:8;18422:93:::2;18350:207;;;::::0;;-1:-1:-1;;;18350:207:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18350:207:8;;;;;;;;;;;;;::::2;;18577:69;18587:12;18601;18615:7;18624;18633:12;18577:9;:69::i;:::-;639:6:59::0;:14;;-1:-1:-1;;;;639:14:59;;;18570:76:8;;-1:-1:-1;;;;;;;17872:782:8:o;12580:274::-;726:12:57;:10;:12::i;:::-;12692:16:8::1;::::0;::::1;::::0;;;::::1;::::0;::::1;12674:34:::0;;::::1;;;12666:73;;;::::0;;-1:-1:-1;;;12666:73:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;12775:13;::::0;12755:50:::1;::::0;;-1:-1:-1;;;12775:13:8;;::::1;;::::0;;::::1;12755:50:::0;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;12816:13;:30:::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;;12816:30:8::1;-1:-1:-1::0;;12816:30:8;;::::1;::::0;;;::::1;::::0;;12580:274::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;21965:97:8:-;22048:6;;-1:-1:-1;;;;;22048:6:8;;21965:97::o;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;7057:134:8;-1:-1:-1;;;;;7135:18:8;;;;;;:8;:18;;;;;-1:-1:-1;7135:24:8;;-1:-1:-1;;;7135:24:8;;;;7127:56;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;;;4077:133:56;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;-1:-1:-1;;;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o;1041:126:64:-;1130:4;-1:-1:-1;;;;;1110:25:64;;;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;716:89:59;772:6;;-1:-1:-1;;;772:6:59;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;;;1196:290:62;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;20061:322:8:-:0;20138:13;6959:23;6973:8;6959:13;:23::i;:::-;1924:42:::1;-1:-1:-1::0;;;;;20168:36:8;::::1;;20164:211;;;-1:-1:-1::0;;;;;20219:23:8;::::1;;::::0;;;:8:::1;:23;::::0;;;;20253:21:::1;20219:55:::0;;20164:211:::1;;;20337:38;::::0;;-1:-1:-1;;;20337:38:8;;20369:4:::1;20337:38;::::0;::::1;::::0;;;-1:-1:-1;;;;;20337:23:8;::::1;::::0;-1:-1:-1;;20337:38:8;;;;;::::1;::::0;;;;;;;;:23;:38;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;20337:38:8;-1:-1:-1;;;;;20303:23:8;::::1;;::::0;;;:8:::1;20337:38;20303:23:::0;;;;:72;20061:322;;:::o;1722:139:56:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:56;:10;:38;1785:68;;;;;-1:-1:-1;;;1785:68:56;;;;;;;;;;;;-1:-1:-1;;;1785:68:56;;;;;;;;;;;;;;15286:803:8;726:12:57;:10;:12::i;:::-;6615:11:8::1;:9;:11::i;:::-;15460:6:::2;594:23:64;608:8;594:13;:23::i;:::-;15494:6:8::3;948:18:64;957:8;948;:18::i;:::-;15531:7:8::4;7656:28;7676:7;7656:19;:28::i;:::-;15618:6:::5;::::0;-1:-1:-1;;;;;15591:34:8;;::::5;15618:6:::0;::::5;15591:34;::::0;::::5;::::0;:61:::5;;-1:-1:-1::0;;;;;;15630:16:8;::::5;;::::0;;;:8:::5;:16;::::0;;;;-1:-1:-1;15630:22:8::5;::::0;-1:-1:-1;;;15630:22:8;::::5;;;15629:23;15591:61;15583:93;;;::::0;;-1:-1:-1;;;15583:93:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15583:93:8;;;;;;;;;;;;;::::5;;15723:12;::::0;::::5;::::0;;::::5;1846:7;15706:29;15695:40:::0;::::5;::::0;;::::5;;;15687:79;;;::::0;;-1:-1:-1;;;15687:79:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;15785:32;:19;:17;:19::i;:::-;:32;;;15777:70;;;::::0;;-1:-1:-1;;;15777:70:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15777:70:8;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;;;;15889:16:8;;;::::5;15860:26;15889:16:::0;;;:8:::5;:16;::::0;;;;15916:22;;;-1:-1:-1;15949:17:8;;::::5;:27:::0;;-1:-1:-1;;15949:27:8::5;::::0;;::::5;-1:-1:-1::0;;15949:27:8;;::::5;;15987:23:::0;;;::::5;-1:-1:-1::0;;;15987:23:8::5;::::0;;;:16:::5;16021:26:::0;;;;::::5;::::0;;;;;;;;::::5;::::0;;-1:-1:-1;;;;;;16021:26:8::5;::::0;;::::5;::::0;;;16058:12:::5;:23:::0;;;;::::5;::::0;;::::5;::::0;;::::5;::::0;::::5;::::0;;;::::5;::::0;;15286:803::o;5419:908:24:-;5532:7;5541;6356:9:8;:7;:9::i;:::-;5608:6:24::1;::::0;;5588:42:::1;::::0;;-1:-1:-1;;;5588:42:24;;;;5566:19:::1;::::0;-1:-1:-1;;;;;5608:6:24;;::::1;::::0;5588:40:::1;::::0;:42;;::::1;::::0;::::1;::::0;;;;;;;;5608:6;5588:42;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;5588:42:24;5668:13:::1;:16:::0;;5588:42;;-1:-1:-1;5641:24:24::1;::::0;;;5668:16:::1;;;;;::::0;;;::::1;::::0;;;::::1;::::0;-1:-1:-1;;;;;5668:16:24::1;::::0;-1:-1:-1;5814:16:24;5810:109:::1;;-1:-1:-1::0;;;;;5885:22:24;::::1;;::::0;;;:8:::1;:22;::::0;;;;-1:-1:-1;5885:29:24::1;::::0;5853:62:::1;::::0;5885:29:::1;::::0;;::::1;::::0;5853:27:::1;::::0;:7;;1846::8::1;::::0;5853:11:24::1;:27;:::i;:::-;:31:::0;::::1;:62::i;:::-;5917:1;5845:74;;;;;;;;5810:109;5932:14;5964:25;-1:-1:-1::0;;;5964:9:24::1;:25::i;:::-;-1:-1:-1::0;;;;;5949:62:24::1;;6026:11:::0;6052:28:::1;6067:12:::0;6052:14:::1;:28::i;:::-;-1:-1:-1::0;;;;;6095:22:24;::::1;;::::0;;;:8:::1;:22;::::0;;;;;;;;-1:-1:-1;6095:29:24::1;::::0;5949:208;;-1:-1:-1;5949:208:24;;;-1:-1:-1;;;;;;5949:208:24;;;::::1;::::0;::::1;::::0;;;;;;;;;;;6095:29:::1;::::0;;::::1;5949:208:::0;;;;;;;;;;;;;;;;;;;;;;;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;5949:208:24;;-1:-1:-1;6248:11:24::1;6262:20;5949:208:::0;6262:12:::1;:20::i;:::-;6301:12:::0;;;::::1;::::0;-1:-1:-1;6248:34:24;;-1:-1:-1;;;;6376:1:8::1;5419:908:24::0;;;:::o;6604:834::-;6713:7;6722;6356:9:8;:7;:9::i;:::-;6789:6:24::1;::::0;;6769:42:::1;::::0;;-1:-1:-1;;;6769:42:24;;;;6747:19:::1;::::0;-1:-1:-1;;;;;6789:6:24;;::::1;::::0;6769:40:::1;::::0;:42;;::::1;::::0;::::1;::::0;;;;;;;;6789:6;6769:42;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;6769:42:24;6851:13:::1;:16:::0;;6769:42;;-1:-1:-1;6824:24:24::1;::::0;;;6851:16:::1;;;;;::::0;;;::::1;::::0;;;::::1;::::0;-1:-1:-1;;;;;6851:16:24::1;::::0;-1:-1:-1;6957:22:24;;::::1;6953:81;;;7002:28;7017:12;7002:14;:28::i;6953:81::-;7047:14;7079:25;-1:-1:-1::0;;;7079:9:24::1;:25::i;:::-;-1:-1:-1::0;;;;;7064:58:24::1;;7137:11:::0;7163:28:::1;7178:12:::0;7163:14:::1;:28::i;11633:276:8:-:0;726:12:57;:10;:12::i;:::-;11803:1:8::1;11781:19;:17;:19::i;:::-;:23;;;11773:61;;;::::0;;-1:-1:-1;;;11773:61:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11773:61:8;;;;;;;;;;;;;::::1;;11845:6;::::0;;:24:::1;::::0;;-1:-1:-1;;;11845:24:8;;;;-1:-1:-1;;;;;11845:6:8;;::::1;::::0;-1:-1:-1;;11845:24:8;;::::1;::::0;:6:::1;::::0;:24;;;;;;:6;;:24;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11880:21;:19;:21::i;3880:1189:24:-:0;4202:6;;4069:7;;;;;;-1:-1:-1;;;;;4166:44:24;;;4202:6;;4166:44;:76;;;;-1:-1:-1;;;;;;4214:22:24;;;;;;:8;:22;;;;;-1:-1:-1;4214:28:24;;-1:-1:-1;;;4214:28:24;;;;4166:76;4162:517;;;-1:-1:-1;4274:12:24;4316:35;4320:7;4329;4338:12;4316:3;:35::i;:::-;4301:50;;4162:517;;;4418:6;;-1:-1:-1;;;;;4382:44:24;;;4418:6;;4382:44;:76;;;;-1:-1:-1;;;;;;4430:22:24;;;;;;:8;:22;;;;;-1:-1:-1;4430:28:24;;-1:-1:-1;;;4430:28:24;;;;4382:76;4378:301;;;-1:-1:-1;4490:12:24;4532:36;4537:7;4546;4555:12;4532:4;:36::i;4378:301::-;4787:6;;;4767:42;;;-1:-1:-1;;;4767:42:24;;;;4745:19;;-1:-1:-1;;;;;4787:6:24;;;;4767:40;;:42;;;;;;;;;;;;;4787:6;4767:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4767:42:24;-1:-1:-1;;;;;4843:22:24;;;4820:20;4843:22;;;:8;4767:42;4843:22;;;;-1:-1:-1;4843:29:24;;4924:6;;4767:42;;-1:-1:-1;4843:29:24;;;:22;;4924:6;4888:141;4948:48;1846:7:8;4948:28:24;4843:22;4948:14;:28::i;:::-;:32;;:48::i;:::-;4998:30;:11;:30;;;;;:15;:30;:::i;:::-;4888:141;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5049:12:24;;3880:1189;-1:-1:-1;;;;;;;;3880:1189:24:o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;1485:312:61;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;-1:-1:-1;;1589:17:61;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o;6701:88:8:-;6756:10;:8;:10::i;:::-;6755:11;6747:34;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;;;7759:157;7847:1;7837:7;:11;;;:40;;;;-1:-1:-1;1846:7:8;7852:25;;;;;7837:40;7829:79;;;;;-1:-1:-1;;;7829:79:8;;;;;;;;;;;;;;;;;;;;;;;;;;;6440:87;6492:10;:8;:10::i;:::-;6484:35;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;;;1149:250:60;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;;1390:1;1149:250;-1:-1:-1;;;1149:250:60:o;1627:174::-;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:60:o;19713:155:8:-;19826:13;;19781:7;;19808:52;;1846:7;;19808:32;;:13;;:52;-1:-1:-1;;;19826:13:8;;;;;;19808:17;:32;:::i;20456:205::-;20530:13;:20;20507;20561:92;20585:12;20581:1;:16;20561:92;;;20617:36;20636:13;20650:1;20636:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20636:16:8;20617:18;:36::i;:::-;20599:3;;20561:92;;7818:1136:24;7905:7;7973:14;7989:11;8004:29;8025:7;8004:20;:29::i;:::-;7972:61;;;;8109:6;8119:1;8109:11;;8101:46;;;;;-1:-1:-1;;;8101:46:24;;;;;;;;;;;;-1:-1:-1;;;8101:46:24;;;;;;;;;;;;;;;8160:24;8187:13;8201:1;8187:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8187:16:24;;-1:-1:-1;1924:42:8;8283:35:24;;8279:270;;;8354:7;8341:9;:20;8333:56;;;;;-1:-1:-1;;;8333:56:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;8279:270;;;8426:9;:14;:100;;;;;8519:7;8444:71;8486:28;8501:12;8486:14;:28::i;:::-;8444:37;;;-1:-1:-1;;;8444:37:24;;8475:4;8444:37;;;;;;-1:-1:-1;;;;;8444:22:24;;;-1:-1:-1;;8444:37:24;;;;;;;;;;;;;;:22;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8444:37:24;;:41;:71::i;:::-;:82;;8426:100;8418:131;;;;;-1:-1:-1;;;8418:131:24;;;;;;;;;;;;-1:-1:-1;;;8418:131:24;;;;;;;;;;;;;;;8599:32;8618:12;8599:18;:32::i;:::-;8731:6;;;8711:56;;;-1:-1:-1;;;8711:56:24;;-1:-1:-1;;;;;8711:56:24;;;;;;;;;;;;;;;;;;8731:6;;;;;8711:34;;:56;;;;;-1:-1:-1;;8711:56:24;;;;;;;;-1:-1:-1;8731:6:24;8711:56;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8880:6:24;;8822:98;;-1:-1:-1;8846:12:24;;-1:-1:-1;;;;;;8880:6:24;8890:7;8899;8908:6;8916:3;8822:23;:98::i;:::-;-1:-1:-1;8940:6:24;;7818:1136;-1:-1:-1;;;;;7818:1136:24:o;9326:1605::-;9544:6;;;9524:53;;;-1:-1:-1;;;9524:53:24;;9571:4;9524:53;;;;;;;;-1:-1:-1;;;;;;;9544:6:24;;;;-1:-1:-1;;9524:53:24;;;;;;;;;;;;;;9544:6;9524:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9524:53:24;9513:64;;;9505:95;;;;;-1:-1:-1;;;9505:95:24;;;;;;;;;;;;-1:-1:-1;;;9505:95:24;;;;;;;;;;;;;;;9661:14;9677:11;9692:25;9709:7;9692:16;:25::i;:::-;9660:57;;;;9793:6;9803:1;9793:11;;9785:46;;;;;-1:-1:-1;;;9785:46:24;;;;;;;;;;;;-1:-1:-1;;;9785:46:24;;;;;;;;;;;;;;;9844:24;9871:13;9885:1;9871:16;;;;;;;;;;;;;;;;;;;;;10054:6;;;10034:42;;;-1:-1:-1;;;10034:42:24;;;;-1:-1:-1;;;;;9871:16:24;;;;-1:-1:-1;10054:6:24;;;;;-1:-1:-1;;10034:42:24;;;;9871:16;;10034:42;;;;;;;;10054:6;10034:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10034:42:24;;-1:-1:-1;10087:18:24;10108:28;10123:12;10108:14;:28::i;:::-;10087:49;;10163:10;10154:6;:19;:71;;;;10188:10;10178:6;:20;:46;;;;;10213:11;10202:7;:22;10178:46;10147:79;;;;10337:6;;;10317:60;;;-1:-1:-1;;;10317:60:24;;10362:4;10317:60;;;;;;;;;;;;;;-1:-1:-1;;;;;10337:6:24;;;;-1:-1:-1;;10317:60:24;;;;;-1:-1:-1;;10317:60:24;;;;;;;-1:-1:-1;10337:6:24;10317:60;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;10462:22:24;;;;;;:8;:22;;;;;:30;:42;;10497:6;10462:34;:42::i;:::-;-1:-1:-1;;;;;10429:22:24;;;;;;:8;:22;;;;;:75;;;;1924:42:8;10588:35:24;10584:160;;;10638:29;;-1:-1:-1;;;;;10638:21:24;;;:29;;;;;;;;;;;;:21;:29;;;;;;;;;;;;;;;;;;;;;10584:160;;;10696:48;10709:12;10723;10737:6;10696:12;:48::i;:::-;10843:6;;10799:98;;-1:-1:-1;;;;;10843:6:24;10853:12;10867:7;10876;10885:6;10893:3;10799:23;:98::i;:::-;-1:-1:-1;10917:6:24;;9326:1605;-1:-1:-1;;;;;;;9326:1605:24:o;778:147:60:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;21084:758:8:-;-1:-1:-1;;;21705:21:8;;21698:29;;;;21743:91;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21743:91:8;;;;;;;;;;;;;;;;;;;;;21084:758;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../../ConverterBase.sol\";\r\nimport \"../../../token/interfaces/ISmartToken.sol\";\r\n\r\n/**\r\n * @dev Liquid Token Converter\r\n *\r\n * The liquid token converter is a specialized version of a converter that manages a liquid token.\r\n *\r\n * The converters govern a token with a single reserve and allow converting between the two.\r\n * Liquid tokens usually have fractional reserve (reserve ratio smaller than 100%).\r\n*/\r\ncontract LiquidTokenConverter is ConverterBase {\r\n /**\r\n * @dev initializes a new LiquidTokenConverter instance\r\n *\r\n * @param _token liquid token governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n */\r\n constructor(\r\n ISmartToken _token,\r\n IContractRegistry _registry,\r\n uint32 _maxConversionFee\r\n )\r\n ConverterBase(_token, _registry, _maxConversionFee)\r\n public\r\n {\r\n }\r\n\r\n /**\r\n * @dev returns the converter type\r\n *\r\n * @return see the converter types in the the main contract doc\r\n */\r\n function converterType() public pure override returns (uint16) {\r\n return 0;\r\n }\r\n\r\n /**\r\n * @dev accepts ownership of the anchor after an ownership transfer\r\n * also activates the converter\r\n * can only be called by the contract owner\r\n * note that prior to version 28, you should use 'acceptTokenOwnership' instead\r\n */\r\n function acceptAnchorOwnership() public override ownerOnly {\r\n super.acceptAnchorOwnership();\r\n\r\n emit Activation(converterType(), anchor, true);\r\n }\r\n\r\n /**\r\n * @dev defines the reserve token for the converter\r\n * can only be called by the owner while the converter is inactive and the\r\n * reserve wasn't defined yet\r\n *\r\n * @param _token address of the reserve token\r\n * @param _weight reserve weight, represented in ppm, 1-1000000\r\n */\r\n function addReserve(IERC20Token _token, uint32 _weight) public override ownerOnly {\r\n // verify that the converter doesn't have a reserve yet\r\n require(reserveTokenCount() == 0, \"ERR_INVALID_RESERVE_COUNT\");\r\n super.addReserve(_token, _weight);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting the source token to the\r\n * target token along with the fee\r\n *\r\n * @param _sourceToken contract address of the source token\r\n * @param _targetToken contract address of the target token\r\n * @param _amount amount of tokens received from the user\r\n *\r\n * @return expected target amount\r\n * @return expected fee\r\n */\r\n function targetAmountAndFee(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) public view override returns (uint256, uint256) {\r\n if (_targetToken == ISmartToken(address(anchor)) && reserves[_sourceToken].isSet)\r\n return purchaseTargetAmount(_amount);\r\n if (_sourceToken == ISmartToken(address(anchor)) && reserves[_targetToken].isSet)\r\n return saleTargetAmount(_amount);\r\n\r\n // invalid input\r\n revert(\"ERR_INVALID_TOKEN\");\r\n }\r\n\r\n /**\r\n * @dev converts between the liquid token and its reserve\r\n * can only be called by the bancor network contract\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _amount amount of tokens to convert (in units of the source token)\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received (in units of the target token)\r\n */\r\n function doConvert(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, address _trader, address payable _beneficiary)\r\n internal\r\n override\r\n returns (uint256)\r\n {\r\n uint256 targetAmount;\r\n IERC20Token reserveToken;\r\n\r\n if (_targetToken == ISmartToken(address(anchor)) && reserves[_sourceToken].isSet) {\r\n reserveToken = _sourceToken;\r\n targetAmount = buy(_amount, _trader, _beneficiary);\r\n }\r\n else if (_sourceToken == ISmartToken(address(anchor)) && reserves[_targetToken].isSet) {\r\n reserveToken = _targetToken;\r\n targetAmount = sell(_amount, _trader, _beneficiary);\r\n }\r\n else {\r\n // invalid input\r\n revert(\"ERR_INVALID_TOKEN\");\r\n }\r\n\r\n // dispatch rate update for the liquid token\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n uint32 reserveWeight = reserves[reserveToken].weight;\r\n emit TokenRateUpdate(ISmartToken(address(anchor)), reserveToken, reserveBalance(reserveToken).mul(PPM_RESOLUTION), totalSupply.mul(reserveWeight));\r\n\r\n return targetAmount;\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of buying with a given amount of tokens\r\n *\r\n * @param _amount amount of reserve tokens to get the target amount for\r\n *\r\n * @return amount of liquid tokens that the user will receive\r\n * @return amount of liquid tokens that the user will pay as fee\r\n */\r\n function purchaseTargetAmount(uint256 _amount)\r\n internal\r\n view\r\n active\r\n returns (uint256, uint256)\r\n {\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n IERC20Token reserveToken = reserveTokens[0];\r\n\r\n // if the current supply is zero, then return the input amount divided by the normalized reserve-weight\r\n if (totalSupply == 0)\r\n return (_amount.mul(PPM_RESOLUTION).div(reserves[reserveToken].weight), 0);\r\n\r\n uint256 amount = IBancorFormula(addressOf(BANCOR_FORMULA)).purchaseTargetAmount(\r\n totalSupply,\r\n reserveBalance(reserveToken),\r\n reserves[reserveToken].weight,\r\n _amount\r\n );\r\n\r\n // return the amount minus the conversion fee and the conversion fee\r\n uint256 fee = calculateFee(amount);\r\n return (amount - fee, fee);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of selling a given amount of tokens\r\n *\r\n * @param _amount amount of liquid tokens to get the target amount for\r\n *\r\n * @return expected reserve tokens\r\n * @return expected fee\r\n */\r\n function saleTargetAmount(uint256 _amount)\r\n internal\r\n view\r\n active\r\n returns (uint256, uint256)\r\n {\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n\r\n IERC20Token reserveToken = reserveTokens[0];\r\n\r\n // if selling the entire supply, then return the entire reserve\r\n if (totalSupply == _amount)\r\n return (reserveBalance(reserveToken), 0);\r\n\r\n uint256 amount = IBancorFormula(addressOf(BANCOR_FORMULA)).saleTargetAmount(\r\n totalSupply,\r\n reserveBalance(reserveToken),\r\n reserves[reserveToken].weight,\r\n _amount\r\n );\r\n\r\n // return the amount minus the conversion fee and the conversion fee\r\n uint256 fee = calculateFee(amount);\r\n return (amount - fee, fee);\r\n }\r\n\r\n /**\r\n * @dev buys the liquid token by depositing in its reserve\r\n *\r\n * @param _amount amount of reserve token to buy the token for\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of liquid tokens received\r\n */\r\n function buy(uint256 _amount, address _trader, address _beneficiary) internal returns (uint256) {\r\n // get expected target amount and fee\r\n (uint256 amount, uint256 fee) = purchaseTargetAmount(_amount);\r\n\r\n // ensure the trade gives something in return\r\n require(amount != 0, \"ERR_ZERO_TARGET_AMOUNT\");\r\n\r\n IERC20Token reserveToken = reserveTokens[0];\r\n\r\n // ensure that the input amount was already deposited\r\n if (reserveToken == ETH_RESERVE_ADDRESS)\r\n require(msg.value == _amount, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n else\r\n require(msg.value == 0 && reserveToken.balanceOf(address(this)).sub(reserveBalance(reserveToken)) >= _amount, \"ERR_INVALID_AMOUNT\");\r\n\r\n // sync the reserve balance\r\n syncReserveBalance(reserveToken);\r\n\r\n // issue new funds to the beneficiary in the liquid token\r\n ISmartToken(address(anchor)).issue(_beneficiary, amount);\r\n\r\n // dispatch the conversion event\r\n dispatchConversionEvent(reserveToken, ISmartToken(address(anchor)), _trader, _amount, amount, fee);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev sells the liquid token by withdrawing from its reserve\r\n *\r\n * @param _amount amount of liquid tokens to sell\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of reserve tokens received\r\n */\r\n function sell(uint256 _amount, address _trader, address payable _beneficiary) internal returns (uint256) {\r\n // ensure that the input amount was already deposited\r\n require(_amount <= ISmartToken(address(anchor)).balanceOf(address(this)), \"ERR_INVALID_AMOUNT\");\r\n\r\n // get expected target amount and fee\r\n (uint256 amount, uint256 fee) = saleTargetAmount(_amount);\r\n\r\n // ensure the trade gives something in return\r\n require(amount != 0, \"ERR_ZERO_TARGET_AMOUNT\");\r\n\r\n IERC20Token reserveToken = reserveTokens[0];\r\n\r\n // ensure that the trade will only deplete the reserve balance if the total supply is depleted as well\r\n uint256 tokenSupply = ISmartToken(address(anchor)).totalSupply();\r\n uint256 rsvBalance = reserveBalance(reserveToken);\r\n assert(amount < rsvBalance || (amount == rsvBalance && _amount == tokenSupply));\r\n\r\n // destroy the tokens from the converter balance in the liquid token\r\n ISmartToken(address(anchor)).destroy(address(this), _amount);\r\n\r\n // update the reserve balance\r\n reserves[reserveToken].balance = reserves[reserveToken].balance.sub(amount);\r\n\r\n // transfer funds to the beneficiary in the reserve token\r\n if (reserveToken == ETH_RESERVE_ADDRESS)\r\n _beneficiary.transfer(amount);\r\n else\r\n safeTransfer(reserveToken, _beneficiary, amount);\r\n\r\n // dispatch the conversion event\r\n dispatchConversionEvent(ISmartToken(address(anchor)), reserveToken, _trader, _amount, amount, fee);\r\n\r\n return amount;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol", + "exportedSymbols": { + "LiquidTokenConverter": [ + 14362 + ] + }, + "id": 14363, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13712, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:24" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "file": "../../ConverterBase.sol", + "id": 13713, + "nodeType": "ImportDirective", + "scope": 14363, + "sourceUnit": 10040, + "src": "77:33:24", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 13714, + "nodeType": "ImportDirective", + "scope": 14363, + "sourceUnit": 21183, + "src": "112:51:24", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13716, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "534:13:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 13717, + "nodeType": "InheritanceSpecifier", + "src": "534:13:24" + } + ], + "contractDependencies": [ + 10039, + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 13715, + "nodeType": "StructuredDocumentation", + "src": "167:332:24", + "text": " @dev Liquid Token Converter\n The liquid token converter is a specialized version of a converter that manages a liquid token.\n The converters govern a token with a single reserve and allow converting between the two.\n Liquid tokens usually have fractional reserve (reserve ratio smaller than 100%)." + }, + "fullyImplemented": true, + "id": 14362, + "linearizedBaseContracts": [ + 14362, + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "LiquidTokenConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 13732, + "nodeType": "Block", + "src": "1079:8:24", + "statements": [] + }, + "documentation": { + "id": 13718, + "nodeType": "StructuredDocumentation", + "src": "555:315:24", + "text": " @dev initializes a new LiquidTokenConverter instance\n @param _token liquid token governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 13733, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 13727, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13720, + "src": "1020:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 13728, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13722, + "src": "1028:9:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 13729, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13724, + "src": "1039:17:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 13730, + "modifierName": { + "argumentTypes": null, + "id": 13726, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "1006:13:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1006:51:24" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13720, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "898:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 13719, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "898:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13722, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "927:27:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13721, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "927:17:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13724, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "965:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13723, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "965:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "887:109:24" + }, + "returnParameters": { + "id": 13731, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:24" + }, + "scope": 14362, + "src": "876:211:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 13742, + "nodeType": "Block", + "src": "1295:27:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1313:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 13739, + "id": 13741, + "nodeType": "Return", + "src": "1306:8:24" + } + ] + }, + "documentation": { + "id": 13734, + "nodeType": "StructuredDocumentation", + "src": "1095:131:24", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 13743, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13736, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1269:8:24" + }, + "parameters": { + "id": 13735, + "nodeType": "ParameterList", + "parameters": [], + "src": "1254:2:24" + }, + "returnParameters": { + "id": 13739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13738, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13743, + "src": "1287:6:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13737, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1287:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1286:8:24" + }, + "scope": 14362, + "src": "1232:90:24", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9405 + ], + "body": { + "id": 13762, + "nodeType": "Block", + "src": "1654:107:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 13750, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1665:5:24", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidTokenConverter_$14362", + "typeString": "contract super LiquidTokenConverter" + } + }, + "id": 13752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 9405, + "src": "1665:27:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 13753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1665:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13754, + "nodeType": "ExpressionStatement", + "src": "1665:29:24" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13756, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 13743 + ], + "referencedDeclaration": 13743, + "src": "1723:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 13757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 13758, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "1740:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 13759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1748:4:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 13755, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "1712:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 13760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1712:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13761, + "nodeType": "EmitStatement", + "src": "1707:46:24" + } + ] + }, + "documentation": { + "id": 13744, + "nodeType": "StructuredDocumentation", + "src": "1330:259:24", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 13763, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13748, + "modifierName": { + "argumentTypes": null, + "id": 13747, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1644:9:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1644:9:24" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1635:8:24" + }, + "parameters": { + "id": 13745, + "nodeType": "ParameterList", + "parameters": [], + "src": "1625:2:24" + }, + "returnParameters": { + "id": 13749, + "nodeType": "ParameterList", + "parameters": [], + "src": "1654:0:24" + }, + "scope": 14362, + "src": "1595:166:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 13789, + "nodeType": "Block", + "src": "2177:190:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 13778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13775, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "2261:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 13776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2261:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2284:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2261:24:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 13779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2287:27:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 13774, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2253:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 13780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2253:62:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13781, + "nodeType": "ExpressionStatement", + "src": "2253:62:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13785, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13766, + "src": "2343:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 13786, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13768, + "src": "2351:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 13782, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2326:5:24", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidTokenConverter_$14362", + "typeString": "contract super LiquidTokenConverter" + } + }, + "id": 13784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "2326:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 13787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2326:33:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13788, + "nodeType": "ExpressionStatement", + "src": "2326:33:24" + } + ] + }, + "documentation": { + "id": 13764, + "nodeType": "StructuredDocumentation", + "src": "1769:320:24", + "text": " @dev defines the reserve token for the converter\n can only be called by the owner while the converter is inactive and the\n reserve wasn't defined yet\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 13790, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13772, + "modifierName": { + "argumentTypes": null, + "id": 13771, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2167:9:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2167:9:24" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13770, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2158:8:24" + }, + "parameters": { + "id": 13769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13766, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13790, + "src": "2115:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13765, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2115:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13768, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13790, + "src": "2135:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13767, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2135:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:36:24" + }, + "returnParameters": { + "id": 13773, + "nodeType": "ParameterList", + "parameters": [], + "src": "2177:0:24" + }, + "scope": 14362, + "src": "2095:272:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 13845, + "nodeType": "Block", + "src": "2954:354:24", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13805, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13795, + "src": "2969:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13809, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3005:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2997:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2997:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2997:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13806, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "2985:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2985:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "2969:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13813, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3017:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13815, + "indexExpression": { + "argumentTypes": null, + "id": 13814, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13793, + "src": "3026:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3017:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13816, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "3017:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2969:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13822, + "nodeType": "IfStatement", + "src": "2965:131:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13819, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13797, + "src": "3088:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13818, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14047, + "src": "3067:20:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 13820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3067:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13804, + "id": 13821, + "nodeType": "Return", + "src": "3060:36:24" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13823, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13793, + "src": "3111:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13827, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3147:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3139:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13825, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3139:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3139:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13824, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "3127:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3127:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "3111:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13831, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3159:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13833, + "indexExpression": { + "argumentTypes": null, + "id": 13832, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13795, + "src": "3168:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3159:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "3159:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3111:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13840, + "nodeType": "IfStatement", + "src": "3107:127:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13837, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13797, + "src": "3226:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13836, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14118, + "src": "3209:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 13838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3209:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13804, + "id": 13839, + "nodeType": "Return", + "src": "3202:32:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f544f4b454e", + "id": 13842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3280:19:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + }, + "value": "ERR_INVALID_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + } + ], + "id": 13841, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "3273:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 13843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13844, + "nodeType": "ExpressionStatement", + "src": "3273:27:24" + } + ] + }, + "documentation": { + "id": 13791, + "nodeType": "StructuredDocumentation", + "src": "2375:428:24", + "text": " @dev returns the expected target amount of converting the source token to the\n target token along with the fee\n @param _sourceToken contract address of the source token\n @param _targetToken contract address of the target token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 13846, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13799, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2918:8:24" + }, + "parameters": { + "id": 13798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13793, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2837:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13792, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2837:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13795, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2863:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13794, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2863:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13797, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2889:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13796, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2889:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2836:69:24" + }, + "returnParameters": { + "id": 13804, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13801, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2936:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13800, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2936:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13803, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2945:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2945:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2935:18:24" + }, + "scope": 14362, + "src": "2809:499:24", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 13968, + "nodeType": "Block", + "src": "4083:986:24", + "statements": [ + { + "assignments": [ + 13864 + ], + "declarations": [ + { + "constant": false, + "id": 13864, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4094:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4094:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13865, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4094:20:24" + }, + { + "assignments": [ + 13867 + ], + "declarations": [ + { + "constant": false, + "id": 13867, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4125:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13866, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4125:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13868, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4125:24:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13869, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4166:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13873, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4202:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4194:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4194:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4194:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13870, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4182:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4182:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "4166:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13877, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4214:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13879, + "indexExpression": { + "argumentTypes": null, + "id": 13878, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4223:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4214:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "4214:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4166:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13895, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4382:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13899, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4418:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4410:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4410:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4410:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13896, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4398:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4398:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "4382:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13903, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4430:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13905, + "indexExpression": { + "argumentTypes": null, + "id": 13904, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4439:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4430:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "4430:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4382:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 13925, + "nodeType": "Block", + "src": "4595:84:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f544f4b454e", + "id": 13922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4647:19:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + }, + "value": "ERR_INVALID_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + } + ], + "id": 13921, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "4640:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 13923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4640:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13924, + "nodeType": "ExpressionStatement", + "src": "4640:27:24" + } + ] + }, + "id": 13926, + "nodeType": "IfStatement", + "src": "4378:301:24", + "trueBody": { + "id": 13920, + "nodeType": "Block", + "src": "4460:120:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 13910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13908, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4475:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 13909, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4490:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "4475:27:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 13911, + "nodeType": "ExpressionStatement", + "src": "4475:27:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13912, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "4517:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13914, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13853, + "src": "4537:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 13915, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13855, + "src": "4546:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 13916, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13857, + "src": "4555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 13913, + "name": "sell", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14361, + "src": "4532:4:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (uint256,address,address payable) returns (uint256)" + } + }, + "id": 13917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4532:36:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4517:51:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13919, + "nodeType": "ExpressionStatement", + "src": "4517:51:24" + } + ] + } + }, + "id": 13927, + "nodeType": "IfStatement", + "src": "4162:517:24", + "trueBody": { + "id": 13894, + "nodeType": "Block", + "src": "4244:119:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 13884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13882, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4259:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 13883, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4274:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "4259:27:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 13885, + "nodeType": "ExpressionStatement", + "src": "4259:27:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13886, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "4301:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13888, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13853, + "src": "4320:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 13889, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13855, + "src": "4329:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 13890, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13857, + "src": "4338:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 13887, + "name": "buy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14218, + "src": "4316:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address,address) returns (uint256)" + } + }, + "id": 13891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4316:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4301:50:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13893, + "nodeType": "ExpressionStatement", + "src": "4301:50:24" + } + ] + } + }, + { + "assignments": [ + 13929 + ], + "declarations": [ + { + "constant": false, + "id": 13929, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4745:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4745:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13938, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13933, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4787:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4779:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4779:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4779:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13930, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4767:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4767:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 13936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "4767:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 13937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4767:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4745:64:24" + }, + { + "assignments": [ + 13940 + ], + "declarations": [ + { + "constant": false, + "id": 13940, + "mutability": "mutable", + "name": "reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4820:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13939, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4820:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13945, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13941, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4843:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13943, + "indexExpression": { + "argumentTypes": null, + "id": 13942, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4852:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4843:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13944, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4843:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4820:52:24" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13950, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4924:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4916:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4916:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4916:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13947, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4904:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4904:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 13953, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4934:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13958, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "4981:14:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13955, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4963:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 13954, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4948:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 13956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "4948:32:24", + "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": 13959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:48:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13962, + "name": "reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13940, + "src": "5014:13:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 13960, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13929, + "src": "4998:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "4998:15:24", + "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": 13963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:30:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13946, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "4888:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 13964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4888:141:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13965, + "nodeType": "EmitStatement", + "src": "4883:146:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13966, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "5049:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 13862, + "id": 13967, + "nodeType": "Return", + "src": "5042:19:24" + } + ] + }, + "documentation": { + "id": 13847, + "nodeType": "StructuredDocumentation", + "src": "3316:558:24", + "text": " @dev converts between the liquid token and its reserve\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 13969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13859, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4042:8:24" + }, + "parameters": { + "id": 13858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13849, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3899:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13848, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3899:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13851, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3925:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13850, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3925:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13853, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3951:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13852, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3951:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13855, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3968:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13854, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3968:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13857, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3985:28:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13856, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3985:15:24", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3898:116:24" + }, + "returnParameters": { + "id": 13862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13861, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "4069:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13860, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4069:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4068:9:24" + }, + "scope": 14362, + "src": "3880:1189:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14046, + "nodeType": "Block", + "src": "5555:772:24", + "statements": [ + { + "assignments": [ + 13982 + ], + "declarations": [ + { + "constant": false, + "id": 13982, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5566:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13981, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5566:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13991, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13986, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "5608:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5600:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5600:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5600:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13983, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "5588:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5588:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 13989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "5588:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 13990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5588:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5566:64:24" + }, + { + "assignments": [ + 13993 + ], + "declarations": [ + { + "constant": false, + "id": 13993, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5641:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13992, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5641:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13997, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13994, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5668:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 13996, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5682:1:24", + "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": "5668:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5641:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13998, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13982, + "src": "5814:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5829:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5814:16:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14014, + "nodeType": "IfStatement", + "src": "5810:109:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14006, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "5885:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14008, + "indexExpression": { + "argumentTypes": null, + "id": 14007, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "5894:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5885:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14009, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "5885:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14003, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "5865:14:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 14001, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13972, + "src": "5853:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5853:11:24", + "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": 14004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5853:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "5853:31:24", + "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": 14010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5853:62:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 14011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5917:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 14012, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5852:67:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 13980, + "id": 14013, + "nodeType": "Return", + "src": "5845:74:24" + } + }, + { + "assignments": [ + 14016 + ], + "declarations": [ + { + "constant": false, + "id": 14016, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5932:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5932:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14033, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14023, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13982, + "src": "6026:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14025, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "6067:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14024, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6052:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6052:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14027, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6095:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14029, + "indexExpression": { + "argumentTypes": null, + "id": 14028, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "6104:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6095:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "6095:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14031, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13972, + "src": "6139:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14019, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5974:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14018, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5964:9:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5964:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14017, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5949:14:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5949:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "5949:62:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5949:208:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5932:225:24" + }, + { + "assignments": [ + 14035 + ], + "declarations": [ + { + "constant": false, + "id": 14035, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "6248:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6248:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14039, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14037, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14016, + "src": "6275:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14036, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "6262:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6248:34:24" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14016, + "src": "6301:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14035, + "src": "6310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6301:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14043, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14035, + "src": "6315:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14044, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6300:19:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13980, + "id": 14045, + "nodeType": "Return", + "src": "6293:26:24" + } + ] + }, + "documentation": { + "id": 13970, + "nodeType": "StructuredDocumentation", + "src": "5077:336:24", + "text": " @dev returns the expected target amount of buying with a given amount of tokens\n @param _amount amount of reserve tokens to get the target amount for\n @return amount of liquid tokens that the user will receive\n @return amount of liquid tokens that the user will pay as fee" + }, + "id": 14047, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13975, + "modifierName": { + "argumentTypes": null, + "id": 13974, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "5507:6:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5507:6:24" + } + ], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13972, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5449:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5449:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5448:17:24" + }, + "returnParameters": { + "id": 13980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13977, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5532:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13976, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5532:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13979, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5541:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5541:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5531:18:24" + }, + "scope": 14362, + "src": "5419:908:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14117, + "nodeType": "Block", + "src": "6736:702:24", + "statements": [ + { + "assignments": [ + 14060 + ], + "declarations": [ + { + "constant": false, + "id": 14060, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "6747:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6747:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14069, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14064, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "6789:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6781:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6781:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6781:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14061, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6769:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6769:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6769:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6769:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6747:64:24" + }, + { + "assignments": [ + 14071 + ], + "declarations": [ + { + "constant": false, + "id": 14071, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "6824:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14070, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6824:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14075, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14072, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "6851:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14074, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6865:1:24", + "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": "6851:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6824:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14076, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14060, + "src": "6957:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14050, + "src": "6972:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6957:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14085, + "nodeType": "IfStatement", + "src": "6953:81:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14080, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7017:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14079, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "7002:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7002:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 14082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7032:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 14083, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7001:33:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 14058, + "id": 14084, + "nodeType": "Return", + "src": "6994:40:24" + } + }, + { + "assignments": [ + 14087 + ], + "declarations": [ + { + "constant": false, + "id": 14087, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "7047:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7047:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14104, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14094, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14060, + "src": "7137:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14096, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7178:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14095, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "7163:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7163:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14098, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "7206:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14100, + "indexExpression": { + "argumentTypes": null, + "id": 14099, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7215:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7206:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "7206:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14050, + "src": "7250:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14090, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "7089:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14089, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7079:9:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7079:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14088, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "7064:14:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7064:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7064:58:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7064:204:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7047:221:24" + }, + { + "assignments": [ + 14106 + ], + "declarations": [ + { + "constant": false, + "id": 14106, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "7359:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7359:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14110, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14108, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14087, + "src": "7386:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14107, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "7373:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7373:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7359:34:24" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14111, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14087, + "src": "7412:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14112, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14106, + "src": "7421:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7412:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14114, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14106, + "src": "7426:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14115, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7411:19:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14058, + "id": 14116, + "nodeType": "Return", + "src": "7404:26:24" + } + ] + }, + "documentation": { + "id": 14048, + "nodeType": "StructuredDocumentation", + "src": "6335:263:24", + "text": " @dev returns the expected target amount of selling a given amount of tokens\n @param _amount amount of liquid tokens to get the target amount for\n @return expected reserve tokens\n @return expected fee" + }, + "id": 14118, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14053, + "modifierName": { + "argumentTypes": null, + "id": 14052, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "6688:6:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6688:6:24" + } + ], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14050, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6630:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6630:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6629:17:24" + }, + "returnParameters": { + "id": 14058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6713:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6713:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14057, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6722:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6722:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6712:18:24" + }, + "scope": 14362, + "src": "6604:834:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14217, + "nodeType": "Block", + "src": "7914:1040:24", + "statements": [ + { + "assignments": [ + 14131, + 14133 + ], + "declarations": [ + { + "constant": false, + "id": 14131, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "7973:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7973:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14133, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "7989:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14132, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7989:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14137, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14135, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8025:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14134, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14047, + "src": "8004:20:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 14136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8004:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7972:61:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14139, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8109:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8119:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8109:11:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8122:24:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14138, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8101:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8101:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14144, + "nodeType": "ExpressionStatement", + "src": "8101:46:24" + }, + { + "assignments": [ + 14146 + ], + "declarations": [ + { + "constant": false, + "id": 14146, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "8160:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14145, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8160:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14150, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14147, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8187:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14149, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8201:1:24", + "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": "8187:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8160:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 14153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14151, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8283:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14152, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "8299:19:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "8283:35:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14163, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8426:3:24", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8426:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8439:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8426:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14176, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8501:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14175, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "8486:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8486:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8475:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8467:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8467:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8467:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14167, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8444:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 14168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "8444:22:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8444:37:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8444:41:24", + "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": 14178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8444:71:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14179, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8519:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8444:82:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8426:100:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8528:20:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14162, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8418:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8418:131:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14184, + "nodeType": "ExpressionStatement", + "src": "8418:131:24" + }, + "id": 14185, + "nodeType": "IfStatement", + "src": "8279:270:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14155, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8341:3:24", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8341:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14157, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8354:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8341:20:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8363:25:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8333:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8333:56:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14161, + "nodeType": "ExpressionStatement", + "src": "8333:56:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14187, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8618:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14186, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "8599:18:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 14188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8599:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14189, + "nodeType": "ExpressionStatement", + "src": "8599:32:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14197, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14125, + "src": "8746:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14198, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8760:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14193, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "8731:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8723:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8723:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14190, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "8711:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8711:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21174, + "src": "8711:34:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 14199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8711:56:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14200, + "nodeType": "ExpressionStatement", + "src": "8711:56:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14202, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8846:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14206, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "8880:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8872:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8872:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8872:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14203, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "8860:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8860:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14209, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14123, + "src": "8890:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8899:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14211, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8908:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14212, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14133, + "src": "8916:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14201, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "8822:23:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8822:98:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14214, + "nodeType": "ExpressionStatement", + "src": "8822:98:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14215, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8940:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14129, + "id": 14216, + "nodeType": "Return", + "src": "8933:13:24" + } + ] + }, + "documentation": { + "id": 14119, + "nodeType": "StructuredDocumentation", + "src": "7446:366:24", + "text": " @dev buys the liquid token by depositing in its reserve\n @param _amount amount of reserve token to buy the token for\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of liquid tokens received" + }, + "id": 14218, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14121, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7831:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7831:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14123, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7848:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7848:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14125, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7865:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7865:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7830:56:24" + }, + "returnParameters": { + "id": 14129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14128, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7905:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7905:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7904:9:24" + }, + "scope": 14362, + "src": "7818:1136:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14360, + "nodeType": "Block", + "src": "9431:1500:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14231, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "9513:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14241, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9571:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9563:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9563:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9563:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14235, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "9544:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9536:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9536:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9536:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14232, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "9524:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9524:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "9524:38:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9524:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9513:64:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9579:20:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9505:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9505:95:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14247, + "nodeType": "ExpressionStatement", + "src": "9505:95:24" + }, + { + "assignments": [ + 14249, + 14251 + ], + "declarations": [ + { + "constant": false, + "id": 14249, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9661:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14248, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9661:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14251, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9677:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14250, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9677:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14255, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14253, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "9709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14252, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14118, + "src": "9692:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 14254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9692:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9660:57:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14257, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "9793:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9803:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9793:11:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9806:24:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14256, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9785:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9785:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14262, + "nodeType": "ExpressionStatement", + "src": "9785:46:24" + }, + { + "assignments": [ + 14264 + ], + "declarations": [ + { + "constant": false, + "id": 14264, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9844:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14263, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9844:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14268, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14265, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9871:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14267, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9885:1:24", + "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": "9871:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9844:43:24" + }, + { + "assignments": [ + 14270 + ], + "declarations": [ + { + "constant": false, + "id": 14270, + "mutability": "mutable", + "name": "tokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "10012:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14269, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10012:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14279, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14274, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10054:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10046:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10046:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10046:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14271, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10034:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10034:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "10034:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10034:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10012:64:24" + }, + { + "assignments": [ + 14281 + ], + "declarations": [ + { + "constant": false, + "id": 14281, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "10087:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14280, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10087:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14285, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14283, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10123:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14282, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "10108:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10108:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10087:49:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14287, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10154:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 14288, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14281, + "src": "10163:10:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10154:19:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14290, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10178:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14291, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14281, + "src": "10188:10:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10178:20:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14293, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10202:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14294, + "name": "tokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14270, + "src": "10213:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10202:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10178:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 14297, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10177:48:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10154:71:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14286, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "10147:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 14299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10147:79:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14300, + "nodeType": "ExpressionStatement", + "src": "10147:79:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14310, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10362:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10354:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10354:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10354:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14312, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10369:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14304, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10337:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10329:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10329:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10329:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14301, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10317:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10317:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21181, + "src": "10317:36:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 14313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10317:60:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14314, + "nodeType": "ExpressionStatement", + "src": "10317:60:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14315, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "10429:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14317, + "indexExpression": { + "argumentTypes": null, + "id": 14316, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10438:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10429:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14318, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "10429:30:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14324, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10497:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14319, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "10462:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14321, + "indexExpression": { + "argumentTypes": null, + "id": 14320, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10471:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10462:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14322, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "10462:30:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "10462:34:24", + "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": 14325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10462:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10429:75:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14327, + "nodeType": "ExpressionStatement", + "src": "10429:75:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 14330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14328, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10588:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14329, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "10604:19:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "10588:35:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14338, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10709:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14339, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14225, + "src": "10723:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10737:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14337, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "10696:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 14341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10696:48:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14342, + "nodeType": "ExpressionStatement", + "src": "10696:48:24" + }, + "id": 14343, + "nodeType": "IfStatement", + "src": "10584:160:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10660:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14331, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14225, + "src": "10638:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 14333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10638:21:24", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 14335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10638:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14336, + "nodeType": "ExpressionStatement", + "src": "10638:29:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14348, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10843:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10835:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10835:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10835:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14345, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10823:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10823:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14351, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10853:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14352, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14223, + "src": "10867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14353, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10876:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14354, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10885:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14355, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14251, + "src": "10893:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14344, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "10799:23:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10799:98:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14357, + "nodeType": "ExpressionStatement", + "src": "10799:98:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14358, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10917:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14229, + "id": 14359, + "nodeType": "Return", + "src": "10910:13:24" + } + ] + }, + "documentation": { + "id": 14219, + "nodeType": "StructuredDocumentation", + "src": "8962:358:24", + "text": " @dev sells the liquid token by withdrawing from its reserve\n @param _amount amount of liquid tokens to sell\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of reserve tokens received" + }, + "id": 14361, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sell", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14221, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9340:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9340:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14223, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9357:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9357:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14225, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9374:28:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 14224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9374:15:24", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9339:64:24" + }, + "returnParameters": { + "id": 14229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14228, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9422:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14227, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9422:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9421:9:24" + }, + "scope": 14362, + "src": "9326:1605:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 14363, + "src": "501:10433:24" + } + ], + "src": "52:10884:24" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol", + "exportedSymbols": { + "LiquidTokenConverter": [ + 14362 + ] + }, + "id": 14363, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13712, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:24" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "file": "../../ConverterBase.sol", + "id": 13713, + "nodeType": "ImportDirective", + "scope": 14363, + "sourceUnit": 10040, + "src": "77:33:24", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 13714, + "nodeType": "ImportDirective", + "scope": 14363, + "sourceUnit": 21183, + "src": "112:51:24", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13716, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "534:13:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 13717, + "nodeType": "InheritanceSpecifier", + "src": "534:13:24" + } + ], + "contractDependencies": [ + 10039, + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 13715, + "nodeType": "StructuredDocumentation", + "src": "167:332:24", + "text": " @dev Liquid Token Converter\n The liquid token converter is a specialized version of a converter that manages a liquid token.\n The converters govern a token with a single reserve and allow converting between the two.\n Liquid tokens usually have fractional reserve (reserve ratio smaller than 100%)." + }, + "fullyImplemented": true, + "id": 14362, + "linearizedBaseContracts": [ + 14362, + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "LiquidTokenConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 13732, + "nodeType": "Block", + "src": "1079:8:24", + "statements": [] + }, + "documentation": { + "id": 13718, + "nodeType": "StructuredDocumentation", + "src": "555:315:24", + "text": " @dev initializes a new LiquidTokenConverter instance\n @param _token liquid token governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 13733, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 13727, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13720, + "src": "1020:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 13728, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13722, + "src": "1028:9:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 13729, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13724, + "src": "1039:17:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 13730, + "modifierName": { + "argumentTypes": null, + "id": 13726, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "1006:13:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1006:51:24" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13720, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "898:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 13719, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21182, + "src": "898:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13722, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "927:27:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13721, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "927:17:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13724, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13733, + "src": "965:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13723, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "965:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "887:109:24" + }, + "returnParameters": { + "id": 13731, + "nodeType": "ParameterList", + "parameters": [], + "src": "1079:0:24" + }, + "scope": 14362, + "src": "876:211:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 13742, + "nodeType": "Block", + "src": "1295:27:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1313:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 13739, + "id": 13741, + "nodeType": "Return", + "src": "1306:8:24" + } + ] + }, + "documentation": { + "id": 13734, + "nodeType": "StructuredDocumentation", + "src": "1095:131:24", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 13743, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13736, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1269:8:24" + }, + "parameters": { + "id": 13735, + "nodeType": "ParameterList", + "parameters": [], + "src": "1254:2:24" + }, + "returnParameters": { + "id": 13739, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13738, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13743, + "src": "1287:6:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 13737, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1287:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1286:8:24" + }, + "scope": 14362, + "src": "1232:90:24", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9405 + ], + "body": { + "id": 13762, + "nodeType": "Block", + "src": "1654:107:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 13750, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1665:5:24", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidTokenConverter_$14362", + "typeString": "contract super LiquidTokenConverter" + } + }, + "id": 13752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 9405, + "src": "1665:27:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 13753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1665:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13754, + "nodeType": "ExpressionStatement", + "src": "1665:29:24" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13756, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 13743 + ], + "referencedDeclaration": 13743, + "src": "1723:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 13757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1723:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 13758, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "1740:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 13759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1748:4:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 13755, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "1712:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 13760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1712:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13761, + "nodeType": "EmitStatement", + "src": "1707:46:24" + } + ] + }, + "documentation": { + "id": 13744, + "nodeType": "StructuredDocumentation", + "src": "1330:259:24", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 13763, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13748, + "modifierName": { + "argumentTypes": null, + "id": 13747, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1644:9:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1644:9:24" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1635:8:24" + }, + "parameters": { + "id": 13745, + "nodeType": "ParameterList", + "parameters": [], + "src": "1625:2:24" + }, + "returnParameters": { + "id": 13749, + "nodeType": "ParameterList", + "parameters": [], + "src": "1654:0:24" + }, + "scope": 14362, + "src": "1595:166:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 13789, + "nodeType": "Block", + "src": "2177:190:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 13778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13775, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "2261:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 13776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2261:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2284:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2261:24:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 13779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2287:27:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 13774, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2253:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 13780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2253:62:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13781, + "nodeType": "ExpressionStatement", + "src": "2253:62:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13785, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13766, + "src": "2343:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 13786, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13768, + "src": "2351:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 13782, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2326:5:24", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidTokenConverter_$14362", + "typeString": "contract super LiquidTokenConverter" + } + }, + "id": 13784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "2326:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 13787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2326:33:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13788, + "nodeType": "ExpressionStatement", + "src": "2326:33:24" + } + ] + }, + "documentation": { + "id": 13764, + "nodeType": "StructuredDocumentation", + "src": "1769:320:24", + "text": " @dev defines the reserve token for the converter\n can only be called by the owner while the converter is inactive and the\n reserve wasn't defined yet\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 13790, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13772, + "modifierName": { + "argumentTypes": null, + "id": 13771, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2167:9:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2167:9:24" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13770, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2158:8:24" + }, + "parameters": { + "id": 13769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13766, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13790, + "src": "2115:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13765, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2115:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13768, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13790, + "src": "2135:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13767, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2135:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2114:36:24" + }, + "returnParameters": { + "id": 13773, + "nodeType": "ParameterList", + "parameters": [], + "src": "2177:0:24" + }, + "scope": 14362, + "src": "2095:272:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 13845, + "nodeType": "Block", + "src": "2954:354:24", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13805, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13795, + "src": "2969:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13809, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3005:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2997:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2997:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2997:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13806, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "2985:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2985:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "2969:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13813, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3017:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13815, + "indexExpression": { + "argumentTypes": null, + "id": 13814, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13793, + "src": "3026:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3017:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13816, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "3017:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2969:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13822, + "nodeType": "IfStatement", + "src": "2965:131:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13819, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13797, + "src": "3088:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13818, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14047, + "src": "3067:20:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 13820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3067:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13804, + "id": 13821, + "nodeType": "Return", + "src": "3060:36:24" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13823, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13793, + "src": "3111:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13827, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3147:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3139:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13825, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3139:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3139:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13824, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "3127:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3127:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "3111:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13831, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3159:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13833, + "indexExpression": { + "argumentTypes": null, + "id": 13832, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13795, + "src": "3168:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3159:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "3159:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3111:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 13840, + "nodeType": "IfStatement", + "src": "3107:127:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13837, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13797, + "src": "3226:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13836, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14118, + "src": "3209:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 13838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3209:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13804, + "id": 13839, + "nodeType": "Return", + "src": "3202:32:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f544f4b454e", + "id": 13842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3280:19:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + }, + "value": "ERR_INVALID_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + } + ], + "id": 13841, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "3273:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 13843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13844, + "nodeType": "ExpressionStatement", + "src": "3273:27:24" + } + ] + }, + "documentation": { + "id": 13791, + "nodeType": "StructuredDocumentation", + "src": "2375:428:24", + "text": " @dev returns the expected target amount of converting the source token to the\n target token along with the fee\n @param _sourceToken contract address of the source token\n @param _targetToken contract address of the target token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 13846, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13799, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2918:8:24" + }, + "parameters": { + "id": 13798, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13793, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2837:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13792, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2837:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13795, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2863:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13794, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2863:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13797, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2889:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13796, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2889:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2836:69:24" + }, + "returnParameters": { + "id": 13804, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13801, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2936:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13800, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2936:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13803, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13846, + "src": "2945:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2945:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2935:18:24" + }, + "scope": 14362, + "src": "2809:499:24", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 13968, + "nodeType": "Block", + "src": "4083:986:24", + "statements": [ + { + "assignments": [ + 13864 + ], + "declarations": [ + { + "constant": false, + "id": 13864, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4094:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4094:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13865, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4094:20:24" + }, + { + "assignments": [ + 13867 + ], + "declarations": [ + { + "constant": false, + "id": 13867, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4125:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13866, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "4125:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13868, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4125:24:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13869, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4166:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13873, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4202:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4194:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13871, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4194:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4194:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13870, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4182:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4182:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "4166:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13877, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4214:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13879, + "indexExpression": { + "argumentTypes": null, + "id": 13878, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4223:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4214:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13880, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "4214:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4166:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 13907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 13902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13895, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4382:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13899, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4418:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4410:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4410:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4410:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13896, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4398:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4398:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "src": "4382:44:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13903, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4430:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13905, + "indexExpression": { + "argumentTypes": null, + "id": 13904, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4439:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4430:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13906, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "4430:28:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4382:76:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 13925, + "nodeType": "Block", + "src": "4595:84:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f544f4b454e", + "id": 13922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4647:19:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + }, + "value": "ERR_INVALID_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_ebb7677ef55bf004ceacedca2d0ee2121b64fc0fddbb89e9252a1965146107fb", + "typeString": "literal_string \"ERR_INVALID_TOKEN\"" + } + ], + "id": 13921, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "4640:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 13923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4640:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13924, + "nodeType": "ExpressionStatement", + "src": "4640:27:24" + } + ] + }, + "id": 13926, + "nodeType": "IfStatement", + "src": "4378:301:24", + "trueBody": { + "id": 13920, + "nodeType": "Block", + "src": "4460:120:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 13910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13908, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4475:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 13909, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13851, + "src": "4490:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "4475:27:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 13911, + "nodeType": "ExpressionStatement", + "src": "4475:27:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13912, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "4517:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13914, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13853, + "src": "4537:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 13915, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13855, + "src": "4546:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 13916, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13857, + "src": "4555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 13913, + "name": "sell", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14361, + "src": "4532:4:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (uint256,address,address payable) returns (uint256)" + } + }, + "id": 13917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4532:36:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4517:51:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13919, + "nodeType": "ExpressionStatement", + "src": "4517:51:24" + } + ] + } + }, + "id": 13927, + "nodeType": "IfStatement", + "src": "4162:517:24", + "trueBody": { + "id": 13894, + "nodeType": "Block", + "src": "4244:119:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 13884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13882, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4259:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 13883, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13849, + "src": "4274:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "4259:27:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 13885, + "nodeType": "ExpressionStatement", + "src": "4259:27:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 13886, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "4301:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13888, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13853, + "src": "4320:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 13889, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13855, + "src": "4329:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 13890, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13857, + "src": "4338:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 13887, + "name": "buy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14218, + "src": "4316:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address,address) returns (uint256)" + } + }, + "id": 13891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4316:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4301:50:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13893, + "nodeType": "ExpressionStatement", + "src": "4301:50:24" + } + ] + } + }, + { + "assignments": [ + 13929 + ], + "declarations": [ + { + "constant": false, + "id": 13929, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4745:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4745:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13938, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13933, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4787:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4779:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13931, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4779:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4779:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13930, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4767:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4767:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 13936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "4767:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 13937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4767:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4745:64:24" + }, + { + "assignments": [ + 13940 + ], + "declarations": [ + { + "constant": false, + "id": 13940, + "mutability": "mutable", + "name": "reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13968, + "src": "4820:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13939, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "4820:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13945, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13941, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4843:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 13943, + "indexExpression": { + "argumentTypes": null, + "id": 13942, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4852:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4843:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 13944, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4843:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4820:52:24" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13950, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "4924:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4916:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4916:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4916:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13947, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "4904:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4904:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 13953, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4934:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13958, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "4981:14:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13955, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13867, + "src": "4963:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 13954, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4948:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 13956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "4948:32:24", + "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": 13959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4948:48:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13962, + "name": "reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13940, + "src": "5014:13:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 13960, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13929, + "src": "4998:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "4998:15:24", + "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": 13963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:30:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 13946, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "4888:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 13964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4888:141:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13965, + "nodeType": "EmitStatement", + "src": "4883:146:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 13966, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13864, + "src": "5049:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 13862, + "id": 13967, + "nodeType": "Return", + "src": "5042:19:24" + } + ] + }, + "documentation": { + "id": 13847, + "nodeType": "StructuredDocumentation", + "src": "3316:558:24", + "text": " @dev converts between the liquid token and its reserve\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 13969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13859, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4042:8:24" + }, + "parameters": { + "id": 13858, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13849, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3899:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13848, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3899:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13851, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3925:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13850, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3925:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13853, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3951:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13852, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3951:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13855, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3968:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13854, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3968:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13857, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "3985:28:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 13856, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3985:15:24", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3898:116:24" + }, + "returnParameters": { + "id": 13862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13861, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13969, + "src": "4069:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13860, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4069:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4068:9:24" + }, + "scope": 14362, + "src": "3880:1189:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14046, + "nodeType": "Block", + "src": "5555:772:24", + "statements": [ + { + "assignments": [ + 13982 + ], + "declarations": [ + { + "constant": false, + "id": 13982, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5566:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13981, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5566:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13991, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 13986, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "5608:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 13985, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5600:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 13984, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5600:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 13987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5600:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 13983, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "5588:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 13988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5588:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 13989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "5588:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 13990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5588:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5566:64:24" + }, + { + "assignments": [ + 13993 + ], + "declarations": [ + { + "constant": false, + "id": 13993, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5641:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13992, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "5641:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 13997, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 13994, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5668:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 13996, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5682:1:24", + "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": "5668:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5641:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 13998, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13982, + "src": "5814:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 13999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5829:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5814:16:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14014, + "nodeType": "IfStatement", + "src": "5810:109:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14006, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "5885:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14008, + "indexExpression": { + "argumentTypes": null, + "id": 14007, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "5894:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5885:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14009, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "5885:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14003, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "5865:14:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 14001, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13972, + "src": "5853:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5853:11:24", + "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": 14004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5853:27:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "5853:31:24", + "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": 14010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5853:62:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 14011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5917:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 14012, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5852:67:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 13980, + "id": 14013, + "nodeType": "Return", + "src": "5845:74:24" + } + }, + { + "assignments": [ + 14016 + ], + "declarations": [ + { + "constant": false, + "id": 14016, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "5932:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5932:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14033, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14023, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13982, + "src": "6026:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14025, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "6067:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14024, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6052:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6052:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14027, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6095:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14029, + "indexExpression": { + "argumentTypes": null, + "id": 14028, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13993, + "src": "6104:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6095:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "6095:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14031, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13972, + "src": "6139:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14019, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "5974:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14018, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "5964:9:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5964:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14017, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "5949:14:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5949:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "purchaseTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13092, + "src": "5949:62:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5949:208:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5932:225:24" + }, + { + "assignments": [ + 14035 + ], + "declarations": [ + { + "constant": false, + "id": 14035, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14046, + "src": "6248:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6248:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14039, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14037, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14016, + "src": "6275:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14036, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "6262:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6248:34:24" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14016, + "src": "6301:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14035, + "src": "6310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6301:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14043, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14035, + "src": "6315:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14044, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6300:19:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 13980, + "id": 14045, + "nodeType": "Return", + "src": "6293:26:24" + } + ] + }, + "documentation": { + "id": 13970, + "nodeType": "StructuredDocumentation", + "src": "5077:336:24", + "text": " @dev returns the expected target amount of buying with a given amount of tokens\n @param _amount amount of reserve tokens to get the target amount for\n @return amount of liquid tokens that the user will receive\n @return amount of liquid tokens that the user will pay as fee" + }, + "id": 14047, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 13975, + "modifierName": { + "argumentTypes": null, + "id": 13974, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "5507:6:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5507:6:24" + } + ], + "name": "purchaseTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13972, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5449:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5449:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5448:17:24" + }, + "returnParameters": { + "id": 13980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13977, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5532:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13976, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5532:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13979, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14047, + "src": "5541:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5541:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5531:18:24" + }, + "scope": 14362, + "src": "5419:908:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14117, + "nodeType": "Block", + "src": "6736:702:24", + "statements": [ + { + "assignments": [ + 14060 + ], + "declarations": [ + { + "constant": false, + "id": 14060, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "6747:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6747:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14069, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14064, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "6789:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14063, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6781:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14062, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6781:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6781:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14061, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "6769:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6769:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "6769:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6769:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6747:64:24" + }, + { + "assignments": [ + 14071 + ], + "declarations": [ + { + "constant": false, + "id": 14071, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "6824:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14070, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6824:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14075, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14072, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "6851:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14074, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6865:1:24", + "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": "6851:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6824:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14076, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14060, + "src": "6957:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14077, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14050, + "src": "6972:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6957:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14085, + "nodeType": "IfStatement", + "src": "6953:81:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14080, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7017:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14079, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "7002:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7002:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 14082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7032:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 14083, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7001:33:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 14058, + "id": 14084, + "nodeType": "Return", + "src": "6994:40:24" + } + }, + { + "assignments": [ + 14087 + ], + "declarations": [ + { + "constant": false, + "id": 14087, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "7047:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7047:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14104, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14094, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14060, + "src": "7137:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14096, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7178:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14095, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "7163:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7163:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14098, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "7206:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14100, + "indexExpression": { + "argumentTypes": null, + "id": 14099, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14071, + "src": "7215:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7206:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "7206:29:24", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14102, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14050, + "src": "7250:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14090, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21533, + "src": "7089:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14089, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21718, + "src": "7079:9:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7079:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14088, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "7064:14:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7064:41:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "saleTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13105, + "src": "7064:58:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7064:204:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7047:221:24" + }, + { + "assignments": [ + 14106 + ], + "declarations": [ + { + "constant": false, + "id": 14106, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14117, + "src": "7359:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7359:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14110, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14108, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14087, + "src": "7386:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14107, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "7373:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7373:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7359:34:24" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14111, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14087, + "src": "7412:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14112, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14106, + "src": "7421:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7412:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14114, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14106, + "src": "7426:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14115, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7411:19:24", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14058, + "id": 14116, + "nodeType": "Return", + "src": "7404:26:24" + } + ] + }, + "documentation": { + "id": 14048, + "nodeType": "StructuredDocumentation", + "src": "6335:263:24", + "text": " @dev returns the expected target amount of selling a given amount of tokens\n @param _amount amount of liquid tokens to get the target amount for\n @return expected reserve tokens\n @return expected fee" + }, + "id": 14118, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14053, + "modifierName": { + "argumentTypes": null, + "id": 14052, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "6688:6:24", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6688:6:24" + } + ], + "name": "saleTargetAmount", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14050, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6630:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6630:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6629:17:24" + }, + "returnParameters": { + "id": 14058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6713:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6713:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14057, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14118, + "src": "6722:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14056, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6722:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6712:18:24" + }, + "scope": 14362, + "src": "6604:834:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14217, + "nodeType": "Block", + "src": "7914:1040:24", + "statements": [ + { + "assignments": [ + 14131, + 14133 + ], + "declarations": [ + { + "constant": false, + "id": 14131, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "7973:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7973:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14133, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "7989:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14132, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7989:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14137, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14135, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8025:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14134, + "name": "purchaseTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14047, + "src": "8004:20:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 14136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8004:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7972:61:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14139, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8109:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8119:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8109:11:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8122:24:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14138, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8101:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8101:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14144, + "nodeType": "ExpressionStatement", + "src": "8101:46:24" + }, + { + "assignments": [ + 14146 + ], + "declarations": [ + { + "constant": false, + "id": 14146, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14217, + "src": "8160:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14145, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "8160:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14150, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14147, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8187:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14149, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8201:1:24", + "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": "8187:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8160:43:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 14153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14151, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8283:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14152, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "8299:19:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "8283:35:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14163, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8426:3:24", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8426:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8439:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8426:14:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14176, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8501:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14175, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "8486:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8486:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14171, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8475:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8467:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8467:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8467:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14167, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8444:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 14168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "8444:22:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8444:37:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "8444:41:24", + "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": 14178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8444:71:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14179, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8519:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8444:82:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8426:100:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8528:20:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14162, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8418:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8418:131:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14184, + "nodeType": "ExpressionStatement", + "src": "8418:131:24" + }, + "id": 14185, + "nodeType": "IfStatement", + "src": "8279:270:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14155, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8341:3:24", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8341:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14157, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8354:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8341:20:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8363:25:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14154, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8333:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8333:56:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14161, + "nodeType": "ExpressionStatement", + "src": "8333:56:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14187, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8618:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14186, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "8599:18:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 14188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8599:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14189, + "nodeType": "ExpressionStatement", + "src": "8599:32:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14197, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14125, + "src": "8746:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14198, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8760:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14193, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "8731:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8723:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8723:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14190, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "8711:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8711:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21174, + "src": "8711:34:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 14199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8711:56:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14200, + "nodeType": "ExpressionStatement", + "src": "8711:56:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14202, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14146, + "src": "8846:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14206, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "8880:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8872:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8872:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8872:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14203, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "8860:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8860:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14209, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14123, + "src": "8890:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14210, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14121, + "src": "8899:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14211, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8908:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14212, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14133, + "src": "8916:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14201, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "8822:23:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8822:98:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14214, + "nodeType": "ExpressionStatement", + "src": "8822:98:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14215, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14131, + "src": "8940:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14129, + "id": 14216, + "nodeType": "Return", + "src": "8933:13:24" + } + ] + }, + "documentation": { + "id": 14119, + "nodeType": "StructuredDocumentation", + "src": "7446:366:24", + "text": " @dev buys the liquid token by depositing in its reserve\n @param _amount amount of reserve token to buy the token for\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of liquid tokens received" + }, + "id": 14218, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "buy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14126, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14121, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7831:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7831:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14123, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7848:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7848:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14125, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7865:20:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7865:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7830:56:24" + }, + "returnParameters": { + "id": 14129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14128, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14218, + "src": "7905:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7905:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7904:9:24" + }, + "scope": 14362, + "src": "7818:1136:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14360, + "nodeType": "Block", + "src": "9431:1500:24", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14231, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "9513:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14241, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9571:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9563:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9563:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9563:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14235, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "9544:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9536:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9536:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9536:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14232, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "9524:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9524:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21088, + "src": "9524:38:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9524:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9513:64:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9579:20:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9505:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9505:95:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14247, + "nodeType": "ExpressionStatement", + "src": "9505:95:24" + }, + { + "assignments": [ + 14249, + 14251 + ], + "declarations": [ + { + "constant": false, + "id": 14249, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9661:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14248, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9661:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14251, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9677:11:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14250, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9677:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14255, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14253, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "9709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14252, + "name": "saleTargetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14118, + "src": "9692:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256,uint256)" + } + }, + "id": 14254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9692:25:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9660:57:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14257, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "9793:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9803:1:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9793:11:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9806:24:24", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14256, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9785:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9785:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14262, + "nodeType": "ExpressionStatement", + "src": "9785:46:24" + }, + { + "assignments": [ + 14264 + ], + "declarations": [ + { + "constant": false, + "id": 14264, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "9844:24:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14263, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "9844:11:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14268, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14265, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9871:13:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14267, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9885:1:24", + "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": "9871:16:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9844:43:24" + }, + { + "assignments": [ + 14270 + ], + "declarations": [ + { + "constant": false, + "id": 14270, + "mutability": "mutable", + "name": "tokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "10012:19:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14269, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10012:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14279, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14274, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10054:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10046:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10046:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10046:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14271, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10034:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10034:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21081, + "src": "10034:40:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10034:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10012:64:24" + }, + { + "assignments": [ + 14281 + ], + "declarations": [ + { + "constant": false, + "id": 14281, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14360, + "src": "10087:18:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14280, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10087:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14285, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14283, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10123:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 14282, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "10108:14:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10108:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10087:49:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14287, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10154:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 14288, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14281, + "src": "10163:10:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10154:19:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14290, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10178:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14291, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14281, + "src": "10188:10:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10178:20:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14293, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10202:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14294, + "name": "tokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14270, + "src": "10213:11:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10202:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10178:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 14297, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10177:48:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10154:71:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14286, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "10147:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 14299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10147:79:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14300, + "nodeType": "ExpressionStatement", + "src": "10147:79:24" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14310, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10362:4:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + ], + "id": 14309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10354:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10354:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10354:13:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14312, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10369:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14304, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10337:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10329:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10329:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10329:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14301, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10317:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10317:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + "id": 14307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21181, + "src": "10317:36:24", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 14313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10317:60:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14314, + "nodeType": "ExpressionStatement", + "src": "10317:60:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14315, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "10429:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14317, + "indexExpression": { + "argumentTypes": null, + "id": 14316, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10438:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10429:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14318, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "10429:30:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14324, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10497:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14319, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "10462:8:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14321, + "indexExpression": { + "argumentTypes": null, + "id": 14320, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10471:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10462:22:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14322, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "10462:30:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "10462:34:24", + "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": 14325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10462:42:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10429:75:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14327, + "nodeType": "ExpressionStatement", + "src": "10429:75:24" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 14330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14328, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10588:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14329, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "10604:19:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "10588:35:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14338, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10709:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14339, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14225, + "src": "10723:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14340, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10737:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14337, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "10696:12:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 14341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10696:48:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14342, + "nodeType": "ExpressionStatement", + "src": "10696:48:24" + }, + "id": 14343, + "nodeType": "IfStatement", + "src": "10584:160:24", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14334, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10660:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14331, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14225, + "src": "10638:12:24", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 14333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10638:21:24", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 14335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10638:29:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14336, + "nodeType": "ExpressionStatement", + "src": "10638:29:24" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14348, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "10843:6:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10835:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10835:7:24", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10835:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14345, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "10823:11:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10823:28:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14351, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14264, + "src": "10853:12:24", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14352, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14223, + "src": "10867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14353, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14221, + "src": "10876:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14354, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10885:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14355, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14251, + "src": "10893:3:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14344, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "10799:23:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10799:98:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14357, + "nodeType": "ExpressionStatement", + "src": "10799:98:24" + }, + { + "expression": { + "argumentTypes": null, + "id": 14358, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14249, + "src": "10917:6:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14229, + "id": 14359, + "nodeType": "Return", + "src": "10910:13:24" + } + ] + }, + "documentation": { + "id": 14219, + "nodeType": "StructuredDocumentation", + "src": "8962:358:24", + "text": " @dev sells the liquid token by withdrawing from its reserve\n @param _amount amount of liquid tokens to sell\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of reserve tokens received" + }, + "id": 14361, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sell", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14221, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9340:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9340:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14223, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9357:15:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9357:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14225, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9374:28:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 14224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9374:15:24", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9339:64:24" + }, + "returnParameters": { + "id": 14229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14228, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14361, + "src": "9422:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14227, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9422:7:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9421:9:24" + }, + "scope": 14362, + "src": "9326:1605:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 14363, + "src": "501:10433:24" + } + ], + "src": "52:10884:24" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.681Z", + "networkType": "ethereum", + "devdoc": { + "details": "Liquid Token Converter The liquid token converter is a specialized version of a converter that manages a liquid token. The converters govern a token with a single reserve and allow converting between the two. Liquid tokens usually have fractional reserve (reserve ratio smaller than 100%).", + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "addReserve(address,uint32)": { + "details": "defines the reserve token for the converter can only be called by the owner while the converter is inactive and the reserve wasn't defined yet", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "constructor": { + "details": "initializes a new LiquidTokenConverter instance", + "params": { + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract", + "_token": "liquid token governed by the converter" + } + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "converterType()": { + "details": "returns the converter type", + "returns": { + "_0": "see the converter types in the the main contract doc" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "targetAmountAndFee(address,address,uint256)": { + "details": "returns the expected target amount of converting the source token to the target token along with the fee", + "params": { + "_amount": "amount of tokens received from the user", + "_sourceToken": "contract address of the source token", + "_targetToken": "contract address of the target token" + }, + "returns": { + "_0": "expected target amount", + "_1": "expected fee" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverterFactory.json new file mode 100644 index 00000000..1fb9a5f3 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidTokenConverterFactory.json @@ -0,0 +1,1529 @@ +{ + "contractName": "LiquidTokenConverterFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"converterType()\":{\"details\":\"returns the converter type the factory is associated with\",\"returns\":{\"_0\":\"converter type\"}},\"createConverter(address,address,uint32)\":{\"details\":\"creates a new converter with the given arguments and transfers the ownership to the caller\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\"},\"returns\":{\"_0\":\"a new converter\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverterFactory.sol\":\"LiquidTokenConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol\":{\"keccak256\":\"0x71b0a2afa4f9c0f92b1607326dd1f13397cf11a4098b6580bfd9e83efcd65539\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://cce0ca5c0e627f2455c0fe3bf1148f01c1c58c34f557df148cfa88e8c94bf20e\",\"dweb:/ipfs/QmNUGi7KbbNT6wtKSd6fuySsX9FT21eqkomQZDGK4BoMHy\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverterFactory.sol\":{\"keccak256\":\"0x4e2dbdb7499c62dbdfae3dfbc155a6cef635b3d0fe80cf673f2bfb6c51174ab3\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://bacd9c9a10315e2d08551ae2422a3784bd939688003122813a4a2b92a8a12c72\",\"dweb:/ipfs/QmbdgRF9x6fj6miW3bf3kN49KzFzbrqDZiyqEqdcD1ThEs\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506133a7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600090565b6131db806101978339019056fe60806040526003805460ff60a81b19169055600880546001600160601b03191690553480156200002e57600080fd5b50604051620031db380380620031db833981810160405260608110156200005457600080fd5b5080516020820151604090920151600080546001600160a01b03191633179055909190828282818062000087816200011e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000be816200011e565b81620000ca816200017d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001dc915050565b6001600160a01b0381166200017a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200017a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b612fef80620001ec6000396000f3fe6080604052600436106102765760003560e01c806371f52bf31161014f578063d031370b116100c1578063d89595121161007a578063d8959512146108e7578063dc8de3791461092c578063e8dc12ff1461095f578063ecbca55d146109a5578063f2fde38b146109d5578063fc0c546a14610a085761030d565b8063d031370b14610836578063d260529c14610860578063d3fb73b414610875578063d4ee1d901461088a578063d55ec6971461089f578063d66bd524146108b45761030d565b80639b99a8e2116101135780639b99a8e21461078a578063af94b8d81461079f578063b4a176d3146107e2578063bf754558146107f7578063c45d3d921461080c578063cdc91c69146108215761030d565b806371f52bf31461072157806379ba5097146107365780637b1039991461074b5780638da5cb5b1461076057806394c275ad146107755761030d565b8063395900d4116101e8578063579cd3ca116101ac578063579cd3ca1461060f5780635e35359e1461062457806361cd756e1461066757806367b6d57c1461067c578063690d8320146106af5780636a49d2c4146106e25761030d565b8063395900d4146105435780633e8ff43f1461058657806349d10b64146105b25780634af80f0e146105c757806354fd4d50146105fa5761030d565b80631cfab2901161023a5780631cfab290146104425780631e1401f81461047557806321e6b53d146104d157806322f3e2d4146105045780632fe8a6ad1461051957806338a5e0161461052e5761030d565b8063024c7ec7146103125780630c7d5cd81461033e5780630e53aae91461036c57806312c2aca4146103d357806319b64015146103fc5761030d565b3661030d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661030b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061030b6004803603602081101561033557600080fd5b50351515610a1d565b34801561034a57600080fd5b50610353610a43565b6040805163ffffffff9092168252519081900360200190f35b34801561037857600080fd5b5061039f6004803603602081101561038f57600080fd5b50356001600160a01b0316610a4f565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156103df57600080fd5b506103e8610ae7565b604080519115158252519081900360200190f35b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610b33565b604080516001600160a01b039092168252519081900360200190f35b34801561044e57600080fd5b506103536004803603602081101561046557600080fd5b50356001600160a01b0316610b5d565b34801561048157600080fd5b506104b86004803603606081101561049857600080fd5b506001600160a01b03813581169160208101359091169060400135610b8f565b6040805192835260208301919091528051918290030190f35b3480156104dd57600080fd5b5061030b600480360360208110156104f457600080fd5b50356001600160a01b0316610baa565b34801561051057600080fd5b506103e8610bbe565b34801561052557600080fd5b506103e8610c3d565b34801561053a57600080fd5b5061030b610c4d565b34801561054f57600080fd5b5061030b6004803603606081101561056657600080fd5b506001600160a01b03813581169160208101359091169060400135610c5f565b34801561059257600080fd5b5061059b610ce5565b6040805161ffff9092168252519081900360200190f35b3480156105be57600080fd5b5061030b610cea565b3480156105d357600080fd5b5061030b600480360360208110156105ea57600080fd5b50356001600160a01b0316610ef2565b34801561060657600080fd5b5061059b610f27565b34801561061b57600080fd5b50610353610f2c565b34801561063057600080fd5b5061030b6004803603606081101561064757600080fd5b506001600160a01b03813581169160208101359091169060400135610f3f565b34801561067357600080fd5b50610426611070565b34801561068857600080fd5b5061030b6004803603602081101561069f57600080fd5b50356001600160a01b031661107f565b3480156106bb57600080fd5b5061030b600480360360208110156106d257600080fd5b50356001600160a01b031661112b565b3480156106ee57600080fd5b5061030b6004803603604081101561070557600080fd5b5080356001600160a01b0316906020013563ffffffff1661125e565b34801561072d57600080fd5b5061059b6112ce565b34801561074257600080fd5b5061030b6112dd565b34801561075757600080fd5b50610426611394565b34801561076c57600080fd5b506104266113a3565b34801561078157600080fd5b506103536113b2565b34801561079657600080fd5b5061059b6113c6565b3480156107ab57600080fd5b506104b8600480360360608110156107c257600080fd5b506001600160a01b038135811691602081013590911690604001356113cc565b3480156107ee57600080fd5b5061030b6114b5565b34801561080357600080fd5b506103e86114e1565b34801561081857600080fd5b506104266114e6565b34801561082d57600080fd5b5061030b6114f5565b34801561084257600080fd5b506104266004803603602081101561085957600080fd5b503561154e565b34801561086c57600080fd5b506103e8611575565b34801561088157600080fd5b5061042661157a565b34801561089657600080fd5b50610426611589565b3480156108ab57600080fd5b5061030b611598565b3480156108c057600080fd5b5061039f600480360360208110156108d757600080fd5b50356001600160a01b0316611680565b3480156108f357600080fd5b5061091a6004803603602081101561090a57600080fd5b50356001600160a01b03166116c3565b60408051918252519081900360200190f35b34801561093857600080fd5b5061091a6004803603602081101561094f57600080fd5b50356001600160a01b03166116d4565b61091a600480360360a081101561097557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135821691608090910135166116fd565b3480156109b157600080fd5b5061030b600480360360208110156109c857600080fd5b503563ffffffff1661190d565b3480156109e157600080fd5b5061030b600480360360208110156109f857600080fd5b50356001600160a01b03166119f5565b348015610a1457600080fd5b50610426611a73565b610a25611a82565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000610a5f612f8b565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b600060068281548110610b4257fe5b6000918252602090912001546001600160a01b031692915050565b600081610b6981611ad5565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600080610b9d8585856113cc565b915091505b935093915050565b610bb2611a82565b610bbb8161107f565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b158015610c0257600080fd5b505afa158015610c16573d6000803e3d6000fd5b505050506040513d6020811015610c2c57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b610c55611a82565b610c5d6114f5565b565b610c67611a82565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b50505050505050565b600090565b6000546001600160a01b0316331480610d0d5750600354600160a01b900460ff16155b610d52576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610d706f436f6e7472616374526567697374727960801b611b42565b6002549091506001600160a01b03808316911614801590610d9957506001600160a01b03811615155b610de1576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b03161415610ec2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610efa611a82565b80610f0481611bc0565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b600854600160401b900463ffffffff1681565b610f47611c14565b6003805460ff60a81b1916600160a81b179055610f62611a82565b6000610f87762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580610fc15750610fbf610bbe565b155b80610fd957506000546001600160a01b038281169116145b61101e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611029848484611c64565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff161561105d5761105d84611c95565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611087611a82565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6110ab81611d73565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561110f57600080fd5b505af1158015611123573d6000803e3d6000fd5b505050505050565b611133611c14565b6003805460ff60a81b1916600160a81b17905561114e611a82565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61116c81611ad5565b6000611191762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b905061119b610bbe565b15806111b457506000546001600160a01b038281169116145b6111f9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561122e573d6000803e3d6000fd5b5061124c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee611c95565b50506003805460ff60a81b1916905550565b611266611a82565b61126e6113c6565b61ffff16156112c0576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6112ca8282611dd5565b5050565b60006112d86113c6565b905090565b6001546001600160a01b03163314611330576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60065490565b60045460009081906001600160a01b03858116911614801561141057506001600160a01b038516600090815260076020526040902060010154600160301b900460ff165b156114275761141e83611ff7565b91509150610ba2565b6004546001600160a01b03868116911614801561146657506001600160a01b038416600090815260076020526040902060010154600160301b900460ff165b156114745761141e836121e9565b6040805162461bcd60e51b815260206004820152601160248201527022a9292fa4a72b20a624a22faa27a5a2a760791b604482015290519081900360640190fd5b6114bd611a82565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b6005546001600160a01b031681565b6114fd611a82565b6115056122dd565b6004546001906001600160a01b031661151c610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b6006818154811061155b57fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b6115a0611a82565b60006115c5762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6004549091506000906001600160a01b03166115df610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4611618816119f5565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561166057600080fd5b505af1158015611674573d6000803e3d6000fd5b50505050610bbb6112dd565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006116ce826116d4565b92915050565b6000816116e081611ad5565b50506001600160a01b031660009081526007602052604090205490565b6000611707611c14565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b61173481611d73565b856001600160a01b0316876001600160a01b03161415611794576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b031615806118a1575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156117f457600080fd5b505afa158015611808573d6000803e3d6000fd5b505050506040513d602081101561181e57600080fd5b505180156118a1575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561187457600080fd5b505afa158015611888573d6000803e3d6000fd5b505050506040513d602081101561189e57600080fd5b50515b6118e8576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6118f587878787876123a4565b6003805460ff60a81b19169055979650505050505050565b611915611a82565b60085463ffffffff6401000000009091048116908216111561197e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6119fd611a82565b6000546001600160a01b0382811691161415611a51576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314610c5d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8e57600080fd5b505afa158015611ba2573d6000803e3d6000fd5b505050506040513d6020811015611bb857600080fd5b505192915050565b6001600160a01b038116301415610bbb576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600354600160a81b900460ff1615610c5d576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b611c6c611a82565b82611c768161256d565b82611c808161256d565b83611c8a81611bc0565b6111238686866125be565b80611c9f81611ad5565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611ce4576001600160a01b03821660009081526007602052604090204790556112ca565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015611d2a57600080fd5b505afa158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b611d7c81611b42565b6001600160a01b0316336001600160a01b031614610bbb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611ddd611a82565b611de561271e565b81611def8161256d565b82611df981611bc0565b82611e0381612765565b6004546001600160a01b03868116911614801590611e4457506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b611e8b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115611ef3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff611efe6113c6565b61ffff1610611f50576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6000806120026127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561205257600080fd5b505afa158015612066573d6000803e3d6000fd5b505050506040513d602081101561207c57600080fd5b505160068054919250600091829061209057fe5b6000918252602090912001546001600160a01b03169050816120f9576001600160a01b0381166000908152600760205260409020600101546120ec9063ffffffff908116906120e6908890620f42409061281d16565b90612882565b60009350935050506121e4565b60006121146c42616e636f72466f726d756c6160981b611b42565b6001600160a01b031663f3250fe28461212c856116d4565b6001600160a01b0386166000908152600760209081526040918290206001015482516001600160e01b031960e088901b1681526004810195909552602485019390935263ffffffff9092166044840152606483018b905251608480840193829003018186803b15801561219e57600080fd5b505afa1580156121b2573d6000803e3d6000fd5b505050506040513d60208110156121c857600080fd5b5051905060006121d7826128e1565b9182900395509093505050505b915091565b6000806121f46127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561224457600080fd5b505afa158015612258573d6000803e3d6000fd5b505050506040513d602081101561226e57600080fd5b505160068054919250600091829061228257fe5b6000918252602090912001546001600160a01b03169050818514156122aa576120ec816116d4565b60006122c56c42616e636f72466f726d756c6160981b611b42565b6001600160a01b03166376cf0b568461212c856116d4565b6122e5611a82565b60006122ef6113c6565b61ffff1611612341576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b15801561238457600080fd5b505af1158015612398573d6000803e3d6000fd5b50505050610c5d61290c565b600454600090819081906001600160a01b0388811691161480156123ea57506001600160a01b038816600090815260076020526040902060010154600160301b900460ff165b156124035750866123fc86868661294c565b9150612454565b6004546001600160a01b03898116911614801561244257506001600160a01b038716600090815260076020526040902060010154600160301b900460ff165b156114745750856123fc868686612bc0565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b50516001600160a01b0380841660008181526007602052604090206001015460045493945063ffffffff16929091167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24612534620f424061252e886116d4565b9061281d565b6125478663ffffffff8088169061281d16565b6040805192835260208301919091528051918290030190a3509198975050505050505050565b6001600160a01b038116610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061263b5780518252601f19909201916020918201910161261c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461269d576040519150601f19603f3d011682016040523d82523d6000602084013e6126a2565b606091505b50915091508180156126d05750805115806126d057508080602001905160208110156126cd57600080fd5b50515b612717576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b612726610bbe565b15610c5d576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156127845750620f424063ffffffff821611155b610bbb576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6127dd610bbe565b610c5d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008261282c575060006116ce565b8282028284828161283957fe5b041461287b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b60008082116128cd576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816128d857fe5b04949350505050565b6008546000906116ce90620f4240906120e6908590600160401b900463ffffffff9081169061281d16565b60065460005b818110156112ca576129446006828154811061292a57fe5b6000918252602090912001546001600160a01b0316611c95565b600101612912565b600080600061295a86611ff7565b9150915081600014156129ad576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b600060066000815481106129bd57fe5b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee811415612a4957863414612a44576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b612b20565b34158015612ada575086612ad7612a5f836116d4565b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b158015612aa557600080fd5b505afa158015612ab9573d6000803e3d6000fd5b505050506040513d6020811015612acf57600080fd5b505190612ed5565b10155b612b20576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b612b2981611c95565b600480546040805163219e412d60e21b81526001600160a01b0389811694820194909452602481018790529051929091169163867904b49160448082019260009290919082900301818387803b158015612b8257600080fd5b505af1158015612b96573d6000803e3d6000fd5b5050600454612bb592508391506001600160a01b0316888a8787612f22565b509095945050505050565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015612c0f57600080fd5b505afa158015612c23573d6000803e3d6000fd5b505050506040513d6020811015612c3957600080fd5b5051841115612c84576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600080612c90866121e9565b915091508160001415612ce3576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b60006006600081548110612cf357fe5b600091825260208083209091015460048054604080516318160ddd60e01b815290516001600160a01b03948516975091909316936318160ddd938084019391929190829003018186803b158015612d4957600080fd5b505afa158015612d5d573d6000803e3d6000fd5b505050506040513d6020811015612d7357600080fd5b505190506000612d82836116d4565b905080851080612d9b57508085148015612d9b57508189145b612da157fe5b600480546040805163a24835d160e01b81523093810193909352602483018c9052516001600160a01b039091169163a24835d191604480830192600092919082900301818387803b158015612df557600080fd5b505af1158015612e09573d6000803e3d6000fd5b5050506001600160a01b038416600090815260076020526040902054612e30915086612ed5565b6001600160a01b03841660008181526007602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612ea3576040516001600160a01b0388169086156108fc029087906000818181858888f19350505050158015612e9d573d6000803e3d6000fd5b50612eae565b612eae8388876125be565b600454612ec8906001600160a01b0316848a8c8989612f22565b5092979650505050505050565b600081831015612f1c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600160ff1b8110612f2f57fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea26469706673582212208711a54d3386915a9a6195bc55c1f59166ac4b22284e030f99ce604b01d8b3fd64736f6c634300060c0033a26469706673582212200541abc3a348b949a796f92270ff16b879e4214957a32a2383745a5a7eecb42e64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600090565b6131db806101978339019056fe60806040526003805460ff60a81b19169055600880546001600160601b03191690553480156200002e57600080fd5b50604051620031db380380620031db833981810160405260608110156200005457600080fd5b5080516020820151604090920151600080546001600160a01b03191633179055909190828282818062000087816200011e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000be816200011e565b81620000ca816200017d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001dc915050565b6001600160a01b0381166200017a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200017a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b612fef80620001ec6000396000f3fe6080604052600436106102765760003560e01c806371f52bf31161014f578063d031370b116100c1578063d89595121161007a578063d8959512146108e7578063dc8de3791461092c578063e8dc12ff1461095f578063ecbca55d146109a5578063f2fde38b146109d5578063fc0c546a14610a085761030d565b8063d031370b14610836578063d260529c14610860578063d3fb73b414610875578063d4ee1d901461088a578063d55ec6971461089f578063d66bd524146108b45761030d565b80639b99a8e2116101135780639b99a8e21461078a578063af94b8d81461079f578063b4a176d3146107e2578063bf754558146107f7578063c45d3d921461080c578063cdc91c69146108215761030d565b806371f52bf31461072157806379ba5097146107365780637b1039991461074b5780638da5cb5b1461076057806394c275ad146107755761030d565b8063395900d4116101e8578063579cd3ca116101ac578063579cd3ca1461060f5780635e35359e1461062457806361cd756e1461066757806367b6d57c1461067c578063690d8320146106af5780636a49d2c4146106e25761030d565b8063395900d4146105435780633e8ff43f1461058657806349d10b64146105b25780634af80f0e146105c757806354fd4d50146105fa5761030d565b80631cfab2901161023a5780631cfab290146104425780631e1401f81461047557806321e6b53d146104d157806322f3e2d4146105045780632fe8a6ad1461051957806338a5e0161461052e5761030d565b8063024c7ec7146103125780630c7d5cd81461033e5780630e53aae91461036c57806312c2aca4146103d357806319b64015146103fc5761030d565b3661030d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661030b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061030b6004803603602081101561033557600080fd5b50351515610a1d565b34801561034a57600080fd5b50610353610a43565b6040805163ffffffff9092168252519081900360200190f35b34801561037857600080fd5b5061039f6004803603602081101561038f57600080fd5b50356001600160a01b0316610a4f565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156103df57600080fd5b506103e8610ae7565b604080519115158252519081900360200190f35b34801561040857600080fd5b506104266004803603602081101561041f57600080fd5b5035610b33565b604080516001600160a01b039092168252519081900360200190f35b34801561044e57600080fd5b506103536004803603602081101561046557600080fd5b50356001600160a01b0316610b5d565b34801561048157600080fd5b506104b86004803603606081101561049857600080fd5b506001600160a01b03813581169160208101359091169060400135610b8f565b6040805192835260208301919091528051918290030190f35b3480156104dd57600080fd5b5061030b600480360360208110156104f457600080fd5b50356001600160a01b0316610baa565b34801561051057600080fd5b506103e8610bbe565b34801561052557600080fd5b506103e8610c3d565b34801561053a57600080fd5b5061030b610c4d565b34801561054f57600080fd5b5061030b6004803603606081101561056657600080fd5b506001600160a01b03813581169160208101359091169060400135610c5f565b34801561059257600080fd5b5061059b610ce5565b6040805161ffff9092168252519081900360200190f35b3480156105be57600080fd5b5061030b610cea565b3480156105d357600080fd5b5061030b600480360360208110156105ea57600080fd5b50356001600160a01b0316610ef2565b34801561060657600080fd5b5061059b610f27565b34801561061b57600080fd5b50610353610f2c565b34801561063057600080fd5b5061030b6004803603606081101561064757600080fd5b506001600160a01b03813581169160208101359091169060400135610f3f565b34801561067357600080fd5b50610426611070565b34801561068857600080fd5b5061030b6004803603602081101561069f57600080fd5b50356001600160a01b031661107f565b3480156106bb57600080fd5b5061030b600480360360208110156106d257600080fd5b50356001600160a01b031661112b565b3480156106ee57600080fd5b5061030b6004803603604081101561070557600080fd5b5080356001600160a01b0316906020013563ffffffff1661125e565b34801561072d57600080fd5b5061059b6112ce565b34801561074257600080fd5b5061030b6112dd565b34801561075757600080fd5b50610426611394565b34801561076c57600080fd5b506104266113a3565b34801561078157600080fd5b506103536113b2565b34801561079657600080fd5b5061059b6113c6565b3480156107ab57600080fd5b506104b8600480360360608110156107c257600080fd5b506001600160a01b038135811691602081013590911690604001356113cc565b3480156107ee57600080fd5b5061030b6114b5565b34801561080357600080fd5b506103e86114e1565b34801561081857600080fd5b506104266114e6565b34801561082d57600080fd5b5061030b6114f5565b34801561084257600080fd5b506104266004803603602081101561085957600080fd5b503561154e565b34801561086c57600080fd5b506103e8611575565b34801561088157600080fd5b5061042661157a565b34801561089657600080fd5b50610426611589565b3480156108ab57600080fd5b5061030b611598565b3480156108c057600080fd5b5061039f600480360360208110156108d757600080fd5b50356001600160a01b0316611680565b3480156108f357600080fd5b5061091a6004803603602081101561090a57600080fd5b50356001600160a01b03166116c3565b60408051918252519081900360200190f35b34801561093857600080fd5b5061091a6004803603602081101561094f57600080fd5b50356001600160a01b03166116d4565b61091a600480360360a081101561097557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135821691608090910135166116fd565b3480156109b157600080fd5b5061030b600480360360208110156109c857600080fd5b503563ffffffff1661190d565b3480156109e157600080fd5b5061030b600480360360208110156109f857600080fd5b50356001600160a01b03166119f5565b348015610a1457600080fd5b50610426611a73565b610a25611a82565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000610a5f612f8b565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b600060068281548110610b4257fe5b6000918252602090912001546001600160a01b031692915050565b600081610b6981611ad5565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600080610b9d8585856113cc565b915091505b935093915050565b610bb2611a82565b610bbb8161107f565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b158015610c0257600080fd5b505afa158015610c16573d6000803e3d6000fd5b505050506040513d6020811015610c2c57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b610c55611a82565b610c5d6114f5565b565b610c67611a82565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b158015610cc857600080fd5b505af1158015610cdc573d6000803e3d6000fd5b50505050505050565b600090565b6000546001600160a01b0316331480610d0d5750600354600160a01b900460ff16155b610d52576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610d706f436f6e7472616374526567697374727960801b611b42565b6002549091506001600160a01b03808316911614801590610d9957506001600160a01b03811615155b610de1576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4357600080fd5b505afa158015610e57573d6000803e3d6000fd5b505050506040513d6020811015610e6d57600080fd5b50516001600160a01b03161415610ec2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610efa611a82565b80610f0481611bc0565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b600854600160401b900463ffffffff1681565b610f47611c14565b6003805460ff60a81b1916600160a81b179055610f62611a82565b6000610f87762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580610fc15750610fbf610bbe565b155b80610fd957506000546001600160a01b038281169116145b61101e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611029848484611c64565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff161561105d5761105d84611c95565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611087611a82565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6110ab81611d73565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561110f57600080fd5b505af1158015611123573d6000803e3d6000fd5b505050505050565b611133611c14565b6003805460ff60a81b1916600160a81b17905561114e611a82565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61116c81611ad5565b6000611191762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b905061119b610bbe565b15806111b457506000546001600160a01b038281169116145b6111f9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561122e573d6000803e3d6000fd5b5061124c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee611c95565b50506003805460ff60a81b1916905550565b611266611a82565b61126e6113c6565b61ffff16156112c0576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6112ca8282611dd5565b5050565b60006112d86113c6565b905090565b6001546001600160a01b03163314611330576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60065490565b60045460009081906001600160a01b03858116911614801561141057506001600160a01b038516600090815260076020526040902060010154600160301b900460ff165b156114275761141e83611ff7565b91509150610ba2565b6004546001600160a01b03868116911614801561146657506001600160a01b038416600090815260076020526040902060010154600160301b900460ff165b156114745761141e836121e9565b6040805162461bcd60e51b815260206004820152601160248201527022a9292fa4a72b20a624a22faa27a5a2a760791b604482015290519081900360640190fd5b6114bd611a82565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b6005546001600160a01b031681565b6114fd611a82565b6115056122dd565b6004546001906001600160a01b031661151c610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b6006818154811061155b57fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b6115a0611a82565b60006115c5762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611b42565b6004549091506000906001600160a01b03166115df610ce5565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4611618816119f5565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561166057600080fd5b505af1158015611674573d6000803e3d6000fd5b50505050610bbb6112dd565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006116ce826116d4565b92915050565b6000816116e081611ad5565b50506001600160a01b031660009081526007602052604090205490565b6000611707611c14565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b61173481611d73565b856001600160a01b0316876001600160a01b03161415611794576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b031615806118a1575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156117f457600080fd5b505afa158015611808573d6000803e3d6000fd5b505050506040513d602081101561181e57600080fd5b505180156118a1575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561187457600080fd5b505afa158015611888573d6000803e3d6000fd5b505050506040513d602081101561189e57600080fd5b50515b6118e8576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6118f587878787876123a4565b6003805460ff60a81b19169055979650505050505050565b611915611a82565b60085463ffffffff6401000000009091048116908216111561197e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6119fd611a82565b6000546001600160a01b0382811691161415611a51576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314610c5d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8e57600080fd5b505afa158015611ba2573d6000803e3d6000fd5b505050506040513d6020811015611bb857600080fd5b505192915050565b6001600160a01b038116301415610bbb576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b600354600160a81b900460ff1615610c5d576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b611c6c611a82565b82611c768161256d565b82611c808161256d565b83611c8a81611bc0565b6111238686866125be565b80611c9f81611ad5565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611ce4576001600160a01b03821660009081526007602052604090204790556112ca565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015611d2a57600080fd5b505afa158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b611d7c81611b42565b6001600160a01b0316336001600160a01b031614610bbb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611ddd611a82565b611de561271e565b81611def8161256d565b82611df981611bc0565b82611e0381612765565b6004546001600160a01b03868116911614801590611e4457506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b611e8b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115611ef3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff611efe6113c6565b61ffff1610611f50576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6000806120026127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561205257600080fd5b505afa158015612066573d6000803e3d6000fd5b505050506040513d602081101561207c57600080fd5b505160068054919250600091829061209057fe5b6000918252602090912001546001600160a01b03169050816120f9576001600160a01b0381166000908152600760205260409020600101546120ec9063ffffffff908116906120e6908890620f42409061281d16565b90612882565b60009350935050506121e4565b60006121146c42616e636f72466f726d756c6160981b611b42565b6001600160a01b031663f3250fe28461212c856116d4565b6001600160a01b0386166000908152600760209081526040918290206001015482516001600160e01b031960e088901b1681526004810195909552602485019390935263ffffffff9092166044840152606483018b905251608480840193829003018186803b15801561219e57600080fd5b505afa1580156121b2573d6000803e3d6000fd5b505050506040513d60208110156121c857600080fd5b5051905060006121d7826128e1565b9182900395509093505050505b915091565b6000806121f46127d5565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561224457600080fd5b505afa158015612258573d6000803e3d6000fd5b505050506040513d602081101561226e57600080fd5b505160068054919250600091829061228257fe5b6000918252602090912001546001600160a01b03169050818514156122aa576120ec816116d4565b60006122c56c42616e636f72466f726d756c6160981b611b42565b6001600160a01b03166376cf0b568461212c856116d4565b6122e5611a82565b60006122ef6113c6565b61ffff1611612341576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b15801561238457600080fd5b505af1158015612398573d6000803e3d6000fd5b50505050610c5d61290c565b600454600090819081906001600160a01b0388811691161480156123ea57506001600160a01b038816600090815260076020526040902060010154600160301b900460ff165b156124035750866123fc86868661294c565b9150612454565b6004546001600160a01b03898116911614801561244257506001600160a01b038716600090815260076020526040902060010154600160301b900460ff165b156114745750856123fc868686612bc0565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b50516001600160a01b0380841660008181526007602052604090206001015460045493945063ffffffff16929091167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24612534620f424061252e886116d4565b9061281d565b6125478663ffffffff8088169061281d16565b6040805192835260208301919091528051918290030190a3509198975050505050505050565b6001600160a01b038116610bbb576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061263b5780518252601f19909201916020918201910161261c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461269d576040519150601f19603f3d011682016040523d82523d6000602084013e6126a2565b606091505b50915091508180156126d05750805115806126d057508080602001905160208110156126cd57600080fd5b50515b612717576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b612726610bbe565b15610c5d576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156127845750620f424063ffffffff821611155b610bbb576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6127dd610bbe565b610c5d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008261282c575060006116ce565b8282028284828161283957fe5b041461287b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b9392505050565b60008082116128cd576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b60008284816128d857fe5b04949350505050565b6008546000906116ce90620f4240906120e6908590600160401b900463ffffffff9081169061281d16565b60065460005b818110156112ca576129446006828154811061292a57fe5b6000918252602090912001546001600160a01b0316611c95565b600101612912565b600080600061295a86611ff7565b9150915081600014156129ad576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b600060066000815481106129bd57fe5b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee811415612a4957863414612a44576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b612b20565b34158015612ada575086612ad7612a5f836116d4565b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b158015612aa557600080fd5b505afa158015612ab9573d6000803e3d6000fd5b505050506040513d6020811015612acf57600080fd5b505190612ed5565b10155b612b20576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b612b2981611c95565b600480546040805163219e412d60e21b81526001600160a01b0389811694820194909452602481018790529051929091169163867904b49160448082019260009290919082900301818387803b158015612b8257600080fd5b505af1158015612b96573d6000803e3d6000fd5b5050600454612bb592508391506001600160a01b0316888a8787612f22565b509095945050505050565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015612c0f57600080fd5b505afa158015612c23573d6000803e3d6000fd5b505050506040513d6020811015612c3957600080fd5b5051841115612c84576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600080612c90866121e9565b915091508160001415612ce3576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b60006006600081548110612cf357fe5b600091825260208083209091015460048054604080516318160ddd60e01b815290516001600160a01b03948516975091909316936318160ddd938084019391929190829003018186803b158015612d4957600080fd5b505afa158015612d5d573d6000803e3d6000fd5b505050506040513d6020811015612d7357600080fd5b505190506000612d82836116d4565b905080851080612d9b57508085148015612d9b57508189145b612da157fe5b600480546040805163a24835d160e01b81523093810193909352602483018c9052516001600160a01b039091169163a24835d191604480830192600092919082900301818387803b158015612df557600080fd5b505af1158015612e09573d6000803e3d6000fd5b5050506001600160a01b038416600090815260076020526040902054612e30915086612ed5565b6001600160a01b03841660008181526007602052604090209190915573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415612ea3576040516001600160a01b0388169086156108fc029087906000818181858888f19350505050158015612e9d573d6000803e3d6000fd5b50612eae565b612eae8388876125be565b600454612ec8906001600160a01b0316848a8c8989612f22565b5092979650505050505050565b600081831015612f1c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600160ff1b8110612f2f57fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fea26469706673582212208711a54d3386915a9a6195bc55c1f59166ac4b22284e030f99ce604b01d8b3fd64736f6c634300060c0033a26469706673582212200541abc3a348b949a796f92270ff16b879e4214957a32a2383745a5a7eecb42e64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "310:1055:25:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "310:1055:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1013:349;;;;;;;;;;;;;;;;-1:-1:-1;1013:349:25;;-1:-1:-1;;;;;1013:349:25;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1013:349:25;;;;;;;;;;;;;;510:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1013:349;1146:10;1169:20;1237:7;1248:9;1259:17;1192:85;;;;;:::i;:::-;;;-1:-1:-1;;;;;1192:85:25;;;;;;-1:-1:-1;;;;;1192:85:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1169:108;;1288:9;-1:-1:-1;;;;;1288:27:25;;1316:10;1288:39;;;;;;;;;;;;;-1:-1:-1;;;;;1288:39:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1345:9:25;;1013:349;-1:-1:-1;;;;;;;1013:349:25:o;510:92::-;567:6;510:92;:::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./LiquidTokenConverter.sol\";\r\nimport \"../../interfaces/IConverter.sol\";\r\nimport \"../../interfaces/ITypedConverterFactory.sol\";\r\nimport \"../../../token/interfaces/ISmartToken.sol\";\r\n\r\n/*\r\n LiquidTokenConverter Factory\r\n*/\r\ncontract LiquidTokenConverterFactory is ITypedConverterFactory {\r\n /**\r\n * @dev returns the converter type the factory is associated with\r\n *\r\n * @return converter type\r\n */\r\n function converterType() external pure override returns (uint16) {\r\n return 0;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n *\r\n * @return a new converter\r\n */\r\n function createConverter(IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external override returns (IConverter) {\r\n IConverter converter = new LiquidTokenConverter(ISmartToken(address(_anchor)), _registry, _maxConversionFee);\r\n converter.transferOwnership(msg.sender);\r\n return converter;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverterFactory.sol", + "exportedSymbols": { + "LiquidTokenConverterFactory": [ + 14418 + ] + }, + "id": 14419, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 14364, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:25" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol", + "file": "./LiquidTokenConverter.sol", + "id": 14365, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 14363, + "src": "77:36:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../interfaces/IConverter.sol", + "id": 14366, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 13341, + "src": "115:41:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 14367, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 13711, + "src": "158:53:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 14368, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 21183, + "src": "213:51:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 14369, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "350:22:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 14370, + "nodeType": "InheritanceSpecifier", + "src": "350:22:25" + } + ], + "contractDependencies": [ + 13710, + 14362 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 14418, + "linearizedBaseContracts": [ + 14418, + 13710 + ], + "name": "LiquidTokenConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 14379, + "nodeType": "Block", + "src": "575:27:25", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "593:1:25", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 14376, + "id": 14378, + "nodeType": "Return", + "src": "586:8:25" + } + ] + }, + "documentation": { + "id": 14371, + "nodeType": "StructuredDocumentation", + "src": "380:124:25", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 14380, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14373, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "549:8:25" + }, + "parameters": { + "id": 14372, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:25" + }, + "returnParameters": { + "id": 14376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14375, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14380, + "src": "567:6:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 14374, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "567:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "566:8:25" + }, + "scope": 14418, + "src": "510:92:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 14416, + "nodeType": "Block", + "src": "1158:204:25", + "statements": [ + { + "assignments": [ + 14394 + ], + "declarations": [ + { + "constant": false, + "id": 14394, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14416, + "src": "1169:20:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 14393, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1169:10:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14406, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14400, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14383, + "src": "1237:7:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1229:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:25", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1229:16:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14397, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "1217:11:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1217:29:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14403, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14385, + "src": "1248:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 14404, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14387, + "src": "1259:17:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 14396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1192:24:25", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_ISmartToken_$21182_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_LiquidTokenConverter_$14362_$", + "typeString": "function (contract ISmartToken,contract IContractRegistry,uint32) returns (contract LiquidTokenConverter)" + }, + "typeName": { + "contractScope": null, + "id": 14395, + "name": "LiquidTokenConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 14362, + "src": "1196:20:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + }, + "id": 14405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1192:85:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1169:108:25" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14410, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1316:3:25", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1316:10:25", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14407, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14394, + "src": "1288:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 14409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "1288:27:25", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 14412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1288:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14413, + "nodeType": "ExpressionStatement", + "src": "1288:39:25" + }, + { + "expression": { + "argumentTypes": null, + "id": 14414, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14394, + "src": "1345:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 14392, + "id": 14415, + "nodeType": "Return", + "src": "1338:16:25" + } + ] + }, + "documentation": { + "id": 14381, + "nodeType": "StructuredDocumentation", + "src": "610:397:25", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return a new converter" + }, + "functionSelector": "11413958", + "id": 14417, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14389, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1128:8:25" + }, + "parameters": { + "id": 14388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14383, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1038:24:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 14382, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1038:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14385, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1064:27:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 14384, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1064:17:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14387, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1093:24:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14386, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1093:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1037:81:25" + }, + "returnParameters": { + "id": 14392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14391, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1146:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 14390, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1146:10:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1145:12:25" + }, + "scope": 14418, + "src": "1013:349:25", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 14419, + "src": "310:1055:25" + } + ], + "src": "52:1315:25" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverterFactory.sol", + "exportedSymbols": { + "LiquidTokenConverterFactory": [ + 14418 + ] + }, + "id": 14419, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 14364, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:25" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquid-token/LiquidTokenConverter.sol", + "file": "./LiquidTokenConverter.sol", + "id": 14365, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 14363, + "src": "77:36:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../interfaces/IConverter.sol", + "id": 14366, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 13341, + "src": "115:41:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 14367, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 13711, + "src": "158:53:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 14368, + "nodeType": "ImportDirective", + "scope": 14419, + "sourceUnit": 21183, + "src": "213:51:25", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 14369, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "350:22:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 14370, + "nodeType": "InheritanceSpecifier", + "src": "350:22:25" + } + ], + "contractDependencies": [ + 13710, + 14362 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 14418, + "linearizedBaseContracts": [ + 14418, + 13710 + ], + "name": "LiquidTokenConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 14379, + "nodeType": "Block", + "src": "575:27:25", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "593:1:25", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 14376, + "id": 14378, + "nodeType": "Return", + "src": "586:8:25" + } + ] + }, + "documentation": { + "id": 14371, + "nodeType": "StructuredDocumentation", + "src": "380:124:25", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 14380, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14373, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "549:8:25" + }, + "parameters": { + "id": 14372, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:2:25" + }, + "returnParameters": { + "id": 14376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14375, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14380, + "src": "567:6:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 14374, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "567:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "566:8:25" + }, + "scope": 14418, + "src": "510:92:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 14416, + "nodeType": "Block", + "src": "1158:204:25", + "statements": [ + { + "assignments": [ + 14394 + ], + "declarations": [ + { + "constant": false, + "id": 14394, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14416, + "src": "1169:20:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 14393, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1169:10:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14406, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14400, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14383, + "src": "1237:7:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1229:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:25", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1229:16:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14397, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21182, + "src": "1217:11:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21182_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1217:29:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14403, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14385, + "src": "1248:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 14404, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14387, + "src": "1259:17:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21182", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 14396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1192:24:25", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_ISmartToken_$21182_$_t_contract$_IContractRegistry_$22831_$_t_uint32_$returns$_t_contract$_LiquidTokenConverter_$14362_$", + "typeString": "function (contract ISmartToken,contract IContractRegistry,uint32) returns (contract LiquidTokenConverter)" + }, + "typeName": { + "contractScope": null, + "id": 14395, + "name": "LiquidTokenConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 14362, + "src": "1196:20:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + } + }, + "id": 14405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1192:85:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidTokenConverter_$14362", + "typeString": "contract LiquidTokenConverter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1169:108:25" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14410, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1316:3:25", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1316:10:25", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14407, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14394, + "src": "1288:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 14409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22843, + "src": "1288:27:25", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 14412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1288:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14413, + "nodeType": "ExpressionStatement", + "src": "1288:39:25" + }, + { + "expression": { + "argumentTypes": null, + "id": 14414, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14394, + "src": "1345:9:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 14392, + "id": 14415, + "nodeType": "Return", + "src": "1338:16:25" + } + ] + }, + "documentation": { + "id": 14381, + "nodeType": "StructuredDocumentation", + "src": "610:397:25", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return a new converter" + }, + "functionSelector": "11413958", + "id": 14417, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14389, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1128:8:25" + }, + "parameters": { + "id": 14388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14383, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1038:24:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 14382, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1038:16:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14385, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1064:27:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 14384, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "1064:17:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14387, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1093:24:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14386, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1093:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1037:81:25" + }, + "returnParameters": { + "id": 14392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14391, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14417, + "src": "1146:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 14390, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1146:10:25", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1145:12:25" + }, + "scope": 14418, + "src": "1013:349:25", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 14419, + "src": "310:1055:25" + } + ], + "src": "52:1315:25" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": {}, + "address": "0x244229012e01117638b2075EaEbE005a2E5A9343", + "transactionHash": "0xd934bf012f9f6d6bea850fc15544e18b967701979be451f9c8c8b255ff2574e0" + }, + "8995": { + "events": {}, + "links": {}, + "address": "0x244229012e01117638b2075EaEbE005a2E5A9343", + "transactionHash": "0xd934bf012f9f6d6bea850fc15544e18b967701979be451f9c8c8b255ff2574e0" + }, + "1604964469407": { + "events": {}, + "links": {}, + "address": "0x9A42fC0a2b878E27A769b3887dB7781178262B95", + "transactionHash": "0xdce320aad6e7eb5003c70460125b847b556fe6df9b8667b70d502f33e06211ed" + }, + "1604965719492": { + "events": {}, + "links": {}, + "address": "0x127a15517F2161AF72D3a9589454df428dbB31c3", + "transactionHash": "0x624516cdbb422b640b1cccd2f76f0583a8d4aaec851534847f222b45953b9af4" + } + }, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:45.560Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "converterType()": { + "details": "returns the converter type the factory is associated with", + "returns": { + "_0": "converter type" + } + }, + "createConverter(address,address,uint32)": { + "details": "creates a new converter with the given arguments and transfers the ownership to the caller", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract" + }, + "returns": { + "_0": "a new converter" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolConverter.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolConverter.json new file mode 100644 index 00000000..8d0d5012 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolConverter.json @@ -0,0 +1,2866 @@ +{ + "contractName": "LiquidityPoolConverter", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Liquidity Pool Converter The liquidity pool converter is the base contract for specific types of converters that manage liquidity pools. Liquidity pools have 2 reserves or more and they allow converting between them. Note that TokenRateUpdate events are dispatched for pool tokens as well. The pool token is the first token in the event in that case.\",\"events\":{\"LiquidityAdded(address,address,uint256,uint256,uint256)\":{\"details\":\"triggered after liquidity is added\",\"params\":{\"_amount\":\"reserve token amount\",\"_newBalance\":\"reserve token new balance\",\"_newSupply\":\"pool token new supply\",\"_provider\":\"liquidity provider\",\"_reserveToken\":\"reserve token address\"}},\"LiquidityRemoved(address,address,uint256,uint256,uint256)\":{\"details\":\"triggered after liquidity is removed\",\"params\":{\"_amount\":\"reserve token amount\",\"_newBalance\":\"reserve token new balance\",\"_newSupply\":\"pool token new supply\",\"_provider\":\"liquidity provider\",\"_reserveToken\":\"reserve token address\"}}},\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"constructor\":{\"details\":\"initializes a new LiquidityPoolConverter instance\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\"}},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":\"LiquidityPoolConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./ConverterBase.sol\";\r\n\r\n/**\r\n * @dev Liquidity Pool Converter\r\n *\r\n * The liquidity pool converter is the base contract for specific types of converters that\r\n * manage liquidity pools.\r\n *\r\n * Liquidity pools have 2 reserves or more and they allow converting between them.\r\n *\r\n * Note that TokenRateUpdate events are dispatched for pool tokens as well.\r\n * The pool token is the first token in the event in that case.\r\n*/\r\nabstract contract LiquidityPoolConverter is ConverterBase {\r\n /**\r\n * @dev triggered after liquidity is added\r\n *\r\n * @param _provider liquidity provider\r\n * @param _reserveToken reserve token address\r\n * @param _amount reserve token amount\r\n * @param _newBalance reserve token new balance\r\n * @param _newSupply pool token new supply\r\n */\r\n event LiquidityAdded(\r\n address indexed _provider,\r\n IERC20Token indexed _reserveToken,\r\n uint256 _amount,\r\n uint256 _newBalance,\r\n uint256 _newSupply\r\n );\r\n\r\n /**\r\n * @dev triggered after liquidity is removed\r\n *\r\n * @param _provider liquidity provider\r\n * @param _reserveToken reserve token address\r\n * @param _amount reserve token amount\r\n * @param _newBalance reserve token new balance\r\n * @param _newSupply pool token new supply\r\n */\r\n event LiquidityRemoved(\r\n address indexed _provider,\r\n IERC20Token indexed _reserveToken,\r\n uint256 _amount,\r\n uint256 _newBalance,\r\n uint256 _newSupply\r\n );\r\n\r\n /**\r\n * @dev initializes a new LiquidityPoolConverter instance\r\n *\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n */\r\n constructor(\r\n IConverterAnchor _anchor,\r\n IContractRegistry _registry,\r\n uint32 _maxConversionFee\r\n )\r\n ConverterBase(_anchor, _registry, _maxConversionFee)\r\n internal\r\n {\r\n }\r\n\r\n /**\r\n * @dev accepts ownership of the anchor after an ownership transfer\r\n * also activates the converter\r\n * can only be called by the contract owner\r\n * note that prior to version 28, you should use 'acceptTokenOwnership' instead\r\n */\r\n function acceptAnchorOwnership() public virtual override {\r\n // verify that the converter has at least 2 reserves\r\n require(reserveTokenCount() > 1, \"ERR_INVALID_RESERVE_COUNT\");\r\n super.acceptAnchorOwnership();\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "exportedSymbols": { + "LiquidityPoolConverter": [ + 13077 + ] + }, + "id": 13078, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13011, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:13" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "file": "./ConverterBase.sol", + "id": 13012, + "nodeType": "ImportDirective", + "scope": 13078, + "sourceUnit": 10040, + "src": "77:29:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13014, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "564:13:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 13015, + "nodeType": "InheritanceSpecifier", + "src": "564:13:13" + } + ], + "contractDependencies": [ + 10039, + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 13013, + "nodeType": "StructuredDocumentation", + "src": "110:408:13", + "text": " @dev Liquidity Pool Converter\n The liquidity pool converter is the base contract for specific types of converters that\n manage liquidity pools.\n Liquidity pools have 2 reserves or more and they allow converting between them.\n Note that TokenRateUpdate events are dispatched for pool tokens as well.\n The pool token is the first token in the event in that case." + }, + "fullyImplemented": false, + "id": 13077, + "linearizedBaseContracts": [ + 13077, + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "LiquidityPoolConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 13016, + "nodeType": "StructuredDocumentation", + "src": "585:344:13", + "text": " @dev triggered after liquidity is added\n @param _provider liquidity provider\n @param _reserveToken reserve token address\n @param _amount reserve token amount\n @param _newBalance reserve token new balance\n @param _newSupply pool token new supply" + }, + "id": 13028, + "name": "LiquidityAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 13027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13018, + "indexed": true, + "mutability": "mutable", + "name": "_provider", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "966:25:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13020, + "indexed": true, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1002:33:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1002:11:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13022, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1046:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1046:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13024, + "indexed": false, + "mutability": "mutable", + "name": "_newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1072:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1072:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13026, + "indexed": false, + "mutability": "mutable", + "name": "_newSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1102:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13025, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "955:172:13" + }, + "src": "935:193:13" + }, + { + "anonymous": false, + "documentation": { + "id": 13029, + "nodeType": "StructuredDocumentation", + "src": "1136:346:13", + "text": " @dev triggered after liquidity is removed\n @param _provider liquidity provider\n @param _reserveToken reserve token address\n @param _amount reserve token amount\n @param _newBalance reserve token new balance\n @param _newSupply pool token new supply" + }, + "id": 13041, + "name": "LiquidityRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 13040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13031, + "indexed": true, + "mutability": "mutable", + "name": "_provider", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1521:25:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13030, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1521:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13033, + "indexed": true, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1557:33:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13032, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1557:11:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13035, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1601:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1601:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13037, + "indexed": false, + "mutability": "mutable", + "name": "_newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1627:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13036, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1627:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13039, + "indexed": false, + "mutability": "mutable", + "name": "_newSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1657:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1657:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1510:172:13" + }, + "src": "1488:195:13" + }, + { + "body": { + "id": 13056, + "nodeType": "Block", + "src": "2220:8:13", + "statements": [] + }, + "documentation": { + "id": 13042, + "nodeType": "StructuredDocumentation", + "src": "1691:311:13", + "text": " @dev initializes a new LiquidityPoolConverter instance\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 13057, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 13051, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13044, + "src": "2158:7:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 13052, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13046, + "src": "2167:9:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 13053, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13048, + "src": "2178:17:13", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 13054, + "modifierName": { + "argumentTypes": null, + "id": 13050, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "2144:13:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2144:52:13" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13044, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2030:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13043, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2030:16:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13046, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2065:27:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13045, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2065:17:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13048, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2103:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13047, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2103:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:115:13" + }, + "returnParameters": { + "id": 13055, + "nodeType": "ParameterList", + "parameters": [], + "src": "2220:0:13" + }, + "scope": 13077, + "src": "2008:220:13", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9405 + ], + "body": { + "id": 13075, + "nodeType": "Block", + "src": "2558:182:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 13066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13063, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "2639:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 13064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 13065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2639:23:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 13067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2664:27:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 13062, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2631:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 13068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2631:61:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13069, + "nodeType": "ExpressionStatement", + "src": "2631:61:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 13070, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2703:5:13", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolConverter_$13077", + "typeString": "contract super LiquidityPoolConverter" + } + }, + "id": 13072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 9405, + "src": "2703:27:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 13073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2703:29:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13074, + "nodeType": "ExpressionStatement", + "src": "2703:29:13" + } + ] + }, + "documentation": { + "id": 13058, + "nodeType": "StructuredDocumentation", + "src": "2236:259:13", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 13076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13060, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2549:8:13" + }, + "parameters": { + "id": 13059, + "nodeType": "ParameterList", + "parameters": [], + "src": "2531:2:13" + }, + "returnParameters": { + "id": 13061, + "nodeType": "ParameterList", + "parameters": [], + "src": "2558:0:13" + }, + "scope": 13077, + "src": "2501:239:13", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 13078, + "src": "520:2223:13" + } + ], + "src": "52:2693:13" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "exportedSymbols": { + "LiquidityPoolConverter": [ + 13077 + ] + }, + "id": 13078, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 13011, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:13" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol", + "file": "./ConverterBase.sol", + "id": 13012, + "nodeType": "ImportDirective", + "scope": 13078, + "sourceUnit": 10040, + "src": "77:29:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13014, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "564:13:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 13015, + "nodeType": "InheritanceSpecifier", + "src": "564:13:13" + } + ], + "contractDependencies": [ + 10039, + 13340, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 13013, + "nodeType": "StructuredDocumentation", + "src": "110:408:13", + "text": " @dev Liquidity Pool Converter\n The liquidity pool converter is the base contract for specific types of converters that\n manage liquidity pools.\n Liquidity pools have 2 reserves or more and they allow converting between them.\n Note that TokenRateUpdate events are dispatched for pool tokens as well.\n The pool token is the first token in the event in that case." + }, + "fullyImplemented": false, + "id": 13077, + "linearizedBaseContracts": [ + 13077, + 10039, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 13340, + 22847 + ], + "name": "LiquidityPoolConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": { + "id": 13016, + "nodeType": "StructuredDocumentation", + "src": "585:344:13", + "text": " @dev triggered after liquidity is added\n @param _provider liquidity provider\n @param _reserveToken reserve token address\n @param _amount reserve token amount\n @param _newBalance reserve token new balance\n @param _newSupply pool token new supply" + }, + "id": 13028, + "name": "LiquidityAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 13027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13018, + "indexed": true, + "mutability": "mutable", + "name": "_provider", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "966:25:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13017, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "966:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13020, + "indexed": true, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1002:33:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1002:11:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13022, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1046:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1046:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13024, + "indexed": false, + "mutability": "mutable", + "name": "_newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1072:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1072:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13026, + "indexed": false, + "mutability": "mutable", + "name": "_newSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13028, + "src": "1102:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13025, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "955:172:13" + }, + "src": "935:193:13" + }, + { + "anonymous": false, + "documentation": { + "id": 13029, + "nodeType": "StructuredDocumentation", + "src": "1136:346:13", + "text": " @dev triggered after liquidity is removed\n @param _provider liquidity provider\n @param _reserveToken reserve token address\n @param _amount reserve token amount\n @param _newBalance reserve token new balance\n @param _newSupply pool token new supply" + }, + "id": 13041, + "name": "LiquidityRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 13040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13031, + "indexed": true, + "mutability": "mutable", + "name": "_provider", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1521:25:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 13030, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1521:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13033, + "indexed": true, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1557:33:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 13032, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1557:11:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13035, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1601:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1601:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13037, + "indexed": false, + "mutability": "mutable", + "name": "_newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1627:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13036, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1627:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13039, + "indexed": false, + "mutability": "mutable", + "name": "_newSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13041, + "src": "1657:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 13038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1657:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1510:172:13" + }, + "src": "1488:195:13" + }, + { + "body": { + "id": 13056, + "nodeType": "Block", + "src": "2220:8:13", + "statements": [] + }, + "documentation": { + "id": 13042, + "nodeType": "StructuredDocumentation", + "src": "1691:311:13", + "text": " @dev initializes a new LiquidityPoolConverter instance\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 13057, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 13051, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13044, + "src": "2158:7:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 13052, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13046, + "src": "2167:9:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 13053, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13048, + "src": "2178:17:13", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 13054, + "modifierName": { + "argumentTypes": null, + "id": 13050, + "name": "ConverterBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 10039, + "src": "2144:13:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterBase_$10039_$", + "typeString": "type(contract ConverterBase)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2144:52:13" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 13049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 13044, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2030:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 13043, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "2030:16:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13046, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2065:27:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 13045, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "2065:17:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 13048, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 13057, + "src": "2103:24:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 13047, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2103:6:13", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2019:115:13" + }, + "returnParameters": { + "id": 13055, + "nodeType": "ParameterList", + "parameters": [], + "src": "2220:0:13" + }, + "scope": 13077, + "src": "2008:220:13", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9405 + ], + "body": { + "id": 13075, + "nodeType": "Block", + "src": "2558:182:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 13066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 13063, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "2639:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 13064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 13065, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2661:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2639:23:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 13067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2664:27:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 13062, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2631:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 13068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2631:61:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13069, + "nodeType": "ExpressionStatement", + "src": "2631:61:13" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 13070, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2703:5:13", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolConverter_$13077", + "typeString": "contract super LiquidityPoolConverter" + } + }, + "id": 13072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 9405, + "src": "2703:27:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 13073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2703:29:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 13074, + "nodeType": "ExpressionStatement", + "src": "2703:29:13" + } + ] + }, + "documentation": { + "id": 13058, + "nodeType": "StructuredDocumentation", + "src": "2236:259:13", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 13076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 13060, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2549:8:13" + }, + "parameters": { + "id": 13059, + "nodeType": "ParameterList", + "parameters": [], + "src": "2531:2:13" + }, + "returnParameters": { + "id": 13061, + "nodeType": "ParameterList", + "parameters": [], + "src": "2558:0:13" + }, + "scope": 13077, + "src": "2501:239:13", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 13078, + "src": "520:2223:13" + } + ], + "src": "52:2693:13" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.742Z", + "devdoc": { + "details": "Liquidity Pool Converter The liquidity pool converter is the base contract for specific types of converters that manage liquidity pools. Liquidity pools have 2 reserves or more and they allow converting between them. Note that TokenRateUpdate events are dispatched for pool tokens as well. The pool token is the first token in the event in that case.", + "events": { + "LiquidityAdded(address,address,uint256,uint256,uint256)": { + "details": "triggered after liquidity is added", + "params": { + "_amount": "reserve token amount", + "_newBalance": "reserve token new balance", + "_newSupply": "pool token new supply", + "_provider": "liquidity provider", + "_reserveToken": "reserve token address" + } + }, + "LiquidityRemoved(address,address,uint256,uint256,uint256)": { + "details": "triggered after liquidity is removed", + "params": { + "_amount": "reserve token amount", + "_newBalance": "reserve token new balance", + "_newSupply": "pool token new supply", + "_provider": "liquidity provider", + "_reserveToken": "reserve token address" + } + } + }, + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "constructor": { + "details": "initializes a new LiquidityPoolConverter instance", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract" + } + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1Converter.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1Converter.json new file mode 100644 index 00000000..a3e46a26 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1Converter.json @@ -0,0 +1,61559 @@ +{ + "contractName": "LiquidityPoolV1Converter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_connectorBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_connectorWeight", + "type": "uint32" + } + ], + "name": "PriceDataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isStandardPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevAverageRate", + "outputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevAverageRateUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + } + ], + "name": "recentAverageRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_reserveAmounts", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_reserveMinReturnAmounts", + "type": "uint256[]" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fund", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidate", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_reserveTokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveAmount", + "type": "uint256" + } + ], + "name": "addLiquidityCost", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_reserveAmount", + "type": "uint256" + } + ], + "name": "addLiquidityReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + } + ], + "name": "removeLiquidityReturn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + } + ], + "name": "decimalLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_d", + "type": "uint256" + } + ], + "name": "roundDiv", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "geometricMean", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_connectorBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_connectorWeight\",\"type\":\"uint32\"}],\"name\":\"PriceDataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_reserveAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_reserveTokenIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveAmount\",\"type\":\"uint256\"}],\"name\":\"addLiquidityCost\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_reserveAmount\",\"type\":\"uint256\"}],\"name\":\"addLiquidityReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"}],\"name\":\"decimalLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"geometricMean\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isStandardPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevAverageRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"d\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevAverageRateUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recentAverageRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_reserveMinReturnAmounts\",\"type\":\"uint256[]\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"}],\"name\":\"removeLiquidityReturn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_d\",\"type\":\"uint256\"}],\"name\":\"roundDiv\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Liquidity Pool v1 Converter The liquidity pool v1 converter is a specialized version of a converter that manages a classic bancor liquidity pool. Even though pools can have many reserves, the standard pool configuration is 2 reserves with 50%/50% weights.\",\"events\":{\"PriceDataUpdate(address,uint256,uint256,uint32)\":{\"details\":\"triggered after a conversion with new price data deprecated, use `TokenRateUpdate` from version 28 and up\",\"params\":{\"_connectorBalance\":\"reserve balance\",\"_connectorToken\":\"reserve token\",\"_connectorWeight\":\"reserve weight\",\"_tokenSupply\":\"smart token supply\"}}},\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"addLiquidity(address[],uint256[],uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller note that prior to version 28, you should use 'fund' instead\",\"params\":{\"_minReturn\":\"token minimum return-amount\",\"_reserveAmounts\":\"amount of each reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"amount of pool tokens issued\"}},\"addLiquidityCost(address[],uint256,uint256)\":{\"details\":\"given the amount of one of the reserve tokens to add liquidity of, returns the required amount of each one of the other reserve tokens since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)\",\"params\":{\"_reserveAmount\":\"amount of the relevant reserve token\",\"_reserveTokenIndex\":\"index of the relevant reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the required amount of each one of the reserve tokens\"}},\"addLiquidityReturn(address,uint256)\":{\"details\":\"given the amount of one of the reserve tokens to add liquidity of, returns the amount of pool tokens entitled for it since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)\",\"params\":{\"_reserveAmount\":\"amount of the reserve token\",\"_reserveToken\":\"address of the reserve token\"},\"returns\":{\"_0\":\"the amount of pool tokens entitled\"}},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"constructor\":{\"details\":\"initializes a new LiquidityPoolV1Converter instance\",\"params\":{\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\",\"_token\":\"pool token governed by the converter\"}},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"converterType()\":{\"details\":\"returns the converter type\",\"returns\":{\"_0\":\"see the converter types in the the main contract doc\"}},\"decimalLength(uint256)\":{\"details\":\"returns the number of decimal digits in a given value\",\"params\":{\"_x\":\"value (assumed positive)\"},\"returns\":{\"_0\":\"the number of decimal digits in the given value\"}},\"fund(uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller for example, if the caller increases the supply by 10%, then it will cost an amount equal to 10% of each reserve token balance note that starting from version 28, you should use 'addLiquidity' instead\",\"params\":{\"_amount\":\"amount to increase the supply by (in the pool token)\"},\"returns\":{\"_0\":\"amount of pool tokens issued\"}},\"geometricMean(uint256[])\":{\"details\":\"returns the average number of decimal digits in a given list of values\",\"params\":{\"_values\":\"list of values (each of which assumed positive)\"},\"returns\":{\"_0\":\"the average number of decimal digits in the given list of values\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"liquidate(uint256)\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool for example, if the holder sells 10% of the supply, then they will receive 10% of each reserve token balance in return note that starting from version 28, you should use 'removeLiquidity' instead\",\"params\":{\"_amount\":\"amount to liquidate (in the pool token)\"},\"returns\":{\"_0\":\"the amount of each reserve token granted for the given amount of pool tokens\"}},\"recentAverageRate(address)\":{\"details\":\"returns the recent average rate of 1 `_token` in the other reserve token units note that the rate can only be queried for reserves in a standard pool\",\"params\":{\"_token\":\"token to get the rate for\"},\"returns\":{\"_0\":\"recent average rate between the reserves (numerator)\",\"_1\":\"recent average rate between the reserves (denominator)\"}},\"removeLiquidity(uint256,address[],uint256[])\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool note that prior to version 28, you should use 'liquidate' instead\",\"params\":{\"_amount\":\"token amount\",\"_reserveMinReturnAmounts\":\"minimum return-amount of each reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the amount of each reserve token granted for the given amount of pool tokens\"}},\"removeLiquidityReturn(uint256,address[])\":{\"details\":\"returns the amount of each reserve token entitled for a given amount of pool tokens\",\"params\":{\"_amount\":\"amount of pool tokens\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the amount of each reserve token entitled for the given amount of pool tokens\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"roundDiv(uint256,uint256)\":{\"details\":\"returns the nearest integer to a given quotient\",\"params\":{\"_d\":\"quotient denominator\",\"_n\":\"quotient numerator\"},\"returns\":{\"_0\":\"the nearest integer to the given quotient\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"targetAmountAndFee(address,address,uint256)\":{\"details\":\"returns the expected target amount of converting one reserve to another along with the fee\",\"params\":{\"_amount\":\"amount of tokens received from the user\",\"_sourceToken\":\"contract address of the source reserve token\",\"_targetToken\":\"contract address of the target reserve token\"},\"returns\":{\"_0\":\"expected target amount\",\"_1\":\"expected fee\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol\":\"LiquidityPoolV1Converter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol\":{\"keccak256\":\"0xa85da56481d8c3e936853f4292f67bb41a534163c11fdb380507fa99b8453648\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://20ab9df64f764e0b050525e489165119026ff12af769bf417ed682b5f3ee70d3\",\"dweb:/ipfs/QmVupKPZQwoTd5ifKDx71iyFVZ7hQvMeimMz7VE4TBn53v\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b191690557fc0829421c1d260bd3cb3e0f06cfe2d52db2ce3150000000000000000000000006008556009805460ff191690553480156200004c57600080fd5b50604051620056ce380380620056ce833981810160405260608110156200007257600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a88162000142565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000df8162000142565b81620000eb81620001a1565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b199092169190911790555062000200945050505050565b6001600160a01b0381166200019e576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6154be80620002106000396000f3fe6080604052600436106103905760003560e01c806371f52bf3116101dc578063ca1d209d11610102578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611081578063ecbca55d146110c7578063f2fde38b146110f7578063fc0c546a1461112a57610421565b8063d66bd52414610fd3578063d895951214611006578063dc8de37914611039578063e2c524681461106c57610421565b8063d260529c116100dc578063d260529c14610f7f578063d3fb73b414610f94578063d4ee1d9014610fa9578063d55ec69714610fbe57610421565b8063ca1d209d14610f23578063cdc91c6914610f40578063d031370b14610f5557610421565b80639b99a8e21161017a578063b4a176d311610149578063b4a176d314610eb4578063bbb7e5d814610ec9578063bf75455814610ef9578063c45d3d9214610f0e57610421565b80639b99a8e214610c77578063a60e772414610c8c578063af94b8d814610d3a578063b127c0a514610d7d57610421565b80637d8916bd116101b65780637d8916bd14610a7557806380d9416d14610b9a5780638da5cb5b14610c4d57806394c275ad14610c6257610421565b806371f52bf314610a3657806379ba509714610a4b5780637b10399914610a6057610421565b806338e9f27a116102c157806354fd4d501161025f57806367b6d57c1161022e57806367b6d57c14610967578063690d83201461099a5780636a49d2c4146109cd5780636aa5332c14610a0c57610421565b806354fd4d50146108e5578063579cd3ca146108fa5780635e35359e1461090f57806361cd756e1461095257610421565b8063415f12401161029b578063415f12401461083a57806349d10b64146108645780634af80f0e146108795780634e40c260146108ac57610421565b806338e9f27a146107b6578063395900d4146107cb5780633e8ff43f1461080e57610421565b80631d4db7911161032e57806321e6b53d1161030857806321e6b53d1461074457806322f3e2d4146107775780632fe8a6ad1461078c57806338a5e016146107a157610421565b80631d4db7911461068e5780631e1401f8146106b55780631f0181bc1461071157610421565b806312c2aca41161036a57806312c2aca4146104e7578063154588371461051057806319b64015146106155780631cfab2901461065b57610421565b8063024c7ec7146104265780630c7d5cd8146104525780630e53aae91461048057610421565b366104215760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661041f576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561043257600080fd5b5061041f6004803603602081101561044957600080fd5b5035151561113f565b34801561045e57600080fd5b50610467611165565b6040805163ffffffff9092168252519081900360200190f35b34801561048c57600080fd5b506104b3600480360360208110156104a357600080fd5b50356001600160a01b0316611171565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156104f357600080fd5b506104fc611208565b604080519115158252519081900360200190f35b34801561051c57600080fd5b506105c56004803603604081101561053357600080fd5b81359190810190604081016020820135600160201b81111561055457600080fd5b82018360208201111561056657600080fd5b803590602001918460208302840111600160201b8311171561058757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061124f945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106015781810151838201526020016105e9565b505050509050019250505060405180910390f35b34801561062157600080fd5b5061063f6004803603602081101561063857600080fd5b50356112f6565b604080516001600160a01b039092168252519081900360200190f35b34801561066757600080fd5b506104676004803603602081101561067e57600080fd5b50356001600160a01b0316611320565b34801561069a57600080fd5b506106a3611352565b60408051918252519081900360200190f35b3480156106c157600080fd5b506106f8600480360360608110156106d857600080fd5b506001600160a01b03813581169160208101359091169060400135611358565b6040805192835260208301919091528051918290030190f35b34801561071d57600080fd5b506106f86004803603602081101561073457600080fd5b50356001600160a01b0316611373565b34801561075057600080fd5b5061041f6004803603602081101561076757600080fd5b50356001600160a01b031661142a565b34801561078357600080fd5b506104fc61143e565b34801561079857600080fd5b506104fc6114bd565b3480156107ad57600080fd5b5061041f6114cd565b3480156107c257600080fd5b506104fc6114df565b3480156107d757600080fd5b5061041f600480360360608110156107ee57600080fd5b506001600160a01b038135811691602081013590911690604001356114e8565b34801561081a57600080fd5b5061082361156e565b6040805161ffff9092168252519081900360200190f35b34801561084657600080fd5b506105c56004803603602081101561085d57600080fd5b5035611573565b34801561087057600080fd5b5061041f6117b1565b34801561088557600080fd5b5061041f6004803603602081101561089c57600080fd5b50356001600160a01b03166119b9565b3480156108b857600080fd5b506106a3600480360360408110156108cf57600080fd5b506001600160a01b0381351690602001356119ee565b3480156108f157600080fd5b50610823611b2a565b34801561090657600080fd5b50610467611b2f565b34801561091b57600080fd5b5061041f6004803603606081101561093257600080fd5b506001600160a01b03813581169160208101359091169060400135611b42565b34801561095e57600080fd5b5061063f611c73565b34801561097357600080fd5b5061041f6004803603602081101561098a57600080fd5b50356001600160a01b0316611c82565b3480156109a657600080fd5b5061041f600480360360208110156109bd57600080fd5b50356001600160a01b0316611d2e565b3480156109d957600080fd5b5061041f600480360360408110156109f057600080fd5b5080356001600160a01b0316906020013563ffffffff16611e55565b348015610a1857600080fd5b506106a360048036036020811015610a2f57600080fd5b5035611f1e565b348015610a4257600080fd5b50610823611f40565b348015610a5757600080fd5b5061041f611f4f565b348015610a6c57600080fd5b5061063f612006565b6106a360048036036060811015610a8b57600080fd5b810190602081018135600160201b811115610aa557600080fd5b820183602082011115610ab757600080fd5b803590602001918460208302840111600160201b83111715610ad857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2757600080fd5b820183602082011115610b3957600080fd5b803590602001918460208302840111600160201b83111715610b5a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250612015915050565b348015610ba657600080fd5b506105c560048036036060811015610bbd57600080fd5b810190602081018135600160201b811115610bd757600080fd5b820183602082011115610be957600080fd5b803590602001918460208302840111600160201b83111715610c0a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356122df565b348015610c5957600080fd5b5061063f61258e565b348015610c6e57600080fd5b5061046761259d565b348015610c8357600080fd5b506108236125b0565b348015610c9857600080fd5b506106a360048036036020811015610caf57600080fd5b810190602081018135600160201b811115610cc957600080fd5b820183602082011115610cdb57600080fd5b803590602001918460208302840111600160201b83111715610cfc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b6945050505050565b348015610d4657600080fd5b506106f860048036036060811015610d5d57600080fd5b506001600160a01b03813581169160208101359091169060400135612608565b348015610d8957600080fd5b506105c560048036036060811015610da057600080fd5b81359190810190604081016020820135600160201b811115610dc157600080fd5b820183602082011115610dd357600080fd5b803590602001918460208302840111600160201b83111715610df457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e4357600080fd5b820183602082011115610e5557600080fd5b803590602001918460208302840111600160201b83111715610e7657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506127ab945050505050565b348015610ec057600080fd5b5061041f6128e7565b348015610ed557600080fd5b506106a360048036036040811015610eec57600080fd5b5080359060200135612913565b348015610f0557600080fd5b506104fc61292b565b348015610f1a57600080fd5b5061063f612930565b6106a360048036036020811015610f3957600080fd5b503561293f565b348015610f4c57600080fd5b5061041f612dba565b348015610f6157600080fd5b5061063f60048036036020811015610f7857600080fd5b5035612e13565b348015610f8b57600080fd5b506104fc61156e565b348015610fa057600080fd5b5061063f612e3a565b348015610fb557600080fd5b5061063f612e49565b348015610fca57600080fd5b5061041f612e58565b348015610fdf57600080fd5b506104b360048036036020811015610ff657600080fd5b50356001600160a01b0316612f40565b34801561101257600080fd5b506106a36004803603602081101561102957600080fd5b50356001600160a01b0316612f82565b34801561104557600080fd5b506106a36004803603602081101561105c57600080fd5b50356001600160a01b0316612f89565b34801561107857600080fd5b506106f8612fb2565b6106a3600480360360a081101561109757600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612fbb565b3480156110d357600080fd5b5061041f600480360360208110156110ea57600080fd5b503563ffffffff166131cb565b34801561110357600080fd5b5061041f6004803603602081101561111a57600080fd5b50356001600160a01b03166132b2565b34801561113657600080fd5b5061063f613330565b61114761333f565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000611181615400565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561129457600080fd5b505afa1580156112a8573d6000803e3d6000fd5b505050506040513d60208110156112be57600080fd5b5051905060006112dd6c42616e636f72466f726d756c6160981b613392565b90506112eb85858484613410565b925050505b92915050565b60006006828154811061130557fe5b6000918252602090912001546001600160a01b031692915050565b60008161132c81613555565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b600080611366858585612608565b915091505b935093915050565b600954600090819060ff166113c7576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b6113cf61542e565b6113d76135c2565b905060066000815481106113e757fe5b6000918252602090912001546001600160a01b03858116911614156114185780516020909101519092509050611425565b6020810151905190925090505b915091565b61143261333f565b61143b81611c82565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d60208110156114ac57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b6114d561333f565b6114dd612dba565b565b60095460ff1681565b6114f061333f565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b600190565b606061157d61375d565b6003805460ff60a81b1916600160a81b179055816115d4576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d602081101561164e57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff811180156116db57600080fd5b50604051908082528060200260200182016040528015611705578160200160208202803683370190505b50905060005b815181101561173557600182828151811061172257fe5b602090810291909101015260010161170b565b5061179c600680548060200260200160405190810160405280929190818152602001828054801561178f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611771575b50505050508284876137ad565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b03163314806117d45750600354600160a01b900460ff16155b611819576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118376f436f6e7472616374526567697374727960801b613392565b6002549091506001600160a01b0380831691161480159061186057506001600160a01b03811615155b6118a8576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d602081101561193457600080fd5b50516001600160a01b03161415611989576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6119c161333f565b806119cb816139b8565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b505190506000611a7b6c42616e636f72466f726d756c6160981b613392565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611af557600080fd5b505afa158015611b09573d6000803e3d6000fd5b505050506040513d6020811015611b1f57600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611b4a61375d565b6003805460ff60a81b1916600160a81b179055611b6561333f565b6000611b8a762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611bc45750611bc261143e565b155b80611bdc57506000546001600160a01b038281169116145b611c21576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611c2c848484613a0c565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611c6057611c6084613a3d565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611c8a61333f565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611cae81613b16565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b505050505050565b611d3661375d565b6003805460ff60a81b1916600160a81b179055611d5161333f565b600080516020615449833981519152611d6981613555565b6000611d8e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b9050611d9861143e565b1580611db157506000546001600160a01b038281169116145b611df6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611e2b573d6000803e3d6000fd5b50611e43600080516020615449833981519152613a3d565b50506003805460ff60a81b1916905550565b611e5d61333f565b611e678282613b78565b6006546002148015611ebb5750600760006006600081548110611e8657fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611f095750600760006006600181548110611ed457fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611f395760019190910190600a9004611f23565b5092915050565b6000611f4a6125b0565b905090565b6001546001600160a01b03163314611fa2576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b600061201f61375d565b6003805460ff60a81b1916600160a81b17905561203a613d9a565b612045848484613de2565b60005b84518110156120f5576000805160206154498339815191526001600160a01b031685828151811061207557fe5b60200260200101516001600160a01b031614156120ed573484828151811061209957fe5b6020026020010151146120ed576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b600101612048565b5034156121855760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16612185576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d557600080fd5b505afa1580156121e9573d6000803e3d6000fd5b505050506040513d60208110156121ff57600080fd5b505190506000612210868684614077565b90508381101561225c576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156122fa57600080fd5b50604051908082528060200260200182016040528015612324578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561237757600080fd5b505afa15801561238b573d6000803e3d6000fd5b505050506040513d60208110156123a157600080fd5b5051905060006123c06c42616e636f72466f726d756c6160981b613392565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106123e457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d602081101561248857600080fd5b5051905060005b845181101561257f57826001600160a01b031663ebbb215885600760008d86815181106124b857fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d602081101561255c57600080fd5b5051855186908390811061256c57fe5b602090810291909101015260010161248f565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156125ef576125e38582815181106125d657fe5b6020026020010151611f1e565b909201916001016125bf565b5060016125fc8383612913565b03600a0a949350505050565b600080612613613d9a565b8461261d81613555565b8461262781613555565b856001600160a01b0316876001600160a01b03161415612687576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006126a26c42616e636f72466f726d756c6160981b613392565b6001600160a01b03166394491fab6126b98a612f89565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166126e48b612f89565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561275f57600080fd5b505afa158015612773573d6000803e3d6000fd5b505050506040513d602081101561278957600080fd5b505190506000612798826140a2565b9182900399919850909650505050505050565b60606127b561375d565b6003805460ff60a81b1916600160a81b1790556127d0613d9a565b6127db838386613de2565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156128ad57600080fd5b505af11580156128c1573d6000803e3d6000fd5b505050506128d1848483886137ad565b6003805460ff60a81b1916905595945050505050565b6128ef61333f565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000816002810484018161292357fe5b049392505050565b600181565b6005546001600160a01b031681565b600061294961375d565b6003805460ff60a81b1916600160a81b1790556129646140d3565b6000805160206154498339815191526000526007602052600080516020615469833981519152546129959034614113565b6000805160206154498339815191526000908152600760209081526000805160206154698339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612a0457600080fd5b505afa158015612a18573d6000803e3d6000fd5b505050506040513d6020811015612a2e57600080fd5b505190506000612a4d6c42616e636f72466f726d756c6160981b613392565b60065490915060005b81811015612d3757600060068281548110612a6d57fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612aef57600080fd5b505afa158015612b03573d6000803e3d6000fd5b505050506040513d6020811015612b1957600080fd5b505190506001600160a01b0383166000805160206154498339815191521415612c645780341115612b795760405133903483900380156108fc02916000818181858888f19350505050158015612b73573d6000803e3d6000fd5b50612c5f565b80341015612c5f573415612bcc576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612beb90600160601b90046001600160a01b0316333084614160565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505b612c70565b612c7083333084614160565b6000612c7c83836142cb565b6001600160a01b0385166000908152600760205260408120829055909150612ca4898c6142cb565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612d269082908790859063ffffffff16614314565b505060019093019250612a56915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612dc261333f565b612dca614383565b6004546001906001600160a01b0316612de161156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612e2057fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6001546001600160a01b031681565b612e6061333f565b6000612e85762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6004549091506000906001600160a01b0316612e9f61156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ed8816132b2565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612f2057600080fd5b505af1158015612f34573d6000803e3d6000fd5b5050505061143b611f4f565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b60006112f0825b600081612f9581613555565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000612fc561375d565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612ff281613b16565b856001600160a01b0316876001600160a01b03161415613052576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061315f575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156130b257600080fd5b505afa1580156130c6573d6000803e3d6000fd5b505050506040513d60208110156130dc57600080fd5b5051801561315f575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561313257600080fd5b505afa158015613146573d6000803e3d6000fd5b505050506040513d602081101561315c57600080fd5b50515b6131a6576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6131b387878787876143e7565b6003805460ff60a81b19169055979650505050505050565b6131d361333f565b60085463ffffffff600160201b9091048116908216111561323b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6132ba61333f565b6000546001600160a01b038281169116141561330e576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b031633146114dd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133de57600080fd5b505afa1580156133f2573d6000803e3d6000fd5b505050506040513d602081101561340857600080fd5b505192915050565b606080845167ffffffffffffffff8111801561342b57600080fd5b50604051908082528060200260200182016040528015613455578160200160208202803683370190505b50905060005b815181101561354b57836001600160a01b0316638074590a86600760008a868151811061348457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156134fe57600080fd5b505afa158015613512573d6000803e3d6000fd5b505050506040513d602081101561352857600080fd5b5051825183908390811061353857fe5b602090810291909101015260010161345b565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6135ca61542e565b6000600c546135d76146aa565b039050806135fd57505060408051808201909152600a548152600b54602082015261124c565b600060076000600660018154811061361157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061364b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549050610258831061369657604080518082019091529182526020820152915061124c9050565b61369e61542e565b5060408051808201909152600a548152600b54602082018190526000906136c590856146ae565b82519091506000906136d790856146ae565b905060006136fd6136e884896146ae565b6136f7846102588b90036146ae565b906142cb565b9050600061372461025861371e8888602001516146ae90919063ffffffff16565b906146ae565b905061373e82826c0c9f2c9cd04674edea4000000061470c565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff16156114dd576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60606137b76140d3565b60006137d26c42616e636f72466f726d756c6160981b613392565b905060006137e08585614113565b905060606137f085898886613410565b905060005b88518110156139ac57600089828151811061380c57fe5b60200260200101519050600083838151811061382457fe5b6020026020010151905089838151811061383a57fe5b602002602001015181101561388f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b0382166000908152600760205260408120546138b29083614113565b6001600160a01b0384166000818152600760205260409020829055909150600080516020615449833981519152141561391857604051339083156108fc029084906000818181858888f19350505050158015613912573d6000803e3d6000fd5b50613923565b61392383338461473e565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b0383166000908152600760205260409020600101546139a19087908590849063ffffffff16614314565b5050506001016137f5565b50979650505050505050565b6001600160a01b03811630141561143b576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613a1461333f565b82613a1e8161489e565b82613a288161489e565b83613a32816139b8565b611d2686868661473e565b80613a4781613555565b6001600160a01b0382166000805160206154498339815191521415613a86576001600160a01b0382166000908152600760205260409020479055613b12565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613acc57600080fd5b505afa158015613ae0573d6000803e3d6000fd5b505050506040513d6020811015613af657600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613b1f81613392565b6001600160a01b0316336001600160a01b03161461143b576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613b8061333f565b613b886148ef565b81613b928161489e565b82613b9c816139b8565b82613ba681614936565b6004546001600160a01b03868116911614801590613be757506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613c2e576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613c96576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613ca16125b0565b61ffff1610613cf3576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613da261143e565b6114dd576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613e35576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613e7f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140305760076000878581518110613e9c57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613f1c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b80821015613f7e57858281518110613f3557fe5b60200260200101516001600160a01b031660068481548110613f5357fe5b6000918252602090912001546001600160a01b03161415613f7357613f7e565b600190910190613f21565b808210613fc8576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000858481518110613fd657fe5b602002602001015111614025576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613e84565b60008411611d26576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161408f5761408884846149a6565b9050612587565b61409a848484614ac5565b949350505050565b6008546000906112f090620f4240906140cd908590600160401b900463ffffffff908116906146ae16565b90614df2565b60065460005b81811015613b125761410b600682815481106140f157fe5b6000918252602090912001546001600160a01b0316613a3d565b6001016140d9565b60008183101561415a576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106141e55780518252601f1990920191602091820191016141c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614247576040519150601f19603f3d011682016040523d82523d6000602084013e61424c565b606091505b509150915081801561427a57508051158061427a575080806020019051602081101561427757600080fd5b50515b611d26576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b600082820183811015612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461435285620f42406146ae565b6143658863ffffffff808816906146ae16565b6040805192835260208301919091528051918290030190a350505050565b600161438d6125b0565b61ffff16116143df576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6114dd614e51565b60008060006143f7888888612608565b91509150816000141561444a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61445387612f89565b821061445b57fe5b6001600160a01b03881660008051602061544983398151915214156144cd578534146144c8576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6145a4565b3415801561455e57508561455b6144e38a612f89565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b15801561452957600080fd5b505afa15801561453d573d6000803e3d6000fd5b505050506040513d602081101561455357600080fd5b505190614113565b10155b6145a4576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6145ad88613a3d565b6001600160a01b0387166000908152600760205260409020546145d09083614113565b6001600160a01b038816600081815260076020526040902091909155600080516020615449833981519152141561463d576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614637573d6000803e3d6000fd5b50614648565b61464887858461473e565b60095460ff168015614662575061465d6146aa565b600c54105b156146875761466f6135c2565b8051600a5560200151600b556146836146aa565b600c555b614695888887898686614f18565b61469f8888614f81565b509695505050505050565b4290565b6000826146bd575060006112f0565b828202828482816146ca57fe5b0414612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808285118061471c57508284115b156147355761472c858585615185565b9150915061136b565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106147bb5780518252601f19909201916020918201910161479c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461481d576040519150601f19603f3d011682016040523d82523d6000602084013e614822565b606091505b5091509150818015614850575080511580614850575080806020019051602081101561484d57600080fd5b50515b614897576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6148f761143e565b156114dd576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156149555750620f424063ffffffff821611155b61143b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6000806149b2836125b6565b905060005b8451811015614abd5760008582815181106149ce57fe5b6020026020010151905060008583815181106149e657fe5b602002602001015190506000805160206154498339815191526001600160a01b0316826001600160a01b031614614a2357614a2382333084614160565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614ab39085908490849063ffffffff16614314565b50506001016149b7565b509392505050565b6000614acf6140d3565b600080516020615449833981519152600052600760205260008051602061546983398151915254614b009034614113565b6000805160206154498339815191526000908152600760205260008051602061546983398151915291909155614b456c42616e636f72466f726d756c6160981b613392565b90506000614b55828588886151ca565b90506000614b6385836142cb565b905060005b8751811015614de6576000888281518110614b7f57fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614c0557600080fd5b505afa158015614c19573d6000803e3d6000fd5b505050506040513d6020811015614c2f57600080fd5b5051905080614c7e576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614c8a57fe5b6020026020010151811115614c9b57fe5b6001600160a01b03831660008051602061544983398151915214614cca57614cc583333084614160565b614d35565b808a8581518110614cd757fe5b60200260200101511115614d3557336001600160a01b03166108fc828c8781518110614cff57fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614d33573d6000803e3d6000fd5b505b6000614d4183836142cb565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614dd69087908690849063ffffffff16614314565b505060019092019150614b689050565b50909695505050505050565b6000808211614e3d576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614e4857fe5b04949350505050565b614e5961333f565b6000614e636125b0565b61ffff1611614eb5576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614ef857600080fd5b505af1158015614f0c573d6000803e3d6000fd5b505050506114dd6140d3565b600160ff1b8110614f2557fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015614fd157600080fd5b505afa158015614fe5573d6000803e3d6000fd5b505050506040513d6020811015614ffb57600080fd5b50519050600061500a84612f89565b9050600061501784612f89565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161505e90859085906146ae16565b905060006150758663ffffffff808616906146ae16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36150cc878a8887614314565b6150d887898786614314565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561519c575050600281048061136b565b838510156151af5761472c858585615390565b6000806151bd868887615390565b9890975095505050505050565b60008060015b84518110156152975761523a600760008784815181106151ec57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061522457fe5b60200260200101516146ae90919063ffffffff16565b6152856007600088868151811061524d57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061522457fe5b101561528f578091505b6001016151d0565b50856001600160a01b0316632f55bdb586600760008886815181106152b857fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff1687868151811061530357fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561535a57600080fd5b505afa15801561536e573d6000803e3d6000fd5b505050506040513d602081101561538457600080fd5b50519695505050505050565b600080600083600019816153a057fe5b049050808611156153d95760008160010187816153b957fe5b0460010190508087816153c857fe5b0496508086816153d457fe5b049550505b60006153f08786026153eb89896142cb565b612913565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea2646970667358221220dc4c1eb48a73c448bec71e9e69e5d49a32f99ae3d43ede630d3172fc61af9d7764736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106103905760003560e01c806371f52bf3116101dc578063ca1d209d11610102578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611081578063ecbca55d146110c7578063f2fde38b146110f7578063fc0c546a1461112a57610421565b8063d66bd52414610fd3578063d895951214611006578063dc8de37914611039578063e2c524681461106c57610421565b8063d260529c116100dc578063d260529c14610f7f578063d3fb73b414610f94578063d4ee1d9014610fa9578063d55ec69714610fbe57610421565b8063ca1d209d14610f23578063cdc91c6914610f40578063d031370b14610f5557610421565b80639b99a8e21161017a578063b4a176d311610149578063b4a176d314610eb4578063bbb7e5d814610ec9578063bf75455814610ef9578063c45d3d9214610f0e57610421565b80639b99a8e214610c77578063a60e772414610c8c578063af94b8d814610d3a578063b127c0a514610d7d57610421565b80637d8916bd116101b65780637d8916bd14610a7557806380d9416d14610b9a5780638da5cb5b14610c4d57806394c275ad14610c6257610421565b806371f52bf314610a3657806379ba509714610a4b5780637b10399914610a6057610421565b806338e9f27a116102c157806354fd4d501161025f57806367b6d57c1161022e57806367b6d57c14610967578063690d83201461099a5780636a49d2c4146109cd5780636aa5332c14610a0c57610421565b806354fd4d50146108e5578063579cd3ca146108fa5780635e35359e1461090f57806361cd756e1461095257610421565b8063415f12401161029b578063415f12401461083a57806349d10b64146108645780634af80f0e146108795780634e40c260146108ac57610421565b806338e9f27a146107b6578063395900d4146107cb5780633e8ff43f1461080e57610421565b80631d4db7911161032e57806321e6b53d1161030857806321e6b53d1461074457806322f3e2d4146107775780632fe8a6ad1461078c57806338a5e016146107a157610421565b80631d4db7911461068e5780631e1401f8146106b55780631f0181bc1461071157610421565b806312c2aca41161036a57806312c2aca4146104e7578063154588371461051057806319b64015146106155780631cfab2901461065b57610421565b8063024c7ec7146104265780630c7d5cd8146104525780630e53aae91461048057610421565b366104215760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661041f576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561043257600080fd5b5061041f6004803603602081101561044957600080fd5b5035151561113f565b34801561045e57600080fd5b50610467611165565b6040805163ffffffff9092168252519081900360200190f35b34801561048c57600080fd5b506104b3600480360360208110156104a357600080fd5b50356001600160a01b0316611171565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156104f357600080fd5b506104fc611208565b604080519115158252519081900360200190f35b34801561051c57600080fd5b506105c56004803603604081101561053357600080fd5b81359190810190604081016020820135600160201b81111561055457600080fd5b82018360208201111561056657600080fd5b803590602001918460208302840111600160201b8311171561058757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061124f945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106015781810151838201526020016105e9565b505050509050019250505060405180910390f35b34801561062157600080fd5b5061063f6004803603602081101561063857600080fd5b50356112f6565b604080516001600160a01b039092168252519081900360200190f35b34801561066757600080fd5b506104676004803603602081101561067e57600080fd5b50356001600160a01b0316611320565b34801561069a57600080fd5b506106a3611352565b60408051918252519081900360200190f35b3480156106c157600080fd5b506106f8600480360360608110156106d857600080fd5b506001600160a01b03813581169160208101359091169060400135611358565b6040805192835260208301919091528051918290030190f35b34801561071d57600080fd5b506106f86004803603602081101561073457600080fd5b50356001600160a01b0316611373565b34801561075057600080fd5b5061041f6004803603602081101561076757600080fd5b50356001600160a01b031661142a565b34801561078357600080fd5b506104fc61143e565b34801561079857600080fd5b506104fc6114bd565b3480156107ad57600080fd5b5061041f6114cd565b3480156107c257600080fd5b506104fc6114df565b3480156107d757600080fd5b5061041f600480360360608110156107ee57600080fd5b506001600160a01b038135811691602081013590911690604001356114e8565b34801561081a57600080fd5b5061082361156e565b6040805161ffff9092168252519081900360200190f35b34801561084657600080fd5b506105c56004803603602081101561085d57600080fd5b5035611573565b34801561087057600080fd5b5061041f6117b1565b34801561088557600080fd5b5061041f6004803603602081101561089c57600080fd5b50356001600160a01b03166119b9565b3480156108b857600080fd5b506106a3600480360360408110156108cf57600080fd5b506001600160a01b0381351690602001356119ee565b3480156108f157600080fd5b50610823611b2a565b34801561090657600080fd5b50610467611b2f565b34801561091b57600080fd5b5061041f6004803603606081101561093257600080fd5b506001600160a01b03813581169160208101359091169060400135611b42565b34801561095e57600080fd5b5061063f611c73565b34801561097357600080fd5b5061041f6004803603602081101561098a57600080fd5b50356001600160a01b0316611c82565b3480156109a657600080fd5b5061041f600480360360208110156109bd57600080fd5b50356001600160a01b0316611d2e565b3480156109d957600080fd5b5061041f600480360360408110156109f057600080fd5b5080356001600160a01b0316906020013563ffffffff16611e55565b348015610a1857600080fd5b506106a360048036036020811015610a2f57600080fd5b5035611f1e565b348015610a4257600080fd5b50610823611f40565b348015610a5757600080fd5b5061041f611f4f565b348015610a6c57600080fd5b5061063f612006565b6106a360048036036060811015610a8b57600080fd5b810190602081018135600160201b811115610aa557600080fd5b820183602082011115610ab757600080fd5b803590602001918460208302840111600160201b83111715610ad857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2757600080fd5b820183602082011115610b3957600080fd5b803590602001918460208302840111600160201b83111715610b5a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250612015915050565b348015610ba657600080fd5b506105c560048036036060811015610bbd57600080fd5b810190602081018135600160201b811115610bd757600080fd5b820183602082011115610be957600080fd5b803590602001918460208302840111600160201b83111715610c0a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356122df565b348015610c5957600080fd5b5061063f61258e565b348015610c6e57600080fd5b5061046761259d565b348015610c8357600080fd5b506108236125b0565b348015610c9857600080fd5b506106a360048036036020811015610caf57600080fd5b810190602081018135600160201b811115610cc957600080fd5b820183602082011115610cdb57600080fd5b803590602001918460208302840111600160201b83111715610cfc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b6945050505050565b348015610d4657600080fd5b506106f860048036036060811015610d5d57600080fd5b506001600160a01b03813581169160208101359091169060400135612608565b348015610d8957600080fd5b506105c560048036036060811015610da057600080fd5b81359190810190604081016020820135600160201b811115610dc157600080fd5b820183602082011115610dd357600080fd5b803590602001918460208302840111600160201b83111715610df457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e4357600080fd5b820183602082011115610e5557600080fd5b803590602001918460208302840111600160201b83111715610e7657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506127ab945050505050565b348015610ec057600080fd5b5061041f6128e7565b348015610ed557600080fd5b506106a360048036036040811015610eec57600080fd5b5080359060200135612913565b348015610f0557600080fd5b506104fc61292b565b348015610f1a57600080fd5b5061063f612930565b6106a360048036036020811015610f3957600080fd5b503561293f565b348015610f4c57600080fd5b5061041f612dba565b348015610f6157600080fd5b5061063f60048036036020811015610f7857600080fd5b5035612e13565b348015610f8b57600080fd5b506104fc61156e565b348015610fa057600080fd5b5061063f612e3a565b348015610fb557600080fd5b5061063f612e49565b348015610fca57600080fd5b5061041f612e58565b348015610fdf57600080fd5b506104b360048036036020811015610ff657600080fd5b50356001600160a01b0316612f40565b34801561101257600080fd5b506106a36004803603602081101561102957600080fd5b50356001600160a01b0316612f82565b34801561104557600080fd5b506106a36004803603602081101561105c57600080fd5b50356001600160a01b0316612f89565b34801561107857600080fd5b506106f8612fb2565b6106a3600480360360a081101561109757600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612fbb565b3480156110d357600080fd5b5061041f600480360360208110156110ea57600080fd5b503563ffffffff166131cb565b34801561110357600080fd5b5061041f6004803603602081101561111a57600080fd5b50356001600160a01b03166132b2565b34801561113657600080fd5b5061063f613330565b61114761333f565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000611181615400565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561129457600080fd5b505afa1580156112a8573d6000803e3d6000fd5b505050506040513d60208110156112be57600080fd5b5051905060006112dd6c42616e636f72466f726d756c6160981b613392565b90506112eb85858484613410565b925050505b92915050565b60006006828154811061130557fe5b6000918252602090912001546001600160a01b031692915050565b60008161132c81613555565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b600080611366858585612608565b915091505b935093915050565b600954600090819060ff166113c7576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b6113cf61542e565b6113d76135c2565b905060066000815481106113e757fe5b6000918252602090912001546001600160a01b03858116911614156114185780516020909101519092509050611425565b6020810151905190925090505b915091565b61143261333f565b61143b81611c82565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d60208110156114ac57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b6114d561333f565b6114dd612dba565b565b60095460ff1681565b6114f061333f565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b600190565b606061157d61375d565b6003805460ff60a81b1916600160a81b179055816115d4576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d602081101561164e57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff811180156116db57600080fd5b50604051908082528060200260200182016040528015611705578160200160208202803683370190505b50905060005b815181101561173557600182828151811061172257fe5b602090810291909101015260010161170b565b5061179c600680548060200260200160405190810160405280929190818152602001828054801561178f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611771575b50505050508284876137ad565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b03163314806117d45750600354600160a01b900460ff16155b611819576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118376f436f6e7472616374526567697374727960801b613392565b6002549091506001600160a01b0380831691161480159061186057506001600160a01b03811615155b6118a8576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d602081101561193457600080fd5b50516001600160a01b03161415611989576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6119c161333f565b806119cb816139b8565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b505190506000611a7b6c42616e636f72466f726d756c6160981b613392565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611af557600080fd5b505afa158015611b09573d6000803e3d6000fd5b505050506040513d6020811015611b1f57600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611b4a61375d565b6003805460ff60a81b1916600160a81b179055611b6561333f565b6000611b8a762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611bc45750611bc261143e565b155b80611bdc57506000546001600160a01b038281169116145b611c21576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611c2c848484613a0c565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611c6057611c6084613a3d565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611c8a61333f565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611cae81613b16565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b505050505050565b611d3661375d565b6003805460ff60a81b1916600160a81b179055611d5161333f565b600080516020615449833981519152611d6981613555565b6000611d8e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b9050611d9861143e565b1580611db157506000546001600160a01b038281169116145b611df6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611e2b573d6000803e3d6000fd5b50611e43600080516020615449833981519152613a3d565b50506003805460ff60a81b1916905550565b611e5d61333f565b611e678282613b78565b6006546002148015611ebb5750600760006006600081548110611e8657fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611f095750600760006006600181548110611ed457fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611f395760019190910190600a9004611f23565b5092915050565b6000611f4a6125b0565b905090565b6001546001600160a01b03163314611fa2576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b600061201f61375d565b6003805460ff60a81b1916600160a81b17905561203a613d9a565b612045848484613de2565b60005b84518110156120f5576000805160206154498339815191526001600160a01b031685828151811061207557fe5b60200260200101516001600160a01b031614156120ed573484828151811061209957fe5b6020026020010151146120ed576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b600101612048565b5034156121855760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16612185576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d557600080fd5b505afa1580156121e9573d6000803e3d6000fd5b505050506040513d60208110156121ff57600080fd5b505190506000612210868684614077565b90508381101561225c576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156122fa57600080fd5b50604051908082528060200260200182016040528015612324578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561237757600080fd5b505afa15801561238b573d6000803e3d6000fd5b505050506040513d60208110156123a157600080fd5b5051905060006123c06c42616e636f72466f726d756c6160981b613392565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106123e457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d602081101561248857600080fd5b5051905060005b845181101561257f57826001600160a01b031663ebbb215885600760008d86815181106124b857fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d602081101561255c57600080fd5b5051855186908390811061256c57fe5b602090810291909101015260010161248f565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156125ef576125e38582815181106125d657fe5b6020026020010151611f1e565b909201916001016125bf565b5060016125fc8383612913565b03600a0a949350505050565b600080612613613d9a565b8461261d81613555565b8461262781613555565b856001600160a01b0316876001600160a01b03161415612687576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006126a26c42616e636f72466f726d756c6160981b613392565b6001600160a01b03166394491fab6126b98a612f89565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166126e48b612f89565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561275f57600080fd5b505afa158015612773573d6000803e3d6000fd5b505050506040513d602081101561278957600080fd5b505190506000612798826140a2565b9182900399919850909650505050505050565b60606127b561375d565b6003805460ff60a81b1916600160a81b1790556127d0613d9a565b6127db838386613de2565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156128ad57600080fd5b505af11580156128c1573d6000803e3d6000fd5b505050506128d1848483886137ad565b6003805460ff60a81b1916905595945050505050565b6128ef61333f565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000816002810484018161292357fe5b049392505050565b600181565b6005546001600160a01b031681565b600061294961375d565b6003805460ff60a81b1916600160a81b1790556129646140d3565b6000805160206154498339815191526000526007602052600080516020615469833981519152546129959034614113565b6000805160206154498339815191526000908152600760209081526000805160206154698339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612a0457600080fd5b505afa158015612a18573d6000803e3d6000fd5b505050506040513d6020811015612a2e57600080fd5b505190506000612a4d6c42616e636f72466f726d756c6160981b613392565b60065490915060005b81811015612d3757600060068281548110612a6d57fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612aef57600080fd5b505afa158015612b03573d6000803e3d6000fd5b505050506040513d6020811015612b1957600080fd5b505190506001600160a01b0383166000805160206154498339815191521415612c645780341115612b795760405133903483900380156108fc02916000818181858888f19350505050158015612b73573d6000803e3d6000fd5b50612c5f565b80341015612c5f573415612bcc576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612beb90600160601b90046001600160a01b0316333084614160565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505b612c70565b612c7083333084614160565b6000612c7c83836142cb565b6001600160a01b0385166000908152600760205260408120829055909150612ca4898c6142cb565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612d269082908790859063ffffffff16614314565b505060019093019250612a56915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612dc261333f565b612dca614383565b6004546001906001600160a01b0316612de161156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612e2057fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6001546001600160a01b031681565b612e6061333f565b6000612e85762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6004549091506000906001600160a01b0316612e9f61156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ed8816132b2565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612f2057600080fd5b505af1158015612f34573d6000803e3d6000fd5b5050505061143b611f4f565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b60006112f0825b600081612f9581613555565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000612fc561375d565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612ff281613b16565b856001600160a01b0316876001600160a01b03161415613052576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061315f575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156130b257600080fd5b505afa1580156130c6573d6000803e3d6000fd5b505050506040513d60208110156130dc57600080fd5b5051801561315f575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561313257600080fd5b505afa158015613146573d6000803e3d6000fd5b505050506040513d602081101561315c57600080fd5b50515b6131a6576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6131b387878787876143e7565b6003805460ff60a81b19169055979650505050505050565b6131d361333f565b60085463ffffffff600160201b9091048116908216111561323b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6132ba61333f565b6000546001600160a01b038281169116141561330e576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b031633146114dd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133de57600080fd5b505afa1580156133f2573d6000803e3d6000fd5b505050506040513d602081101561340857600080fd5b505192915050565b606080845167ffffffffffffffff8111801561342b57600080fd5b50604051908082528060200260200182016040528015613455578160200160208202803683370190505b50905060005b815181101561354b57836001600160a01b0316638074590a86600760008a868151811061348457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156134fe57600080fd5b505afa158015613512573d6000803e3d6000fd5b505050506040513d602081101561352857600080fd5b5051825183908390811061353857fe5b602090810291909101015260010161345b565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6135ca61542e565b6000600c546135d76146aa565b039050806135fd57505060408051808201909152600a548152600b54602082015261124c565b600060076000600660018154811061361157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061364b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549050610258831061369657604080518082019091529182526020820152915061124c9050565b61369e61542e565b5060408051808201909152600a548152600b54602082018190526000906136c590856146ae565b82519091506000906136d790856146ae565b905060006136fd6136e884896146ae565b6136f7846102588b90036146ae565b906142cb565b9050600061372461025861371e8888602001516146ae90919063ffffffff16565b906146ae565b905061373e82826c0c9f2c9cd04674edea4000000061470c565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff16156114dd576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60606137b76140d3565b60006137d26c42616e636f72466f726d756c6160981b613392565b905060006137e08585614113565b905060606137f085898886613410565b905060005b88518110156139ac57600089828151811061380c57fe5b60200260200101519050600083838151811061382457fe5b6020026020010151905089838151811061383a57fe5b602002602001015181101561388f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b0382166000908152600760205260408120546138b29083614113565b6001600160a01b0384166000818152600760205260409020829055909150600080516020615449833981519152141561391857604051339083156108fc029084906000818181858888f19350505050158015613912573d6000803e3d6000fd5b50613923565b61392383338461473e565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b0383166000908152600760205260409020600101546139a19087908590849063ffffffff16614314565b5050506001016137f5565b50979650505050505050565b6001600160a01b03811630141561143b576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613a1461333f565b82613a1e8161489e565b82613a288161489e565b83613a32816139b8565b611d2686868661473e565b80613a4781613555565b6001600160a01b0382166000805160206154498339815191521415613a86576001600160a01b0382166000908152600760205260409020479055613b12565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613acc57600080fd5b505afa158015613ae0573d6000803e3d6000fd5b505050506040513d6020811015613af657600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613b1f81613392565b6001600160a01b0316336001600160a01b03161461143b576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613b8061333f565b613b886148ef565b81613b928161489e565b82613b9c816139b8565b82613ba681614936565b6004546001600160a01b03868116911614801590613be757506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613c2e576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613c96576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613ca16125b0565b61ffff1610613cf3576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613da261143e565b6114dd576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613e35576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613e7f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140305760076000878581518110613e9c57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613f1c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b80821015613f7e57858281518110613f3557fe5b60200260200101516001600160a01b031660068481548110613f5357fe5b6000918252602090912001546001600160a01b03161415613f7357613f7e565b600190910190613f21565b808210613fc8576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000858481518110613fd657fe5b602002602001015111614025576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613e84565b60008411611d26576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161408f5761408884846149a6565b9050612587565b61409a848484614ac5565b949350505050565b6008546000906112f090620f4240906140cd908590600160401b900463ffffffff908116906146ae16565b90614df2565b60065460005b81811015613b125761410b600682815481106140f157fe5b6000918252602090912001546001600160a01b0316613a3d565b6001016140d9565b60008183101561415a576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106141e55780518252601f1990920191602091820191016141c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614247576040519150601f19603f3d011682016040523d82523d6000602084013e61424c565b606091505b509150915081801561427a57508051158061427a575080806020019051602081101561427757600080fd5b50515b611d26576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b600082820183811015612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461435285620f42406146ae565b6143658863ffffffff808816906146ae16565b6040805192835260208301919091528051918290030190a350505050565b600161438d6125b0565b61ffff16116143df576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6114dd614e51565b60008060006143f7888888612608565b91509150816000141561444a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61445387612f89565b821061445b57fe5b6001600160a01b03881660008051602061544983398151915214156144cd578534146144c8576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6145a4565b3415801561455e57508561455b6144e38a612f89565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b15801561452957600080fd5b505afa15801561453d573d6000803e3d6000fd5b505050506040513d602081101561455357600080fd5b505190614113565b10155b6145a4576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6145ad88613a3d565b6001600160a01b0387166000908152600760205260409020546145d09083614113565b6001600160a01b038816600081815260076020526040902091909155600080516020615449833981519152141561463d576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614637573d6000803e3d6000fd5b50614648565b61464887858461473e565b60095460ff168015614662575061465d6146aa565b600c54105b156146875761466f6135c2565b8051600a5560200151600b556146836146aa565b600c555b614695888887898686614f18565b61469f8888614f81565b509695505050505050565b4290565b6000826146bd575060006112f0565b828202828482816146ca57fe5b0414612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808285118061471c57508284115b156147355761472c858585615185565b9150915061136b565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106147bb5780518252601f19909201916020918201910161479c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461481d576040519150601f19603f3d011682016040523d82523d6000602084013e614822565b606091505b5091509150818015614850575080511580614850575080806020019051602081101561484d57600080fd5b50515b614897576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6148f761143e565b156114dd576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156149555750620f424063ffffffff821611155b61143b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6000806149b2836125b6565b905060005b8451811015614abd5760008582815181106149ce57fe5b6020026020010151905060008583815181106149e657fe5b602002602001015190506000805160206154498339815191526001600160a01b0316826001600160a01b031614614a2357614a2382333084614160565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614ab39085908490849063ffffffff16614314565b50506001016149b7565b509392505050565b6000614acf6140d3565b600080516020615449833981519152600052600760205260008051602061546983398151915254614b009034614113565b6000805160206154498339815191526000908152600760205260008051602061546983398151915291909155614b456c42616e636f72466f726d756c6160981b613392565b90506000614b55828588886151ca565b90506000614b6385836142cb565b905060005b8751811015614de6576000888281518110614b7f57fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614c0557600080fd5b505afa158015614c19573d6000803e3d6000fd5b505050506040513d6020811015614c2f57600080fd5b5051905080614c7e576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614c8a57fe5b6020026020010151811115614c9b57fe5b6001600160a01b03831660008051602061544983398151915214614cca57614cc583333084614160565b614d35565b808a8581518110614cd757fe5b60200260200101511115614d3557336001600160a01b03166108fc828c8781518110614cff57fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614d33573d6000803e3d6000fd5b505b6000614d4183836142cb565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614dd69087908690849063ffffffff16614314565b505060019092019150614b689050565b50909695505050505050565b6000808211614e3d576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614e4857fe5b04949350505050565b614e5961333f565b6000614e636125b0565b61ffff1611614eb5576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614ef857600080fd5b505af1158015614f0c573d6000803e3d6000fd5b505050506114dd6140d3565b600160ff1b8110614f2557fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015614fd157600080fd5b505afa158015614fe5573d6000803e3d6000fd5b505050506040513d6020811015614ffb57600080fd5b50519050600061500a84612f89565b9050600061501784612f89565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161505e90859085906146ae16565b905060006150758663ffffffff808616906146ae16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36150cc878a8887614314565b6150d887898786614314565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561519c575050600281048061136b565b838510156151af5761472c858585615390565b6000806151bd868887615390565b9890975095505050505050565b60008060015b84518110156152975761523a600760008784815181106151ec57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061522457fe5b60200260200101516146ae90919063ffffffff16565b6152856007600088868151811061524d57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061522457fe5b101561528f578091505b6001016151d0565b50856001600160a01b0316632f55bdb586600760008886815181106152b857fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff1687868151811061530357fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561535a57600080fd5b505afa15801561536e573d6000803e3d6000fd5b505050506040513d602081101561538457600080fd5b50519695505050505050565b600080600083600019816153a057fe5b049050808611156153d95760008160010187816153b957fe5b0460010190508087816153c857fe5b0496508086816153d457fe5b049550505b60006153f08786026153eb89896142cb565b612913565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea2646970667358221220dc4c1eb48a73c448bec71e9e69e5d49a32f99ae3d43ede630d3172fc61af9d7764736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "519:35281:26:-:0;;;349:27:60;;;-1:-1:-1;;;;349:27:60;;;-1:-1:-1;;;2899:30:8;586:89:26;989:34;;;-1:-1:-1;;989:34:26;;;2190:220;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2190:220:26;;;;;;;;;;;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;2190:220:26;;;;;;;;;;;594:23:65;2190:220:26;594:13:65;:23::i;:::-;-1:-1:-1;2122:8:57::1;:39:::0;;-1:-1:-1;;;;;2122:39:57;;;::::1;-1:-1:-1::0;;;;;;2122:39:57;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;6069:7:8;594:23:65;6069:7:8;594:13:65;:23::i;:::-;6168:17:8;7294:35:::2;6168:17:::0;7294:19:::2;:35::i;:::-;-1:-1:-1::0;;6203:6:8::3;:16:::0;;-1:-1:-1;;;;;;6203:16:8::3;-1:-1:-1::0;;;;;6203:16:8;;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;6230:16:8::3;:36:::0;;-1:-1:-1;;6230:36:8::3;::::0;::::3;::::0;;::::3;::::0;;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;519:35281:26;;-1:-1:-1;;;;;519:35281:26;692:128:65;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;7404:156:8:-;1846:7;7489:32;;;;;7481:71;;;;;-1:-1:-1;;;7481:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;519:35281:26;;;;;;;", + "deployedSourceMap": "519:35281:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;8454:29:8;:8;:29;;:35;;-1:-1:-1;;;8454:35:8;;;;8446:67;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;;;;519:35281:26;;;;;3655:224:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:57;;;;:::i;2899:30:8:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22514:248;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22514:248:8;-1:-1:-1;;;;;22514:248:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17176:113;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20265:410:26;;-1:-1:-1;20265:410:26;;-1:-1:-1;;;;;20265:410:26:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22836:145:8;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22836:145:8;;:::i;:::-;;;;-1:-1:-1;;;;;22836:145:8;;;;;;;;;;;;;;16300:204;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16300:204:8;-1:-1:-1;;;;;16300:204:8;;:::i;1206:40:26:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;23471:208:8;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;23471:208:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;7816:436:26;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7816:436:26;-1:-1:-1;;;;;7816:436:26;;:::i;22136:130:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22136:130:8;-1:-1:-1;;;;;22136:130:8;;:::i;10641:121::-;;;;;;;;;;;;;:::i;1333:38:57:-;;;;;;;;;;;;;:::i;22340:100:8:-;;;;;;;;;;;;;:::i;989:34:26:-;;;;;;;;;;;;;:::i;12220:157:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12220:157:8;;;;;;;;;;;;;;;;;:::i;2555:90:26:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;16888:626;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16888:626:26;;:::i;2300:925:57:-;;;;;;;;;;;;;:::i;10268:202:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10268:202:8;-1:-1:-1;;;;;10268:202:8;;:::i;19492:419:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19492:419:26;;-1:-1:-1;;;;;19492:419:26;;;;;;:::i;2343:35:8:-;;;;;;;;;;;;;:::i;3292:40::-;;;;;;;;;;;;;:::i;13330:735::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13330:735:8;;;;;;;;;;;;;;;;;:::i;1243:37:57:-;;;;;;;;;;;;;:::i;11112:198:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11112:198:8;-1:-1:-1;;;;;11112:198:8;;:::i;9086:554::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9086:554:8;-1:-1:-1;;;;;9086:554:8;;:::i;3376:322:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3376:322:26;;-1:-1:-1;;;;;3376:322:26;;;;;;;;:::i;30782:180::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30782:180:26;;:::i;23055:114:8:-;;;;;;;;;;;;;:::i;1422:217:58:-;;;;;;;;;;;;;:::i;1154:33:57:-;;;;;;;;;;;;;:::i;10576:1538:26:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10576:1538:26;;;;;;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;10576:1538:26;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;10576:1538:26:i;18168:798::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;18168:798:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;18168:798:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18168:798:26;;-1:-1:-1;;18168:798:26;;;-1:-1:-1;;;18168:798:26;;;;:::i;219:29:58:-;;;;;;;;;;;;;:::i;3041:43:8:-;;;;;;;;;;;;;:::i;14882:112::-;;;;;;;;;;;;;:::i;31607:332:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31607:332:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31607:332:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31607:332:26;;-1:-1:-1;31607:332:26;;-1:-1:-1;;;;;31607:332:26:i;4133:848::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4133:848:26;;;;;;;;;;;;;;;;;:::i;12623:783::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12623:783:26;;;;;;;;-1:-1:-1;12623:783:26;;-1:-1:-1;;;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12623:783:26;;-1:-1:-1;12623:783:26;;-1:-1:-1;;;;;12623:783:26:i;3304:137:57:-;;;;;;;;;;;;;:::i;31208:116:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31208:116:26;;;;;;;:::i;3417:46:8:-;;;;;;;;;;;;;:::i;2473:::-;;;;;;;;;;;;;:::i;13893:2483:26:-;;;;;;;;;;;;;;;;-1:-1:-1;13893:2483:26;;:::i;2918:166::-;;;;;;;;;;;;;:::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2613:34:8;;:::i;9815:82::-;;;;;;;;;;;;;:::i;2387:39::-;;;;;;;;;;;;;:::i;255:23:58:-;;;;;;;;;;;;;:::i;14288:374:8:-;;;;;;;;;;;;;:::i;2754:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2754:48:8;-1:-1:-1;;;;;2754:48:8;;:::i;23243:154::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23243:154:8;-1:-1:-1;;;;;23243:154:8;;:::i;16773:225::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16773:225:8;-1:-1:-1;;;;;16773:225:8;;:::i;1068:31:26:-;;;;;;;;;;;;;:::i;17872:782:8:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17872:782:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12580:274::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12580:274:8;;;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;21965:97:8:-;;;;;;;;;;;;;:::i;3655:224:57:-;726:12:58;:10;:12::i;:::-;3815:26:57::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:57::1;-1:-1:-1::0;;;;3815:56:57;;::::1;::::0;;;::::1;::::0;;3655:224::o;2899:30:8:-;;;;;;:::o;22514:248::-;22586:7;22595:6;22603:4;22609;22615;22632:22;;:::i;:::-;-1:-1:-1;;;;;;;;;22657:18:8;;;;;;;;:8;:18;;;;;;;;22632:43;;-1:-1:-1;22632:43:8;;;;;;;;;-1:-1:-1;22632:43:8;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;-1:-1:-1;22657:18:8;;-1:-1:-1;22657:18:8;;22632:43;22514:248::o;17176:113::-;-1:-1:-1;;;;;;;;;;;;17246:29:8;:8;:29;;:35;;-1:-1:-1;;;17246:35:8;;;;17176:113;;:::o;20265:410:26:-;20474:6;;;20454:42;;;-1:-1:-1;;;20454:42:26;;;;20398:16;;20432:19;;-1:-1:-1;;;;;20474:6:26;;-1:-1:-1;;20454:42:26;;;;;;;;;;;20474:6;20454:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20454:42:26;;-1:-1:-1;20507:22:26;20547:25;-1:-1:-1;;;20547:9:26;:25::i;:::-;20507:66;;20591:76;20621:7;20630:14;20646:11;20659:7;20591:29;:76::i;:::-;20584:83;;;;20265:410;;;;;:::o;22836:145:8:-;22907:11;22938:27;22966:6;22938:35;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22938:35:8;;;-1:-1:-1;;22836:145:8:o;16300:204::-;16435:6;16402:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16466:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;-1:-1:-1;16466:30:8::1;::::0;::::1;;::::0;16300:204::o;1206:40:26:-;;;;:::o;23471:208:8:-;23580:7;23589;23616:55;23635:12;23649;23663:7;23616:18;:55::i;:::-;23609:62;;;;23471:208;;;;;;;:::o;7816:436:26:-;7968:14;;7886:7;;;;7968:14;;7960:48;;;;;-1:-1:-1;;;7960:48:26;;;;;;;;;;;;-1:-1:-1;;;7960:48:26;;;;;;;;;;;;;;;8074:20;;:::i;:::-;8097:19;:17;:19::i;:::-;8074:42;;8141:13;8155:1;8141:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8131:26:26;;;8141:16;;8131:26;8127:82;;;8182:6;;8190;;;;;8182;;-1:-1:-1;8190:6:26;-1:-1:-1;8174:23:26;;8127:82;8229:6;;;;8237;;8229;;-1:-1:-1;8237:6:26;-1:-1:-1;7816:436:26;;;;:::o;22136:130:8:-;726:12:58;:10;:12::i;:::-;22224:34:8::1;22248:9;22224:23;:34::i;:::-;22136:130:::0;:::o;10641:121::-;10723:6;;;:14;;;-1:-1:-1;;;10723:14:8;;;;10699:4;;10749;;-1:-1:-1;;;;;10723:6:8;;-1:-1:-1;;10723:14:8;;;;;;;;;;;:6;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10723:14:8;-1:-1:-1;;;;;10723:31:8;;;10641:121;-1:-1:-1;10641:121:8:o;1333:38:57:-;;;-1:-1:-1;;;1333:38:57;;;;;:::o;22340:100:8:-;726:12:58;:10;:12::i;:::-;22409:23:8::1;:21;:23::i;:::-;22340:100::o:0;989:34:26:-;;;;;;:::o;12220:157:8:-;726:12:58;:10;:12::i;:::-;12326:6:8::1;::::0;;:43:::1;::::0;;-1:-1:-1;;;12326:43:8;;-1:-1:-1;;;;;12326:43:8;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;:6;;;::::1;::::0;:21:::1;::::0;:43;;;;;-1:-1:-1;;12326:43:8;;;;;;;;-1:-1:-1;12326:6:8;:43;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12220:157:::0;;;:::o;2555:90:26:-;2636:1;2555:90;:::o;16888:626::-;16977:16;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;17019:11:26;17011:39:::1;;;::::0;;-1:-1:-1;;;17011:39:26;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;17011:39:26;;;;;;;;;;;;;::::1;;17105:6;::::0;;17085:42:::1;::::0;;-1:-1:-1;;;17085:42:26;;;;17063:19:::1;::::0;-1:-1:-1;;;;;17105:6:26;;::::1;::::0;17085:40:::1;::::0;:42;;::::1;::::0;::::1;::::0;;;;;;;;17105:6;17085:42;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;17085:42:26;17158:6:::1;::::0;;17138:57:::1;::::0;;-1:-1:-1;;;17138:57:26;;17175:10:::1;17138:57:::0;;::::1;::::0;;;;;;;;;;;17085:42;;-1:-1:-1;;;;;;17158:6:26::1;::::0;-1:-1:-1;;17138:57:26;;;;;-1:-1:-1;;17138:57:26;;;;;;;;-1:-1:-1;17158:6:26;17138:57;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;17265:13:26::1;:20:::0;17208:40:::1;::::0;-1:-1:-1;17265:20:26;-1:-1:-1;17251:35:26::1;::::0;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;17251:35:26::1;;17208:78;;17302:9;17297:104;17321:23;:30;17317:1;:34;17297:104;;;17400:1;17371:23;17395:1;17371:26;;;;;;;;;::::0;;::::1;::::0;;;;;:30;17353:3:::1;;17297:104;;;;17421:85;17445:13;17421:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;17421:85:26::1;::::0;;-1:-1:-1;17421:85:26;;::::1;::::0;::::1;;::::0;;::::1;;;;;;;;;17460:23;17485:11;17498:7;17421:23;:85::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;17414:92:26;;-1:-1:-1;;;;16888:626:26:o;2300:925:57:-;2417:5;;-1:-1:-1;;;;;2417:5:57;2403:10;:19;;:50;;-1:-1:-1;2427:26:57;;-1:-1:-1;;;2427:26:57;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:57;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:57;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:57;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;;;;2907:40;;;-1:-1:-1;;;2907:40:57;;-1:-1:-1;;;2907:40:57;;;;;;2959:1;;-1:-1:-1;;;;;2907:21:57;;;;;:40;;;;;;;;;;;;;;;:21;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:57;-1:-1:-1;;;;;2907:54:57;;;2899:87;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:57;;;-1:-1:-1;;;;;;3078:23:57;;;;;;;3195:22;;;;;;;;;;;2300:925::o;10268:202:8:-;726:12:58;:10;:12::i;:::-;10401:10:8::1;948:18:65;957:8;948;:18::i;:::-;-1:-1:-1::0;10430:19:8::2;:32:::0;;-1:-1:-1;;;;;;10430:32:8::2;-1:-1:-1::0;;;;;10430:32:8;;;::::2;::::0;;;::::2;::::0;;10268:202::o;19492:419:26:-;19686:6;;;19666:42;;;-1:-1:-1;;;19666:42:26;;;;19619:7;;;;-1:-1:-1;;;;;19686:6:26;;-1:-1:-1;;19666:42:26;;;;;;;;;;;19686:6;19666:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19666:42:26;;-1:-1:-1;19719:22:26;19759:25;-1:-1:-1;;;19759:9:26;:25::i;:::-;-1:-1:-1;;;;;19841:23:26;;;;;;;:8;:23;;;;;;;;;:31;19874:12;;19803:100;;-1:-1:-1;;;19803:100:26;;;;;;;;;;;;;;;19874:12;;19803:100;;;;;;;;;;;;19719:66;;-1:-1:-1;19803:24:26;;;;-1:-1:-1;;19803:100:26;;;;;19841:23;;19803:100;;;;;;:24;:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19803:100:26;;19492:419;-1:-1:-1;;;;;19492:419:26:o;2343:35:8:-;2376:2;2343:35;:::o;3292:40::-;;;-1:-1:-1;;;3292:40:8;;;;;:::o;13330:735::-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;13517:25:8::2;13545:29;-1:-1:-1::0;;;13545:9:8::2;:29::i;:::-;-1:-1:-1::0;;;;;13765:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13765:22:8::2;::::0;13517:57;;-1:-1:-1;;;;13765:22:8;::::2;;;13764:23;::::0;:38:::2;;;13792:10;:8;:10::i;:::-;13791:11;13764:38;:68;;;-1:-1:-1::0;13806:5:8::2;::::0;-1:-1:-1;;;;;13806:26:8;;::::2;:5:::0;::::2;:26;13764:68;13756:98;;;::::0;;-1:-1:-1;;;13756:98:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13756:98:8;;;;;;;;;;;;;::::2;;13865:42;13886:6;13894:3;13899:7;13865:20;:42::i;:::-;-1:-1:-1::0;;;;;13994:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13994:22:8::2;::::0;-1:-1:-1;;;13994:22:8;::::2;;;13990:67;;;14031:26;14050:6;14031:18;:26::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;;13330:735:8:o;1243:37:57:-;;;-1:-1:-1;;;;;1243:37:57;;:::o;11112:198:8:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;-1:-1:-1::0;1627:5:57::1;:20::i;:::-;11267:6:8::2;::::0;;:35:::2;::::0;;-1:-1:-1;;;11267:35:8;;-1:-1:-1;;;;;11267:35:8;;::::2;::::0;;::::2;::::0;;;;;;:6;;;::::2;::::0;:24:::2;::::0;:35;;;;;:6:::2;::::0;:35;;;;;;;;:6;;:35;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;749:1:58::1;11112:198:8::0;:::o;9086:554::-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;-1:-1:-1::0;;;;;;;;;;;6959:23:8::2;6973:8;6959:13;:23::i;:::-;9259:25:::3;9287:29;-1:-1:-1::0;;;9287:9:8::3;:29::i;:::-;9259:57;;9431:10;:8;:10::i;:::-;9430:11;:41;;;-1:-1:-1::0;9445:5:8::3;::::0;-1:-1:-1;;;;;9445:26:8;;::::3;:5:::0;::::3;:26;9430:41;9422:71;;;::::0;;-1:-1:-1;;;9422:71:8;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;9422:71:8;;;;;;;;;;;;;::::3;;9504:35;::::0;-1:-1:-1;;;;;9504:12:8;::::3;::::0;9517:21:::3;9504:35:::0;::::3;;;::::0;::::3;::::0;;;9517:21;9504:12;:35;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;9593:39;-1:-1:-1::0;;;;;;;;;;;9593:18:8::3;:39::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;9086:554:8:o;3376:322:26:-;726:12:58;:10;:12::i;:::-;3469:33:26::1;3486:6;3494:7;3469:16;:33::i;:::-;3545:13;:20:::0;3569:1:::1;3545:25;:85:::0;::::1;;;;3587:8;:26;3596:13;3610:1;3596:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;3596:16:26::1;3587:26:::0;;;::::1;::::0;;;;;;;;-1:-1:-1;3587:33:26::1;::::0;::::1;;3624:6;3587:43;3545:85;:145;;;;;3647:8;:26;3656:13;3670:1;3656:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;3656:16:26::1;3647:26:::0;;;::::1;::::0;;;;;;;;-1:-1:-1;3647:33:26::1;::::0;::::1;;3684:6;3647:43;3545:145;3515:14;:175:::0;;-1:-1:-1;;3515:175:26::1;::::0;::::1;;::::0;;;::::1;::::0;;-1:-1:-1;;3376:322:26:o;30782:180::-;30838:7;;30899:2;30882:53;30903:5;;30882:53;;30932:3;;;;;;30915:2;30910:7;;30882:53;;;-1:-1:-1;30953:1:26;30782:180;-1:-1:-1;;30782:180:26:o;23055:114:8:-;23116:6;23142:19;:17;:19::i;:::-;23135:26;;23055:114;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;1591:8:58;;-1:-1:-1;;;;;;1583:16:58;;;;;;;1610:21;;;1422:217::o;1154:33:57:-;;;-1:-1:-1;;;;;1154:33:57;;:::o;10576:1538:26:-;10775:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;10834:65:26::2;10855:14;10871:15;10888:10;10834:20;:65::i;:::-;11036:9;11031:195;11055:14;:21;11051:1;:25;11031:195;;;-1:-1:-1::0;;;;;;;;;;;;;;;;11100:40:26::2;:14;11115:1;11100:17;;;;;;;;;;;;;;-1:-1:-1::0;;;;;11100:40:26::2;;11096:130;;;11189:9;11167:15;11183:1;11167:18;;;;;;;;;;;;;;:31;11159:67;;;::::0;;-1:-1:-1;;;11159:67:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11159:67:26;;;;;;;;;;;;;::::2;;11078:3;;11031:195;;;-1:-1:-1::0;11346:9:26::2;:13:::0;11342:112:::2;;-1:-1:-1::0;;;;;;;;;;;;11384:29:26;:8:::2;:29;::::0;:35;;-1:-1:-1;;;11384:35:26;::::2;;;11376:66;;;::::0;;-1:-1:-1;;;11376:66:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11376:66:26;;;;;;;;;;;;;::::2;;11541:6;::::0;;11521:42:::2;::::0;;-1:-1:-1;;;11521:42:26;;;;11499:19:::2;::::0;-1:-1:-1;;;;;11541:6:26;;::::2;::::0;11521:40:::2;::::0;:42;;::::2;::::0;::::2;::::0;;;;;;;;11541:6;11521:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;11521:42:26;;-1:-1:-1;11669:14:26::2;11686:64;11705:14:::0;11721:15;11521:42;11686:18:::2;:64::i;:::-;11669:81;;11887:10;11877:6;:20;;11869:51;;;::::0;;-1:-1:-1;;;11869:51:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11869:51:26;;;;;;;;;;;;;::::2;;11994:6;::::0;;11974:54:::2;::::0;;-1:-1:-1;;;11974:54:26;;12009:10:::2;11974:54:::0;;::::2;::::0;;;;;;;;;;;-1:-1:-1;;;;;11994:6:26;;::::2;::::0;11974:34:::2;::::0;:54;;;;;-1:-1:-1;;11974:54:26;;;;;;;-1:-1:-1;11994:6:26;11974:54;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;12100:6:26;;;-1:-1:-1;;;;;;10576:1538:26:o;18168:798::-;18331:16;18365:31;18413:14;:21;18399:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18399:36:26;-1:-1:-1;18490:6:26;;;18470:42;;;-1:-1:-1;;;18470:42:26;;;;18365:70;;-1:-1:-1;18448:19:26;;-1:-1:-1;;;;;18490:6:26;;;;18470:40;;:42;;;;;;;;;;;;18490:6;18470:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18470:42:26;;-1:-1:-1;18523:22:26;18563:25;-1:-1:-1;;;18563:9:26;:25::i;:::-;18523:66;;18600:14;18617:7;-1:-1:-1;;;;;18617:24:26;;18642:11;18655:8;:44;18664:14;18679:18;18664:34;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18655:44:26;;;;;;;;;;;;;;-1:-1:-1;18655:44:26;:52;18709:12;;18617:121;;-1:-1:-1;18617:121:26;;;-1:-1:-1;;;;;;18617:121:26;;;;;;;;;;;;;;;;;18709:12;;18617:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18617:121:26;;-1:-1:-1;18756:9:26;18751:173;18775:14;:21;18771:1;:25;18751:173;;;18836:7;-1:-1:-1;;;;;18836:16:26;;18853:11;18866:8;:27;18875:14;18890:1;18875:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18866:27:26;;;;;;;;;;;;;;-1:-1:-1;18866:27:26;:35;18903:12;;18836:88;;-1:-1:-1;18836:88:26;;;-1:-1:-1;;;;;;18836:88:26;;;;;;;;;;;;;;;;;18903:12;;18836:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18836:88:26;18816:17;;:14;;18831:1;;18816:17;;;;;;;;;;;;;;;:108;18798:3;;18751:173;;;-1:-1:-1;18944:14:26;;-1:-1:-1;;;;18168:798:26;;;;;;:::o;219:29:58:-;;;-1:-1:-1;;;;;219:29:58;;:::o;3041:43:8:-;;;-1:-1:-1;;;3041:43:8;;;;;:::o;14882:112::-;14965:13;:20;14882:112;:::o;31607:332:26:-;31748:14;;31677:7;;;;;31773:90;31797:6;31793:1;:10;31773:90;;;31838:25;31852:7;31860:1;31852:10;;;;;;;;;;;;;;31838:13;:25::i;:::-;31823:40;;;;31805:3;;31773:90;;;;31929:1;31897:29;31906:11;31919:6;31897:8;:29::i;:::-;:33;31889:2;31881:50;;31607:332;-1:-1:-1;;;;31607:332:26:o;4133:848::-;4384:7;4393;6356:9:8;:7;:9::i;:::-;4316:12:26::1;6959:23:8;6973:8;6959:13;:23::i;:::-;4352:12:26::2;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1::0;;;;;4453:28:26;;::::3;::::0;;::::3;;;4445:63;;;::::0;;-1:-1:-1;;;4445:63:26;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;4445:63:26;;;;;;;;;;;;;::::3;;4521:14;4553:25;-1:-1:-1::0;;;4553:9:26::3;:25::i;:::-;-1:-1:-1::0;;;;;4538:66:26::3;;4619:28;4634:12:::0;4619:14:::3;:28::i;:::-;-1:-1:-1::0;;;;;4662:22:26;::::3;;::::0;;;:8:::3;:22;::::0;;;;-1:-1:-1;4662:29:26::3;::::0;::::3;;4706:28;4721:12:::0;4706:14:::3;:28::i;:::-;-1:-1:-1::0;;;;;4749:22:26;::::3;;::::0;;;:8:::3;:22;::::0;;;;;;;;-1:-1:-1;4749:29:26::3;::::0;4538:273;;-1:-1:-1;4538:273:26;;;-1:-1:-1;;;;;;4538:273:26;;;::::3;::::0;::::3;::::0;;;;4749:29:::3;4538:273:::0;;::::3;::::0;;;;;;;;;;;4749:29;;;::::3;4538:273:::0;;;;;;;;;;;;;;;;;;;;;;;::::3;;::::0;::::3;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;4538:273:26;;-1:-1:-1;4902:11:26::3;4916:20;4538:273:::0;4916:12:::3;:20::i;:::-;4955:12:::0;;;::::3;::::0;;;-1:-1:-1;4133:848:26;;-1:-1:-1;;;;;;;4133:848:26:o;12623:783::-;12814:16;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;12882:71:26::2;12903:14;12919:24;12945:7;12882:20;:71::i;:::-;13075:6;::::0;;13055:42:::2;::::0;;-1:-1:-1;;;13055:42:26;;;;13033:19:::2;::::0;-1:-1:-1;;;;;13075:6:26;;::::2;::::0;13055:40:::2;::::0;:42;;::::2;::::0;::::2;::::0;;;;;;;;13075:6;13055:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;13055:42:26;13166:6:::2;::::0;;13146:57:::2;::::0;;-1:-1:-1;;;13146:57:26;;13183:10:::2;13146:57:::0;;::::2;::::0;;;;;;;;;;;13055:42;;-1:-1:-1;;;;;;13166:6:26::2;::::0;-1:-1:-1;;13146:57:26;;;;;-1:-1:-1;;13146:57:26;;;;;;;;-1:-1:-1;13166:6:26;13146:57;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;13311:87;13335:14;13351:24;13377:11;13390:7;13311:23;:87::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;13304:94:26;;-1:-1:-1;;;;;12623:783:26:o;3304:137:57:-;726:12:58;:10;:12::i;:::-;3421::57::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:57::1;-1:-1:-1::0;;;;;3421:12:57;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;31208:116:26:-;31271:7;31314:2;31309:1;31314:2;31304:6;31299:2;:11;31298:18;;;;;;;31208:116;-1:-1:-1;;;31208:116:26:o;3417:46:8:-;3459:4;3417:46;:::o;2473:::-;;;-1:-1:-1;;;;;2473:46:8;;:::o;13893:2483:26:-;13994:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;14019:21:26::1;:19;:21::i;:::-;-1:-1:-1::0;;;;;;;;;;;14091:29:26::1;::::0;:8:::1;:29;::::0;-1:-1:-1;;;;;;;;;;;14091:37:26;:52:::1;::::0;14133:9:::1;14091:41;:52::i;:::-;-1:-1:-1::0;;;;;;;;;;;14051:29:26::1;::::0;;;:8:::1;:29;::::0;;;-1:-1:-1;;;;;;;;;;;14051:92:26;;;;14193:6:::1;::::0;;14051:29;14173:42;;-1:-1:-1;;;14173:42:26;;;;14051:29;;-1:-1:-1;;;;;14193:6:26;;::::1;::::0;-1:-1:-1;;14173:42:26;;::::1;::::0;14051:92;14173:42;;;;;14193:6;14173:42;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;14173:42:26;;-1:-1:-1;14226:22:26::1;14266:25;-1:-1:-1::0;;;14266:9:26::1;:25::i;:::-;14519:13;:20:::0;14226:66;;-1:-1:-1;14496:20:26::1;14550:1612;14574:12;14570:1;:16;14550:1612;;;14608:24;14635:13;14649:1;14635:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;14635:16:26;;::::1;14687:22:::0;;;:8:::1;:22:::0;;;;;;:30;14793:12:::1;::::0;14756:59;;-1:-1:-1;;;14756:59:26;;::::1;::::0;::::1;::::0;;;;;;;;;14793:12:::1;::::0;;::::1;14756:59:::0;;;;;;;;;;;;14635:16;;-1:-1:-1;14687:30:26;14635:16;14756;;::::1;::::0;::::1;::::0;:59;;;;;;;;;;:16;:59;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;14756:59:26;-1:-1:-1;;;14756:59:26;;-1:-1:-1;;;;;;14904:35:26;::::1;::::0;-1:-1:-1;;;;;;;;14904:35:26::1;14900:616;;;14976:13;14964:9;:25;14960:415;;;15014:46;::::0;:10:::1;::::0;15034:9:::1;:25:::0;;::::1;15014:46:::0;::::1;;;::::0;::::1;::::0;;;15034:25;15014:10;:46;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;14960:415;;;15119:13;15107:9;:25;15103:272;;;15165:9;:14:::0;15157:48:::1;;;::::0;;-1:-1:-1;;;15157:48:26;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;15157:48:26;;;;;;;;;;;;;::::1;;15245:10;::::0;15228:70:::1;::::0;-1:-1:-1;;;15245:10:26;::::1;-1:-1:-1::0;;;;;15245:10:26::1;15257;15277:4;15284:13:::0;15228:16:::1;:70::i;:::-;15321:10;::::0;:34:::1;::::0;;-1:-1:-1;;;15321:34:26;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;15321:10:26;;::::1;-1:-1:-1::0;;;;;15321:10:26::1;::::0;:19:::1;::::0;:34;;;;;-1:-1:-1;;15321:34:26;;;;;;;;-1:-1:-1;15321:10:26;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;15103:272;14900:616;;;15428:72;15445:12;15459:10;15479:4;15486:13;15428:16;:72::i;:::-;15573:25;15601:29;:10:::0;15616:13;15601:14:::1;:29::i;:::-;-1:-1:-1::0;;;;;15645:22:26;::::1;;::::0;;;:8:::1;:22;::::0;;;;:50;;;;;-1:-1:-1;15741:19:26::1;:6:::0;15752:7;15741:10:::1;:19::i;:::-;15851:94;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;-1:-1:-1;;;;;;15851:94:26;::::1;::::0;15866:10:::1;::::0;15851:94:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;;;;;16120:22:26;::::1;;::::0;;;:8:::1;:22;::::0;;;;-1:-1:-1;16120:29:26::1;::::0;16034:116:::1;::::0;16067:18;;16120:22;;16101:17;;16120:29:::1;;16034:32;:116::i;:::-;-1:-1:-1::0;;14588:3:26::1;::::0;;::::1;::::0;-1:-1:-1;14550:1612:26::1;::::0;-1:-1:-1;;14550:1612:26::1;;-1:-1:-1::0;16254:6:26::1;::::0;;16234:55:::1;::::0;;-1:-1:-1;;;16234:55:26;;16269:10:::1;16234:55:::0;;::::1;::::0;;;;;;;;;;;-1:-1:-1;;;;;16254:6:26;;::::1;::::0;16234:34:::1;::::0;:55;;;;;-1:-1:-1;;16234:55:26;;;;;;;-1:-1:-1;16254:6:26;16234:55;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;16361:7:26;;;-1:-1:-1;;;;;13893:2483:26:o;2918:166::-;726:12:58;:10;:12::i;:::-;2988:29:26::1;:27;:29::i;:::-;3063:6;::::0;3071:4:::1;::::0;-1:-1:-1;;;;;3063:6:26::1;3046:15;:13;:15::i;:::-;3035:41;;;;;;;;;;;;2918:166::o:0;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2613:34:8;;-1:-1:-1;2613:34:8;:::o;2387:39::-;;;-1:-1:-1;;;;;2387:39:8;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;14288:374:8:-;726:12:58;:10;:12::i;:::-;14335:36:8::1;14393:29;-1:-1:-1::0;;;14393:9:8::1;:29::i;:::-;14509:6;::::0;14335:88;;-1:-1:-1;14517:5:8::1;::::0;-1:-1:-1;;;;;14509:6:8::1;14492:15;:13;:15::i;:::-;14481:42;;;;;;;;;;;;14536:45;14562:17;14536;:45::i;:::-;14592:34;::::0;;-1:-1:-1;;;14592:34:8;;2376:2:::1;14592:34;::::0;::::1;::::0;;;-1:-1:-1;;;;;14592:25:8;::::1;::::0;::::1;::::0;:34;;;;;-1:-1:-1;;14592:34:8;;;;;;;-1:-1:-1;14592:25:8;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;14637:17;:15;:17::i;2754:48::-:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;:::o;23243:154::-;23331:7;23358:31;23373:15;16773:225;16927:7;16894:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16959:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:31;;16773:225::o;1068:31:26:-;;;;;;:::o;17872:782:8:-;18123:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;-1:-1:-1;;;1627:20:57::1;-1:-1:-1::0;1627:5:57::1;:20::i;:::-;-1:-1:-1::0;;;;;18183:28:8;;::::2;::::0;;::::2;;;18175:63;;;::::0;;-1:-1:-1;;;18175:63:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18175:63:8;;;;;;;;;;;;;::::2;;18366:19;::::0;-1:-1:-1;;;;;18366:19:8::2;18358:42:::0;;:158:::2;;-1:-1:-1::0;18422:19:8::2;::::0;:42:::2;::::0;;-1:-1:-1;;;18422:42:8;;-1:-1:-1;;;;;18422:42:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18422:42:8;;;;;::::2;::::0;;;;;;;;:19;:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18422:42:8;:93;::::2;;;-1:-1:-1::0;18468:19:8::2;::::0;:47:::2;::::0;;-1:-1:-1;;;18468:47:8;;-1:-1:-1;;;;;18468:47:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18468:47:8;;;;;::::2;::::0;;;;;;;;:19;:47;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18468:47:8;18422:93:::2;18350:207;;;::::0;;-1:-1:-1;;;18350:207:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18350:207:8;;;;;;;;;;;;;::::2;;18577:69;18587:12;18601;18615:7;18624;18633:12;18577:9;:69::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;18570:76:8;;-1:-1:-1;;;;;;;17872:782:8:o;12580:274::-;726:12:58;:10;:12::i;:::-;12692:16:8::1;::::0;-1:-1:-1;;;12692:16:8;::::1;;::::0;;::::1;12674:34:::0;;::::1;;;12666:73;;;::::0;;-1:-1:-1;;;12666:73:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;12775:13;::::0;12755:50:::1;::::0;;-1:-1:-1;;;12775:13:8;;::::1;;::::0;;::::1;12755:50:::0;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;12816:13;:30:::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;;12816:30:8::1;-1:-1:-1::0;;12816:30:8;;::::1;::::0;;;::::1;::::0;;12580:274::o;1164:167:58:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;21965:97:8:-;22048:6;;-1:-1:-1;;;;;22048:6:8;;21965:97::o;813:104:58:-;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;4077:133:57;4169:8;;:33;;;-1:-1:-1;;;4169:33:57;;;;;;;;;;-1:-1:-1;;;;;;;4169:8:57;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:57;;4077:133;-1:-1:-1;;4077:133:57:o;27252:534:26:-;27441:16;27475:31;27523:14;:21;27509:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27509:36:26;;27475:70;;27561:9;27556:190;27580:14;:21;27576:1;:25;27556:190;;;27641:8;-1:-1:-1;;;;;27641:31:26;;27673:12;27687:8;:27;27696:14;27711:1;27696:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;27687:27:26;;;;;;;;;;;;;;-1:-1:-1;27687:27:26;:35;27724:12;;27641:105;;-1:-1:-1;27641:105:26;;;-1:-1:-1;;;;;;27641:105:26;;;;;;;;;;;;;;;;;27724:12;;27641:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27641:105:26;27621:17;;:14;;27636:1;;27621:17;;;;;;;;;;;;;;;:125;27603:3;;27556:190;;;-1:-1:-1;27764:14:26;27252:534;-1:-1:-1;;;;;27252:534:26:o;7057:134:8:-;-1:-1:-1;;;;;7135:18:8;;;;;;:8;:18;;;;;-1:-1:-1;7135:24:8;;-1:-1:-1;;;7135:24:8;;;;7127:56;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;;;8436:1703:26;8488:15;;:::i;:::-;8596:19;8627:25;;8618:6;:4;:6::i;:::-;:34;;-1:-1:-1;8757:16:26;8753:71;;-1:-1:-1;;8790:22:26;;;;;;;;;8797:15;8790:22;;;;;;;;;;;8753:71;8890:20;8913:8;:26;8922:13;8936:1;8922:16;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8922:16:26;8913:26;;;;;;;;;;;;:34;8990:13;:16;;8913:34;;-1:-1:-1;8981:8:26;;8922:16;;8990:13;8922:16;;8990;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8990:16:26;8981:26;;;;;;;;;;;;:34;;-1:-1:-1;889:10:26;9147:34;;9143:120;;9205:46;;;;;;;;;;;;;;;;;-1:-1:-1;9198:53:26;;-1:-1:-1;9198:53:26;9143:120;9546:27;;:::i;:::-;-1:-1:-1;9546:45:26;;;;;;;;;9576:15;9546:45;;;;;;;;;;;-1:-1:-1;;9616:31:26;;9634:12;9616:17;:31::i;:::-;9670:13;;9604:43;;-1:-1:-1;9658:9:26;;9670:31;;9688:12;9670:17;:31::i;:::-;9658:43;-1:-1:-1;9809:16:26;9828:64;9873:18;:1;9879:11;9873:5;:18::i;:::-;9828:40;:1;889:10;9834:33;;;9828:5;:40::i;:::-;:44;;:64::i;:::-;9809:83;;9903:16;9922:56;889:10;9922:31;9940:12;9922:11;:13;;;:17;;:31;;;;:::i;:::-;:35;;:56::i;:::-;9903:75;;10014:61;10027:8;10037;738:4;10014:12;:61::i;:::-;10093:38;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;8436:1703:26;:::o;716:89:60:-;772:6;;-1:-1:-1;;;772:6:60;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;;;28249:1695:26;28436:16;28470:21;:19;:21::i;:::-;28504:22;28544:25;-1:-1:-1;;;28544:9:26;:25::i;:::-;28504:66;-1:-1:-1;28581:26:26;28610:25;:12;28627:7;28610:16;:25::i;:::-;28581:54;;28646:31;28680:77;28710:7;28719:14;28735:12;28749:7;28680:29;:77::i;:::-;28646:111;;28775:9;28770:1037;28794:14;:21;28790:1;:25;28770:1037;;;28837:24;28864:14;28879:1;28864:17;;;;;;;;;;;;;;28837:44;;28896:21;28920:14;28935:1;28920:17;;;;;;;;;;;;;;28896:41;;28977:24;29002:1;28977:27;;;;;;;;;;;;;;28960:13;:44;;28952:79;;;;;-1:-1:-1;;;28952:79:26;;;;;;;;;;;;-1:-1:-1;;;28952:79:26;;;;;;;;;;;;;;;-1:-1:-1;;;;;29076:22:26;;29048:25;29076:22;;;:8;:22;;;;;:30;:49;;29111:13;29076:34;:49::i;:::-;-1:-1:-1;;;;;29140:22:26;;;;;;:8;:22;;;;;;;:50;;;;;-1:-1:-1;29140:22:26;;;;-1:-1:-1;29140:22:26;-1:-1:-1;;;;;29294:35:26;29290:182;;;29348:34;;:10;;:34;;;;;29368:13;;29348:34;;;;29368:13;29348:10;:34;;;;;;;;;;;;;;;;;;;;;29290:182;;;29419:53;29432:12;29446:10;29458:13;29419:12;:53::i;:::-;29494:96;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;29494:96:26;;;29511:10;;29494:96;;;;;;;;;-1:-1:-1;;;;;29765:22:26;;;;;;:8;:22;;;;;-1:-1:-1;29765:29:26;;29679:116;;29712:18;;29765:22;;29746:17;;29765:29;;29679:32;:116::i;:::-;-1:-1:-1;;;28817:3:26;;28770:1037;;;-1:-1:-1;29922:14:26;28249:1695;-1:-1:-1;;;;;;;28249:1695:26:o;1041:126:65:-;1130:4;-1:-1:-1;;;;;1110:25:65;;;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;1196:290:63;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;20061:322:8:-:0;20138:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;;20168:36:8;::::1;::::0;-1:-1:-1;;;;;;;;;20168:36:8::1;20164:211;;;-1:-1:-1::0;;;;;20219:23:8;::::1;;::::0;;;:8:::1;:23;::::0;;;;20253:21:::1;20219:55:::0;;20164:211:::1;;;20337:38;::::0;;-1:-1:-1;;;20337:38:8;;20369:4:::1;20337:38;::::0;::::1;::::0;;;-1:-1:-1;;;;;20337:23:8;::::1;::::0;-1:-1:-1;;20337:38:8;;;;;::::1;::::0;;;;;;;;:23;:38;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;20337:38:8;-1:-1:-1;;;;;20303:23:8;::::1;;::::0;;;:8:::1;20337:38;20303:23:::0;;;;:72;20164:211:::1;20061:322:::0;;:::o;1722:139:57:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:57;:10;:38;1785:68;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;;;15286:803:8;726:12:58;:10;:12::i;:::-;6615:11:8::1;:9;:11::i;:::-;15460:6:::2;594:23:65;608:8;594:13;:23::i;:::-;15494:6:8::3;948:18:65;957:8;948;:18::i;:::-;15531:7:8::4;7656:28;7676:7;7656:19;:28::i;:::-;15618:6:::5;::::0;-1:-1:-1;;;;;15591:34:8;;::::5;15618:6:::0;::::5;15591:34;::::0;::::5;::::0;:61:::5;;-1:-1:-1::0;;;;;;15630:16:8;::::5;;::::0;;;:8:::5;:16;::::0;;;;-1:-1:-1;15630:22:8::5;::::0;-1:-1:-1;;;15630:22:8;::::5;;;15629:23;15591:61;15583:93;;;::::0;;-1:-1:-1;;;15583:93:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15583:93:8;;;;;;;;;;;;;::::5;;15723:12;::::0;::::5;::::0;;::::5;1846:7;15706:29;15695:40:::0;::::5;::::0;;::::5;;;15687:79;;;::::0;;-1:-1:-1;;;15687:79:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;15785:32;:19;:17;:19::i;:::-;:32;;;15777:70;;;::::0;;-1:-1:-1;;;15777:70:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15777:70:8;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;;;;15889:16:8;;;::::5;15860:26;15889:16:::0;;;:8:::5;:16;::::0;;;;15916:22;;;-1:-1:-1;15949:17:8;;::::5;:27:::0;;-1:-1:-1;;15949:27:8::5;::::0;;::::5;-1:-1:-1::0;;15949:27:8;;::::5;;15987:23:::0;;;::::5;-1:-1:-1::0;;;15987:23:8::5;::::0;;;:16:::5;16021:26:::0;;;;::::5;::::0;;;;;;;;::::5;::::0;;-1:-1:-1;;;;;;16021:26:8::5;::::0;;::::5;::::0;;;16058:12:::5;:23:::0;;;;::::5;::::0;;::::5;::::0;;::::5;::::0;::::5;::::0;;;::::5;::::0;;15286:803::o;6440:87::-;6492:10;:8;:10::i;:::-;6484:35;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;;;21082:1181:26;21306:13;:20;21355:21;;21247:9;;;;21345:31;;21337:63;;;;;-1:-1:-1;;;21337:63:26;;;;;;;;;;;;-1:-1:-1;;;21337:63:26;;;;;;;;;;;;;;;21429:15;:22;21419:6;:32;21411:63;;;;;-1:-1:-1;;;21411:63:26;;;;;;;;;;;;-1:-1:-1;;;21411:63:26;;;;;;;;;;;;;;;21496:1;21492:5;;21487:650;21503:6;21499:1;:10;21487:650;;;21627:8;:27;21636:14;21651:1;21636:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21627:27:26;;;;;;;;;;;-1:-1:-1;21627:27:26;-1:-1:-1;21627:33:26;;-1:-1:-1;;;21627:33:26;;;;21619:65;;;;;-1:-1:-1;;;21619:65:26;;;;;;;;;;;;-1:-1:-1;;;21619:65:26;;;;;;;;;;;;;;;21708:1;21704:5;;21699:133;21715:6;21711:1;:10;21699:133;;;21771:14;21786:1;21771:17;;;;;;;;;;;;;;-1:-1:-1;;;;;21751:37:26;:13;21765:1;21751:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21751:16:26;:37;21747:69;;;21811:5;;21747:69;21723:3;;;;;21699:133;;;21946:6;21942:1;:10;21934:42;;;;;-1:-1:-1;;;21934:42:26;;;;;;;;;;;;-1:-1:-1;;;21934:42:26;;;;;;;;;;;;;;;22101:1;22080:15;22096:1;22080:18;;;;;;;;;;;;;;:22;22072:53;;;;;-1:-1:-1;;;22072:53:26;;;;;;;;;;;;-1:-1:-1;;;22072:53:26;;;;;;;;;;;;;;;21511:3;;;;;21487:650;;;22234:1;22224:7;:11;22216:39;;;;;-1:-1:-1;;;22216:39:26;;;;;;;;;;;;-1:-1:-1;;;22216:39:26;;;;;;;;;;;;;;22580:379;22736:7;22765:17;22761:99;;22804:56;22828:14;22844:15;22804:23;:56::i;:::-;22797:63;;;;22761:99;22878:73;22905:14;22921:15;22938:12;22878:26;:73::i;:::-;22871:80;22580:379;-1:-1:-1;;;;22580:379:26:o;19713:155:8:-;19826:13;;19781:7;;19808:52;;1846:7;;19808:32;;:13;;:52;-1:-1:-1;;;19826:13:8;;;;;;19808:17;:32;:::i;:::-;:36;;:52::i;20456:205::-;20530:13;:20;20507;20561:92;20585:12;20581:1;:16;20561:92;;;20617:36;20636:13;20650:1;20636:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20636:16:8;20617:18;:36::i;:::-;20599:3;;20561:92;;778:147:61;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;2190:348:62:-;2355:71;;;-1:-1:-1;;;;;2355:71:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:62;-1:-1:-1;;;2355:71:62;;;2334:93;;;;-1:-1:-1;;2313:17:62;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:62;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:62;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:62;;;;;;;;;;;;;;;;;;;;;;;;;;;386:169:61;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;33843:310:26;34046:6;;-1:-1:-1;;;;;34010:135:26;;;;34046:6;34010:135;34071:35;:15;1846:7:8;34071:19:26;:35::i;:::-;34108:36;:16;:36;;;;;:20;:36;:::i;:::-;34010:135;;;;;;;;;;;;;;;;;;;;;;33843:310;;;;:::o;2501:239:13:-;2661:1;2639:19;:17;:19::i;:::-;:23;;;2631:61;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;;;;2703:29;:27;:29::i;5564:1852:26:-;5753:7;5826:14;5842:11;5857:55;5876:12;5890;5904:7;5857:18;:55::i;:::-;5825:87;;;;5993:6;6003:1;5993:11;;5985:46;;;;;-1:-1:-1;;;5985:46:26;;;;;;;;;;;;-1:-1:-1;;;5985:46:26;;;;;;;;;;;;;;;6128:28;6143:12;6128:14;:28::i;:::-;6119:6;:37;6112:45;;;;-1:-1:-1;;;;;;;;6237:35:26;;;-1:-1:-1;;;;;;;;;6237:35:26;6233:270;;;6308:7;6295:9;:20;6287:56;;;;;-1:-1:-1;;;6287:56:26;;;;;;;;;;;;-1:-1:-1;;;6287:56:26;;;;;;;;;;;;;;;6233:270;;;6380:9;:14;:100;;;;;6473:7;6398:71;6440:28;6455:12;6440:14;:28::i;:::-;6398:37;;;-1:-1:-1;;;6398:37:26;;6429:4;6398:37;;;;;;-1:-1:-1;;;;;6398:22:26;;;-1:-1:-1;;6398:37:26;;;;;;;;;;;;;;:22;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6398:37:26;;:41;:71::i;:::-;:82;;6380:100;6372:131;;;;;-1:-1:-1;;;6372:131:26;;;;;;;;;;;;-1:-1:-1;;;6372:131:26;;;;;;;;;;;;;;;6554:32;6573:12;6554:18;:32::i;:::-;-1:-1:-1;;;;;6630:22:26;;;;;;:8;:22;;;;;:30;:42;;6665:6;6630:34;:42::i;:::-;-1:-1:-1;;;;;6597:22:26;;;;;;:8;:22;;;;;;;:75;;;;:22;;;;-1:-1:-1;6597:22:26;-1:-1:-1;;;;;6759:35:26;6755:160;;;6809:29;;-1:-1:-1;;;;;6809:21:26;;;:29;;;;;;;;;;;;:21;:29;;;;;;;;;;;;;;;;;;;;;6755:160;;;6867:48;6880:12;6894;6908:6;6867:12;:48::i;:::-;6975:14;;;;:52;;;;;7021:6;:4;:6::i;:::-;6993:25;;:34;6975:52;6971:171;;;7062:19;:17;:19::i;:::-;7044:37;;:15;:37;;;;;;7124:6;:4;:6::i;:::-;7096:25;:34;6971:171;7196:82;7220:12;7234;7248:7;7257;7266:6;7274:3;7196:23;:82::i;:::-;7325:57;7355:12;7369;7325:29;:57::i;:::-;-1:-1:-1;7402:6:26;5564:1852;-1:-1:-1;;;;;;5564:1852:26:o;34263:85::-;34337:3;34263:85;:::o;1149:250:61:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:61;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;;;34608:223:26;34691:7;34700;34729:4;34724:2;:9;:22;;;;34742:4;34737:2;:9;34724:22;34720:77;;;34768:29;34784:2;34788;34792:4;34768:15;:29::i;:::-;34761:36;;;;;;34720:77;-1:-1:-1;34816:2:26;;34820;;-1:-1:-1;;34608:223:26:o;1485:312:62:-;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;-1:-1:-1;;1589:17:62;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;;1485:312;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;6701:88:8;6756:10;:8;:10::i;:::-;6755:11;6747:34;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;;;7759:157;7847:1;7837:7;:11;;;:40;;;;-1:-1:-1;1846:7:8;7852:25;;;;;7837:40;7829:79;;;;;-1:-1:-1;;;7829:79:8;;;;;;;;;;;;;;;;;;;;;;;;;;;23240:1215:26;23379:7;23489:14;23506:30;23520:15;23506:13;:30::i;:::-;23489:47;;23633:9;23628:742;23652:14;:21;23648:1;:25;23628:742;;;23695:24;23722:14;23737:1;23722:17;;;;;;;;;;;;;;23695:44;;23754:21;23778:15;23794:1;23778:18;;;;;;;;;;;;;;23754:42;;-1:-1:-1;;;;;;;;;;;;;;;;23817:35:26;;;;;;23813:193;;23934:72;23951:12;23965:10;23985:4;23992:13;23934:16;:72::i;:::-;-1:-1:-1;;;;;24023:22:26;;;;;;:8;:22;;;;;;;;;:46;;;24091:78;;;;;;;;;;;;;;;;;;;24106:10;;24091:78;;;;;;;;;;-1:-1:-1;;;;;24328:22:26;;;;;;:8;:22;;;;;-1:-1:-1;24328:29:26;;24258:100;;24291:6;;24328:22;;24313:13;;24328:29;;24258:32;:100::i;:::-;-1:-1:-1;;23675:3:26;;23628:742;;;-1:-1:-1;24441:6:26;23240:1215;-1:-1:-1;;;23240:1215:26:o;24792:2004::-;24956:7;24981:21;:19;:21::i;:::-;-1:-1:-1;;;;;;;;;;;25053:29:26;;:8;:29;;-1:-1:-1;;;;;;;;;;;25053:37:26;:52;;25095:9;25053:41;:52::i;:::-;-1:-1:-1;;;;;;;;;;;25013:29:26;;;;:8;:29;;-1:-1:-1;;;;;;;;;;;25013:92:26;;;;25158:25;-1:-1:-1;;;25158:9:26;:25::i;:::-;25118:66;;25195:14;25212:67;25224:7;25233:12;25247:14;25263:15;25212:11;:67::i;:::-;25195:84;-1:-1:-1;25290:26:26;25319:24;:12;25195:84;25319:16;:24::i;:::-;25290:53;;25361:9;25356:1355;25380:14;:21;25376:1;:25;25356:1355;;;25423:24;25450:14;25465:1;25450:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25503:22:26;;;25482:18;25503:22;;;:8;:22;;;;;;:30;25615:12;;25572:64;;-1:-1:-1;;;25572:64:26;;;;;;;;;;;;;;25615:12;;;;25572:64;;;;;;;;;;;;25450:17;;-1:-1:-1;25503:30:26;25482:18;;25572:16;;;;;;:64;;;;;25450:17;;25572:64;;;;;;:16;:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25572:64:26;;-1:-1:-1;25659:17:26;25651:52;;;;;-1:-1:-1;;;25651:52:26;;;;;;;;;;;;-1:-1:-1;;;25651:52:26;;;;;;;;;;;;;;;25742:15;25758:1;25742:18;;;;;;;;;;;;;;25725:13;:35;;25718:43;;;;-1:-1:-1;;;;;;;;25865:35:26;;;-1:-1:-1;;;;;;;;;25865:35:26;25861:378;;25982:72;25999:12;26013:10;26033:4;26040:13;25982:16;:72::i;:::-;25861:378;;;26099:13;26078:15;26094:1;26078:18;;;;;;;;;;;;;;:34;26074:165;;;26204:18;;26184:10;;:55;;26225:13;;26204:15;;26220:1;;26204:18;;;;;;;;;;;;:34;26184:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26074:165;26256:25;26284:29;:10;26299:13;26284:14;:29::i;:::-;-1:-1:-1;;;;;26328:22:26;;;;;;:8;:22;;;;;;;;;:50;;;26400:94;;;;;;;;;;;;;;;;;;;26328:50;;-1:-1:-1;26328:22:26;;26415:10;;26400:94;;;;;;;;;;-1:-1:-1;;;;;26669:22:26;;;;;;:8;:22;;;;;-1:-1:-1;26669:29:26;;26583:116;;26616:18;;26669:22;;26650:17;;26669:29;;26583:32;:116::i;:::-;-1:-1:-1;;25403:3:26;;;;;-1:-1:-1;25356:1355:26;;-1:-1:-1;25356:1355:26;;-1:-1:-1;26782:6:26;;24792:2004;-1:-1:-1;;;;;;24792:2004:26:o;1627:174:61:-;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:61:o;11633:276:8:-;726:12:58;:10;:12::i;:::-;11803:1:8::1;11781:19;:17;:19::i;:::-;:23;;;11773:61;;;::::0;;-1:-1:-1;;;11773:61:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11773:61:8;;;;;;;;;;;;;::::1;;11845:6;::::0;;:24:::1;::::0;;-1:-1:-1;;;11845:24:8;;;;-1:-1:-1;;;;;11845:6:8;;::::1;::::0;-1:-1:-1;;11845:24:8;;::::1;::::0;:6:::1;::::0;:24;;;;;;:6;;:24;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11880:21;:19;:21::i;21084:758::-:0;-1:-1:-1;;;21705:21:8;;21698:29;;;;21743:91;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21743:91:8;;;;;;;;;;;;;;;;;;;;;21084:758;;;;;;:::o;32195:1330:26:-;32351:6;;;32331:42;;;-1:-1:-1;;;32331:42:26;;;;32305:23;;-1:-1:-1;;;;;32351:6:26;;;;32331:40;;:42;;;;;;;;;;;;;32351:6;32331:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32331:42:26;;-1:-1:-1;32384:28:26;32415;32430:12;32415:14;:28::i;:::-;32384:59;;32454:28;32485;32500:12;32485:14;:28::i;:::-;-1:-1:-1;;;;;32553:22:26;;;32524:26;32553:22;;;:8;:22;;;;;;-1:-1:-1;32553:29:26;;;;32622:22;;;;;;;;:29;;32454:59;;-1:-1:-1;32553:29:26;;;;;32622;;;32748:45;;32454:59;;32553:29;;32748:24;:45;:::i;:::-;32732:61;-1:-1:-1;32804:13:26;32820:45;:20;:45;;;;;:24;:45;:::i;:::-;32881:57;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32881:57:26;;;;;;;;;;;;;;;;33016:106;33049:15;33066:12;33080:20;33102:19;33016:32;:106::i;:::-;33133;33166:15;33183:12;33197:20;33219:19;33133:32;:106::i;:::-;33323:89;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33323:89:26;;;;;;;;;;;;;33428;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33428:89:26;;;;;;;;;;;;;32195:1330;;;;;;;;;:::o;34928:345::-;35016:7;35025;35055:2;35049;:8;35045:58;;;-1:-1:-1;;35089:1:26;35080:10;;;35072:31;;35045:58;35123:2;35118;:7;35114:62;;;35147:29;35161:2;35165;35169:6;35147:13;:29::i;35114:62::-;35188:9;35199;35212:29;35226:2;35230;35234:6;35212:13;:29::i;:::-;35187:54;;;-1:-1:-1;34928:345:26;-1:-1:-1;;;;;;34928:345:26:o;29952:608::-;30112:7;;30180:1;30163:249;30187:14;:21;30183:1;:25;30163:249;;;30303:66;30333:8;:27;30342:14;30357:1;30342:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30333:27:26;;;;;;;;;;;-1:-1:-1;30333:27:26;:35;30303:25;;:15;;30319:8;;30303:25;;;;;;;;;;;;:29;;:66;;;;:::i;:::-;30234;30257:8;:34;30266:14;30281:8;30266:24;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30257:34:26;;;;;;;;;;;-1:-1:-1;30257:34:26;:42;30234:18;;:15;;30250:1;;30234:18;;;;;:66;:135;30230:170;;;30399:1;30388:12;;30230:170;30210:3;;30163:249;;;;30429:7;-1:-1:-1;;;;;30429:24:26;;30454:12;30468:8;:34;30477:14;30492:8;30477:24;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30468:34:26;;;;;;;;;;;-1:-1:-1;30468:34:26;:42;30512:12;;30526:25;;30512:12;;;;;30526:15;;30542:8;;30526:25;;;;;;;;;;;;30429:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30429:123:26;;29952:608;-1:-1:-1;;;;;;29952:608:26:o;35393:404::-;35479:7;;;35539:6;-1:-1:-1;;35539:6:26;35525:20;;;;;35508:37;;35565:6;35560:2;:11;35556:121;;;35588:9;35606:6;35615:1;35606:10;35600:2;:17;;;;;;35620:1;35600:21;35588:33;;35642:1;35636:7;;;;;;;;;35664:1;35658:7;;;;;;;;;35556:121;;35687:9;35699:33;35708:11;;;35721:10;35708:2;35728;35721:6;:10::i;:::-;35699:8;:33::i;:::-;35687:45;35755:10;;;;;-1:-1:-1;35393:404:26;;-1:-1:-1;;;;;35393:404:26:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../../LiquidityPoolConverter.sol\";\r\nimport \"../../../token/interfaces/ISmartToken.sol\";\r\nimport \"../../../utility/Types.sol\";\r\n\r\n/**\r\n * @dev Liquidity Pool v1 Converter\r\n *\r\n * The liquidity pool v1 converter is a specialized version of a converter that manages\r\n * a classic bancor liquidity pool.\r\n *\r\n * Even though pools can have many reserves, the standard pool configuration\r\n * is 2 reserves with 50%/50% weights.\r\n*/\r\ncontract LiquidityPoolV1Converter is LiquidityPoolConverter {\r\n IEtherToken internal etherToken = IEtherToken(0xc0829421C1d260BD3cB3E0F06cfE2D52db2cE315);\r\n uint256 internal constant MAX_RATE_FACTOR_LOWER_BOUND = 1e30;\r\n \r\n // the period of time taken into account when calculating the recent averate rate\r\n uint256 private constant AVERAGE_RATE_PERIOD = 10 minutes;\r\n\r\n // true if the pool is a 2 reserves / 50%/50% weights pool, false otherwise\r\n bool public isStandardPool = false;\r\n\r\n // only used in standard pools\r\n Fraction public prevAverageRate; // average rate after the previous conversion (1 reserve token 0 in reserve token 1 units)\r\n uint256 public prevAverageRateUpdateTime; // last time when the previous rate was updated (in seconds)\r\n\r\n /**\r\n * @dev triggered after a conversion with new price data\r\n * deprecated, use `TokenRateUpdate` from version 28 and up\r\n *\r\n * @param _connectorToken reserve token\r\n * @param _tokenSupply smart token supply\r\n * @param _connectorBalance reserve balance\r\n * @param _connectorWeight reserve weight\r\n */\r\n event PriceDataUpdate(\r\n IERC20Token indexed _connectorToken,\r\n uint256 _tokenSupply,\r\n uint256 _connectorBalance,\r\n uint32 _connectorWeight\r\n );\r\n\r\n /**\r\n * @dev initializes a new LiquidityPoolV1Converter instance\r\n *\r\n * @param _token pool token governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n */\r\n constructor(\r\n ISmartToken _token,\r\n IContractRegistry _registry,\r\n uint32 _maxConversionFee\r\n )\r\n LiquidityPoolConverter(_token, _registry, _maxConversionFee)\r\n public\r\n {\r\n }\r\n\r\n /**\r\n * @dev returns the converter type\r\n *\r\n * @return see the converter types in the the main contract doc\r\n */\r\n function converterType() public pure override returns (uint16) {\r\n return 1;\r\n }\r\n\r\n /**\r\n * @dev accepts ownership of the anchor after an ownership transfer\r\n * also activates the converter\r\n * can only be called by the contract owner\r\n * note that prior to version 28, you should use 'acceptTokenOwnership' instead\r\n */\r\n function acceptAnchorOwnership() public override ownerOnly {\r\n super.acceptAnchorOwnership();\r\n\r\n emit Activation(converterType(), anchor, true);\r\n }\r\n\r\n /**\r\n * @dev defines a new reserve token for the converter\r\n * can only be called by the owner while the converter is inactive\r\n *\r\n * @param _token address of the reserve token\r\n * @param _weight reserve weight, represented in ppm, 1-1000000\r\n */\r\n function addReserve(IERC20Token _token, uint32 _weight) public override ownerOnly {\r\n super.addReserve(_token, _weight);\r\n\r\n isStandardPool =\r\n reserveTokens.length == 2 &&\r\n reserves[reserveTokens[0]].weight == 500000 &&\r\n reserves[reserveTokens[1]].weight == 500000;\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting one reserve to another along with the fee\r\n *\r\n * @param _sourceToken contract address of the source reserve token\r\n * @param _targetToken contract address of the target reserve token\r\n * @param _amount amount of tokens received from the user\r\n *\r\n * @return expected target amount\r\n * @return expected fee\r\n */\r\n function targetAmountAndFee(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount)\r\n public\r\n view\r\n override\r\n active\r\n validReserve(_sourceToken)\r\n validReserve(_targetToken)\r\n returns (uint256, uint256)\r\n {\r\n // validate input\r\n require(_sourceToken != _targetToken, \"ERR_SAME_SOURCE_TARGET\");\r\n\r\n uint256 amount = IBancorFormula(addressOf(BANCOR_FORMULA)).crossReserveTargetAmount(\r\n reserveBalance(_sourceToken),\r\n reserves[_sourceToken].weight,\r\n reserveBalance(_targetToken),\r\n reserves[_targetToken].weight,\r\n _amount\r\n );\r\n\r\n // return the amount minus the conversion fee and the conversion fee\r\n uint256 fee = calculateFee(amount);\r\n return (amount - fee, fee);\r\n }\r\n\r\n /**\r\n * @dev converts a specific amount of source tokens to target tokens\r\n * can only be called by the bancor network contract\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _amount amount of tokens to convert (in units of the source token)\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received (in units of the target token)\r\n */\r\n function doConvert(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, address _trader, address payable _beneficiary)\r\n internal\r\n override\r\n returns (uint256)\r\n {\r\n // get expected target amount and fee\r\n (uint256 amount, uint256 fee) = targetAmountAndFee(_sourceToken, _targetToken, _amount);\r\n\r\n // ensure that the trade gives something in return\r\n require(amount != 0, \"ERR_ZERO_TARGET_AMOUNT\");\r\n\r\n // ensure that the trade won't deplete the reserve balance\r\n assert(amount < reserveBalance(_targetToken));\r\n\r\n // ensure that the input amount was already deposited\r\n if (_sourceToken == ETH_RESERVE_ADDRESS)\r\n require(msg.value == _amount, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n else\r\n require(msg.value == 0 && _sourceToken.balanceOf(address(this)).sub(reserveBalance(_sourceToken)) >= _amount, \"ERR_INVALID_AMOUNT\");\r\n\r\n // sync the reserve balances\r\n syncReserveBalance(_sourceToken);\r\n reserves[_targetToken].balance = reserves[_targetToken].balance.sub(amount);\r\n\r\n // transfer funds to the beneficiary in the to reserve token\r\n if (_targetToken == ETH_RESERVE_ADDRESS)\r\n _beneficiary.transfer(amount);\r\n else\r\n safeTransfer(_targetToken, _beneficiary, amount);\r\n\r\n // update the recent average rate\r\n if (isStandardPool && prevAverageRateUpdateTime < time()) {\r\n prevAverageRate = recentAverageRate();\r\n prevAverageRateUpdateTime = time();\r\n }\r\n\r\n // dispatch the conversion event\r\n dispatchConversionEvent(_sourceToken, _targetToken, _trader, _amount, amount, fee);\r\n\r\n // dispatch rate updates\r\n dispatchTokenRateUpdateEvents(_sourceToken, _targetToken);\r\n\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev returns the recent average rate of 1 `_token` in the other reserve token units\r\n * note that the rate can only be queried for reserves in a standard pool\r\n *\r\n * @param _token token to get the rate for\r\n * @return recent average rate between the reserves (numerator)\r\n * @return recent average rate between the reserves (denominator)\r\n */\r\n function recentAverageRate(IERC20Token _token) external view returns (uint256, uint256) {\r\n // verify that the pool is standard\r\n require(isStandardPool, \"ERR_NON_STANDARD_POOL\");\r\n\r\n // get the recent average rate of reserve 0\r\n Fraction memory rate = recentAverageRate();\r\n if (_token == reserveTokens[0]) {\r\n return (rate.n, rate.d);\r\n }\r\n\r\n return (rate.d, rate.n);\r\n }\r\n\r\n /**\r\n * @dev returns the recent average rate of 1 reserve token 0 in reserve token 1 units\r\n *\r\n * @return recent average rate between the reserves\r\n */\r\n function recentAverageRate() internal view returns (Fraction memory) {\r\n // get the elapsed time since the previous average rate was calculated\r\n uint256 timeElapsed = time() - prevAverageRateUpdateTime;\r\n\r\n // if the previous average rate was calculated in the current block, return it\r\n if (timeElapsed == 0) {\r\n return prevAverageRate;\r\n }\r\n\r\n // get the current rate between the reserves\r\n uint256 currentRateN = reserves[reserveTokens[1]].balance;\r\n uint256 currentRateD = reserves[reserveTokens[0]].balance;\r\n\r\n // if the previous average rate was calculated a while ago, the average rate is equal to the current rate\r\n if (timeElapsed >= AVERAGE_RATE_PERIOD) {\r\n return Fraction({ n: currentRateN, d: currentRateD });\r\n }\r\n\r\n // given N as the sampling window, the new rate is calculated according to the following formula:\r\n // newRate = prevAverageRate + timeElapsed * [currentRate - prevAverageRate] / N\r\n\r\n // calculate the numerator and the denumerator of the new rate\r\n Fraction memory prevAverage = prevAverageRate;\r\n\r\n uint256 x = prevAverage.d.mul(currentRateN);\r\n uint256 y = prevAverage.n.mul(currentRateD);\r\n\r\n // since we know that timeElapsed < AVERAGE_RATE_PERIOD, we can avoid using SafeMath:\r\n uint256 newRateN = y.mul(AVERAGE_RATE_PERIOD - timeElapsed).add(x.mul(timeElapsed));\r\n uint256 newRateD = prevAverage.d.mul(currentRateD).mul(AVERAGE_RATE_PERIOD);\r\n\r\n (newRateN, newRateD) = reducedRatio(newRateN, newRateD, MAX_RATE_FACTOR_LOWER_BOUND);\r\n return Fraction({ n: newRateN, d: newRateD });\r\n }\r\n\r\n /**\r\n * @dev increases the pool's liquidity and mints new shares in the pool to the caller\r\n * note that prior to version 28, you should use 'fund' instead\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveAmounts amount of each reserve token\r\n * @param _minReturn token minimum return-amount\r\n *\r\n * @return amount of pool tokens issued\r\n */\r\n function addLiquidity(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts, uint256 _minReturn)\r\n public\r\n payable\r\n protected\r\n active\r\n returns (uint256)\r\n {\r\n // verify the user input\r\n verifyLiquidityInput(_reserveTokens, _reserveAmounts, _minReturn);\r\n\r\n // if one of the reserves is ETH, then verify that the input amount of ETH is equal to the input value of ETH\r\n for (uint256 i = 0; i < _reserveTokens.length; i++)\r\n if (_reserveTokens[i] == ETH_RESERVE_ADDRESS)\r\n require(_reserveAmounts[i] == msg.value, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n\r\n // if the input value of ETH is larger than zero, then verify that one of the reserves is ETH\r\n if (msg.value > 0) {\r\n require(reserves[ETH_RESERVE_ADDRESS].isSet, \"ERR_NO_ETH_RESERVE\");\r\n }\r\n\r\n // get the total supply\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n\r\n // transfer from the user an equally-worth amount of each one of the reserve tokens\r\n uint256 amount = addLiquidityToPool(_reserveTokens, _reserveAmounts, totalSupply);\r\n\r\n // verify that the equivalent amount of tokens is equal to or larger than the user's expectation\r\n require(amount >= _minReturn, \"ERR_RETURN_TOO_LOW\");\r\n\r\n // issue the tokens to the user\r\n ISmartToken(address(anchor)).issue(msg.sender, amount);\r\n\r\n // return the amount of pool tokens issued\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev decreases the pool's liquidity and burns the caller's shares in the pool\r\n * note that prior to version 28, you should use 'liquidate' instead\r\n *\r\n * @param _amount token amount\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveMinReturnAmounts minimum return-amount of each reserve token\r\n *\r\n * @return the amount of each reserve token granted for the given amount of pool tokens\r\n */\r\n function removeLiquidity(uint256 _amount, IERC20Token[] memory _reserveTokens, uint256[] memory _reserveMinReturnAmounts)\r\n public\r\n protected\r\n active\r\n returns (uint256[] memory)\r\n {\r\n // verify the user input\r\n verifyLiquidityInput(_reserveTokens, _reserveMinReturnAmounts, _amount);\r\n\r\n // get the total supply BEFORE destroying the user tokens\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n\r\n // destroy the user tokens\r\n ISmartToken(address(anchor)).destroy(msg.sender, _amount);\r\n\r\n // transfer to the user an equivalent amount of each one of the reserve tokens\r\n return removeLiquidityFromPool(_reserveTokens, _reserveMinReturnAmounts, totalSupply, _amount);\r\n }\r\n\r\n /**\r\n * @dev increases the pool's liquidity and mints new shares in the pool to the caller\r\n * for example, if the caller increases the supply by 10%,\r\n * then it will cost an amount equal to 10% of each reserve token balance\r\n * note that starting from version 28, you should use 'addLiquidity' instead\r\n *\r\n * @param _amount amount to increase the supply by (in the pool token)\r\n *\r\n * @return amount of pool tokens issued\r\n */\r\n function fund(uint256 _amount)\r\n public\r\n payable\r\n protected\r\n returns (uint256)\r\n {\r\n syncReserveBalances();\r\n reserves[ETH_RESERVE_ADDRESS].balance = reserves[ETH_RESERVE_ADDRESS].balance.sub(msg.value);\r\n\r\n uint256 supply = ISmartToken(address(anchor)).totalSupply();\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n\r\n // iterate through the reserve tokens and transfer a percentage equal to the weight between\r\n // _amount and the total supply in each reserve from the caller to the converter\r\n uint256 reserveCount = reserveTokens.length;\r\n for (uint256 i = 0; i < reserveCount; i++) {\r\n IERC20Token reserveToken = reserveTokens[i];\r\n uint256 rsvBalance = reserves[reserveToken].balance;\r\n uint256 reserveAmount = formula.fundCost(supply, rsvBalance, reserveRatio, _amount);\r\n\r\n // transfer funds from the caller in the reserve token\r\n if (reserveToken == ETH_RESERVE_ADDRESS) {\r\n if (msg.value > reserveAmount) {\r\n msg.sender.transfer(msg.value - reserveAmount);\r\n }\r\n else if (msg.value < reserveAmount) {\r\n require(msg.value == 0, \"ERR_INVALID_ETH_VALUE\");\r\n safeTransferFrom(etherToken, msg.sender, address(this), reserveAmount);\r\n etherToken.withdraw(reserveAmount);\r\n }\r\n }\r\n else {\r\n safeTransferFrom(reserveToken, msg.sender, address(this), reserveAmount);\r\n }\r\n\r\n // sync the reserve balance\r\n uint256 newReserveBalance = rsvBalance.add(reserveAmount);\r\n reserves[reserveToken].balance = newReserveBalance;\r\n\r\n uint256 newPoolTokenSupply = supply.add(_amount);\r\n\r\n // dispatch liquidity update for the pool token/reserve\r\n emit LiquidityAdded(msg.sender, reserveToken, reserveAmount, newReserveBalance, newPoolTokenSupply);\r\n\r\n // dispatch the `TokenRateUpdate` event for the pool token\r\n dispatchPoolTokenRateUpdateEvent(newPoolTokenSupply, reserveToken, newReserveBalance, reserves[reserveToken].weight);\r\n }\r\n\r\n // issue new funds to the caller in the pool token\r\n ISmartToken(address(anchor)).issue(msg.sender, _amount);\r\n\r\n // return the amount of pool tokens issued\r\n return _amount;\r\n }\r\n\r\n /**\r\n * @dev decreases the pool's liquidity and burns the caller's shares in the pool\r\n * for example, if the holder sells 10% of the supply,\r\n * then they will receive 10% of each reserve token balance in return\r\n * note that starting from version 28, you should use 'removeLiquidity' instead\r\n *\r\n * @param _amount amount to liquidate (in the pool token)\r\n *\r\n * @return the amount of each reserve token granted for the given amount of pool tokens\r\n */\r\n function liquidate(uint256 _amount)\r\n public\r\n protected\r\n returns (uint256[] memory)\r\n {\r\n require(_amount > 0, \"ERR_ZERO_AMOUNT\");\r\n\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n ISmartToken(address(anchor)).destroy(msg.sender, _amount);\r\n\r\n uint256[] memory reserveMinReturnAmounts = new uint256[](reserveTokens.length);\r\n for (uint256 i = 0; i < reserveMinReturnAmounts.length; i++)\r\n reserveMinReturnAmounts[i] = 1;\r\n\r\n return removeLiquidityFromPool(reserveTokens, reserveMinReturnAmounts, totalSupply, _amount);\r\n }\r\n\r\n /**\r\n * @dev given the amount of one of the reserve tokens to add liquidity of,\r\n * returns the required amount of each one of the other reserve tokens\r\n * since an empty pool can be funded with any list of non-zero input amounts,\r\n * this function assumes that the pool is not empty (has already been funded)\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveTokenIndex index of the relevant reserve token\r\n * @param _reserveAmount amount of the relevant reserve token\r\n *\r\n * @return the required amount of each one of the reserve tokens\r\n */\r\n function addLiquidityCost(IERC20Token[] memory _reserveTokens, uint256 _reserveTokenIndex, uint256 _reserveAmount)\r\n public\r\n view\r\n returns (uint256[] memory)\r\n {\r\n uint256[] memory reserveAmounts = new uint256[](_reserveTokens.length);\r\n\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n uint256 amount = formula.fundSupplyAmount(totalSupply, reserves[_reserveTokens[_reserveTokenIndex]].balance, reserveRatio, _reserveAmount);\r\n\r\n for (uint256 i = 0; i < reserveAmounts.length; i++)\r\n reserveAmounts[i] = formula.fundCost(totalSupply, reserves[_reserveTokens[i]].balance, reserveRatio, amount);\r\n\r\n return reserveAmounts;\r\n }\r\n\r\n /**\r\n * @dev given the amount of one of the reserve tokens to add liquidity of,\r\n * returns the amount of pool tokens entitled for it\r\n * since an empty pool can be funded with any list of non-zero input amounts,\r\n * this function assumes that the pool is not empty (has already been funded)\r\n *\r\n * @param _reserveToken address of the reserve token\r\n * @param _reserveAmount amount of the reserve token\r\n *\r\n * @return the amount of pool tokens entitled\r\n */\r\n function addLiquidityReturn(IERC20Token _reserveToken, uint256 _reserveAmount)\r\n public\r\n view\r\n returns (uint256)\r\n {\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n return formula.fundSupplyAmount(totalSupply, reserves[_reserveToken].balance, reserveRatio, _reserveAmount);\r\n }\r\n\r\n /**\r\n * @dev returns the amount of each reserve token entitled for a given amount of pool tokens\r\n *\r\n * @param _amount amount of pool tokens\r\n * @param _reserveTokens address of each reserve token\r\n *\r\n * @return the amount of each reserve token entitled for the given amount of pool tokens\r\n */\r\n function removeLiquidityReturn(uint256 _amount, IERC20Token[] memory _reserveTokens)\r\n public\r\n view\r\n returns (uint256[] memory)\r\n {\r\n uint256 totalSupply = ISmartToken(address(anchor)).totalSupply();\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n return removeLiquidityReserveAmounts(_amount, _reserveTokens, totalSupply, formula);\r\n }\r\n\r\n /**\r\n * @dev verifies that a given array of tokens is identical to the converter's array of reserve tokens\r\n * we take this input in order to allow specifying the corresponding reserve amounts in any order\r\n *\r\n * @param _reserveTokens array of reserve tokens\r\n * @param _reserveAmounts array of reserve amounts\r\n * @param _amount token amount\r\n */\r\n function verifyLiquidityInput(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts, uint256 _amount)\r\n private\r\n view\r\n {\r\n uint256 i;\r\n uint256 j;\r\n\r\n uint256 length = reserveTokens.length;\r\n require(length == _reserveTokens.length, \"ERR_INVALID_RESERVE\");\r\n require(length == _reserveAmounts.length, \"ERR_INVALID_AMOUNT\");\r\n\r\n for (i = 0; i < length; i++) {\r\n // verify that every input reserve token is included in the reserve tokens\r\n require(reserves[_reserveTokens[i]].isSet, \"ERR_INVALID_RESERVE\");\r\n for (j = 0; j < length; j++) {\r\n if (reserveTokens[i] == _reserveTokens[j])\r\n break;\r\n }\r\n // verify that every reserve token is included in the input reserve tokens\r\n require(j < length, \"ERR_INVALID_RESERVE\");\r\n // verify that every input reserve token amount is larger than zero\r\n require(_reserveAmounts[i] > 0, \"ERR_INVALID_AMOUNT\");\r\n }\r\n\r\n // verify that the input token amount is larger than zero\r\n require(_amount > 0, \"ERR_ZERO_AMOUNT\");\r\n }\r\n\r\n /**\r\n * @dev adds liquidity (reserve) to the pool\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveAmounts amount of each reserve token\r\n * @param _totalSupply token total supply\r\n *\r\n * @return amount of pool tokens issued\r\n */\r\n function addLiquidityToPool(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts, uint256 _totalSupply)\r\n private\r\n returns (uint256)\r\n {\r\n if (_totalSupply == 0)\r\n return addLiquidityToEmptyPool(_reserveTokens, _reserveAmounts);\r\n return addLiquidityToNonEmptyPool(_reserveTokens, _reserveAmounts, _totalSupply);\r\n }\r\n\r\n /**\r\n * @dev adds liquidity (reserve) to the pool when it's empty\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveAmounts amount of each reserve token\r\n *\r\n * @return amount of pool tokens issued\r\n */\r\n function addLiquidityToEmptyPool(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts)\r\n private\r\n returns (uint256)\r\n {\r\n // calculate the geometric-mean of the reserve amounts approved by the user\r\n uint256 amount = geometricMean(_reserveAmounts);\r\n\r\n // transfer each one of the reserve amounts from the user to the pool\r\n for (uint256 i = 0; i < _reserveTokens.length; i++) {\r\n IERC20Token reserveToken = _reserveTokens[i];\r\n uint256 reserveAmount = _reserveAmounts[i];\r\n\r\n if (reserveToken != ETH_RESERVE_ADDRESS) // ETH has already been transferred as part of the transaction\r\n safeTransferFrom(reserveToken, msg.sender, address(this), reserveAmount);\r\n\r\n reserves[reserveToken].balance = reserveAmount;\r\n\r\n emit LiquidityAdded(msg.sender, reserveToken, reserveAmount, reserveAmount, amount);\r\n\r\n // dispatch the `TokenRateUpdate` event for the pool token\r\n dispatchPoolTokenRateUpdateEvent(amount, reserveToken, reserveAmount, reserves[reserveToken].weight);\r\n }\r\n\r\n // return the amount of pool tokens issued\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev adds liquidity (reserve) to the pool when it's not empty\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveAmounts amount of each reserve token\r\n * @param _totalSupply token total supply\r\n *\r\n * @return amount of pool tokens issued\r\n */\r\n function addLiquidityToNonEmptyPool(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts, uint256 _totalSupply)\r\n private\r\n returns (uint256)\r\n {\r\n syncReserveBalances();\r\n reserves[ETH_RESERVE_ADDRESS].balance = reserves[ETH_RESERVE_ADDRESS].balance.sub(msg.value);\r\n\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n uint256 amount = getMinShare(formula, _totalSupply, _reserveTokens, _reserveAmounts);\r\n uint256 newPoolTokenSupply = _totalSupply.add(amount);\r\n\r\n for (uint256 i = 0; i < _reserveTokens.length; i++) {\r\n IERC20Token reserveToken = _reserveTokens[i];\r\n uint256 rsvBalance = reserves[reserveToken].balance;\r\n uint256 reserveAmount = formula.fundCost(_totalSupply, rsvBalance, reserveRatio, amount);\r\n require(reserveAmount > 0, \"ERR_ZERO_TARGET_AMOUNT\");\r\n assert(reserveAmount <= _reserveAmounts[i]);\r\n\r\n // transfer each one of the reserve amounts from the user to the pool\r\n if (reserveToken != ETH_RESERVE_ADDRESS) // ETH has already been transferred as part of the transaction\r\n safeTransferFrom(reserveToken, msg.sender, address(this), reserveAmount);\r\n else if (_reserveAmounts[i] > reserveAmount) // transfer the extra amount of ETH back to the user\r\n msg.sender.transfer(_reserveAmounts[i] - reserveAmount);\r\n\r\n uint256 newReserveBalance = rsvBalance.add(reserveAmount);\r\n reserves[reserveToken].balance = newReserveBalance;\r\n\r\n emit LiquidityAdded(msg.sender, reserveToken, reserveAmount, newReserveBalance, newPoolTokenSupply);\r\n\r\n // dispatch the `TokenRateUpdate` event for the pool token\r\n dispatchPoolTokenRateUpdateEvent(newPoolTokenSupply, reserveToken, newReserveBalance, reserves[reserveToken].weight);\r\n }\r\n\r\n // return the amount of pool tokens issued\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev returns the amount of each reserve token entitled for a given amount of pool tokens\r\n *\r\n * @param _amount amount of pool tokens\r\n * @param _reserveTokens address of each reserve token\r\n * @param _totalSupply token total supply\r\n * @param _formula formula contract\r\n *\r\n * @return the amount of each reserve token entitled for the given amount of pool tokens\r\n */\r\n function removeLiquidityReserveAmounts(uint256 _amount, IERC20Token[] memory _reserveTokens, uint256 _totalSupply, IBancorFormula _formula)\r\n private\r\n view\r\n returns (uint256[] memory)\r\n {\r\n uint256[] memory reserveAmounts = new uint256[](_reserveTokens.length);\r\n for (uint256 i = 0; i < reserveAmounts.length; i++)\r\n reserveAmounts[i] = _formula.liquidateReserveAmount(_totalSupply, reserves[_reserveTokens[i]].balance, reserveRatio, _amount);\r\n return reserveAmounts;\r\n }\r\n\r\n /**\r\n * @dev removes liquidity (reserve) from the pool\r\n *\r\n * @param _reserveTokens address of each reserve token\r\n * @param _reserveMinReturnAmounts minimum return-amount of each reserve token\r\n * @param _totalSupply token total supply\r\n * @param _amount token amount\r\n *\r\n * @return the amount of each reserve token granted for the given amount of pool tokens\r\n */\r\n function removeLiquidityFromPool(IERC20Token[] memory _reserveTokens, uint256[] memory _reserveMinReturnAmounts, uint256 _totalSupply, uint256 _amount)\r\n private\r\n returns (uint256[] memory)\r\n {\r\n syncReserveBalances();\r\n\r\n IBancorFormula formula = IBancorFormula(addressOf(BANCOR_FORMULA));\r\n uint256 newPoolTokenSupply = _totalSupply.sub(_amount);\r\n uint256[] memory reserveAmounts = removeLiquidityReserveAmounts(_amount, _reserveTokens, _totalSupply, formula);\r\n\r\n for (uint256 i = 0; i < _reserveTokens.length; i++) {\r\n IERC20Token reserveToken = _reserveTokens[i];\r\n uint256 reserveAmount = reserveAmounts[i];\r\n require(reserveAmount >= _reserveMinReturnAmounts[i], \"ERR_ZERO_TARGET_AMOUNT\");\r\n\r\n uint256 newReserveBalance = reserves[reserveToken].balance.sub(reserveAmount);\r\n reserves[reserveToken].balance = newReserveBalance;\r\n\r\n // transfer each one of the reserve amounts from the pool to the user\r\n if (reserveToken == ETH_RESERVE_ADDRESS)\r\n msg.sender.transfer(reserveAmount);\r\n else\r\n safeTransfer(reserveToken, msg.sender, reserveAmount);\r\n\r\n emit LiquidityRemoved(msg.sender, reserveToken, reserveAmount, newReserveBalance, newPoolTokenSupply);\r\n\r\n // dispatch the `TokenRateUpdate` event for the pool token\r\n dispatchPoolTokenRateUpdateEvent(newPoolTokenSupply, reserveToken, newReserveBalance, reserves[reserveToken].weight);\r\n }\r\n\r\n // return the amount of each reserve token granted for the given amount of pool tokens\r\n return reserveAmounts;\r\n }\r\n\r\n function getMinShare(IBancorFormula formula, uint256 _totalSupply, IERC20Token[] memory _reserveTokens, uint256[] memory _reserveAmounts) private view returns (uint256) {\r\n uint256 minIndex = 0;\r\n for (uint256 i = 1; i < _reserveTokens.length; i++) {\r\n if (_reserveAmounts[i].mul(reserves[_reserveTokens[minIndex]].balance) < _reserveAmounts[minIndex].mul(reserves[_reserveTokens[i]].balance))\r\n minIndex = i;\r\n }\r\n return formula.fundSupplyAmount(_totalSupply, reserves[_reserveTokens[minIndex]].balance, reserveRatio, _reserveAmounts[minIndex]);\r\n }\r\n\r\n /**\r\n * @dev returns the number of decimal digits in a given value\r\n *\r\n * @param _x value (assumed positive)\r\n *\r\n * @return the number of decimal digits in the given value\r\n */\r\n function decimalLength(uint256 _x) public pure returns (uint256) {\r\n uint256 y = 0;\r\n for (uint256 x = _x; x > 0; x /= 10)\r\n y++;\r\n return y;\r\n }\r\n\r\n /**\r\n * @dev returns the nearest integer to a given quotient\r\n *\r\n * @param _n quotient numerator\r\n * @param _d quotient denominator\r\n *\r\n * @return the nearest integer to the given quotient\r\n */\r\n function roundDiv(uint256 _n, uint256 _d) public pure returns (uint256) {\r\n return (_n + _d / 2) / _d;\r\n }\r\n\r\n /**\r\n * @dev returns the average number of decimal digits in a given list of values\r\n *\r\n * @param _values list of values (each of which assumed positive)\r\n *\r\n * @return the average number of decimal digits in the given list of values\r\n */\r\n function geometricMean(uint256[] memory _values) public pure returns (uint256) {\r\n uint256 numOfDigits = 0;\r\n uint256 length = _values.length;\r\n for (uint256 i = 0; i < length; i++)\r\n numOfDigits += decimalLength(_values[i]);\r\n return uint256(10) ** (roundDiv(numOfDigits, length) - 1);\r\n }\r\n\r\n /**\r\n * @dev dispatches token rate update events for the reserve tokens and the pool token\r\n *\r\n * @param _sourceToken address of the source reserve token\r\n * @param _targetToken address of the target reserve token\r\n */\r\n function dispatchTokenRateUpdateEvents(IERC20Token _sourceToken, IERC20Token _targetToken) private {\r\n uint256 poolTokenSupply = ISmartToken(address(anchor)).totalSupply();\r\n uint256 sourceReserveBalance = reserveBalance(_sourceToken);\r\n uint256 targetReserveBalance = reserveBalance(_targetToken);\r\n uint32 sourceReserveWeight = reserves[_sourceToken].weight;\r\n uint32 targetReserveWeight = reserves[_targetToken].weight;\r\n\r\n // dispatch token rate update event for the reserve tokens\r\n uint256 rateN = targetReserveBalance.mul(sourceReserveWeight);\r\n uint256 rateD = sourceReserveBalance.mul(targetReserveWeight);\r\n emit TokenRateUpdate(_sourceToken, _targetToken, rateN, rateD);\r\n\r\n // dispatch token rate update events for the pool token\r\n dispatchPoolTokenRateUpdateEvent(poolTokenSupply, _sourceToken, sourceReserveBalance, sourceReserveWeight);\r\n dispatchPoolTokenRateUpdateEvent(poolTokenSupply, _targetToken, targetReserveBalance, targetReserveWeight);\r\n\r\n // dispatch price data update events (deprecated events)\r\n emit PriceDataUpdate(_sourceToken, poolTokenSupply, sourceReserveBalance, sourceReserveWeight);\r\n emit PriceDataUpdate(_targetToken, poolTokenSupply, targetReserveBalance, targetReserveWeight);\r\n }\r\n\r\n /**\r\n * @dev dispatches token rate update event for the pool token\r\n *\r\n * @param _poolTokenSupply total pool token supply\r\n * @param _reserveToken address of the reserve token\r\n * @param _reserveBalance reserve balance\r\n * @param _reserveWeight reserve weight\r\n */\r\n function dispatchPoolTokenRateUpdateEvent(uint256 _poolTokenSupply, IERC20Token _reserveToken, uint256 _reserveBalance, uint32 _reserveWeight) private {\r\n emit TokenRateUpdate(ISmartToken(address(anchor)), _reserveToken, _reserveBalance.mul(PPM_RESOLUTION), _poolTokenSupply.mul(_reserveWeight));\r\n }\r\n\r\n /**\r\n * @dev returns the current time\r\n * utility to allow overrides for tests\r\n */\r\n function time() internal view virtual returns (uint256) {\r\n return now;\r\n }\r\n\r\n /**\r\n * @dev computes a reduced-scalar ratio\r\n *\r\n * @param _n ratio numerator\r\n * @param _d ratio denominator\r\n * @param _max maximum desired scalar\r\n *\r\n * @return ratio's numerator and denominator\r\n */\r\n function reducedRatio(uint256 _n, uint256 _d, uint256 _max) internal pure returns (uint256, uint256) {\r\n if (_n > _max || _d > _max)\r\n return normalizedRatio(_n, _d, _max);\r\n return (_n, _d);\r\n }\r\n\r\n /**\r\n * @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\".\r\n */\r\n function normalizedRatio(uint256 _a, uint256 _b, uint256 _scale) internal pure returns (uint256, uint256) {\r\n if (_a == _b)\r\n return (_scale / 2, _scale / 2);\r\n if (_a < _b)\r\n return accurateRatio(_a, _b, _scale);\r\n (uint256 y, uint256 x) = accurateRatio(_b, _a, _scale);\r\n return (x, y);\r\n }\r\n\r\n /**\r\n * @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\", assuming that \"a < b\".\r\n */\r\n function accurateRatio(uint256 _a, uint256 _b, uint256 _scale) internal pure returns (uint256, uint256) {\r\n uint256 maxVal = uint256(-1) / _scale;\r\n if (_a > maxVal) {\r\n uint256 c = _a / (maxVal + 1) + 1;\r\n _a /= c;\r\n _b /= c;\r\n }\r\n uint256 x = roundDiv(_a * _scale, _a.add(_b));\r\n uint256 y = _scale - x;\r\n return (x, y);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "exportedSymbols": { + "LiquidityPoolV1Converter": [ + 16593 + ] + }, + "id": 16594, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 14420, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:26" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "file": "../../LiquidityPoolConverter.sol", + "id": 14421, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 13078, + "src": "77:42:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 14422, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 21517, + "src": "121:51:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol", + "file": "../../../utility/Types.sol", + "id": 14423, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 22917, + "src": "174:36:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 14425, + "name": "LiquidityPoolConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13077, + "src": "556:22:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolConverter_$13077", + "typeString": "contract LiquidityPoolConverter" + } + }, + "id": 14426, + "nodeType": "InheritanceSpecifier", + "src": "556:22:26" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": { + "id": 14424, + "nodeType": "StructuredDocumentation", + "src": "214:303:26", + "text": " @dev Liquidity Pool v1 Converter\n The liquidity pool v1 converter is a specialized version of a converter that manages\n a classic bancor liquidity pool.\n Even though pools can have many reserves, the standard pool configuration\n is 2 reserves with 50%/50% weights." + }, + "fullyImplemented": true, + "id": 16593, + "linearizedBaseContracts": [ + 16593, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "LiquidityPoolV1Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 14431, + "mutability": "mutable", + "name": "etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "586:89:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 14427, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21487, + "src": "586:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307863303832393432314331643236304244336342334530463036636645324435326462326345333135", + "id": 14429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "632:42:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xc0829421C1d260BD3cB3E0F06cfE2D52db2cE315" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 14428, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21487, + "src": "620:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21487_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 14430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "620:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 14434, + "mutability": "constant", + "name": "MAX_RATE_FACTOR_LOWER_BOUND", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "682:60:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "682:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31653330", + "id": 14433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "738:4:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000000000000000_by_1", + "typeString": "int_const 1000000000000000000000000000000" + }, + "value": "1e30" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 14437, + "mutability": "constant", + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "842:57:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14435, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "842:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3130", + "id": 14436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "889:10:26", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_600_by_1", + "typeString": "int_const 600" + }, + "value": "10" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "38e9f27a", + "id": 14440, + "mutability": "mutable", + "name": "isStandardPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "989:34:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 14438, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "989:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 14439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1018:5:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e2c52468", + "id": 14442, + "mutability": "mutable", + "name": "prevAverageRate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "1068:31:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14441, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "1068:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1d4db791", + "id": 14444, + "mutability": "mutable", + "name": "prevAverageRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "1206:40:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1206:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 14445, + "nodeType": "StructuredDocumentation", + "src": "1316:361:26", + "text": " @dev triggered after a conversion with new price data\n deprecated, use `TokenRateUpdate` from version 28 and up\n @param _connectorToken reserve token\n @param _tokenSupply smart token supply\n @param _connectorBalance reserve balance\n @param _connectorWeight reserve weight" + }, + "id": 14455, + "name": "PriceDataUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 14454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14447, + "indexed": true, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1715:35:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14446, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1715:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14449, + "indexed": false, + "mutability": "mutable", + "name": "_tokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1761:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1761:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14451, + "indexed": false, + "mutability": "mutable", + "name": "_connectorBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1792:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1792:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14453, + "indexed": false, + "mutability": "mutable", + "name": "_connectorWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1828:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14452, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1828:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1704:154:26" + }, + "src": "1683:176:26" + }, + { + "body": { + "id": 14470, + "nodeType": "Block", + "src": "2402:8:26", + "statements": [] + }, + "documentation": { + "id": 14456, + "nodeType": "StructuredDocumentation", + "src": "1867:317:26", + "text": " @dev initializes a new LiquidityPoolV1Converter instance\n @param _token pool token governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 14471, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 14465, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14458, + "src": "2343:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14466, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14460, + "src": "2351:9:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 14467, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14462, + "src": "2362:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 14468, + "modifierName": { + "argumentTypes": null, + "id": 14464, + "name": "LiquidityPoolConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13077, + "src": "2320:22:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolConverter_$13077_$", + "typeString": "type(contract LiquidityPoolConverter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2320:60:26" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14458, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2212:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 14457, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "2212:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14460, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2241:27:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 14459, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "2241:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14462, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2279:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14461, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2279:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2201:109:26" + }, + "returnParameters": { + "id": 14469, + "nodeType": "ParameterList", + "parameters": [], + "src": "2402:0:26" + }, + "scope": 16593, + "src": "2190:220:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 14480, + "nodeType": "Block", + "src": "2618:27:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2636:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 14477, + "id": 14479, + "nodeType": "Return", + "src": "2629:8:26" + } + ] + }, + "documentation": { + "id": 14472, + "nodeType": "StructuredDocumentation", + "src": "2418:131:26", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 14481, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14474, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2592:8:26" + }, + "parameters": { + "id": 14473, + "nodeType": "ParameterList", + "parameters": [], + "src": "2577:2:26" + }, + "returnParameters": { + "id": 14477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14476, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14481, + "src": "2610:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 14475, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2610:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2609:8:26" + }, + "scope": 16593, + "src": "2555:90:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13076 + ], + "body": { + "id": 14500, + "nodeType": "Block", + "src": "2977:107:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 14488, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2988:5:26", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV1Converter_$16593", + "typeString": "contract super LiquidityPoolV1Converter" + } + }, + "id": 14490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13076, + "src": "2988:27:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 14491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2988:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14492, + "nodeType": "ExpressionStatement", + "src": "2988:29:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14494, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 14481 + ], + "referencedDeclaration": 14481, + "src": "3046:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 14495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3046:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 14496, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3063:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 14497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3071:4:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14493, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "3035:10:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 14498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3035:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14499, + "nodeType": "EmitStatement", + "src": "3030:46:26" + } + ] + }, + "documentation": { + "id": 14482, + "nodeType": "StructuredDocumentation", + "src": "2653:259:26", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 14501, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14486, + "modifierName": { + "argumentTypes": null, + "id": 14485, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "2967:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2967:9:26" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14484, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2958:8:26" + }, + "parameters": { + "id": 14483, + "nodeType": "ParameterList", + "parameters": [], + "src": "2948:2:26" + }, + "returnParameters": { + "id": 14487, + "nodeType": "ParameterList", + "parameters": [], + "src": "2977:0:26" + }, + "scope": 16593, + "src": "2918:166:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 14544, + "nodeType": "Block", + "src": "3458:240:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14515, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14504, + "src": "3486:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14516, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14506, + "src": "3494:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 14512, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3469:5:26", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV1Converter_$16593", + "typeString": "contract super LiquidityPoolV1Converter" + } + }, + "id": 14514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "3469:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 14517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3469:33:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14518, + "nodeType": "ExpressionStatement", + "src": "3469:33:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14519, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "3515:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14520, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3545:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3545:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 14522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3569:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3545:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 14531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14524, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3587:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14528, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14525, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3596:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14527, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3610:1:26", + "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": "3596:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3587:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14529, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "3587:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "353030303030", + "id": 14530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3624:6:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_500000_by_1", + "typeString": "int_const 500000" + }, + "value": "500000" + }, + "src": "3587:43:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3545:85:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 14540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14533, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3647:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14537, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14534, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3656:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14536, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3670:1:26", + "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": "3656:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3647:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "3647:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "353030303030", + "id": 14539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3684:6:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_500000_by_1", + "typeString": "int_const 500000" + }, + "value": "500000" + }, + "src": "3647:43:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3545:145:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3515:175:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 14543, + "nodeType": "ExpressionStatement", + "src": "3515:175:26" + } + ] + }, + "documentation": { + "id": 14502, + "nodeType": "StructuredDocumentation", + "src": "3092:278:26", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 14545, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14510, + "modifierName": { + "argumentTypes": null, + "id": 14509, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "3448:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3448:9:26" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3439:8:26" + }, + "parameters": { + "id": 14507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14504, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14545, + "src": "3396:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14503, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "3396:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14506, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14545, + "src": "3416:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14505, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3416:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3395:36:26" + }, + "returnParameters": { + "id": 14511, + "nodeType": "ParameterList", + "parameters": [], + "src": "3458:0:26" + }, + "scope": 16593, + "src": "3376:322:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 14612, + "nodeType": "Block", + "src": "4407:574:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14569, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4453:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 14570, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4469:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "4453:28:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 14572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4483:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 14568, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4445:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4445:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14574, + "nodeType": "ExpressionStatement", + "src": "4445:63:26" + }, + { + "assignments": [ + 14576 + ], + "declarations": [ + { + "constant": false, + "id": 14576, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14612, + "src": "4521:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4521:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14599, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14584, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4634:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14583, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4619:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4619:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14586, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4662:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14588, + "indexExpression": { + "argumentTypes": null, + "id": 14587, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4671:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4662:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14589, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4662:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14591, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4721:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14590, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4706:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4706:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14593, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4749:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14595, + "indexExpression": { + "argumentTypes": null, + "id": 14594, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4758:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4749:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14596, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4749:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14597, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14552, + "src": "4793:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14579, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "4563:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14578, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "4553:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4553:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14577, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "4538:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4538:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "crossReserveTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13120, + "src": "4538:66:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4538:273:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4521:290:26" + }, + { + "assignments": [ + 14601 + ], + "declarations": [ + { + "constant": false, + "id": 14601, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14612, + "src": "4902:11:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4902:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14605, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14603, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14576, + "src": "4929:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14602, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "4916:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4916:20:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4902:34:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14606, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14576, + "src": "4955:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14607, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14601, + "src": "4964:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4955:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14609, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14601, + "src": "4969:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14610, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4954:19:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14567, + "id": 14611, + "nodeType": "Return", + "src": "4947:26:26" + } + ] + }, + "documentation": { + "id": 14546, + "nodeType": "StructuredDocumentation", + "src": "3706:421:26", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fee\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 14613, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14556, + "modifierName": { + "argumentTypes": null, + "id": 14555, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "4287:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4287:6:26" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 14558, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4316:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 14559, + "modifierName": { + "argumentTypes": null, + "id": 14557, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4303:12:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4303:26:26" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 14561, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4352:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 14562, + "modifierName": { + "argumentTypes": null, + "id": 14560, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4339:12:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4339:26:26" + } + ], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14554, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4269:8:26" + }, + "parameters": { + "id": 14553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14548, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4161:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14547, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4161:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14550, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4187:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14549, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4187:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14552, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4213:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4213:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4160:69:26" + }, + "returnParameters": { + "id": 14567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14564, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4384:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14563, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14566, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4393:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4393:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4383:18:26" + }, + "scope": 16593, + "src": "4133:848:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 14757, + "nodeType": "Block", + "src": "5767:1649:26", + "statements": [ + { + "assignments": [ + 14631, + 14633 + ], + "declarations": [ + { + "constant": false, + "id": 14631, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14757, + "src": "5826:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5826:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14633, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14757, + "src": "5842:11:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5842:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14639, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14635, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "5876:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14636, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "5890:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14637, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "5904:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14634, + "name": "targetAmountAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 14613 + ], + "referencedDeclaration": 14613, + "src": "5857:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 14638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5857:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5825:87:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14641, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "5993:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6003:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5993:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6006:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14640, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5985:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5985:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14646, + "nodeType": "ExpressionStatement", + "src": "5985:46:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14648, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6119:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14650, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6143:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14649, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6128:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6128:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6119:37:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14647, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "6112:6:26", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 14653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6112:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14654, + "nodeType": "ExpressionStatement", + "src": "6112:45:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14655, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6237:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14656, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "6253:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "6237:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14667, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6380:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6380:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6393:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6380:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14680, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6455:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14679, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6440:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6440:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14675, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6429:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 14674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6421:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14673, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6421:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6421:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14671, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6398:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 14672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21422, + "src": "6398:22:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6398:37:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "6398:41:26", + "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": 14682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6398:71:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14683, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "6473:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6398:82:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6380:100:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6482:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14666, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6372:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6372:131:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14688, + "nodeType": "ExpressionStatement", + "src": "6372:131:26" + }, + "id": 14689, + "nodeType": "IfStatement", + "src": "6233:270:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14659, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6295:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6295:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14661, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "6308:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6295:20:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6317:25:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6287:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6287:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14665, + "nodeType": "ExpressionStatement", + "src": "6287:56:26" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14691, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6573:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14690, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "6554:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 14692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6554:32:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14693, + "nodeType": "ExpressionStatement", + "src": "6554:32:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14694, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6597:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14696, + "indexExpression": { + "argumentTypes": null, + "id": 14695, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6606:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6597:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14697, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "6597:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14703, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6665:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14698, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6630:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14700, + "indexExpression": { + "argumentTypes": null, + "id": 14699, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6639:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6630:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14701, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "6630:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "6630:34:26", + "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": 14704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6630:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6597:75:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14706, + "nodeType": "ExpressionStatement", + "src": "6597:75:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14707, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6759:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14708, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "6775:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "6759:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14717, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6880:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14718, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14624, + "src": "6894:12:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6908:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14716, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "6867:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 14720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6867:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14721, + "nodeType": "ExpressionStatement", + "src": "6867:48:26" + }, + "id": 14722, + "nodeType": "IfStatement", + "src": "6755:160:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14713, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6831:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14710, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14624, + "src": "6809:12:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 14712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6809:21:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 14714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6809:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14715, + "nodeType": "ExpressionStatement", + "src": "6809:29:26" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14723, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "6975:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14724, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "6993:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14725, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "7021:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7021:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6993:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6975:52:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14740, + "nodeType": "IfStatement", + "src": "6971:171:26", + "trueBody": { + "id": 14739, + "nodeType": "Block", + "src": "7029:113:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 14732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14729, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "7044:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14730, + "name": "recentAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14908, + "src": "7062:17:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 14731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7062:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "7044:37:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 14733, + "nodeType": "ExpressionStatement", + "src": "7044:37:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14734, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "7096:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14735, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "7124:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7124:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7096:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14738, + "nodeType": "ExpressionStatement", + "src": "7096:34:26" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14742, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "7220:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14743, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "7234:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14744, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14622, + "src": "7248:7:26", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14745, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "7257:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14746, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "7266:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14747, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14633, + "src": "7274:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14741, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "7196:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7196:82:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14749, + "nodeType": "ExpressionStatement", + "src": "7196:82:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14751, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "7355:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14752, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "7369:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14750, + "name": "dispatchTokenRateUpdateEvents", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16397, + "src": "7325:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token)" + } + }, + "id": 14753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7325:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14754, + "nodeType": "ExpressionStatement", + "src": "7325:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14755, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "7402:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14629, + "id": 14756, + "nodeType": "Return", + "src": "7395:13:26" + } + ] + }, + "documentation": { + "id": 14614, + "nodeType": "StructuredDocumentation", + "src": "4989:569:26", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 14758, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14626, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5726:8:26" + }, + "parameters": { + "id": 14625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14616, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5583:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14615, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "5583:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14618, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5609:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14617, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "5609:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14620, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5635:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14619, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14622, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5652:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14621, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5652:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14624, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5669:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 14623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5669:15:26", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5582:116:26" + }, + "returnParameters": { + "id": 14629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14628, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5753:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5753:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5752:9:26" + }, + "scope": 16593, + "src": "5564:1852:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14797, + "nodeType": "Block", + "src": "7904:348:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14769, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "7968:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f4e5f5354414e444152445f504f4f4c", + "id": 14770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7984:23:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bc9141faf76a54775cecd0a0d87b229f48265d7ddb667bb1d0e384e600638f7c", + "typeString": "literal_string \"ERR_NON_STANDARD_POOL\"" + }, + "value": "ERR_NON_STANDARD_POOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bc9141faf76a54775cecd0a0d87b229f48265d7ddb667bb1d0e384e600638f7c", + "typeString": "literal_string \"ERR_NON_STANDARD_POOL\"" + } + ], + "id": 14768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7960:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7960:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14772, + "nodeType": "ExpressionStatement", + "src": "7960:48:26" + }, + { + "assignments": [ + 14774 + ], + "declarations": [ + { + "constant": false, + "id": 14774, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14797, + "src": "8074:20:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14773, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "8074:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14777, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14775, + "name": "recentAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14908, + "src": "8097:17:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 14776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8097:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8074:42:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14778, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14761, + "src": "8131:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14779, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8141:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14781, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8155:1:26", + "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": "8141:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "8131:26:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14790, + "nodeType": "IfStatement", + "src": "8127:82:26", + "trueBody": { + "id": 14789, + "nodeType": "Block", + "src": "8159:50:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14783, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8182:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "8182:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14785, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8190:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "8190:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14787, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8181:16:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14767, + "id": 14788, + "nodeType": "Return", + "src": "8174:23:26" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14791, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8229:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "8229:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14793, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8237:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "8237:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14795, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8228:16:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14767, + "id": 14796, + "nodeType": "Return", + "src": "8221:23:26" + } + ] + }, + "documentation": { + "id": 14759, + "nodeType": "StructuredDocumentation", + "src": "7424:386:26", + "text": " @dev returns the recent average rate of 1 `_token` in the other reserve token units\n note that the rate can only be queried for reserves in a standard pool\n @param _token token to get the rate for\n @return recent average rate between the reserves (numerator)\n @return recent average rate between the reserves (denominator)" + }, + "functionSelector": "1f0181bc", + "id": 14798, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recentAverageRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14761, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7843:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14760, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "7843:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7842:20:26" + }, + "returnParameters": { + "id": 14767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14764, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7886:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7886:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14766, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7895:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14765, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7895:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7885:18:26" + }, + "scope": 16593, + "src": "7816:436:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 14907, + "nodeType": "Block", + "src": "8505:1634:26", + "statements": [ + { + "assignments": [ + 14805 + ], + "declarations": [ + { + "constant": false, + "id": 14805, + "mutability": "mutable", + "name": "timeElapsed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8596:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8596:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14810, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14806, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "8618:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8618:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14808, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "8627:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8618:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8596:56:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14811, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "8757:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8772:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8757:16:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14817, + "nodeType": "IfStatement", + "src": "8753:71:26", + "trueBody": { + "id": 14816, + "nodeType": "Block", + "src": "8775:49:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 14814, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "8797:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "functionReturnParameters": 14803, + "id": 14815, + "nodeType": "Return", + "src": "8790:22:26" + } + ] + } + }, + { + "assignments": [ + 14819 + ], + "declarations": [ + { + "constant": false, + "id": 14819, + "mutability": "mutable", + "name": "currentRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8890:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8890:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14826, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14820, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8913:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14824, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14821, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8922:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14823, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8936:1:26", + "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": "8922:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8913:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14825, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "8913:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8890:57:26" + }, + { + "assignments": [ + 14828 + ], + "declarations": [ + { + "constant": false, + "id": 14828, + "mutability": "mutable", + "name": "currentRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8958:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14827, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8958:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14835, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14829, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8981:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14833, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14830, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8990:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14832, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9004:1:26", + "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": "8990:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8981:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "8981:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8958:57:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14836, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9147:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14837, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9162:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9147:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14845, + "nodeType": "IfStatement", + "src": "9143:120:26", + "trueBody": { + "id": 14844, + "nodeType": "Block", + "src": "9183:80:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14840, + "name": "currentRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14819, + "src": "9219:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14841, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9236:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14839, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "9205:8:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 14842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "9205:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 14803, + "id": 14843, + "nodeType": "Return", + "src": "9198:53:26" + } + ] + } + }, + { + "assignments": [ + 14847 + ], + "declarations": [ + { + "constant": false, + "id": 14847, + "mutability": "mutable", + "name": "prevAverage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9546:27:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14846, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "9546:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14849, + "initialValue": { + "argumentTypes": null, + "id": 14848, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "9576:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9546:45:26" + }, + { + "assignments": [ + 14851 + ], + "declarations": [ + { + "constant": false, + "id": 14851, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9604:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9604:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14857, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14855, + "name": "currentRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14819, + "src": "9634:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14852, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9616:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "9616:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9616:17:26", + "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": 14856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9616:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9604:43:26" + }, + { + "assignments": [ + 14859 + ], + "declarations": [ + { + "constant": false, + "id": 14859, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9658:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14858, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9658:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14865, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14863, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9688:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14860, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9670:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "9670:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9670:17:26", + "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": 14864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9670:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9658:43:26" + }, + { + "assignments": [ + 14867 + ], + "declarations": [ + { + "constant": false, + "id": 14867, + "mutability": "mutable", + "name": "newRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9809:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9809:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14880, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14877, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9879:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14875, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14851, + "src": "9873:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9873:5:26", + "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": 14878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9873:18:26", + "tryCall": false, + "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": 14872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14870, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9834:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14871, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9856:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9834:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14868, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14859, + "src": "9828:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9828:5:26", + "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": 14873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9828:40:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "9828:44:26", + "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": 14879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9828:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9809:83:26" + }, + { + "assignments": [ + 14882 + ], + "declarations": [ + { + "constant": false, + "id": 14882, + "mutability": "mutable", + "name": "newRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9903:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9903:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14891, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14889, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9958:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14886, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9940:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14883, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9922:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "9922:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9922:17:26", + "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": 14887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9922:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9922:35:26", + "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": 14890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9922:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9903:75:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 14892, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "9992:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14893, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10002:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14894, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "9991:20:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14896, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "10027:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14897, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10037:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14898, + "name": "MAX_RATE_FACTOR_LOWER_BOUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14434, + "src": "10047:27:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14895, + "name": "reducedRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16470, + "src": "10014:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 14899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10014:61:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "9991:84:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14901, + "nodeType": "ExpressionStatement", + "src": "9991:84:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14903, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "10107:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14904, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10120:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14902, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "10093:8:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 14905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "10093:38:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 14803, + "id": 14906, + "nodeType": "Return", + "src": "10086:45:26" + } + ] + }, + "documentation": { + "id": 14799, + "nodeType": "StructuredDocumentation", + "src": "8260:170:26", + "text": " @dev returns the recent average rate of 1 reserve token 0 in reserve token 1 units\n @return recent average rate between the reserves" + }, + "id": 14908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recentAverageRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14800, + "nodeType": "ParameterList", + "parameters": [], + "src": "8462:2:26" + }, + "returnParameters": { + "id": 14803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14802, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14908, + "src": "8488:15:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14801, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "8488:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8487:17:26" + }, + "scope": 16593, + "src": "8436:1703:26", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 15014, + "nodeType": "Block", + "src": "10789:1325:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14927, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "10855:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 14928, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "10871:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 14929, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14917, + "src": "10888:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14926, + "name": "verifyLiquidityInput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15634, + "src": "10834:20:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) view" + } + }, + "id": 14930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10834:65:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14931, + "nodeType": "ExpressionStatement", + "src": "10834:65:26" + }, + { + "body": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14943, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11100:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 14945, + "indexExpression": { + "argumentTypes": null, + "id": 14944, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11115:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11100:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14946, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "11121:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "11100:40:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14958, + "nodeType": "IfStatement", + "src": "11096:130:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14949, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "11167:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 14951, + "indexExpression": { + "argumentTypes": null, + "id": 14950, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11183:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11167:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11189:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11189:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11167:31:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11200:25:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14948, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11159:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11159:67:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14957, + "nodeType": "ExpressionStatement", + "src": "11159:67:26" + } + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14936, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11051:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14937, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11055:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 14938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11055:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11051:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 14959, + "initializationExpression": { + "assignments": [ + 14933 + ], + "declarations": [ + { + "constant": false, + "id": 14933, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14959, + "src": "11036:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11036:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14935, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 14934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11048:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11036:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 14941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11078:3:26", + "subExpression": { + "argumentTypes": null, + "id": 14940, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11078:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14942, + "nodeType": "ExpressionStatement", + "src": "11078:3:26" + }, + "nodeType": "ForStatement", + "src": "11031:195:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11346:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11346:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14962, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11358:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11346:13:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14973, + "nodeType": "IfStatement", + "src": "11342:112:26", + "trueBody": { + "id": 14972, + "nodeType": "Block", + "src": "11361:93:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14965, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "11384:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14967, + "indexExpression": { + "argumentTypes": null, + "id": 14966, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "11393:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11384:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "11384:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f5f4554485f52455345525645", + "id": 14969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11421:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_467f328539cc1e1b7e8c0e459b4245a158bd2d844c358525ec924cd65d4df604", + "typeString": "literal_string \"ERR_NO_ETH_RESERVE\"" + }, + "value": "ERR_NO_ETH_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_467f328539cc1e1b7e8c0e459b4245a158bd2d844c358525ec924cd65d4df604", + "typeString": "literal_string \"ERR_NO_ETH_RESERVE\"" + } + ], + "id": 14964, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11376:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11376:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14971, + "nodeType": "ExpressionStatement", + "src": "11376:66:26" + } + ] + } + }, + { + "assignments": [ + 14975 + ], + "declarations": [ + { + "constant": false, + "id": 14975, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15014, + "src": "11499:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14974, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11499:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14984, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14979, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11541:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11533:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11533:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11533:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14976, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "11521:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11521:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 14982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "11521:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11521:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11499:64:26" + }, + { + "assignments": [ + 14986 + ], + "declarations": [ + { + "constant": false, + "id": 14986, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15014, + "src": "11669:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11669:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14992, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14988, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11705:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 14989, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "11721:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 14990, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14975, + "src": "11738:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14987, + "name": "addLiquidityToPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15664, + "src": "11686:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) returns (uint256)" + } + }, + "id": 14991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11686:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11669:81:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14994, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "11877:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14995, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14917, + "src": "11887:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11877:20:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 14997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11899:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 14993, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11869:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11869:51:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14999, + "nodeType": "ExpressionStatement", + "src": "11869:51:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15007, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12009:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12009:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15009, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "12021:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15003, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11994:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11986:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15001, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11986:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11986:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15000, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "11974:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11974:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21508, + "src": "11974:34:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11974:54:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15011, + "nodeType": "ExpressionStatement", + "src": "11974:54:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "12100:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14925, + "id": 15013, + "nodeType": "Return", + "src": "12093:13:26" + } + ] + }, + "documentation": { + "id": 14909, + "nodeType": "StructuredDocumentation", + "src": "10147:423:26", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n note that prior to version 28, you should use 'fund' instead\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _minReturn token minimum return-amount\n @return amount of pool tokens issued" + }, + "functionSelector": "7d8916bd", + "id": 15015, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14920, + "modifierName": { + "argumentTypes": null, + "id": 14919, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "10731:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10731:9:26" + }, + { + "arguments": null, + "id": 14922, + "modifierName": { + "argumentTypes": null, + "id": 14921, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "10750:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10750:6:26" + } + ], + "name": "addLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14912, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10598:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 14910, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10598:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 14911, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10598:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14915, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10635:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 14913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10635:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14914, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10635:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14917, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10669:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10669:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10597:91:26" + }, + "returnParameters": { + "id": 14925, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14924, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10775:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10775:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10774:9:26" + }, + "scope": 16593, + "src": "10576:1538:26", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15070, + "nodeType": "Block", + "src": "12837:569:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15035, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15021, + "src": "12903:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15036, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15024, + "src": "12919:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15037, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "12945:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15034, + "name": "verifyLiquidityInput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15634, + "src": "12882:20:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) view" + } + }, + "id": 15038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12882:71:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15039, + "nodeType": "ExpressionStatement", + "src": "12882:71:26" + }, + { + "assignments": [ + 15041 + ], + "declarations": [ + { + "constant": false, + "id": 15041, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15070, + "src": "13033:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13033:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15050, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15045, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "13075:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13067:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13067:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13067:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15042, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "13055:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13055:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "13055:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13055:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13033:64:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15058, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13183:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13183:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15060, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "13195:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15054, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "13166:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13158:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13158:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13158:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15051, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "13146:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21515, + "src": "13146:36:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15062, + "nodeType": "ExpressionStatement", + "src": "13146:57:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15064, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15021, + "src": "13335:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15065, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15024, + "src": "13351:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15066, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15041, + "src": "13377:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15067, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "13390:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15063, + "name": "removeLiquidityFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16125, + "src": "13311:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256,uint256) returns (uint256[] memory)" + } + }, + "id": 15068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13311:87:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15033, + "id": 15069, + "nodeType": "Return", + "src": "13304:94:26" + } + ] + }, + "documentation": { + "id": 15016, + "nodeType": "StructuredDocumentation", + "src": "12122:495:26", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n note that prior to version 28, you should use 'liquidate' instead\n @param _amount token amount\n @param _reserveTokens address of each reserve token\n @param _reserveMinReturnAmounts minimum return-amount of each reserve token\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "functionSelector": "b127c0a5", + "id": 15071, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15027, + "modifierName": { + "argumentTypes": null, + "id": 15026, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "12770:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12770:9:26" + }, + { + "arguments": null, + "id": 15029, + "modifierName": { + "argumentTypes": null, + "id": 15028, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "12789:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12789:6:26" + } + ], + "name": "removeLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15018, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12648:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12648:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15021, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12665:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "12665:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15020, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12665:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15024, + "mutability": "mutable", + "name": "_reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12702:41:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12702:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15023, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12702:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12647:97:26" + }, + "returnParameters": { + "id": 15033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12814:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15030, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12814:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15031, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12814:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12813:18:26" + }, + "scope": 16593, + "src": "12623:783:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15276, + "nodeType": "Block", + "src": "14008:2368:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 15081, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "14019:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 15082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14019:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15083, + "nodeType": "ExpressionStatement", + "src": "14019:21:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15084, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14051:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15086, + "indexExpression": { + "argumentTypes": null, + "id": 15085, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14060:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14051:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15087, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14051:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15093, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14133:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14133:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15088, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14091:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15090, + "indexExpression": { + "argumentTypes": null, + "id": 15089, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14100:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14091:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14091:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "14091:41:26", + "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": 15095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14091:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14051:92:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15097, + "nodeType": "ExpressionStatement", + "src": "14051:92:26" + }, + { + "assignments": [ + 15099 + ], + "declarations": [ + { + "constant": false, + "id": 15099, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14156:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15098, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14156:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15108, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15103, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "14193:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14185:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14185:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14185:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15100, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "14173:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14173:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "14173:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14173:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14156:59:26" + }, + { + "assignments": [ + 15110 + ], + "declarations": [ + { + "constant": false, + "id": 15110, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14226:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15109, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "14226:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15116, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15113, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "14276:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15112, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "14266:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14266:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15111, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "14251:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14251:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14226:66:26" + }, + { + "assignments": [ + 15118 + ], + "declarations": [ + { + "constant": false, + "id": 15118, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14496:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14496:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15121, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15119, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14519:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14519:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14496:43:26" + }, + { + "body": { + "id": 15260, + "nodeType": "Block", + "src": "14593:1569:26", + "statements": [ + { + "assignments": [ + 15133 + ], + "declarations": [ + { + "constant": false, + "id": 15133, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14608:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15132, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "14608:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15137, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15134, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14635:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15136, + "indexExpression": { + "argumentTypes": null, + "id": 15135, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14649:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14635:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14608:43:26" + }, + { + "assignments": [ + 15139 + ], + "declarations": [ + { + "constant": false, + "id": 15139, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14666:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15138, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14666:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15144, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15140, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14687:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15142, + "indexExpression": { + "argumentTypes": null, + "id": 15141, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "14696:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14687:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14687:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14666:51:26" + }, + { + "assignments": [ + 15146 + ], + "declarations": [ + { + "constant": false, + "id": 15146, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14732:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15145, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14732:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15154, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15149, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15099, + "src": "14773:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15150, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15139, + "src": "14781:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15151, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "14793:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15152, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "14807:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15147, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15110, + "src": "14756:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "14756:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14756:59:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14732:83:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15155, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "14904:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 15156, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14920:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "14904:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 15218, + "nodeType": "Block", + "src": "15409:107:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15208, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15445:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15459:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15459:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15213, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15479:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15471:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15471:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15471:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15215, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15486:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15207, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "15428:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15428:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15217, + "nodeType": "ExpressionStatement", + "src": "15428:72:26" + } + ] + }, + "id": 15219, + "nodeType": "IfStatement", + "src": "14900:616:26", + "trueBody": { + "id": 15206, + "nodeType": "Block", + "src": "14941:449:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14964:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14964:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 15160, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "14976:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14964:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15174, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15107:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15107:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15176, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15119:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15107:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15204, + "nodeType": "IfStatement", + "src": "15103:272:26", + "trueBody": { + "id": 15203, + "nodeType": "Block", + "src": "15134:241:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15165:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15165:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15178:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15165:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4554485f56414c5545", + "id": 15183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15181:23:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e220b3a28f19681b7484bf734e3fcd080dc85319844b89942d75a3bc56505e89", + "typeString": "literal_string \"ERR_INVALID_ETH_VALUE\"" + }, + "value": "ERR_INVALID_ETH_VALUE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e220b3a28f19681b7484bf734e3fcd080dc85319844b89942d75a3bc56505e89", + "typeString": "literal_string \"ERR_INVALID_ETH_VALUE\"" + } + ], + "id": 15178, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15157:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15157:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15185, + "nodeType": "ExpressionStatement", + "src": "15157:48:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15187, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "15245:10:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15257:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15257:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15277:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15269:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15269:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15269:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15194, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15284:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15186, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "15228:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15228:70:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15196, + "nodeType": "ExpressionStatement", + "src": "15228:70:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15200, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15341:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15197, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "15321:10:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "id": 15199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21474, + "src": "15321:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 15201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15321:34:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15202, + "nodeType": "ExpressionStatement", + "src": "15321:34:26" + } + ] + } + }, + "id": 15205, + "nodeType": "IfStatement", + "src": "14960:415:26", + "trueBody": { + "id": 15173, + "nodeType": "Block", + "src": "14991:89:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15167, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15034:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15034:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 15169, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15046:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15034:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15162, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15014:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15014:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 15166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15014:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 15171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15014:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15172, + "nodeType": "ExpressionStatement", + "src": "15014:46:26" + } + ] + } + } + ] + } + }, + { + "assignments": [ + 15221 + ], + "declarations": [ + { + "constant": false, + "id": 15221, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "15573:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15573:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15226, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15224, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15616:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15222, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15139, + "src": "15601:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "15601:14:26", + "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": 15225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15601:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15573:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15227, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15645:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15229, + "indexExpression": { + "argumentTypes": null, + "id": 15228, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15654:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15645:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15230, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "15645:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15231, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "15678:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15645:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15233, + "nodeType": "ExpressionStatement", + "src": "15645:50:26" + }, + { + "assignments": [ + 15235 + ], + "declarations": [ + { + "constant": false, + "id": 15235, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "15712:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15234, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15712:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15240, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15238, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "15752:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15236, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15099, + "src": "15741:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "15741:10:26", + "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": 15239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15741:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15712:48:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15866:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15866:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15244, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15878:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15245, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15892:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15246, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "15907:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15247, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15235, + "src": "15926:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15241, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "15851:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15851:94:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15249, + "nodeType": "EmitStatement", + "src": "15846:99:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15251, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15235, + "src": "16067:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15252, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "16087:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15253, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "16101:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15254, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16120:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15256, + "indexExpression": { + "argumentTypes": null, + "id": 15255, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "16129:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16120:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15257, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16120:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15250, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "16034:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16034:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15259, + "nodeType": "ExpressionStatement", + "src": "16034:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15126, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14570:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15127, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15118, + "src": "14574:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14570:16:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15261, + "initializationExpression": { + "assignments": [ + 15123 + ], + "declarations": [ + { + "constant": false, + "id": 15123, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15261, + "src": "14555:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14555:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15125, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14567:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14555:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14588:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15129, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14588:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15131, + "nodeType": "ExpressionStatement", + "src": "14588:3:26" + }, + "nodeType": "ForStatement", + "src": "14550:1612:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15269, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16269:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16269:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15271, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "16281:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15265, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "16254:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16246:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16246:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16246:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15262, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "16234:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21508, + "src": "16234:34:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15273, + "nodeType": "ExpressionStatement", + "src": "16234:55:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15274, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "16361:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15080, + "id": 15275, + "nodeType": "Return", + "src": "16354:14:26" + } + ] + }, + "documentation": { + "id": 15072, + "nodeType": "StructuredDocumentation", + "src": "13414:473:26", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n for example, if the caller increases the supply by 10%,\n then it will cost an amount equal to 10% of each reserve token balance\n note that starting from version 28, you should use 'addLiquidity' instead\n @param _amount amount to increase the supply by (in the pool token)\n @return amount of pool tokens issued" + }, + "functionSelector": "ca1d209d", + "id": 15277, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15077, + "modifierName": { + "argumentTypes": null, + "id": 15076, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "13966:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13966:9:26" + } + ], + "name": "fund", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15074, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15277, + "src": "13907:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13907:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13906:17:26" + }, + "returnParameters": { + "id": 15080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15277, + "src": "13994:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13994:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13993:9:26" + }, + "scope": 16593, + "src": "13893:2483:26", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15355, + "nodeType": "Block", + "src": "17000:514:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15289, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17019:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17029:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17019:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f414d4f554e54", + "id": 15292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17032:17:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + }, + "value": "ERR_ZERO_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + } + ], + "id": 15288, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "17011:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17011:39:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15294, + "nodeType": "ExpressionStatement", + "src": "17011:39:26" + }, + { + "assignments": [ + 15296 + ], + "declarations": [ + { + "constant": false, + "id": 15296, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15355, + "src": "17063:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17063:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15305, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15300, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "17105:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17097:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17097:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17097:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15297, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "17085:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17085:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "17085:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17085:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17063:64:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15313, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17175:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17175:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15315, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17187:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15309, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "17158:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17150:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17150:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17150:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15306, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "17138:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17138:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21515, + "src": "17138:36:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17138:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15317, + "nodeType": "ExpressionStatement", + "src": "17138:57:26" + }, + { + "assignments": [ + 15322 + ], + "declarations": [ + { + "constant": false, + "id": 15322, + "mutability": "mutable", + "name": "reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15355, + "src": "17208:40:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17208:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15321, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17208:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15329, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15326, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "17265:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17265:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "17251:13:26", + "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": 15323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17255:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15324, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17255:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17251:35:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17208:78:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15341, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17371:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15343, + "indexExpression": { + "argumentTypes": null, + "id": 15342, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17395:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17371:26:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 15344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17400:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17371:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15346, + "nodeType": "ExpressionStatement", + "src": "17371:30:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15334, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17317:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15335, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17321:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17321:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17317:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15347, + "initializationExpression": { + "assignments": [ + 15331 + ], + "declarations": [ + { + "constant": false, + "id": 15331, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15347, + "src": "17302:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17302:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15333, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17314:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17302:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17353:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15338, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17353:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15340, + "nodeType": "ExpressionStatement", + "src": "17353:3:26" + }, + "nodeType": "ForStatement", + "src": "17297:104:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15349, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "17445:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + { + "argumentTypes": null, + "id": 15350, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17460:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15351, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15296, + "src": "17485:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15352, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17498:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15348, + "name": "removeLiquidityFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16125, + "src": "17421:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256,uint256) returns (uint256[] memory)" + } + }, + "id": 15353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17421:85:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15287, + "id": 15354, + "nodeType": "Return", + "src": "17414:92:26" + } + ] + }, + "documentation": { + "id": 15278, + "nodeType": "StructuredDocumentation", + "src": "16384:498:26", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n for example, if the holder sells 10% of the supply,\n then they will receive 10% of each reserve token balance in return\n note that starting from version 28, you should use 'removeLiquidity' instead\n @param _amount amount to liquidate (in the pool token)\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "functionSelector": "415f1240", + "id": 15356, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15283, + "modifierName": { + "argumentTypes": null, + "id": 15282, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "16949:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "16949:9:26" + } + ], + "name": "liquidate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15280, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15356, + "src": "16907:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15279, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16907:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16906:17:26" + }, + "returnParameters": { + "id": 15287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15286, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15356, + "src": "16977:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15285, + "length": null, + "nodeType": "ArrayTypeName", + "src": "16977:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16976:18:26" + }, + "scope": 16593, + "src": "16888:626:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15447, + "nodeType": "Block", + "src": "18354:612:26", + "statements": [ + { + "assignments": [ + 15374 + ], + "declarations": [ + { + "constant": false, + "id": 15374, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18365:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18365:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15373, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18365:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15378, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18413:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18413:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "18399:13:26", + "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": 15375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15376, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18403:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18399:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18365:70:26" + }, + { + "assignments": [ + 15383 + ], + "declarations": [ + { + "constant": false, + "id": 15383, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18448:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18448:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15392, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "18490:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18482:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18482:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18482:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15384, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "18470:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18470:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "18470:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18470:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18448:64:26" + }, + { + "assignments": [ + 15394 + ], + "declarations": [ + { + "constant": false, + "id": 15394, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18523:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15393, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "18523:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15400, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15397, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "18573:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15396, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "18563:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18563:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15395, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "18548:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18548:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18523:66:26" + }, + { + "assignments": [ + 15402 + ], + "declarations": [ + { + "constant": false, + "id": 15402, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18600:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18600:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15405, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15383, + "src": "18642:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15406, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "18655:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15410, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15407, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18664:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15409, + "indexExpression": { + "argumentTypes": null, + "id": 15408, + "name": "_reserveTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15362, + "src": "18679:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18664:34:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18655:44:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15411, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "18655:52:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15412, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "18709:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15413, + "name": "_reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15364, + "src": "18723:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15403, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15394, + "src": "18617:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "18617:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18617:121:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18600:138:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15427, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18816:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15429, + "indexExpression": { + "argumentTypes": null, + "id": 15428, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18831:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18816:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15432, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15383, + "src": "18853:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15433, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "18866:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15437, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15434, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18875:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15436, + "indexExpression": { + "argumentTypes": null, + "id": 15435, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18890:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18875:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18866:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15438, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "18866:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15439, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "18903:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15440, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15402, + "src": "18917:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15430, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15394, + "src": "18836:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "18836:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18836:88:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18816:108:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15443, + "nodeType": "ExpressionStatement", + "src": "18816:108:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15420, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18771:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15421, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18775:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18775:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18771:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15444, + "initializationExpression": { + "assignments": [ + 15417 + ], + "declarations": [ + { + "constant": false, + "id": 15417, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15444, + "src": "18756:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15416, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18756:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15419, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18768:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18756:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18798:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15424, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18798:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15426, + "nodeType": "ExpressionStatement", + "src": "18798:3:26" + }, + "nodeType": "ForStatement", + "src": "18751:173:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15445, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18944:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15369, + "id": 15446, + "nodeType": "Return", + "src": "18937:21:26" + } + ] + }, + "documentation": { + "id": 15357, + "nodeType": "StructuredDocumentation", + "src": "17522:640:26", + "text": " @dev given the amount of one of the reserve tokens to add liquidity of,\n returns the required amount of each one of the other reserve tokens\n since an empty pool can be funded with any list of non-zero input amounts,\n this function assumes that the pool is not empty (has already been funded)\n @param _reserveTokens address of each reserve token\n @param _reserveTokenIndex index of the relevant reserve token\n @param _reserveAmount amount of the relevant reserve token\n @return the required amount of each one of the reserve tokens" + }, + "functionSelector": "80d9416d", + "id": 15448, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15360, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18194:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15358, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "18194:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15359, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18194:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15362, + "mutability": "mutable", + "name": "_reserveTokenIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18231:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18231:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15364, + "mutability": "mutable", + "name": "_reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18259:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15363, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18259:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18193:89:26" + }, + "returnParameters": { + "id": 15369, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15368, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18331:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18331:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15367, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18331:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18330:18:26" + }, + "scope": 16593, + "src": "18168:798:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15488, + "nodeType": "Block", + "src": "19633:278:26", + "statements": [ + { + "assignments": [ + 15459 + ], + "declarations": [ + { + "constant": false, + "id": 15459, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15488, + "src": "19644:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15458, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19644:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15468, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15463, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "19686:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19678:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19678:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19678:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15460, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "19666:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19666:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "19666:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19666:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19644:64:26" + }, + { + "assignments": [ + 15470 + ], + "declarations": [ + { + "constant": false, + "id": 15470, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15488, + "src": "19719:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15469, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "19719:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15476, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15473, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "19769:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15472, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "19759:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19759:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15471, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "19744:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19744:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19719:66:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15479, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15459, + "src": "19828:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15480, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19841:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15482, + "indexExpression": { + "argumentTypes": null, + "id": 15481, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15451, + "src": "19850:13:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19841:23:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15483, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19841:31:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15484, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "19874:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15485, + "name": "_reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15453, + "src": "19888:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15477, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15470, + "src": "19803:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "19803:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19803:100:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15457, + "id": 15487, + "nodeType": "Return", + "src": "19796:107:26" + } + ] + }, + "documentation": { + "id": 15449, + "nodeType": "StructuredDocumentation", + "src": "18974:512:26", + "text": " @dev given the amount of one of the reserve tokens to add liquidity of,\n returns the amount of pool tokens entitled for it\n since an empty pool can be funded with any list of non-zero input amounts,\n this function assumes that the pool is not empty (has already been funded)\n @param _reserveToken address of the reserve token\n @param _reserveAmount amount of the reserve token\n @return the amount of pool tokens entitled" + }, + "functionSelector": "4e40c260", + "id": 15489, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15451, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19520:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15450, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "19520:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15453, + "mutability": "mutable", + "name": "_reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19547:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15452, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19547:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19519:51:26" + }, + "returnParameters": { + "id": 15457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15456, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19619:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19619:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19618:9:26" + }, + "scope": 16593, + "src": "19492:419:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15527, + "nodeType": "Block", + "src": "20421:254:26", + "statements": [ + { + "assignments": [ + 15502 + ], + "declarations": [ + { + "constant": false, + "id": 15502, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15527, + "src": "20432:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15501, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20432:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15511, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15506, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "20474:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20466:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20466:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20466:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15503, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "20454:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20454:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "20454:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20454:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20432:64:26" + }, + { + "assignments": [ + 15513 + ], + "declarations": [ + { + "constant": false, + "id": 15513, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15527, + "src": "20507:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15512, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "20507:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15519, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15516, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "20557:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15515, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "20547:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20547:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15514, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "20532:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20532:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20507:66:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15521, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15492, + "src": "20621:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15522, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15495, + "src": "20630:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15523, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15502, + "src": "20646:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15524, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15513, + "src": "20659:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + ], + "id": 15520, + "name": "removeLiquidityReserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15986, + "src": "20591:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_uint256_$_t_contract$_IBancorFormula_$13177_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,contract IERC20Token[] memory,uint256,contract IBancorFormula) view returns (uint256[] memory)" + } + }, + "id": 15525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20591:76:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15500, + "id": 15526, + "nodeType": "Return", + "src": "20584:83:26" + } + ] + }, + "documentation": { + "id": 15490, + "nodeType": "StructuredDocumentation", + "src": "19919:340:26", + "text": " @dev returns the amount of each reserve token entitled for a given amount of pool tokens\n @param _amount amount of pool tokens\n @param _reserveTokens address of each reserve token\n @return the amount of each reserve token entitled for the given amount of pool tokens" + }, + "functionSelector": "15458837", + "id": 15528, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15492, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20296:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20296:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15495, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20313:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15493, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "20313:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15494, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20313:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20295:54:26" + }, + "returnParameters": { + "id": 15500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15499, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20398:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15497, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20398:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15498, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20398:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20397:18:26" + }, + "scope": 16593, + "src": "20265:410:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15633, + "nodeType": "Block", + "src": "21236:1027:26", + "statements": [ + { + "assignments": [ + 15541 + ], + "declarations": [ + { + "constant": false, + "id": 15541, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21247:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21247:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15542, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "21247:9:26" + }, + { + "assignments": [ + 15544 + ], + "declarations": [ + { + "constant": false, + "id": 15544, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21267:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21267:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15545, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "21267:9:26" + }, + { + "assignments": [ + 15547 + ], + "declarations": [ + { + "constant": false, + "id": 15547, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21289:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15546, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21289:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15550, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15548, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21306:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21306:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21289:37:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15552, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21345:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15553, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21355:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21355:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21345:31:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21378:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15551, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21337:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21337:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15558, + "nodeType": "ExpressionStatement", + "src": "21337:63:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15560, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21419:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15561, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15535, + "src": "21429:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21429:22:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21419:32:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 15564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21453:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 15559, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21411:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21411:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15566, + "nodeType": "ExpressionStatement", + "src": "21411:63:26" + }, + { + "body": { + "id": 15624, + "nodeType": "Block", + "src": "21516:621:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15578, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "21627:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15582, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15579, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21636:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15581, + "indexExpression": { + "argumentTypes": null, + "id": 15580, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21651:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21636:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21627:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "21627:33:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21662:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15577, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21619:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21619:65:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15586, + "nodeType": "ExpressionStatement", + "src": "21619:65:26" + }, + { + "body": { + "id": 15606, + "nodeType": "Block", + "src": "21728:104:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15597, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21751:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15599, + "indexExpression": { + "argumentTypes": null, + "id": 15598, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21765:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21751:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15600, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21771:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15602, + "indexExpression": { + "argumentTypes": null, + "id": 15601, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21786:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21771:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "21751:37:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15605, + "nodeType": "IfStatement", + "src": "21747:69:26", + "trueBody": { + "id": 15604, + "nodeType": "Break", + "src": "21811:5:26" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15591, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21711:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15592, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21715:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21711:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15607, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 15589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 15587, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21704:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 15588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21708:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21704:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15590, + "nodeType": "ExpressionStatement", + "src": "21704:5:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21723:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15594, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21723:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15596, + "nodeType": "ExpressionStatement", + "src": "21723:3:26" + }, + "nodeType": "ForStatement", + "src": "21699:133:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15609, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21942:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15610, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21946:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21942:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21954:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21934:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21934:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15614, + "nodeType": "ExpressionStatement", + "src": "21934:42:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15616, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15535, + "src": "22080:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15618, + "indexExpression": { + "argumentTypes": null, + "id": 15617, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "22096:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22080:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22101:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22080:22:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 15621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22104:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 15615, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22072:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22072:53:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15623, + "nodeType": "ExpressionStatement", + "src": "22072:53:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15571, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21499:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15572, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21503:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21499:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15625, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 15569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 15567, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21492:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 15568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21496:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21492:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15570, + "nodeType": "ExpressionStatement", + "src": "21492:5:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21511:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15574, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21511:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15576, + "nodeType": "ExpressionStatement", + "src": "21511:3:26" + }, + "nodeType": "ForStatement", + "src": "21487:650:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15627, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15537, + "src": "22224:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22234:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22224:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f414d4f554e54", + "id": 15630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22237:17:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + }, + "value": "ERR_ZERO_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + } + ], + "id": 15626, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22216:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22216:39:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15632, + "nodeType": "ExpressionStatement", + "src": "22216:39:26" + } + ] + }, + "documentation": { + "id": 15529, + "nodeType": "StructuredDocumentation", + "src": "20683:393:26", + "text": " @dev verifies that a given array of tokens is identical to the converter's array of reserve tokens\n we take this input in order to allow specifying the corresponding reserve amounts in any order\n @param _reserveTokens array of reserve tokens\n @param _reserveAmounts array of reserve amounts\n @param _amount token amount" + }, + "id": 15634, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifyLiquidityInput", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15532, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21112:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15530, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "21112:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15531, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21112:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15535, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21149:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21149:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15534, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21149:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15537, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21183:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15536, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21183:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21111:88:26" + }, + "returnParameters": { + "id": 15539, + "nodeType": "ParameterList", + "parameters": [], + "src": "21236:0:26" + }, + "scope": 16593, + "src": "21082:1181:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15663, + "nodeType": "Block", + "src": "22750:209:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15648, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15643, + "src": "22765:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22781:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22765:17:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15656, + "nodeType": "IfStatement", + "src": "22761:99:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15652, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15638, + "src": "22828:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15653, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15641, + "src": "22844:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15651, + "name": "addLiquidityToEmptyPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15751, + "src": "22804:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory) returns (uint256)" + } + }, + "id": 15654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22804:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15647, + "id": 15655, + "nodeType": "Return", + "src": "22797:63:26" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15658, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15638, + "src": "22905:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15659, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15641, + "src": "22921:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15660, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15643, + "src": "22938:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15657, + "name": "addLiquidityToNonEmptyPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15926, + "src": "22878:26:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) returns (uint256)" + } + }, + "id": 15661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22878:73:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15647, + "id": 15662, + "nodeType": "Return", + "src": "22871:80:26" + } + ] + }, + "documentation": { + "id": 15635, + "nodeType": "StructuredDocumentation", + "src": "22271:303:26", + "text": " @dev adds liquidity (reserve) to the pool\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _totalSupply token total supply\n @return amount of pool tokens issued" + }, + "id": 15664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15638, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22608:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15636, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "22608:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15637, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22608:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15641, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22645:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22645:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15640, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22645:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15643, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22679:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15642, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22679:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22607:93:26" + }, + "returnParameters": { + "id": 15647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15646, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22736:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22736:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22735:9:26" + }, + "scope": 16593, + "src": "22580:379:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15750, + "nodeType": "Block", + "src": "23393:1062:26", + "statements": [ + { + "assignments": [ + 15677 + ], + "declarations": [ + { + "constant": false, + "id": 15677, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15750, + "src": "23489:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23489:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15681, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15679, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15671, + "src": "23520:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15678, + "name": "geometricMean", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16302, + "src": "23506:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256[] memory) pure returns (uint256)" + } + }, + "id": 15680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23506:30:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23489:47:26" + }, + { + "body": { + "id": 15746, + "nodeType": "Block", + "src": "23680:690:26", + "statements": [ + { + "assignments": [ + 15694 + ], + "declarations": [ + { + "constant": false, + "id": 15694, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15746, + "src": "23695:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15693, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23695:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15698, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15695, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15668, + "src": "23722:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15697, + "indexExpression": { + "argumentTypes": null, + "id": 15696, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23737:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23722:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23695:44:26" + }, + { + "assignments": [ + 15700 + ], + "declarations": [ + { + "constant": false, + "id": 15700, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15746, + "src": "23754:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23754:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15704, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15701, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15671, + "src": "23778:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15703, + "indexExpression": { + "argumentTypes": null, + "id": 15702, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23794:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23778:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23754:42:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15705, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "23817:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 15706, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "23833:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "23817:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15719, + "nodeType": "IfStatement", + "src": "23813:193:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15709, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "23951:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15710, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23965:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23965:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "23985:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23977:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23977:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15716, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "23992:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15708, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "23934:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23934:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15718, + "nodeType": "ExpressionStatement", + "src": "23934:72:26" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 15725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15720, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "24023:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15722, + "indexExpression": { + "argumentTypes": null, + "id": 15721, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24032:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24023:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15723, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "24023:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15724, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24056:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24023:46:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15726, + "nodeType": "ExpressionStatement", + "src": "24023:46:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15728, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24106:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24106:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15730, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24118:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15731, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24132:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15732, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24147:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15733, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24162:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15727, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "24091:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24091:78:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15735, + "nodeType": "EmitStatement", + "src": "24086:83:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15737, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24291:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15738, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24299:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15739, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24313:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15740, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "24328:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15742, + "indexExpression": { + "argumentTypes": null, + "id": 15741, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24337:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24328:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15743, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "24328:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15736, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "24258:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24258:100:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15745, + "nodeType": "ExpressionStatement", + "src": "24258:100:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15686, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23648:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15687, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15668, + "src": "23652:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23652:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23648:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15747, + "initializationExpression": { + "assignments": [ + 15683 + ], + "declarations": [ + { + "constant": false, + "id": 15683, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15747, + "src": "23633:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23633:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15685, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23645:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23633:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "23675:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15690, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23675:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15692, + "nodeType": "ExpressionStatement", + "src": "23675:3:26" + }, + "nodeType": "ForStatement", + "src": "23628:742:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15748, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24441:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15675, + "id": 15749, + "nodeType": "Return", + "src": "24434:13:26" + } + ] + }, + "documentation": { + "id": 15665, + "nodeType": "StructuredDocumentation", + "src": "22967:267:26", + "text": " @dev adds liquidity (reserve) to the pool when it's empty\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @return amount of pool tokens issued" + }, + "id": 15751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToEmptyPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15668, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23273:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23273:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15667, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23273:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15671, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23310:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23310:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15670, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23310:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23272:71:26" + }, + "returnParameters": { + "id": 15675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15674, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23379:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23379:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23378:9:26" + }, + "scope": 16593, + "src": "23240:1215:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15925, + "nodeType": "Block", + "src": "24970:1826:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 15765, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "24981:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 15766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24981:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15767, + "nodeType": "ExpressionStatement", + "src": "24981:21:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15768, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25013:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15770, + "indexExpression": { + "argumentTypes": null, + "id": 15769, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25022:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25013:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15771, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25013:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15777, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "25095:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25095:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15772, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25053:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15774, + "indexExpression": { + "argumentTypes": null, + "id": 15773, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25062:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25053:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15775, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25053:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "25053:41:26", + "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": 15779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25053:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25013:92:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15781, + "nodeType": "ExpressionStatement", + "src": "25013:92:26" + }, + { + "assignments": [ + 15783 + ], + "declarations": [ + { + "constant": false, + "id": 15783, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25118:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15782, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "25118:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15789, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15786, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "25168:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15785, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "25158:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25158:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15784, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "25143:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25143:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25118:66:26" + }, + { + "assignments": [ + 15791 + ], + "declarations": [ + { + "constant": false, + "id": 15791, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25195:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25195:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15798, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15793, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15783, + "src": "25224:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + { + "argumentTypes": null, + "id": 15794, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25233:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15795, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25247:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15796, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "25263:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15792, + "name": "getMinShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16201, + "src": "25212:11:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IBancorFormula_$13177_$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (contract IBancorFormula,uint256,contract IERC20Token[] memory,uint256[] memory) view returns (uint256)" + } + }, + "id": 15797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25212:67:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25195:84:26" + }, + { + "assignments": [ + 15800 + ], + "declarations": [ + { + "constant": false, + "id": 15800, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25290:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25290:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15805, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15803, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "25336:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15801, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25319:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "25319:16:26", + "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": 15804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25319:24:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25290:53:26" + }, + { + "body": { + "id": 15921, + "nodeType": "Block", + "src": "25408:1303:26", + "statements": [ + { + "assignments": [ + 15818 + ], + "declarations": [ + { + "constant": false, + "id": 15818, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25423:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15817, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "25423:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15822, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15819, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25450:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15821, + "indexExpression": { + "argumentTypes": null, + "id": 15820, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25465:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25450:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25423:44:26" + }, + { + "assignments": [ + 15824 + ], + "declarations": [ + { + "constant": false, + "id": 15824, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25482:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15823, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25482:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15829, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15825, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25503:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15827, + "indexExpression": { + "argumentTypes": null, + "id": 15826, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25512:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25503:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25503:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25482:51:26" + }, + { + "assignments": [ + 15831 + ], + "declarations": [ + { + "constant": false, + "id": 15831, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25548:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15830, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25548:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15839, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15834, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25589:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15835, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15824, + "src": "25603:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15836, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "25615:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15837, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "25629:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15832, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15783, + "src": "25572:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "25572:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25572:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25548:88:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15841, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "25659:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25675:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25659:17:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 15844, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25678:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 15840, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25651:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25651:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15846, + "nodeType": "ExpressionStatement", + "src": "25651:52:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15848, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "25725:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15849, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "25742:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15851, + "indexExpression": { + "argumentTypes": null, + "id": 15850, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25758:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25742:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25725:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 15847, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "25718:6:26", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 15853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25718:43:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15854, + "nodeType": "ExpressionStatement", + "src": "25718:43:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15855, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25865:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 15856, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25881:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "25865:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15869, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "26078:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15871, + "indexExpression": { + "argumentTypes": null, + "id": 15870, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "26094:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26078:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 15872, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26099:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26078:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15886, + "nodeType": "IfStatement", + "src": "26074:165:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15879, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "26204:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15881, + "indexExpression": { + "argumentTypes": null, + "id": 15880, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "26220:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26204:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 15882, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26225:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26204:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15874, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26184:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26184:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 15878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26184:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 15884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26184:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15885, + "nodeType": "ExpressionStatement", + "src": "26184:55:26" + } + }, + "id": 15887, + "nodeType": "IfStatement", + "src": "25861:378:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15859, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25999:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15860, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26013:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26013:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15864, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26033:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26025:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26025:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26025:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15866, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26040:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15858, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "25982:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25982:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15868, + "nodeType": "ExpressionStatement", + "src": "25982:72:26" + } + }, + { + "assignments": [ + 15889 + ], + "declarations": [ + { + "constant": false, + "id": 15889, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "26256:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26256:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15894, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15892, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26299:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15890, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15824, + "src": "26284:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "26284:14:26", + "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": 15893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26284:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26256:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15895, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "26328:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15897, + "indexExpression": { + "argumentTypes": null, + "id": 15896, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26337:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26328:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15898, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "26328:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15899, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26361:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26328:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15901, + "nodeType": "ExpressionStatement", + "src": "26328:50:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15903, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26415:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26415:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15905, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26427:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15906, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26441:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15907, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26456:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15908, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15800, + "src": "26475:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15902, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "26400:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26400:94:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15910, + "nodeType": "EmitStatement", + "src": "26395:99:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15912, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15800, + "src": "26616:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15913, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26636:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15914, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26650:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15915, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "26669:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15917, + "indexExpression": { + "argumentTypes": null, + "id": 15916, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26678:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26669:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15918, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "26669:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15911, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "26583:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26583:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15920, + "nodeType": "ExpressionStatement", + "src": "26583:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25376:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15811, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25380:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25380:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25376:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15922, + "initializationExpression": { + "assignments": [ + 15807 + ], + "declarations": [ + { + "constant": false, + "id": 15807, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15922, + "src": "25361:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25361:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15809, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25373:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "25361:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "25403:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15814, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25403:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15816, + "nodeType": "ExpressionStatement", + "src": "25403:3:26" + }, + "nodeType": "ForStatement", + "src": "25356:1355:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15923, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "26782:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15764, + "id": 15924, + "nodeType": "Return", + "src": "26775:13:26" + } + ] + }, + "documentation": { + "id": 15752, + "nodeType": "StructuredDocumentation", + "src": "24463:323:26", + "text": " @dev adds liquidity (reserve) to the pool when it's not empty\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _totalSupply token total supply\n @return amount of pool tokens issued" + }, + "id": 15926, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToNonEmptyPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15755, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24828:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15753, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "24828:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15754, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24828:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15758, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24865:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24865:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15757, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24865:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15760, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24899:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15759, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24899:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24827:93:26" + }, + "returnParameters": { + "id": 15764, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15763, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24956:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24956:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24955:9:26" + }, + "scope": 16593, + "src": "24792:2004:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15985, + "nodeType": "Block", + "src": "27464:322:26", + "statements": [ + { + "assignments": [ + 15946 + ], + "declarations": [ + { + "constant": false, + "id": 15946, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15985, + "src": "27475:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15944, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27475:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15945, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27475:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15953, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15950, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15932, + "src": "27523:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27523:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "27509:13:26", + "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": 15947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27513:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15948, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27513:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27509:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27475:70:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15965, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27621:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15967, + "indexExpression": { + "argumentTypes": null, + "id": 15966, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27636:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "27621:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15970, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15934, + "src": "27673:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15971, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "27687:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15975, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15972, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15932, + "src": "27696:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15974, + "indexExpression": { + "argumentTypes": null, + "id": 15973, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27711:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27696:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27687:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15976, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "27687:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15977, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "27724:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15978, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15929, + "src": "27738:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15968, + "name": "_formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15936, + "src": "27641:8:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "liquidateReserveAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13159, + "src": "27641:31:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27641:105:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27621:125:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15981, + "nodeType": "ExpressionStatement", + "src": "27621:125:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15958, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27576:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15959, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27580:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27580:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27576:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15982, + "initializationExpression": { + "assignments": [ + 15955 + ], + "declarations": [ + { + "constant": false, + "id": 15955, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15982, + "src": "27561:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15954, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27561:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15957, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27573:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "27561:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "27603:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15962, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27603:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15964, + "nodeType": "ExpressionStatement", + "src": "27603:3:26" + }, + "nodeType": "ForStatement", + "src": "27556:190:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15983, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27764:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15941, + "id": 15984, + "nodeType": "Return", + "src": "27757:21:26" + } + ] + }, + "documentation": { + "id": 15927, + "nodeType": "StructuredDocumentation", + "src": "26804:442:26", + "text": " @dev returns the amount of each reserve token entitled for a given amount of pool tokens\n @param _amount amount of pool tokens\n @param _reserveTokens address of each reserve token\n @param _totalSupply token total supply\n @param _formula formula contract\n @return the amount of each reserve token entitled for the given amount of pool tokens" + }, + "id": 15986, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReserveAmounts", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15929, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27291:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27291:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15932, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27308:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15930, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "27308:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15931, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27308:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15934, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27345:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27345:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15936, + "mutability": "mutable", + "name": "_formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27367:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15935, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "27367:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27290:101:26" + }, + "returnParameters": { + "id": 15941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15940, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27441:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15938, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27441:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15939, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27441:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27440:18:26" + }, + "scope": 16593, + "src": "27252:534:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16124, + "nodeType": "Block", + "src": "28459:1485:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16003, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "28470:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28470:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16005, + "nodeType": "ExpressionStatement", + "src": "28470:21:26" + }, + { + "assignments": [ + 16007 + ], + "declarations": [ + { + "constant": false, + "id": 16007, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28504:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 16006, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "28504:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16013, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16010, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "28554:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16009, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "28544:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28544:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16008, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "28529:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 16012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28529:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28504:66:26" + }, + { + "assignments": [ + 16015 + ], + "declarations": [ + { + "constant": false, + "id": 16015, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28581:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16014, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28581:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16020, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16018, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15997, + "src": "28627:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16016, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15995, + "src": "28610:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "28610:16:26", + "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": 16019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28610:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28581:54:26" + }, + { + "assignments": [ + 16025 + ], + "declarations": [ + { + "constant": false, + "id": 16025, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28646:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28646:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16024, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28646:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16032, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16027, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15997, + "src": "28710:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16028, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28719:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 16029, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15995, + "src": "28735:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16030, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16007, + "src": "28749:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + ], + "id": 16026, + "name": "removeLiquidityReserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15986, + "src": "28680:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_uint256_$_t_contract$_IBancorFormula_$13177_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,contract IERC20Token[] memory,uint256,contract IBancorFormula) view returns (uint256[] memory)" + } + }, + "id": 16031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28680:77:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28646:111:26" + }, + { + "body": { + "id": 16120, + "nodeType": "Block", + "src": "28822:985:26", + "statements": [ + { + "assignments": [ + 16045 + ], + "declarations": [ + { + "constant": false, + "id": 16045, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "28837:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16044, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "28837:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16049, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16046, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28864:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16048, + "indexExpression": { + "argumentTypes": null, + "id": 16047, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28879:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28864:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28837:44:26" + }, + { + "assignments": [ + 16051 + ], + "declarations": [ + { + "constant": false, + "id": 16051, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "28896:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16050, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28896:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16055, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16052, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16025, + "src": "28920:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16054, + "indexExpression": { + "argumentTypes": null, + "id": 16053, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28935:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28920:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28896:41:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16057, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "28960:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16058, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15993, + "src": "28977:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16060, + "indexExpression": { + "argumentTypes": null, + "id": 16059, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "29002:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28977:27:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28960:44:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 16062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29006:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 16056, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28952:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28952:79:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16064, + "nodeType": "ExpressionStatement", + "src": "28952:79:26" + }, + { + "assignments": [ + 16066 + ], + "declarations": [ + { + "constant": false, + "id": 16066, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "29048:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29048:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16074, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16072, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29111:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16067, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29076:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16069, + "indexExpression": { + "argumentTypes": null, + "id": 16068, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29085:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29076:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16070, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29076:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "29076:34:26", + "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": 16073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29076:49:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29048:77:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16075, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29140:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16077, + "indexExpression": { + "argumentTypes": null, + "id": 16076, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29149:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29140:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16078, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29140:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16079, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29173:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29140:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16081, + "nodeType": "ExpressionStatement", + "src": "29140:50:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 16084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16082, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29294:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16083, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "29310:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "29294:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16094, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29432:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16095, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29446:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29446:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 16097, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29458:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16093, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "29419:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 16098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29419:53:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16099, + "nodeType": "ExpressionStatement", + "src": "29419:53:26" + }, + "id": 16100, + "nodeType": "IfStatement", + "src": "29290:182:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16090, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29368:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29348:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29348:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 16089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29348:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 16091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29348:34:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16092, + "nodeType": "ExpressionStatement", + "src": "29348:34:26" + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16102, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29511:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29511:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 16104, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29523:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16105, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29537:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16106, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29552:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16107, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16015, + "src": "29571:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16101, + "name": "LiquidityRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13041, + "src": "29494:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 16108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29494:96:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16109, + "nodeType": "EmitStatement", + "src": "29489:101:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16111, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16015, + "src": "29712:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16112, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29732:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16113, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29746:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16114, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29765:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16116, + "indexExpression": { + "argumentTypes": null, + "id": 16115, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29774:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29765:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29765:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16110, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "29679:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29679:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16119, + "nodeType": "ExpressionStatement", + "src": "29679:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16037, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28790:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16038, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28794:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28794:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28790:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16121, + "initializationExpression": { + "assignments": [ + 16034 + ], + "declarations": [ + { + "constant": false, + "id": 16034, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16121, + "src": "28775:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16033, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28775:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16036, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28787:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28775:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28817:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16041, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28817:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16043, + "nodeType": "ExpressionStatement", + "src": "28817:3:26" + }, + "nodeType": "ForStatement", + "src": "28770:1037:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16122, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16025, + "src": "29922:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 16002, + "id": 16123, + "nodeType": "Return", + "src": "29915:21:26" + } + ] + }, + "documentation": { + "id": 15987, + "nodeType": "StructuredDocumentation", + "src": "27794:449:26", + "text": " @dev removes liquidity (reserve) from the pool\n @param _reserveTokens address of each reserve token\n @param _reserveMinReturnAmounts minimum return-amount of each reserve token\n @param _totalSupply token total supply\n @param _amount token amount\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "id": 16125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityFromPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15990, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28282:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15988, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "28282:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15989, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28282:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15993, + "mutability": "mutable", + "name": "_reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28319:41:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15991, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28319:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15992, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28319:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15995, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28362:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28362:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15997, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28384:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15996, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28281:119:26" + }, + "returnParameters": { + "id": 16002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16001, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15999, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28436:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16000, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28435:18:26" + }, + "scope": 16593, + "src": "28249:1695:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16200, + "nodeType": "Block", + "src": "30121:439:26", + "statements": [ + { + "assignments": [ + 16141 + ], + "declarations": [ + { + "constant": false, + "id": 16141, + "mutability": "mutable", + "name": "minIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16200, + "src": "30132:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30132:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16143, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30151:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30132:20:26" + }, + { + "body": { + "id": 16183, + "nodeType": "Block", + "src": "30215:197:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16159, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30257:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16163, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16160, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30266:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16162, + "indexExpression": { + "argumentTypes": null, + "id": 16161, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30281:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30266:24:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30257:34:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30257:42:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16155, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30234:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16157, + "indexExpression": { + "argumentTypes": null, + "id": 16156, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30250:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30234:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30234:22:26", + "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": 16165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30234:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16170, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30333:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16174, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16171, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30342:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16173, + "indexExpression": { + "argumentTypes": null, + "id": 16172, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30357:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30342:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30333:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30333:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16166, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30303:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16168, + "indexExpression": { + "argumentTypes": null, + "id": 16167, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30319:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30303:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30303:29:26", + "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": 16176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30303:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30234:135:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16182, + "nodeType": "IfStatement", + "src": "30230:170:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 16180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16178, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30388:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16179, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30399:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30388:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16181, + "nodeType": "ExpressionStatement", + "src": "30388:12:26" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16148, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30183:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16149, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30187:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30187:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30183:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16184, + "initializationExpression": { + "assignments": [ + 16145 + ], + "declarations": [ + { + "constant": false, + "id": 16145, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16184, + "src": "30168:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16144, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30168:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16147, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 16146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30180:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30168:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "30210:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16152, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30210:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16154, + "nodeType": "ExpressionStatement", + "src": "30210:3:26" + }, + "nodeType": "ForStatement", + "src": "30163:249:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16187, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16129, + "src": "30454:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16188, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30468:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16192, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16189, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30477:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16191, + "indexExpression": { + "argumentTypes": null, + "id": 16190, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30492:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30477:24:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30468:34:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30468:42:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16194, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "30512:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16195, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30526:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16197, + "indexExpression": { + "argumentTypes": null, + "id": 16196, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30542:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30526:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16185, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16127, + "src": "30429:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 16186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "30429:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 16198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30429:123:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16139, + "id": 16199, + "nodeType": "Return", + "src": "30422:130:26" + } + ] + }, + "documentation": null, + "id": 16201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinShare", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16127, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "29973:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 16126, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "29973:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16129, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "29997:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29997:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16132, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30019:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 16130, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "30019:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16131, + "length": null, + "nodeType": "ArrayTypeName", + "src": "30019:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16135, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30056:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30056:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16134, + "length": null, + "nodeType": "ArrayTypeName", + "src": "30056:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29972:117:26" + }, + "returnParameters": { + "id": 16139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16138, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30112:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30112:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30111:9:26" + }, + "scope": 16593, + "src": "29952:608:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16230, + "nodeType": "Block", + "src": "30847:115:26", + "statements": [ + { + "assignments": [ + 16210 + ], + "declarations": [ + { + "constant": false, + "id": 16210, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16230, + "src": "30858:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30858:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16212, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30870:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30858:13:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 16225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "30932:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16224, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16210, + "src": "30932:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16226, + "nodeType": "ExpressionStatement", + "src": "30932:3:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16217, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16214, + "src": "30903:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30907:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30903:5:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16227, + "initializationExpression": { + "assignments": [ + 16214 + ], + "declarations": [ + { + "constant": false, + "id": 16214, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16227, + "src": "30887:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30887:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16216, + "initialValue": { + "argumentTypes": null, + "id": 16215, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16204, + "src": "30899:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30887:14:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16220, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16214, + "src": "30910:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3130", + "id": 16221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30915:2:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "30910:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16223, + "nodeType": "ExpressionStatement", + "src": "30910:7:26" + }, + "nodeType": "ForStatement", + "src": "30882:53:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16228, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16210, + "src": "30953:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16208, + "id": 16229, + "nodeType": "Return", + "src": "30946:8:26" + } + ] + }, + "documentation": { + "id": 16202, + "nodeType": "StructuredDocumentation", + "src": "30568:208:26", + "text": " @dev returns the number of decimal digits in a given value\n @param _x value (assumed positive)\n @return the number of decimal digits in the given value" + }, + "functionSelector": "6aa5332c", + "id": 16231, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimalLength", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16204, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16231, + "src": "30805:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30805:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30804:12:26" + }, + "returnParameters": { + "id": 16208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16207, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16231, + "src": "30838:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30838:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30837:9:26" + }, + "scope": 16593, + "src": "30782:180:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16250, + "nodeType": "Block", + "src": "31280:44:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16241, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16234, + "src": "31299:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16242, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16236, + "src": "31304:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31309:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "31304:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31299:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16246, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31298:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 16247, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16236, + "src": "31314:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31298:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16240, + "id": 16249, + "nodeType": "Return", + "src": "31291:25:26" + } + ] + }, + "documentation": { + "id": 16232, + "nodeType": "StructuredDocumentation", + "src": "30970:232:26", + "text": " @dev returns the nearest integer to a given quotient\n @param _n quotient numerator\n @param _d quotient denominator\n @return the nearest integer to the given quotient" + }, + "functionSelector": "bbb7e5d8", + "id": 16251, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16234, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31226:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31226:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16236, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31238:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31238:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31225:24:26" + }, + "returnParameters": { + "id": 16240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16239, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31271:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31271:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31270:9:26" + }, + "scope": 16593, + "src": "31208:116:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16301, + "nodeType": "Block", + "src": "31686:253:26", + "statements": [ + { + "assignments": [ + 16261 + ], + "declarations": [ + { + "constant": false, + "id": 16261, + "mutability": "mutable", + "name": "numOfDigits", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16301, + "src": "31697:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31697:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16263, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31719:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "31697:23:26" + }, + { + "assignments": [ + 16265 + ], + "declarations": [ + { + "constant": false, + "id": 16265, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16301, + "src": "31731:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31731:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16268, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16266, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16255, + "src": "31748:7:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31748:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31731:31:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 16285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16279, + "name": "numOfDigits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16261, + "src": "31823:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16281, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16255, + "src": "31852:7:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16283, + "indexExpression": { + "argumentTypes": null, + "id": 16282, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31860:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31852:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16280, + "name": "decimalLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16231, + "src": "31838:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 16284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31838:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31823:40:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16286, + "nodeType": "ExpressionStatement", + "src": "31823:40:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16273, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31793:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 16274, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16265, + "src": "31797:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31793:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16287, + "initializationExpression": { + "assignments": [ + 16270 + ], + "declarations": [ + { + "constant": false, + "id": 16270, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16287, + "src": "31778:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16269, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31778:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16272, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31790:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "31778:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "31805:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16276, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31805:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16278, + "nodeType": "ExpressionStatement", + "src": "31805:3:26" + }, + "nodeType": "ForStatement", + "src": "31773:90:26" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 16290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31889:2:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 16289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31881:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 16288, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31881:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31881:11:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16293, + "name": "numOfDigits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16261, + "src": "31906:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16294, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16265, + "src": "31919:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16292, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16251, + "src": "31897:8:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 16295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31897:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31929:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "31897:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16298, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31896:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31881:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16259, + "id": 16300, + "nodeType": "Return", + "src": "31874:57:26" + } + ] + }, + "documentation": { + "id": 16252, + "nodeType": "StructuredDocumentation", + "src": "31332:269:26", + "text": " @dev returns the average number of decimal digits in a given list of values\n @param _values list of values (each of which assumed positive)\n @return the average number of decimal digits in the given list of values" + }, + "functionSelector": "a60e7724", + "id": 16302, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "geometricMean", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16255, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16302, + "src": "31630:24:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31630:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16254, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31630:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31629:26:26" + }, + "returnParameters": { + "id": 16259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16258, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16302, + "src": "31677:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31677:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31676:9:26" + }, + "scope": 16593, + "src": "31607:332:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16396, + "nodeType": "Block", + "src": "32294:1231:26", + "statements": [ + { + "assignments": [ + 16311 + ], + "declarations": [ + { + "constant": false, + "id": 16311, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32305:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32305:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16320, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16315, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "32351:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32343:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16313, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32343:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32343:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16312, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "32331:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32331:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 16318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "32331:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 16319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32331:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32305:68:26" + }, + { + "assignments": [ + 16322 + ], + "declarations": [ + { + "constant": false, + "id": 16322, + "mutability": "mutable", + "name": "sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32384:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16326, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16324, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32430:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16323, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "32415:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32415:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32384:59:26" + }, + { + "assignments": [ + 16328 + ], + "declarations": [ + { + "constant": false, + "id": 16328, + "mutability": "mutable", + "name": "targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32454:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16327, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32454:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16330, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32500:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16329, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "32485:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32485:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32454:59:26" + }, + { + "assignments": [ + 16334 + ], + "declarations": [ + { + "constant": false, + "id": 16334, + "mutability": "mutable", + "name": "sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32524:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16333, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "32524:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16339, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16335, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "32553:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16337, + "indexExpression": { + "argumentTypes": null, + "id": 16336, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32562:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32553:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16338, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "32553:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32524:58:26" + }, + { + "assignments": [ + 16341 + ], + "declarations": [ + { + "constant": false, + "id": 16341, + "mutability": "mutable", + "name": "targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32593:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16340, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "32593:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16346, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16342, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "32622:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16344, + "indexExpression": { + "argumentTypes": null, + "id": 16343, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32631:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32622:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "32622:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32593:58:26" + }, + { + "assignments": [ + 16348 + ], + "declarations": [ + { + "constant": false, + "id": 16348, + "mutability": "mutable", + "name": "rateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32732:13:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16347, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32732:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16353, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16351, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "32773:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16349, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "32748:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "32748:24:26", + "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": 16352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32748:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32732:61:26" + }, + { + "assignments": [ + 16355 + ], + "declarations": [ + { + "constant": false, + "id": 16355, + "mutability": "mutable", + "name": "rateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32804:13:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32804:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16360, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16358, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "32845:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16356, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "32820:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "32820:24:26", + "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": 16359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32820:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32804:61:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16362, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32897:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16363, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32911:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16364, + "name": "rateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16348, + "src": "32925:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16365, + "name": "rateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16355, + "src": "32932:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16361, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "32881:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 16366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32881:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16367, + "nodeType": "EmitStatement", + "src": "32876:62:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16369, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33049:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16370, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "33066:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16371, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "33080:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16372, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "33102:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16368, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "33016:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33016:106:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16374, + "nodeType": "ExpressionStatement", + "src": "33016:106:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16376, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33166:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16377, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "33183:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16378, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "33197:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16379, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "33219:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16375, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "33133:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33133:106:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16381, + "nodeType": "ExpressionStatement", + "src": "33133:106:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16383, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "33339:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16384, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33353:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16385, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "33370:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16386, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "33392:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16382, + "name": "PriceDataUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14455, + "src": "33323:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint256,uint256,uint32)" + } + }, + "id": 16387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33323:89:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16388, + "nodeType": "EmitStatement", + "src": "33318:94:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16390, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "33444:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16391, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33458:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16392, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "33475:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16393, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "33497:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16389, + "name": "PriceDataUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14455, + "src": "33428:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint256,uint256,uint32)" + } + }, + "id": 16394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33428:89:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16395, + "nodeType": "EmitStatement", + "src": "33423:94:26" + } + ] + }, + "documentation": { + "id": 16303, + "nodeType": "StructuredDocumentation", + "src": "31947:242:26", + "text": " @dev dispatches token rate update events for the reserve tokens and the pool token\n @param _sourceToken address of the source reserve token\n @param _targetToken address of the target reserve token" + }, + "id": 16397, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchTokenRateUpdateEvents", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16305, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16397, + "src": "32234:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16304, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32234:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16307, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16397, + "src": "32260:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16306, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32260:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32233:52:26" + }, + "returnParameters": { + "id": 16309, + "nodeType": "ParameterList", + "parameters": [], + "src": "32294:0:26" + }, + "scope": 16593, + "src": "32195:1330:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16427, + "nodeType": "Block", + "src": "33994:159:26", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16413, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "34046:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34038:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34038:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34038:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16410, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "34026:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34026:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 16416, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16402, + "src": "34056:13:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16419, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "34091:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16417, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16404, + "src": "34071:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "34071:19:26", + "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": 16420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34071:35:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16423, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16406, + "src": "34129:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16421, + "name": "_poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16400, + "src": "34108:16:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "34108:20:26", + "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": 16424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34108:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16409, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "34010:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 16425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34010:135:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16426, + "nodeType": "EmitStatement", + "src": "34005:140:26" + } + ] + }, + "documentation": { + "id": 16398, + "nodeType": "StructuredDocumentation", + "src": "33533:304:26", + "text": " @dev dispatches token rate update event for the pool token\n @param _poolTokenSupply total pool token supply\n @param _reserveToken address of the reserve token\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight" + }, + "id": 16428, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16400, + "mutability": "mutable", + "name": "_poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33885:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33885:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16402, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33911:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16401, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "33911:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16404, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33938:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33938:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16406, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33963:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16405, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33963:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33884:101:26" + }, + "returnParameters": { + "id": 16408, + "nodeType": "ParameterList", + "parameters": [], + "src": "33994:0:26" + }, + "scope": 16593, + "src": "33843:310:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16436, + "nodeType": "Block", + "src": "34319:29:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 16434, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "34337:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16433, + "id": 16435, + "nodeType": "Return", + "src": "34330:10:26" + } + ] + }, + "documentation": { + "id": 16429, + "nodeType": "StructuredDocumentation", + "src": "34161:96:26", + "text": " @dev returns the current time\n utility to allow overrides for tests" + }, + "id": 16437, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16430, + "nodeType": "ParameterList", + "parameters": [], + "src": "34276:2:26" + }, + "returnParameters": { + "id": 16433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16432, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16437, + "src": "34310:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34310:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34309:9:26" + }, + "scope": 16593, + "src": "34263:85:26", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 16469, + "nodeType": "Block", + "src": "34709:122:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16451, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34724:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16452, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34729:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34724:9:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16454, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34737:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16455, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34737:9:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "34724:22:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16464, + "nodeType": "IfStatement", + "src": "34720:77:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16459, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34784:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16460, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34788:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16461, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34792:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16458, + "name": "normalizedRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16521, + "src": "34768:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34768:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16450, + "id": 16463, + "nodeType": "Return", + "src": "34761:36:26" + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16465, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34816:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16466, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34820:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16467, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "34815:8:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16450, + "id": 16468, + "nodeType": "Return", + "src": "34808:15:26" + } + ] + }, + "documentation": { + "id": 16438, + "nodeType": "StructuredDocumentation", + "src": "34356:246:26", + "text": " @dev computes a reduced-scalar ratio\n @param _n ratio numerator\n @param _d ratio denominator\n @param _max maximum desired scalar\n @return ratio's numerator and denominator" + }, + "id": 16470, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reducedRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16440, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34630:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34630:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16442, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34642:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34642:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16444, + "mutability": "mutable", + "name": "_max", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34654:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34654:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34629:38:26" + }, + "returnParameters": { + "id": 16450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16447, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34691:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34691:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16449, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34700:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34700:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34690:18:26" + }, + "scope": 16593, + "src": "34608:223:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16520, + "nodeType": "Block", + "src": "35034:239:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16484, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35049:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16485, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35055:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35049:8:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16495, + "nodeType": "IfStatement", + "src": "35045:58:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16487, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35080:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35089:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "35080:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16490, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35092:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35101:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "35092:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35079:24:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16494, + "nodeType": "Return", + "src": "35072:31:26" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16496, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35118:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 16497, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35123:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35118:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16505, + "nodeType": "IfStatement", + "src": "35114:62:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16500, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35161:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16501, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35165:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16502, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35169:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16499, + "name": "accurateRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16592, + "src": "35147:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35147:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16504, + "nodeType": "Return", + "src": "35140:36:26" + } + }, + { + "assignments": [ + 16507, + 16509 + ], + "declarations": [ + { + "constant": false, + "id": 16507, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16520, + "src": "35188:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16506, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35188:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16509, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16520, + "src": "35199:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35199:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16515, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16511, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35226:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16512, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35230:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16513, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35234:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16510, + "name": "accurateRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16592, + "src": "35212:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35212:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35187:54:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16516, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16509, + "src": "35260:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16517, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16507, + "src": "35263:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16518, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35259:6:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16519, + "nodeType": "Return", + "src": "35252:13:26" + } + ] + }, + "documentation": { + "id": 16471, + "nodeType": "StructuredDocumentation", + "src": "34839:83:26", + "text": " @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\"." + }, + "id": 16521, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16473, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34953:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34953:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16475, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34965:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34965:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16477, + "mutability": "mutable", + "name": "_scale", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34977:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34952:40:26" + }, + "returnParameters": { + "id": 16483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "35016:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16479, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35016:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "35025:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35025:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35015:18:26" + }, + "scope": 16593, + "src": "34928:345:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16591, + "nodeType": "Block", + "src": "35497:300:26", + "statements": [ + { + "assignments": [ + 16536 + ], + "declarations": [ + { + "constant": false, + "id": 16536, + "mutability": "mutable", + "name": "maxVal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35508:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35508:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16544, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "35533:2:26", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35534:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 16538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35525:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 16537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35525:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35525:11:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 16542, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35539:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35525:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35508:37:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16545, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35560:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16546, + "name": "maxVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16536, + "src": "35565:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35560:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16568, + "nodeType": "IfStatement", + "src": "35556:121:26", + "trueBody": { + "id": 16567, + "nodeType": "Block", + "src": "35573:104:26", + "statements": [ + { + "assignments": [ + 16549 + ], + "declarations": [ + { + "constant": false, + "id": 16549, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16567, + "src": "35588:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35588:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16558, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16550, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35600:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16551, + "name": "maxVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16536, + "src": "35606:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35615:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "35606:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16554, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35605:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35600:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35620:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "35600:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35588:33:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16559, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35636:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 16560, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16549, + "src": "35642:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35636:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16562, + "nodeType": "ExpressionStatement", + "src": "35636:7:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16563, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16526, + "src": "35658:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 16564, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16549, + "src": "35664:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35658:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16566, + "nodeType": "ExpressionStatement", + "src": "35658:7:26" + } + ] + } + }, + { + "assignments": [ + 16570 + ], + "declarations": [ + { + "constant": false, + "id": 16570, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35687:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35687:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16580, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16572, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35708:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 16573, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35713:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35708:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16577, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16526, + "src": "35728:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16575, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35721:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "35721:6:26", + "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": 16578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35721:10:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16571, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16251, + "src": "35699:8:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 16579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35699:33:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35687:45:26" + }, + { + "assignments": [ + 16582 + ], + "declarations": [ + { + "constant": false, + "id": 16582, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35743:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35743:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16586, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16583, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35755:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 16584, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16570, + "src": "35764:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35755:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35743:22:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16587, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16570, + "src": "35784:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16588, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16582, + "src": "35787:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16589, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35783:6:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16534, + "id": 16590, + "nodeType": "Return", + "src": "35776:13:26" + } + ] + }, + "documentation": { + "id": 16522, + "nodeType": "StructuredDocumentation", + "src": "35281:106:26", + "text": " @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\", assuming that \"a < b\"." + }, + "id": 16592, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16524, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35416:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35416:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16526, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35428:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35428:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16528, + "mutability": "mutable", + "name": "_scale", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35440:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35440:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35415:40:26" + }, + "returnParameters": { + "id": 16534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16531, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35479:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16530, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35479:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16533, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35488:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16532, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35488:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35478:18:26" + }, + "scope": 16593, + "src": "35393:404:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 16594, + "src": "519:35281:26" + } + ], + "src": "52:35750:26" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "exportedSymbols": { + "LiquidityPoolV1Converter": [ + 16593 + ] + }, + "id": 16594, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 14420, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:26" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "file": "../../LiquidityPoolConverter.sol", + "id": 14421, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 13078, + "src": "77:42:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 14422, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 21517, + "src": "121:51:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol", + "file": "../../../utility/Types.sol", + "id": 14423, + "nodeType": "ImportDirective", + "scope": 16594, + "sourceUnit": 22917, + "src": "174:36:26", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 14425, + "name": "LiquidityPoolConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13077, + "src": "556:22:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolConverter_$13077", + "typeString": "contract LiquidityPoolConverter" + } + }, + "id": 14426, + "nodeType": "InheritanceSpecifier", + "src": "556:22:26" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": { + "id": 14424, + "nodeType": "StructuredDocumentation", + "src": "214:303:26", + "text": " @dev Liquidity Pool v1 Converter\n The liquidity pool v1 converter is a specialized version of a converter that manages\n a classic bancor liquidity pool.\n Even though pools can have many reserves, the standard pool configuration\n is 2 reserves with 50%/50% weights." + }, + "fullyImplemented": true, + "id": 16593, + "linearizedBaseContracts": [ + 16593, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "LiquidityPoolV1Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 14431, + "mutability": "mutable", + "name": "etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "586:89:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 14427, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21487, + "src": "586:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307863303832393432314331643236304244336342334530463036636645324435326462326345333135", + "id": 14429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "632:42:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xc0829421C1d260BD3cB3E0F06cfE2D52db2cE315" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 14428, + "name": "IEtherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21487, + "src": "620:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IEtherToken_$21487_$", + "typeString": "type(contract IEtherToken)" + } + }, + "id": 14430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "620:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 14434, + "mutability": "constant", + "name": "MAX_RATE_FACTOR_LOWER_BOUND", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "682:60:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14432, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "682:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31653330", + "id": 14433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "738:4:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000000000000000_by_1", + "typeString": "int_const 1000000000000000000000000000000" + }, + "value": "1e30" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 14437, + "mutability": "constant", + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "842:57:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14435, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "842:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3130", + "id": 14436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "889:10:26", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_600_by_1", + "typeString": "int_const 600" + }, + "value": "10" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "38e9f27a", + "id": 14440, + "mutability": "mutable", + "name": "isStandardPool", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "989:34:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 14438, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "989:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 14439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1018:5:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e2c52468", + "id": 14442, + "mutability": "mutable", + "name": "prevAverageRate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "1068:31:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14441, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "1068:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1d4db791", + "id": 14444, + "mutability": "mutable", + "name": "prevAverageRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16593, + "src": "1206:40:26", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1206:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 14445, + "nodeType": "StructuredDocumentation", + "src": "1316:361:26", + "text": " @dev triggered after a conversion with new price data\n deprecated, use `TokenRateUpdate` from version 28 and up\n @param _connectorToken reserve token\n @param _tokenSupply smart token supply\n @param _connectorBalance reserve balance\n @param _connectorWeight reserve weight" + }, + "id": 14455, + "name": "PriceDataUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 14454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14447, + "indexed": true, + "mutability": "mutable", + "name": "_connectorToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1715:35:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14446, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1715:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14449, + "indexed": false, + "mutability": "mutable", + "name": "_tokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1761:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1761:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14451, + "indexed": false, + "mutability": "mutable", + "name": "_connectorBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1792:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1792:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14453, + "indexed": false, + "mutability": "mutable", + "name": "_connectorWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14455, + "src": "1828:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14452, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1828:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1704:154:26" + }, + "src": "1683:176:26" + }, + { + "body": { + "id": 14470, + "nodeType": "Block", + "src": "2402:8:26", + "statements": [] + }, + "documentation": { + "id": 14456, + "nodeType": "StructuredDocumentation", + "src": "1867:317:26", + "text": " @dev initializes a new LiquidityPoolV1Converter instance\n @param _token pool token governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 14471, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 14465, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14458, + "src": "2343:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 14466, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14460, + "src": "2351:9:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 14467, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14462, + "src": "2362:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 14468, + "modifierName": { + "argumentTypes": null, + "id": 14464, + "name": "LiquidityPoolConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13077, + "src": "2320:22:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolConverter_$13077_$", + "typeString": "type(contract LiquidityPoolConverter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2320:60:26" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14458, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2212:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 14457, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "2212:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14460, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2241:27:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 14459, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "2241:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14462, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14471, + "src": "2279:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14461, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2279:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2201:109:26" + }, + "returnParameters": { + "id": 14469, + "nodeType": "ParameterList", + "parameters": [], + "src": "2402:0:26" + }, + "scope": 16593, + "src": "2190:220:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 14480, + "nodeType": "Block", + "src": "2618:27:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2636:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 14477, + "id": 14479, + "nodeType": "Return", + "src": "2629:8:26" + } + ] + }, + "documentation": { + "id": 14472, + "nodeType": "StructuredDocumentation", + "src": "2418:131:26", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 14481, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14474, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2592:8:26" + }, + "parameters": { + "id": 14473, + "nodeType": "ParameterList", + "parameters": [], + "src": "2577:2:26" + }, + "returnParameters": { + "id": 14477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14476, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14481, + "src": "2610:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 14475, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "2610:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2609:8:26" + }, + "scope": 16593, + "src": "2555:90:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13076 + ], + "body": { + "id": 14500, + "nodeType": "Block", + "src": "2977:107:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 14488, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2988:5:26", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV1Converter_$16593", + "typeString": "contract super LiquidityPoolV1Converter" + } + }, + "id": 14490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptAnchorOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 13076, + "src": "2988:27:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 14491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2988:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14492, + "nodeType": "ExpressionStatement", + "src": "2988:29:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14494, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 14481 + ], + "referencedDeclaration": 14481, + "src": "3046:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 14495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3046:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 14496, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "3063:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 14497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3071:4:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14493, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "3035:10:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 14498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3035:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14499, + "nodeType": "EmitStatement", + "src": "3030:46:26" + } + ] + }, + "documentation": { + "id": 14482, + "nodeType": "StructuredDocumentation", + "src": "2653:259:26", + "text": " @dev accepts ownership of the anchor after an ownership transfer\n also activates the converter\n can only be called by the contract owner\n note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "functionSelector": "cdc91c69", + "id": 14501, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14486, + "modifierName": { + "argumentTypes": null, + "id": 14485, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "2967:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2967:9:26" + } + ], + "name": "acceptAnchorOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14484, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2958:8:26" + }, + "parameters": { + "id": 14483, + "nodeType": "ParameterList", + "parameters": [], + "src": "2948:2:26" + }, + "returnParameters": { + "id": 14487, + "nodeType": "ParameterList", + "parameters": [], + "src": "2977:0:26" + }, + "scope": 16593, + "src": "2918:166:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 14544, + "nodeType": "Block", + "src": "3458:240:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14515, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14504, + "src": "3486:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14516, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14506, + "src": "3494:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 14512, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3469:5:26", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV1Converter_$16593", + "typeString": "contract super LiquidityPoolV1Converter" + } + }, + "id": 14514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "3469:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 14517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3469:33:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14518, + "nodeType": "ExpressionStatement", + "src": "3469:33:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14519, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "3515:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14520, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3545:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3545:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 14522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3569:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3545:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 14531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14524, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3587:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14528, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14525, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3596:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14527, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3610:1:26", + "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": "3596:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3587:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14529, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "3587:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "353030303030", + "id": 14530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3624:6:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_500000_by_1", + "typeString": "int_const 500000" + }, + "value": "500000" + }, + "src": "3587:43:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3545:85:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 14540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14533, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "3647:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14537, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14534, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "3656:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14536, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14535, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3670:1:26", + "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": "3656:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3647:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "3647:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "353030303030", + "id": 14539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3684:6:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_500000_by_1", + "typeString": "int_const 500000" + }, + "value": "500000" + }, + "src": "3647:43:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3545:145:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3515:175:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 14543, + "nodeType": "ExpressionStatement", + "src": "3515:175:26" + } + ] + }, + "documentation": { + "id": 14502, + "nodeType": "StructuredDocumentation", + "src": "3092:278:26", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 14545, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14510, + "modifierName": { + "argumentTypes": null, + "id": 14509, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "3448:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3448:9:26" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3439:8:26" + }, + "parameters": { + "id": 14507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14504, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14545, + "src": "3396:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14503, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "3396:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14506, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14545, + "src": "3416:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 14505, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "3416:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3395:36:26" + }, + "returnParameters": { + "id": 14511, + "nodeType": "ParameterList", + "parameters": [], + "src": "3458:0:26" + }, + "scope": 16593, + "src": "3376:322:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 14612, + "nodeType": "Block", + "src": "4407:574:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14569, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4453:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 14570, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4469:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "4453:28:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 14572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4483:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 14568, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4445:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4445:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14574, + "nodeType": "ExpressionStatement", + "src": "4445:63:26" + }, + { + "assignments": [ + 14576 + ], + "declarations": [ + { + "constant": false, + "id": 14576, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14612, + "src": "4521:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4521:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14599, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14584, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4634:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14583, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4619:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4619:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14586, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4662:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14588, + "indexExpression": { + "argumentTypes": null, + "id": 14587, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4671:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4662:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14589, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4662:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14591, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4721:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14590, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "4706:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4706:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14593, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "4749:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14595, + "indexExpression": { + "argumentTypes": null, + "id": 14594, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4758:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4749:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14596, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "4749:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 14597, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14552, + "src": "4793:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14579, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "4563:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 14578, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "4553:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 14580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4553:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14577, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "4538:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 14581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4538:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 14582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "crossReserveTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13120, + "src": "4538:66:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 14598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4538:273:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4521:290:26" + }, + { + "assignments": [ + 14601 + ], + "declarations": [ + { + "constant": false, + "id": 14601, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14612, + "src": "4902:11:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4902:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14605, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14603, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14576, + "src": "4929:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14602, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "4916:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 14604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4916:20:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4902:34:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14606, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14576, + "src": "4955:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14607, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14601, + "src": "4964:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4955:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14609, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14601, + "src": "4969:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14610, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4954:19:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14567, + "id": 14611, + "nodeType": "Return", + "src": "4947:26:26" + } + ] + }, + "documentation": { + "id": 14546, + "nodeType": "StructuredDocumentation", + "src": "3706:421:26", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fee\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 14613, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14556, + "modifierName": { + "argumentTypes": null, + "id": 14555, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "4287:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4287:6:26" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 14558, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14548, + "src": "4316:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 14559, + "modifierName": { + "argumentTypes": null, + "id": 14557, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4303:12:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4303:26:26" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 14561, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14550, + "src": "4352:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 14562, + "modifierName": { + "argumentTypes": null, + "id": 14560, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4339:12:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4339:26:26" + } + ], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14554, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4269:8:26" + }, + "parameters": { + "id": 14553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14548, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4161:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14547, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4161:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14550, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4187:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14549, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4187:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14552, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4213:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14551, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4213:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4160:69:26" + }, + "returnParameters": { + "id": 14567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14564, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4384:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14563, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14566, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14613, + "src": "4393:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14565, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4393:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4383:18:26" + }, + "scope": 16593, + "src": "4133:848:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 14757, + "nodeType": "Block", + "src": "5767:1649:26", + "statements": [ + { + "assignments": [ + 14631, + 14633 + ], + "declarations": [ + { + "constant": false, + "id": 14631, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14757, + "src": "5826:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14630, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5826:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14633, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14757, + "src": "5842:11:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14632, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5842:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14639, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14635, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "5876:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14636, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "5890:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14637, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "5904:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14634, + "name": "targetAmountAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 14613 + ], + "referencedDeclaration": 14613, + "src": "5857:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 14638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5857:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5825:87:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14641, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "5993:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6003:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5993:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 14644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6006:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 14640, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5985:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5985:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14646, + "nodeType": "ExpressionStatement", + "src": "5985:46:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14648, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6119:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14650, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6143:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14649, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6128:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6128:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6119:37:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14647, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "6112:6:26", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 14653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6112:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14654, + "nodeType": "ExpressionStatement", + "src": "6112:45:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14655, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6237:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14656, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "6253:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "6237:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14667, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6380:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6380:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14669, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6393:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6380:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14680, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6455:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14679, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6440:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 14681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6440:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14675, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6429:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 14674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6421:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14673, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6421:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6421:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 14671, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6398:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 14672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21422, + "src": "6398:22:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 14677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6398:37:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "6398:41:26", + "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": 14682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6398:71:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14683, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "6473:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6398:82:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6380:100:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 14686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6482:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 14666, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6372:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6372:131:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14688, + "nodeType": "ExpressionStatement", + "src": "6372:131:26" + }, + "id": 14689, + "nodeType": "IfStatement", + "src": "6233:270:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14659, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6295:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6295:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14661, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "6308:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6295:20:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6317:25:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6287:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6287:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14665, + "nodeType": "ExpressionStatement", + "src": "6287:56:26" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14691, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "6573:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14690, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "6554:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 14692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6554:32:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14693, + "nodeType": "ExpressionStatement", + "src": "6554:32:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14694, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6597:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14696, + "indexExpression": { + "argumentTypes": null, + "id": 14695, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6606:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6597:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14697, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "6597:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14703, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6665:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14698, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "6630:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14700, + "indexExpression": { + "argumentTypes": null, + "id": 14699, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6639:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6630:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14701, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "6630:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "6630:34:26", + "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": 14704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6630:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6597:75:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14706, + "nodeType": "ExpressionStatement", + "src": "6597:75:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14707, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6759:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14708, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "6775:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "6759:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14717, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "6880:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14718, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14624, + "src": "6894:12:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 14719, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6908:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14716, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "6867:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 14720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6867:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14721, + "nodeType": "ExpressionStatement", + "src": "6867:48:26" + }, + "id": 14722, + "nodeType": "IfStatement", + "src": "6755:160:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14713, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "6831:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14710, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14624, + "src": "6809:12:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 14712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6809:21:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 14714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6809:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14715, + "nodeType": "ExpressionStatement", + "src": "6809:29:26" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 14728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14723, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "6975:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14724, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "6993:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14725, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "7021:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7021:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6993:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6975:52:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14740, + "nodeType": "IfStatement", + "src": "6971:171:26", + "trueBody": { + "id": 14739, + "nodeType": "Block", + "src": "7029:113:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 14732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14729, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "7044:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14730, + "name": "recentAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14908, + "src": "7062:17:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 14731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7062:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "7044:37:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 14733, + "nodeType": "ExpressionStatement", + "src": "7044:37:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 14734, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "7096:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14735, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "7124:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7124:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7096:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14738, + "nodeType": "ExpressionStatement", + "src": "7096:34:26" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14742, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "7220:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14743, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "7234:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14744, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14622, + "src": "7248:7:26", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 14745, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14620, + "src": "7257:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14746, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "7266:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14747, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14633, + "src": "7274:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14741, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "7196:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 14748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7196:82:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14749, + "nodeType": "ExpressionStatement", + "src": "7196:82:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14751, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14616, + "src": "7355:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 14752, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14618, + "src": "7369:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 14750, + "name": "dispatchTokenRateUpdateEvents", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16397, + "src": "7325:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token)" + } + }, + "id": 14753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7325:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14754, + "nodeType": "ExpressionStatement", + "src": "7325:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14755, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14631, + "src": "7402:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14629, + "id": 14756, + "nodeType": "Return", + "src": "7395:13:26" + } + ] + }, + "documentation": { + "id": 14614, + "nodeType": "StructuredDocumentation", + "src": "4989:569:26", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 14758, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 14626, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5726:8:26" + }, + "parameters": { + "id": 14625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14616, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5583:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14615, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "5583:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14618, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5609:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14617, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "5609:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14620, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5635:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14619, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5635:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14622, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5652:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 14621, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5652:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14624, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5669:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 14623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5669:15:26", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5582:116:26" + }, + "returnParameters": { + "id": 14629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14628, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14758, + "src": "5753:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14627, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5753:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5752:9:26" + }, + "scope": 16593, + "src": "5564:1852:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 14797, + "nodeType": "Block", + "src": "7904:348:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14769, + "name": "isStandardPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14440, + "src": "7968:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f4e5f5354414e444152445f504f4f4c", + "id": 14770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7984:23:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bc9141faf76a54775cecd0a0d87b229f48265d7ddb667bb1d0e384e600638f7c", + "typeString": "literal_string \"ERR_NON_STANDARD_POOL\"" + }, + "value": "ERR_NON_STANDARD_POOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bc9141faf76a54775cecd0a0d87b229f48265d7ddb667bb1d0e384e600638f7c", + "typeString": "literal_string \"ERR_NON_STANDARD_POOL\"" + } + ], + "id": 14768, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7960:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7960:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14772, + "nodeType": "ExpressionStatement", + "src": "7960:48:26" + }, + { + "assignments": [ + 14774 + ], + "declarations": [ + { + "constant": false, + "id": 14774, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14797, + "src": "8074:20:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14773, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "8074:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14777, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14775, + "name": "recentAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14908, + "src": "8097:17:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 14776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8097:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8074:42:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14778, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14761, + "src": "8131:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14779, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8141:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14781, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8155:1:26", + "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": "8141:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "8131:26:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14790, + "nodeType": "IfStatement", + "src": "8127:82:26", + "trueBody": { + "id": 14789, + "nodeType": "Block", + "src": "8159:50:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14783, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8182:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "8182:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14785, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8190:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14786, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "8190:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14787, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8181:16:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14767, + "id": 14788, + "nodeType": "Return", + "src": "8174:23:26" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14791, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8229:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "8229:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14793, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14774, + "src": "8237:4:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "8237:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14795, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8228:16:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 14767, + "id": 14796, + "nodeType": "Return", + "src": "8221:23:26" + } + ] + }, + "documentation": { + "id": 14759, + "nodeType": "StructuredDocumentation", + "src": "7424:386:26", + "text": " @dev returns the recent average rate of 1 `_token` in the other reserve token units\n note that the rate can only be queried for reserves in a standard pool\n @param _token token to get the rate for\n @return recent average rate between the reserves (numerator)\n @return recent average rate between the reserves (denominator)" + }, + "functionSelector": "1f0181bc", + "id": 14798, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recentAverageRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14761, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7843:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 14760, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "7843:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7842:20:26" + }, + "returnParameters": { + "id": 14767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14764, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7886:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14763, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7886:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14766, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14798, + "src": "7895:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14765, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7895:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7885:18:26" + }, + "scope": 16593, + "src": "7816:436:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 14907, + "nodeType": "Block", + "src": "8505:1634:26", + "statements": [ + { + "assignments": [ + 14805 + ], + "declarations": [ + { + "constant": false, + "id": 14805, + "mutability": "mutable", + "name": "timeElapsed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8596:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8596:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14810, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 14806, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16437, + "src": "8618:4:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 14807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8618:6:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14808, + "name": "prevAverageRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14444, + "src": "8627:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8618:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8596:56:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14811, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "8757:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8772:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8757:16:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14817, + "nodeType": "IfStatement", + "src": "8753:71:26", + "trueBody": { + "id": 14816, + "nodeType": "Block", + "src": "8775:49:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 14814, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "8797:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "functionReturnParameters": 14803, + "id": 14815, + "nodeType": "Return", + "src": "8790:22:26" + } + ] + } + }, + { + "assignments": [ + 14819 + ], + "declarations": [ + { + "constant": false, + "id": 14819, + "mutability": "mutable", + "name": "currentRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8890:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8890:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14826, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14820, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8913:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14824, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14821, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8922:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14823, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 14822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8936:1:26", + "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": "8922:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8913:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14825, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "8913:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8890:57:26" + }, + { + "assignments": [ + 14828 + ], + "declarations": [ + { + "constant": false, + "id": 14828, + "mutability": "mutable", + "name": "currentRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "8958:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14827, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8958:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14835, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14829, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "8981:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14833, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14830, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "8990:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 14832, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9004:1:26", + "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": "8990:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8981:26:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "8981:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8958:57:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14836, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9147:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14837, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9162:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9147:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14845, + "nodeType": "IfStatement", + "src": "9143:120:26", + "trueBody": { + "id": 14844, + "nodeType": "Block", + "src": "9183:80:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14840, + "name": "currentRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14819, + "src": "9219:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14841, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9236:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14839, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "9205:8:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 14842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "9205:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 14803, + "id": 14843, + "nodeType": "Return", + "src": "9198:53:26" + } + ] + } + }, + { + "assignments": [ + 14847 + ], + "declarations": [ + { + "constant": false, + "id": 14847, + "mutability": "mutable", + "name": "prevAverage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9546:27:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14846, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "9546:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14849, + "initialValue": { + "argumentTypes": null, + "id": 14848, + "name": "prevAverageRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14442, + "src": "9576:15:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9546:45:26" + }, + { + "assignments": [ + 14851 + ], + "declarations": [ + { + "constant": false, + "id": 14851, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9604:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9604:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14857, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14855, + "name": "currentRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14819, + "src": "9634:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14852, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9616:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "9616:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9616:17:26", + "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": 14856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9616:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9604:43:26" + }, + { + "assignments": [ + 14859 + ], + "declarations": [ + { + "constant": false, + "id": 14859, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9658:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14858, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9658:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14865, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14863, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9688:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14860, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9670:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14861, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "9670:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9670:17:26", + "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": 14864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9670:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9658:43:26" + }, + { + "assignments": [ + 14867 + ], + "declarations": [ + { + "constant": false, + "id": 14867, + "mutability": "mutable", + "name": "newRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9809:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9809:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14880, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14877, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9879:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14875, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14851, + "src": "9873:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9873:5:26", + "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": 14878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9873:18:26", + "tryCall": false, + "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": 14872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14870, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9834:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 14871, + "name": "timeElapsed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14805, + "src": "9856:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9834:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 14868, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14859, + "src": "9828:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9828:5:26", + "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": 14873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9828:40:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "9828:44:26", + "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": 14879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9828:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9809:83:26" + }, + { + "assignments": [ + 14882 + ], + "declarations": [ + { + "constant": false, + "id": 14882, + "mutability": "mutable", + "name": "newRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14907, + "src": "9903:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9903:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14891, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14889, + "name": "AVERAGE_RATE_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14437, + "src": "9958:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14886, + "name": "currentRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14828, + "src": "9940:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14883, + "name": "prevAverage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14847, + "src": "9922:11:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 14884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "9922:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9922:17:26", + "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": 14887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9922:31:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "9922:35:26", + "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": 14890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9922:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9903:75:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 14900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 14892, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "9992:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14893, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10002:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 14894, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "9991:20:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14896, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "10027:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14897, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10037:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14898, + "name": "MAX_RATE_FACTOR_LOWER_BOUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14434, + "src": "10047:27:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14895, + "name": "reducedRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16470, + "src": "10014:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 14899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10014:61:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "src": "9991:84:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14901, + "nodeType": "ExpressionStatement", + "src": "9991:84:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14903, + "name": "newRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14867, + "src": "10107:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 14904, + "name": "newRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14882, + "src": "10120:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14902, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "10093:8:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 14905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "10093:38:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 14803, + "id": 14906, + "nodeType": "Return", + "src": "10086:45:26" + } + ] + }, + "documentation": { + "id": 14799, + "nodeType": "StructuredDocumentation", + "src": "8260:170:26", + "text": " @dev returns the recent average rate of 1 reserve token 0 in reserve token 1 units\n @return recent average rate between the reserves" + }, + "id": 14908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "recentAverageRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14800, + "nodeType": "ParameterList", + "parameters": [], + "src": "8462:2:26" + }, + "returnParameters": { + "id": 14803, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14802, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14908, + "src": "8488:15:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 14801, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "8488:8:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8487:17:26" + }, + "scope": 16593, + "src": "8436:1703:26", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 15014, + "nodeType": "Block", + "src": "10789:1325:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14927, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "10855:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 14928, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "10871:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 14929, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14917, + "src": "10888:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14926, + "name": "verifyLiquidityInput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15634, + "src": "10834:20:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) view" + } + }, + "id": 14930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10834:65:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14931, + "nodeType": "ExpressionStatement", + "src": "10834:65:26" + }, + { + "body": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 14947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14943, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11100:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 14945, + "indexExpression": { + "argumentTypes": null, + "id": 14944, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11115:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11100:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 14946, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "11121:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "11100:40:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14958, + "nodeType": "IfStatement", + "src": "11096:130:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14949, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "11167:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 14951, + "indexExpression": { + "argumentTypes": null, + "id": 14950, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11183:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11167:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11189:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11189:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11167:31:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 14955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11200:25:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 14948, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11159:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11159:67:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14957, + "nodeType": "ExpressionStatement", + "src": "11159:67:26" + } + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14936, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11051:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14937, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11055:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 14938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11055:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11051:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 14959, + "initializationExpression": { + "assignments": [ + 14933 + ], + "declarations": [ + { + "constant": false, + "id": 14933, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 14959, + "src": "11036:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11036:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14935, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 14934, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11048:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "11036:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 14941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "11078:3:26", + "subExpression": { + "argumentTypes": null, + "id": 14940, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14933, + "src": "11078:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14942, + "nodeType": "ExpressionStatement", + "src": "11078:3:26" + }, + "nodeType": "ForStatement", + "src": "11031:195:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 14960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11346:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 14961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11346:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 14962, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11358:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11346:13:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 14973, + "nodeType": "IfStatement", + "src": "11342:112:26", + "trueBody": { + "id": 14972, + "nodeType": "Block", + "src": "11361:93:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 14965, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "11384:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 14967, + "indexExpression": { + "argumentTypes": null, + "id": 14966, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "11393:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11384:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 14968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "11384:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4e4f5f4554485f52455345525645", + "id": 14969, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11421:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_467f328539cc1e1b7e8c0e459b4245a158bd2d844c358525ec924cd65d4df604", + "typeString": "literal_string \"ERR_NO_ETH_RESERVE\"" + }, + "value": "ERR_NO_ETH_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_467f328539cc1e1b7e8c0e459b4245a158bd2d844c358525ec924cd65d4df604", + "typeString": "literal_string \"ERR_NO_ETH_RESERVE\"" + } + ], + "id": 14964, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11376:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11376:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14971, + "nodeType": "ExpressionStatement", + "src": "11376:66:26" + } + ] + } + }, + { + "assignments": [ + 14975 + ], + "declarations": [ + { + "constant": false, + "id": 14975, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15014, + "src": "11499:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14974, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11499:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14984, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14979, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11541:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 14978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11533:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 14977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11533:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 14980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11533:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 14976, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "11521:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 14981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11521:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 14982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "11521:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 14983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11521:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11499:64:26" + }, + { + "assignments": [ + 14986 + ], + "declarations": [ + { + "constant": false, + "id": 14986, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15014, + "src": "11669:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11669:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 14992, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 14988, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14912, + "src": "11705:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 14989, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14915, + "src": "11721:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 14990, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14975, + "src": "11738:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 14987, + "name": "addLiquidityToPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15664, + "src": "11686:18:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) returns (uint256)" + } + }, + "id": 14991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11686:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11669:81:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 14996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 14994, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "11877:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 14995, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14917, + "src": "11887:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11877:20:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 14997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11899:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 14993, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11869:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 14998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11869:51:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14999, + "nodeType": "ExpressionStatement", + "src": "11869:51:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15007, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12009:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12009:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15009, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "12021:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15003, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "11994:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15002, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11986:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15001, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11986:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11986:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15000, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "11974:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11974:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21508, + "src": "11974:34:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11974:54:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15011, + "nodeType": "ExpressionStatement", + "src": "11974:54:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14986, + "src": "12100:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 14925, + "id": 15013, + "nodeType": "Return", + "src": "12093:13:26" + } + ] + }, + "documentation": { + "id": 14909, + "nodeType": "StructuredDocumentation", + "src": "10147:423:26", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n note that prior to version 28, you should use 'fund' instead\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _minReturn token minimum return-amount\n @return amount of pool tokens issued" + }, + "functionSelector": "7d8916bd", + "id": 15015, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 14920, + "modifierName": { + "argumentTypes": null, + "id": 14919, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "10731:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10731:9:26" + }, + { + "arguments": null, + "id": 14922, + "modifierName": { + "argumentTypes": null, + "id": 14921, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "10750:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10750:6:26" + } + ], + "name": "addLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 14918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14912, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10598:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 14910, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10598:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 14911, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10598:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14915, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10635:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 14913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10635:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 14914, + "length": null, + "nodeType": "ArrayTypeName", + "src": "10635:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 14917, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10669:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10669:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10597:91:26" + }, + "returnParameters": { + "id": 14925, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 14924, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15015, + "src": "10775:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10775:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10774:9:26" + }, + "scope": 16593, + "src": "10576:1538:26", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15070, + "nodeType": "Block", + "src": "12837:569:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15035, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15021, + "src": "12903:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15036, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15024, + "src": "12919:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15037, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "12945:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15034, + "name": "verifyLiquidityInput", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15634, + "src": "12882:20:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) view" + } + }, + "id": 15038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12882:71:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15039, + "nodeType": "ExpressionStatement", + "src": "12882:71:26" + }, + { + "assignments": [ + 15041 + ], + "declarations": [ + { + "constant": false, + "id": 15041, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15070, + "src": "13033:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13033:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15050, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15045, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "13075:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15044, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13067:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13067:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13067:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15042, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "13055:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13055:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "13055:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13055:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13033:64:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15058, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13183:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13183:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15060, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "13195:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15054, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "13166:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13158:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13158:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13158:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15051, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "13146:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21515, + "src": "13146:36:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13146:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15062, + "nodeType": "ExpressionStatement", + "src": "13146:57:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15064, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15021, + "src": "13335:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15065, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15024, + "src": "13351:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15066, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15041, + "src": "13377:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15067, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15018, + "src": "13390:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15063, + "name": "removeLiquidityFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16125, + "src": "13311:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256,uint256) returns (uint256[] memory)" + } + }, + "id": 15068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13311:87:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15033, + "id": 15069, + "nodeType": "Return", + "src": "13304:94:26" + } + ] + }, + "documentation": { + "id": 15016, + "nodeType": "StructuredDocumentation", + "src": "12122:495:26", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n note that prior to version 28, you should use 'liquidate' instead\n @param _amount token amount\n @param _reserveTokens address of each reserve token\n @param _reserveMinReturnAmounts minimum return-amount of each reserve token\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "functionSelector": "b127c0a5", + "id": 15071, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15027, + "modifierName": { + "argumentTypes": null, + "id": 15026, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "12770:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12770:9:26" + }, + { + "arguments": null, + "id": 15029, + "modifierName": { + "argumentTypes": null, + "id": 15028, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "12789:6:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12789:6:26" + } + ], + "name": "removeLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15025, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15018, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12648:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12648:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15021, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12665:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15019, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "12665:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15020, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12665:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15024, + "mutability": "mutable", + "name": "_reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12702:41:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15022, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12702:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15023, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12702:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12647:97:26" + }, + "returnParameters": { + "id": 15033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15071, + "src": "12814:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15030, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12814:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15031, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12814:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12813:18:26" + }, + "scope": 16593, + "src": "12623:783:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15276, + "nodeType": "Block", + "src": "14008:2368:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 15081, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "14019:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 15082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14019:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15083, + "nodeType": "ExpressionStatement", + "src": "14019:21:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15084, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14051:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15086, + "indexExpression": { + "argumentTypes": null, + "id": 15085, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14060:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14051:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15087, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14051:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15093, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14133:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14133:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15088, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14091:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15090, + "indexExpression": { + "argumentTypes": null, + "id": 15089, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14100:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14091:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14091:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "14091:41:26", + "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": 15095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14091:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14051:92:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15097, + "nodeType": "ExpressionStatement", + "src": "14051:92:26" + }, + { + "assignments": [ + 15099 + ], + "declarations": [ + { + "constant": false, + "id": 15099, + "mutability": "mutable", + "name": "supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14156:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15098, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14156:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15108, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15103, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "14193:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14185:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14185:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14185:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15100, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "14173:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14173:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "14173:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14173:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14156:59:26" + }, + { + "assignments": [ + 15110 + ], + "declarations": [ + { + "constant": false, + "id": 15110, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14226:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15109, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "14226:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15116, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15113, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "14276:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15112, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "14266:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14266:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15111, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "14251:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14251:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14226:66:26" + }, + { + "assignments": [ + 15118 + ], + "declarations": [ + { + "constant": false, + "id": 15118, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15276, + "src": "14496:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15117, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14496:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15121, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15119, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14519:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14519:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14496:43:26" + }, + { + "body": { + "id": 15260, + "nodeType": "Block", + "src": "14593:1569:26", + "statements": [ + { + "assignments": [ + 15133 + ], + "declarations": [ + { + "constant": false, + "id": 15133, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14608:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15132, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "14608:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15137, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15134, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "14635:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15136, + "indexExpression": { + "argumentTypes": null, + "id": 15135, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14649:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14635:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14608:43:26" + }, + { + "assignments": [ + 15139 + ], + "declarations": [ + { + "constant": false, + "id": 15139, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14666:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15138, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14666:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15144, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15140, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "14687:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15142, + "indexExpression": { + "argumentTypes": null, + "id": 15141, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "14696:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14687:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "14687:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14666:51:26" + }, + { + "assignments": [ + 15146 + ], + "declarations": [ + { + "constant": false, + "id": 15146, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "14732:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15145, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14732:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15154, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15149, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15099, + "src": "14773:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15150, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15139, + "src": "14781:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15151, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "14793:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15152, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "14807:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15147, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15110, + "src": "14756:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "14756:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14756:59:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14732:83:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15155, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "14904:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 15156, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "14920:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "14904:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 15218, + "nodeType": "Block", + "src": "15409:107:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15208, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15445:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15209, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15459:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15459:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15213, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15479:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15212, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15471:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15471:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15471:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15215, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15486:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15207, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "15428:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15428:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15217, + "nodeType": "ExpressionStatement", + "src": "15428:72:26" + } + ] + }, + "id": 15219, + "nodeType": "IfStatement", + "src": "14900:616:26", + "trueBody": { + "id": 15206, + "nodeType": "Block", + "src": "14941:449:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15158, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14964:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14964:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 15160, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "14976:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14964:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15174, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15107:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15107:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15176, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15119:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15107:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15204, + "nodeType": "IfStatement", + "src": "15103:272:26", + "trueBody": { + "id": 15203, + "nodeType": "Block", + "src": "15134:241:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15165:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15165:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15178:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15165:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4554485f56414c5545", + "id": 15183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15181:23:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e220b3a28f19681b7484bf734e3fcd080dc85319844b89942d75a3bc56505e89", + "typeString": "literal_string \"ERR_INVALID_ETH_VALUE\"" + }, + "value": "ERR_INVALID_ETH_VALUE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e220b3a28f19681b7484bf734e3fcd080dc85319844b89942d75a3bc56505e89", + "typeString": "literal_string \"ERR_INVALID_ETH_VALUE\"" + } + ], + "id": 15178, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15157:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15157:48:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15185, + "nodeType": "ExpressionStatement", + "src": "15157:48:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15187, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "15245:10:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15257:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15257:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15277:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15269:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15269:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15269:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15194, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15284:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15186, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "15228:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15228:70:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15196, + "nodeType": "ExpressionStatement", + "src": "15228:70:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15200, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15341:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15197, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "15321:10:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "id": 15199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 21474, + "src": "15321:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 15201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15321:34:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15202, + "nodeType": "ExpressionStatement", + "src": "15321:34:26" + } + ] + } + }, + "id": 15205, + "nodeType": "IfStatement", + "src": "14960:415:26", + "trueBody": { + "id": 15173, + "nodeType": "Block", + "src": "14991:89:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15167, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15034:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15034:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 15169, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15046:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15034:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15162, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15014:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15014:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 15166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15014:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 15171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15014:46:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15172, + "nodeType": "ExpressionStatement", + "src": "15014:46:26" + } + ] + } + } + ] + } + }, + { + "assignments": [ + 15221 + ], + "declarations": [ + { + "constant": false, + "id": 15221, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "15573:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15573:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15226, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15224, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15616:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15222, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15139, + "src": "15601:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "15601:14:26", + "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": 15225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15601:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15573:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15227, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "15645:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15229, + "indexExpression": { + "argumentTypes": null, + "id": 15228, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15654:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15645:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15230, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "15645:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15231, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "15678:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15645:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15233, + "nodeType": "ExpressionStatement", + "src": "15645:50:26" + }, + { + "assignments": [ + 15235 + ], + "declarations": [ + { + "constant": false, + "id": 15235, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15260, + "src": "15712:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15234, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15712:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15240, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15238, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "15752:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15236, + "name": "supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15099, + "src": "15741:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "15741:10:26", + "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": 15239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15741:19:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15712:48:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15242, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15866:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15866:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15244, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "15878:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15245, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15146, + "src": "15892:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15246, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "15907:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15247, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15235, + "src": "15926:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15241, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "15851:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15851:94:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15249, + "nodeType": "EmitStatement", + "src": "15846:99:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15251, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15235, + "src": "16067:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15252, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "16087:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15253, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15221, + "src": "16101:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15254, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16120:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15256, + "indexExpression": { + "argumentTypes": null, + "id": 15255, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15133, + "src": "16129:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16120:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15257, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16120:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15250, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "16034:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16034:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15259, + "nodeType": "ExpressionStatement", + "src": "16034:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15126, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14570:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15127, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15118, + "src": "14574:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14570:16:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15261, + "initializationExpression": { + "assignments": [ + 15123 + ], + "declarations": [ + { + "constant": false, + "id": 15123, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15261, + "src": "14555:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14555:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15125, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14567:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "14555:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14588:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15129, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15123, + "src": "14588:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15131, + "nodeType": "ExpressionStatement", + "src": "14588:3:26" + }, + "nodeType": "ForStatement", + "src": "14550:1612:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15269, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16269:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16269:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15271, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "16281:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15265, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "16254:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16246:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16246:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16246:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15262, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "16234:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21508, + "src": "16234:34:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15273, + "nodeType": "ExpressionStatement", + "src": "16234:55:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15274, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15074, + "src": "16361:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15080, + "id": 15275, + "nodeType": "Return", + "src": "16354:14:26" + } + ] + }, + "documentation": { + "id": 15072, + "nodeType": "StructuredDocumentation", + "src": "13414:473:26", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n for example, if the caller increases the supply by 10%,\n then it will cost an amount equal to 10% of each reserve token balance\n note that starting from version 28, you should use 'addLiquidity' instead\n @param _amount amount to increase the supply by (in the pool token)\n @return amount of pool tokens issued" + }, + "functionSelector": "ca1d209d", + "id": 15277, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15077, + "modifierName": { + "argumentTypes": null, + "id": 15076, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "13966:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13966:9:26" + } + ], + "name": "fund", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15074, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15277, + "src": "13907:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13907:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13906:17:26" + }, + "returnParameters": { + "id": 15080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15277, + "src": "13994:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13994:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13993:9:26" + }, + "scope": 16593, + "src": "13893:2483:26", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15355, + "nodeType": "Block", + "src": "17000:514:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15289, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17019:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17029:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "17019:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f414d4f554e54", + "id": 15292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17032:17:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + }, + "value": "ERR_ZERO_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + } + ], + "id": 15288, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "17011:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17011:39:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15294, + "nodeType": "ExpressionStatement", + "src": "17011:39:26" + }, + { + "assignments": [ + 15296 + ], + "declarations": [ + { + "constant": false, + "id": 15296, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15355, + "src": "17063:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17063:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15305, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15300, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "17105:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17097:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17097:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17097:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15297, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "17085:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17085:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "17085:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17085:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17063:64:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15313, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17175:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17175:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15315, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17187:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15309, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "17158:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17150:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17150:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17150:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15306, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "17138:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17138:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21515, + "src": "17138:36:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 15316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17138:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15317, + "nodeType": "ExpressionStatement", + "src": "17138:57:26" + }, + { + "assignments": [ + 15322 + ], + "declarations": [ + { + "constant": false, + "id": 15322, + "mutability": "mutable", + "name": "reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15355, + "src": "17208:40:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17208:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15321, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17208:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15329, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15326, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "17265:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17265:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "17251:13:26", + "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": 15323, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17255:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15324, + "length": null, + "nodeType": "ArrayTypeName", + "src": "17255:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17251:35:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17208:78:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15341, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17371:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15343, + "indexExpression": { + "argumentTypes": null, + "id": 15342, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17395:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17371:26:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 15344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17400:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "17371:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15346, + "nodeType": "ExpressionStatement", + "src": "17371:30:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15334, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17317:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15335, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17321:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17321:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17317:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15347, + "initializationExpression": { + "assignments": [ + 15331 + ], + "declarations": [ + { + "constant": false, + "id": 15331, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15347, + "src": "17302:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17302:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15333, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17314:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17302:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "17353:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15338, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15331, + "src": "17353:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15340, + "nodeType": "ExpressionStatement", + "src": "17353:3:26" + }, + "nodeType": "ForStatement", + "src": "17297:104:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15349, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "17445:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + { + "argumentTypes": null, + "id": 15350, + "name": "reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15322, + "src": "17460:23:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15351, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15296, + "src": "17485:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15352, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15280, + "src": "17498:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15348, + "name": "removeLiquidityFromPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16125, + "src": "17421:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256,uint256) returns (uint256[] memory)" + } + }, + "id": 15353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17421:85:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15287, + "id": 15354, + "nodeType": "Return", + "src": "17414:92:26" + } + ] + }, + "documentation": { + "id": 15278, + "nodeType": "StructuredDocumentation", + "src": "16384:498:26", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n for example, if the holder sells 10% of the supply,\n then they will receive 10% of each reserve token balance in return\n note that starting from version 28, you should use 'removeLiquidity' instead\n @param _amount amount to liquidate (in the pool token)\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "functionSelector": "415f1240", + "id": 15356, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 15283, + "modifierName": { + "argumentTypes": null, + "id": 15282, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "16949:9:26", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "16949:9:26" + } + ], + "name": "liquidate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15280, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15356, + "src": "16907:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15279, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16907:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16906:17:26" + }, + "returnParameters": { + "id": 15287, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15286, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15356, + "src": "16977:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15284, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15285, + "length": null, + "nodeType": "ArrayTypeName", + "src": "16977:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "16976:18:26" + }, + "scope": 16593, + "src": "16888:626:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15447, + "nodeType": "Block", + "src": "18354:612:26", + "statements": [ + { + "assignments": [ + 15374 + ], + "declarations": [ + { + "constant": false, + "id": 15374, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18365:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18365:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15373, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18365:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15381, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15378, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18413:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18413:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "18399:13:26", + "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": 15375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15376, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18403:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18399:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18365:70:26" + }, + { + "assignments": [ + 15383 + ], + "declarations": [ + { + "constant": false, + "id": 15383, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18448:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18448:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15392, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15387, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "18490:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18482:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18482:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18482:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15384, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "18470:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18470:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "18470:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18470:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18448:64:26" + }, + { + "assignments": [ + 15394 + ], + "declarations": [ + { + "constant": false, + "id": 15394, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18523:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15393, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "18523:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15400, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15397, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "18573:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15396, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "18563:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18563:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15395, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "18548:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18548:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18523:66:26" + }, + { + "assignments": [ + 15402 + ], + "declarations": [ + { + "constant": false, + "id": 15402, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15447, + "src": "18600:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18600:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15405, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15383, + "src": "18642:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15406, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "18655:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15410, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15407, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18664:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15409, + "indexExpression": { + "argumentTypes": null, + "id": 15408, + "name": "_reserveTokenIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15362, + "src": "18679:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18664:34:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18655:44:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15411, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "18655:52:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15412, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "18709:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15413, + "name": "_reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15364, + "src": "18723:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15403, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15394, + "src": "18617:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "18617:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18617:121:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18600:138:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15427, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18816:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15429, + "indexExpression": { + "argumentTypes": null, + "id": 15428, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18831:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18816:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15432, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15383, + "src": "18853:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15433, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "18866:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15437, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15434, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15360, + "src": "18875:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15436, + "indexExpression": { + "argumentTypes": null, + "id": 15435, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18890:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18875:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18866:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15438, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "18866:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15439, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "18903:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15440, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15402, + "src": "18917:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15430, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15394, + "src": "18836:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "18836:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18836:88:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18816:108:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15443, + "nodeType": "ExpressionStatement", + "src": "18816:108:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15420, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18771:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15421, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18775:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "18775:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18771:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15444, + "initializationExpression": { + "assignments": [ + 15417 + ], + "declarations": [ + { + "constant": false, + "id": 15417, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15444, + "src": "18756:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15416, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18756:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15419, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18768:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "18756:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18798:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15424, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15417, + "src": "18798:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15426, + "nodeType": "ExpressionStatement", + "src": "18798:3:26" + }, + "nodeType": "ForStatement", + "src": "18751:173:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15445, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15374, + "src": "18944:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15369, + "id": 15446, + "nodeType": "Return", + "src": "18937:21:26" + } + ] + }, + "documentation": { + "id": 15357, + "nodeType": "StructuredDocumentation", + "src": "17522:640:26", + "text": " @dev given the amount of one of the reserve tokens to add liquidity of,\n returns the required amount of each one of the other reserve tokens\n since an empty pool can be funded with any list of non-zero input amounts,\n this function assumes that the pool is not empty (has already been funded)\n @param _reserveTokens address of each reserve token\n @param _reserveTokenIndex index of the relevant reserve token\n @param _reserveAmount amount of the relevant reserve token\n @return the required amount of each one of the reserve tokens" + }, + "functionSelector": "80d9416d", + "id": 15448, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityCost", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15360, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18194:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15358, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "18194:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15359, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18194:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15362, + "mutability": "mutable", + "name": "_reserveTokenIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18231:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18231:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15364, + "mutability": "mutable", + "name": "_reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18259:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15363, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18259:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18193:89:26" + }, + "returnParameters": { + "id": 15369, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15368, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15448, + "src": "18331:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15366, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18331:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15367, + "length": null, + "nodeType": "ArrayTypeName", + "src": "18331:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18330:18:26" + }, + "scope": 16593, + "src": "18168:798:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15488, + "nodeType": "Block", + "src": "19633:278:26", + "statements": [ + { + "assignments": [ + 15459 + ], + "declarations": [ + { + "constant": false, + "id": 15459, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15488, + "src": "19644:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15458, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19644:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15468, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15463, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "19686:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "19678:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15461, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19678:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19678:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15460, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "19666:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19666:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "19666:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19666:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19644:64:26" + }, + { + "assignments": [ + 15470 + ], + "declarations": [ + { + "constant": false, + "id": 15470, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15488, + "src": "19719:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15469, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "19719:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15476, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15473, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "19769:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15472, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "19759:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19759:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15471, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "19744:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19744:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19719:66:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15479, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15459, + "src": "19828:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15480, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19841:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15482, + "indexExpression": { + "argumentTypes": null, + "id": 15481, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15451, + "src": "19850:13:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19841:23:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15483, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19841:31:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15484, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "19874:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15485, + "name": "_reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15453, + "src": "19888:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15477, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15470, + "src": "19803:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "19803:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19803:100:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15457, + "id": 15487, + "nodeType": "Return", + "src": "19796:107:26" + } + ] + }, + "documentation": { + "id": 15449, + "nodeType": "StructuredDocumentation", + "src": "18974:512:26", + "text": " @dev given the amount of one of the reserve tokens to add liquidity of,\n returns the amount of pool tokens entitled for it\n since an empty pool can be funded with any list of non-zero input amounts,\n this function assumes that the pool is not empty (has already been funded)\n @param _reserveToken address of the reserve token\n @param _reserveAmount amount of the reserve token\n @return the amount of pool tokens entitled" + }, + "functionSelector": "4e40c260", + "id": 15489, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15454, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15451, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19520:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15450, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "19520:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15453, + "mutability": "mutable", + "name": "_reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19547:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15452, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19547:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19519:51:26" + }, + "returnParameters": { + "id": 15457, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15456, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15489, + "src": "19619:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19619:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "19618:9:26" + }, + "scope": 16593, + "src": "19492:419:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15527, + "nodeType": "Block", + "src": "20421:254:26", + "statements": [ + { + "assignments": [ + 15502 + ], + "declarations": [ + { + "constant": false, + "id": 15502, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15527, + "src": "20432:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15501, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20432:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15511, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15506, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "20474:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 15505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20466:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20466:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20466:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15503, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "20454:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 15508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20454:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 15509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "20454:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 15510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20454:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20432:64:26" + }, + { + "assignments": [ + 15513 + ], + "declarations": [ + { + "constant": false, + "id": 15513, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15527, + "src": "20507:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15512, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "20507:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15519, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15516, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "20557:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15515, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "20547:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20547:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15514, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "20532:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20532:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20507:66:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15521, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15492, + "src": "20621:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15522, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15495, + "src": "20630:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15523, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15502, + "src": "20646:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15524, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15513, + "src": "20659:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + ], + "id": 15520, + "name": "removeLiquidityReserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15986, + "src": "20591:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_uint256_$_t_contract$_IBancorFormula_$13177_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,contract IERC20Token[] memory,uint256,contract IBancorFormula) view returns (uint256[] memory)" + } + }, + "id": 15525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20591:76:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15500, + "id": 15526, + "nodeType": "Return", + "src": "20584:83:26" + } + ] + }, + "documentation": { + "id": 15490, + "nodeType": "StructuredDocumentation", + "src": "19919:340:26", + "text": " @dev returns the amount of each reserve token entitled for a given amount of pool tokens\n @param _amount amount of pool tokens\n @param _reserveTokens address of each reserve token\n @return the amount of each reserve token entitled for the given amount of pool tokens" + }, + "functionSelector": "15458837", + "id": 15528, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15492, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20296:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20296:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15495, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20313:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15493, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "20313:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15494, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20313:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20295:54:26" + }, + "returnParameters": { + "id": 15500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15499, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15528, + "src": "20398:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15497, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20398:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15498, + "length": null, + "nodeType": "ArrayTypeName", + "src": "20398:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "20397:18:26" + }, + "scope": 16593, + "src": "20265:410:26", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 15633, + "nodeType": "Block", + "src": "21236:1027:26", + "statements": [ + { + "assignments": [ + 15541 + ], + "declarations": [ + { + "constant": false, + "id": 15541, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21247:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21247:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15542, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "21247:9:26" + }, + { + "assignments": [ + 15544 + ], + "declarations": [ + { + "constant": false, + "id": 15544, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21267:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21267:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15545, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "21267:9:26" + }, + { + "assignments": [ + 15547 + ], + "declarations": [ + { + "constant": false, + "id": 15547, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15633, + "src": "21289:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15546, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21289:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15550, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15548, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21306:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21306:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21289:37:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15552, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21345:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15553, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21355:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21355:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21345:31:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21378:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15551, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21337:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21337:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15558, + "nodeType": "ExpressionStatement", + "src": "21337:63:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15560, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21419:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15561, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15535, + "src": "21429:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21429:22:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21419:32:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 15564, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21453:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 15559, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21411:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21411:63:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15566, + "nodeType": "ExpressionStatement", + "src": "21411:63:26" + }, + { + "body": { + "id": 15624, + "nodeType": "Block", + "src": "21516:621:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15578, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "21627:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15582, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15579, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21636:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15581, + "indexExpression": { + "argumentTypes": null, + "id": 15580, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21651:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21636:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21627:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9022, + "src": "21627:33:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21662:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15577, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21619:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21619:65:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15586, + "nodeType": "ExpressionStatement", + "src": "21619:65:26" + }, + { + "body": { + "id": 15606, + "nodeType": "Block", + "src": "21728:104:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15597, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21751:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 15599, + "indexExpression": { + "argumentTypes": null, + "id": 15598, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21765:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21751:16:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15600, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15532, + "src": "21771:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15602, + "indexExpression": { + "argumentTypes": null, + "id": 15601, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21786:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21771:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "21751:37:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15605, + "nodeType": "IfStatement", + "src": "21747:69:26", + "trueBody": { + "id": 15604, + "nodeType": "Break", + "src": "21811:5:26" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15591, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21711:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15592, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21715:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21711:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15607, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 15589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 15587, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21704:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 15588, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21708:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21704:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15590, + "nodeType": "ExpressionStatement", + "src": "21704:5:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21723:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15594, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21723:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15596, + "nodeType": "ExpressionStatement", + "src": "21723:3:26" + }, + "nodeType": "ForStatement", + "src": "21699:133:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15609, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15544, + "src": "21942:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15610, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21946:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21942:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f52455345525645", + "id": 15612, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21954:21:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + }, + "value": "ERR_INVALID_RESERVE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f153897d46b1410527faf37dfe95496d4a79980282840ba17da0adc4406792c", + "typeString": "literal_string \"ERR_INVALID_RESERVE\"" + } + ], + "id": 15608, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21934:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21934:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15614, + "nodeType": "ExpressionStatement", + "src": "21934:42:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15616, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15535, + "src": "22080:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15618, + "indexExpression": { + "argumentTypes": null, + "id": 15617, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "22096:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22080:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22101:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22080:22:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 15621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22104:20:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 15615, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22072:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22072:53:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15623, + "nodeType": "ExpressionStatement", + "src": "22072:53:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15571, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21499:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 15572, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15547, + "src": "21503:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21499:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15625, + "initializationExpression": { + "expression": { + "argumentTypes": null, + "id": 15569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 15567, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21492:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 15568, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21496:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "21492:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15570, + "nodeType": "ExpressionStatement", + "src": "21492:5:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21511:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15574, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15541, + "src": "21511:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15576, + "nodeType": "ExpressionStatement", + "src": "21511:3:26" + }, + "nodeType": "ForStatement", + "src": "21487:650:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15627, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15537, + "src": "22224:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22234:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22224:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f414d4f554e54", + "id": 15630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22237:17:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + }, + "value": "ERR_ZERO_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7361098e42735bca910fe31e755673f84106720004757c7a37e5f52f92430b9e", + "typeString": "literal_string \"ERR_ZERO_AMOUNT\"" + } + ], + "id": 15626, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22216:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22216:39:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15632, + "nodeType": "ExpressionStatement", + "src": "22216:39:26" + } + ] + }, + "documentation": { + "id": 15529, + "nodeType": "StructuredDocumentation", + "src": "20683:393:26", + "text": " @dev verifies that a given array of tokens is identical to the converter's array of reserve tokens\n we take this input in order to allow specifying the corresponding reserve amounts in any order\n @param _reserveTokens array of reserve tokens\n @param _reserveAmounts array of reserve amounts\n @param _amount token amount" + }, + "id": 15634, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verifyLiquidityInput", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15532, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21112:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15530, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "21112:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15531, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21112:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15535, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21149:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21149:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15534, + "length": null, + "nodeType": "ArrayTypeName", + "src": "21149:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15537, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15634, + "src": "21183:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15536, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21183:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "21111:88:26" + }, + "returnParameters": { + "id": 15539, + "nodeType": "ParameterList", + "parameters": [], + "src": "21236:0:26" + }, + "scope": 16593, + "src": "21082:1181:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15663, + "nodeType": "Block", + "src": "22750:209:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15648, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15643, + "src": "22765:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22781:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "22765:17:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15656, + "nodeType": "IfStatement", + "src": "22761:99:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15652, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15638, + "src": "22828:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15653, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15641, + "src": "22844:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15651, + "name": "addLiquidityToEmptyPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15751, + "src": "22804:23:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory) returns (uint256)" + } + }, + "id": 15654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22804:56:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15647, + "id": 15655, + "nodeType": "Return", + "src": "22797:63:26" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15658, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15638, + "src": "22905:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15659, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15641, + "src": "22921:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "id": 15660, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15643, + "src": "22938:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15657, + "name": "addLiquidityToNonEmptyPool", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15926, + "src": "22878:26:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token[] memory,uint256[] memory,uint256) returns (uint256)" + } + }, + "id": 15661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22878:73:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15647, + "id": 15662, + "nodeType": "Return", + "src": "22871:80:26" + } + ] + }, + "documentation": { + "id": 15635, + "nodeType": "StructuredDocumentation", + "src": "22271:303:26", + "text": " @dev adds liquidity (reserve) to the pool\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _totalSupply token total supply\n @return amount of pool tokens issued" + }, + "id": 15664, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15638, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22608:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15636, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "22608:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15637, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22608:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15641, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22645:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15639, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22645:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15640, + "length": null, + "nodeType": "ArrayTypeName", + "src": "22645:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15643, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22679:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15642, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22679:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22607:93:26" + }, + "returnParameters": { + "id": 15647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15646, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15664, + "src": "22736:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22736:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22735:9:26" + }, + "scope": 16593, + "src": "22580:379:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15750, + "nodeType": "Block", + "src": "23393:1062:26", + "statements": [ + { + "assignments": [ + 15677 + ], + "declarations": [ + { + "constant": false, + "id": 15677, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15750, + "src": "23489:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23489:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15681, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15679, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15671, + "src": "23520:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15678, + "name": "geometricMean", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16302, + "src": "23506:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256[] memory) pure returns (uint256)" + } + }, + "id": 15680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23506:30:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23489:47:26" + }, + { + "body": { + "id": 15746, + "nodeType": "Block", + "src": "23680:690:26", + "statements": [ + { + "assignments": [ + 15694 + ], + "declarations": [ + { + "constant": false, + "id": 15694, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15746, + "src": "23695:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15693, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23695:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15698, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15695, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15668, + "src": "23722:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15697, + "indexExpression": { + "argumentTypes": null, + "id": 15696, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23737:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23722:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23695:44:26" + }, + { + "assignments": [ + 15700 + ], + "declarations": [ + { + "constant": false, + "id": 15700, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15746, + "src": "23754:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23754:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15704, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15701, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15671, + "src": "23778:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15703, + "indexExpression": { + "argumentTypes": null, + "id": 15702, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23794:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23778:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23754:42:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15705, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "23817:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 15706, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "23833:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "23817:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15719, + "nodeType": "IfStatement", + "src": "23813:193:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15709, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "23951:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15710, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23965:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23965:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "23985:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23977:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23977:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15716, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "23992:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15708, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "23934:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23934:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15718, + "nodeType": "ExpressionStatement", + "src": "23934:72:26" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 15725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15720, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "24023:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15722, + "indexExpression": { + "argumentTypes": null, + "id": 15721, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24032:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24023:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15723, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "24023:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15724, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24056:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24023:46:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15726, + "nodeType": "ExpressionStatement", + "src": "24023:46:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15728, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24106:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24106:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15730, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24118:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15731, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24132:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15732, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24147:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15733, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24162:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15727, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "24091:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24091:78:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15735, + "nodeType": "EmitStatement", + "src": "24086:83:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15737, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24291:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15738, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24299:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15739, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15700, + "src": "24313:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15740, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "24328:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15742, + "indexExpression": { + "argumentTypes": null, + "id": 15741, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15694, + "src": "24337:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24328:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15743, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "24328:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15736, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "24258:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24258:100:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15745, + "nodeType": "ExpressionStatement", + "src": "24258:100:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15686, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23648:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15687, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15668, + "src": "23652:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23652:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23648:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15747, + "initializationExpression": { + "assignments": [ + 15683 + ], + "declarations": [ + { + "constant": false, + "id": 15683, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15747, + "src": "23633:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23633:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15685, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23645:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "23633:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "23675:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15690, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15683, + "src": "23675:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15692, + "nodeType": "ExpressionStatement", + "src": "23675:3:26" + }, + "nodeType": "ForStatement", + "src": "23628:742:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15748, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15677, + "src": "24441:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15675, + "id": 15749, + "nodeType": "Return", + "src": "24434:13:26" + } + ] + }, + "documentation": { + "id": 15665, + "nodeType": "StructuredDocumentation", + "src": "22967:267:26", + "text": " @dev adds liquidity (reserve) to the pool when it's empty\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @return amount of pool tokens issued" + }, + "id": 15751, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToEmptyPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15668, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23273:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23273:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15667, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23273:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15671, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23310:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23310:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15670, + "length": null, + "nodeType": "ArrayTypeName", + "src": "23310:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23272:71:26" + }, + "returnParameters": { + "id": 15675, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15674, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15751, + "src": "23379:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23379:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "23378:9:26" + }, + "scope": 16593, + "src": "23240:1215:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15925, + "nodeType": "Block", + "src": "24970:1826:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 15765, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "24981:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 15766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24981:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15767, + "nodeType": "ExpressionStatement", + "src": "24981:21:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15768, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25013:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15770, + "indexExpression": { + "argumentTypes": null, + "id": 15769, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25022:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25013:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15771, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25013:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15777, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "25095:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25095:9:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15772, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25053:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15774, + "indexExpression": { + "argumentTypes": null, + "id": 15773, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25062:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25053:29:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15775, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25053:37:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "25053:41:26", + "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": 15779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25053:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25013:92:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15781, + "nodeType": "ExpressionStatement", + "src": "25013:92:26" + }, + { + "assignments": [ + 15783 + ], + "declarations": [ + { + "constant": false, + "id": 15783, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25118:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15782, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "25118:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15789, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15786, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "25168:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 15785, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "25158:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 15787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25158:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 15784, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "25143:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 15788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25143:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25118:66:26" + }, + { + "assignments": [ + 15791 + ], + "declarations": [ + { + "constant": false, + "id": 15791, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25195:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25195:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15798, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15793, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15783, + "src": "25224:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + { + "argumentTypes": null, + "id": 15794, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25233:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15795, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25247:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 15796, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "25263:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 15792, + "name": "getMinShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16201, + "src": "25212:11:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IBancorFormula_$13177_$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (contract IBancorFormula,uint256,contract IERC20Token[] memory,uint256[] memory) view returns (uint256)" + } + }, + "id": 15797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25212:67:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25195:84:26" + }, + { + "assignments": [ + 15800 + ], + "declarations": [ + { + "constant": false, + "id": 15800, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15925, + "src": "25290:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25290:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15805, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15803, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "25336:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15801, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25319:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "25319:16:26", + "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": 15804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25319:24:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25290:53:26" + }, + { + "body": { + "id": 15921, + "nodeType": "Block", + "src": "25408:1303:26", + "statements": [ + { + "assignments": [ + 15818 + ], + "declarations": [ + { + "constant": false, + "id": 15818, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25423:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 15817, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "25423:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15822, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15819, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25450:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15821, + "indexExpression": { + "argumentTypes": null, + "id": 15820, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25465:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25450:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25423:44:26" + }, + { + "assignments": [ + 15824 + ], + "declarations": [ + { + "constant": false, + "id": 15824, + "mutability": "mutable", + "name": "rsvBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25482:18:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15823, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25482:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15829, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15825, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "25503:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15827, + "indexExpression": { + "argumentTypes": null, + "id": 15826, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25512:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25503:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "25503:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25482:51:26" + }, + { + "assignments": [ + 15831 + ], + "declarations": [ + { + "constant": false, + "id": 15831, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "25548:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15830, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25548:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15839, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15834, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15760, + "src": "25589:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15835, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15824, + "src": "25603:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15836, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "25615:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15837, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "25629:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15832, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15783, + "src": "25572:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundCost", + "nodeType": "MemberAccess", + "referencedDeclaration": 13133, + "src": "25572:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25572:64:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25548:88:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15841, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "25659:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 15842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25675:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "25659:17:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 15844, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25678:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 15840, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25651:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 15845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25651:52:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15846, + "nodeType": "ExpressionStatement", + "src": "25651:52:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15848, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "25725:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15849, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "25742:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15851, + "indexExpression": { + "argumentTypes": null, + "id": 15850, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25758:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25742:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25725:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 15847, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -3, + "src": "25718:6:26", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 15853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25718:43:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15854, + "nodeType": "ExpressionStatement", + "src": "25718:43:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 15857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15855, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25865:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 15856, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "25881:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "25865:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15869, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "26078:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15871, + "indexExpression": { + "argumentTypes": null, + "id": 15870, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "26094:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26078:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 15872, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26099:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26078:34:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 15886, + "nodeType": "IfStatement", + "src": "26074:165:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15879, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15758, + "src": "26204:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15881, + "indexExpression": { + "argumentTypes": null, + "id": 15880, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "26220:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26204:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 15882, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26225:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26204:34:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15874, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26184:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26184:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 15878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26184:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 15884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26184:55:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15885, + "nodeType": "ExpressionStatement", + "src": "26184:55:26" + } + }, + "id": 15887, + "nodeType": "IfStatement", + "src": "25861:378:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15859, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "25999:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15860, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26013:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26013:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15864, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "26033:4:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + ], + "id": 15863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26025:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 15862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26025:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 15865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26025:13:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15866, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26040:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15858, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "25982:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 15867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25982:72:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15868, + "nodeType": "ExpressionStatement", + "src": "25982:72:26" + } + }, + { + "assignments": [ + 15889 + ], + "declarations": [ + { + "constant": false, + "id": 15889, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15921, + "src": "26256:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26256:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15894, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15892, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26299:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15890, + "name": "rsvBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15824, + "src": "26284:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "26284:14:26", + "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": 15893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26284:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26256:57:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15895, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "26328:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15897, + "indexExpression": { + "argumentTypes": null, + "id": 15896, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26337:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26328:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15898, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "26328:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 15899, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26361:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26328:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15901, + "nodeType": "ExpressionStatement", + "src": "26328:50:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15903, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "26415:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 15904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "26415:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 15905, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26427:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15906, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15831, + "src": "26441:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15907, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26456:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15908, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15800, + "src": "26475:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15902, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "26400:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 15909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26400:94:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15910, + "nodeType": "EmitStatement", + "src": "26395:99:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15912, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15800, + "src": "26616:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15913, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26636:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 15914, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15889, + "src": "26650:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15915, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "26669:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15917, + "indexExpression": { + "argumentTypes": null, + "id": 15916, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15818, + "src": "26678:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26669:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15918, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "26669:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 15911, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "26583:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 15919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26583:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 15920, + "nodeType": "ExpressionStatement", + "src": "26583:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15810, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25376:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15811, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15755, + "src": "25380:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "25380:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25376:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15922, + "initializationExpression": { + "assignments": [ + 15807 + ], + "declarations": [ + { + "constant": false, + "id": 15807, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15922, + "src": "25361:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25361:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15809, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25373:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "25361:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "25403:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15814, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15807, + "src": "25403:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15816, + "nodeType": "ExpressionStatement", + "src": "25403:3:26" + }, + "nodeType": "ForStatement", + "src": "25356:1355:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15923, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15791, + "src": "26782:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 15764, + "id": 15924, + "nodeType": "Return", + "src": "26775:13:26" + } + ] + }, + "documentation": { + "id": 15752, + "nodeType": "StructuredDocumentation", + "src": "24463:323:26", + "text": " @dev adds liquidity (reserve) to the pool when it's not empty\n @param _reserveTokens address of each reserve token\n @param _reserveAmounts amount of each reserve token\n @param _totalSupply token total supply\n @return amount of pool tokens issued" + }, + "id": 15926, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addLiquidityToNonEmptyPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15755, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24828:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15753, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "24828:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15754, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24828:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15758, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24865:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15756, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24865:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15757, + "length": null, + "nodeType": "ArrayTypeName", + "src": "24865:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15760, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24899:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15759, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24899:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24827:93:26" + }, + "returnParameters": { + "id": 15764, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15763, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15926, + "src": "24956:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24956:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24955:9:26" + }, + "scope": 16593, + "src": "24792:2004:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 15985, + "nodeType": "Block", + "src": "27464:322:26", + "statements": [ + { + "assignments": [ + 15946 + ], + "declarations": [ + { + "constant": false, + "id": 15946, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15985, + "src": "27475:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15944, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27475:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15945, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27475:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15953, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15950, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15932, + "src": "27523:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27523:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 15949, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "27509:13:26", + "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": 15947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27513:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15948, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27513:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 15952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27509:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27475:70:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 15980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15965, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27621:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15967, + "indexExpression": { + "argumentTypes": null, + "id": 15966, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27636:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "27621:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 15970, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15934, + "src": "27673:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15971, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "27687:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 15975, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 15972, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15932, + "src": "27696:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 15974, + "indexExpression": { + "argumentTypes": null, + "id": 15973, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27711:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27696:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27687:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 15976, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "27687:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 15977, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "27724:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 15978, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15929, + "src": "27738:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 15968, + "name": "_formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15936, + "src": "27641:8:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 15969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "liquidateReserveAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13159, + "src": "27641:31:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 15979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27641:105:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27621:125:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15981, + "nodeType": "ExpressionStatement", + "src": "27621:125:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 15961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 15958, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27576:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15959, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27580:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 15960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "27580:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27576:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 15982, + "initializationExpression": { + "assignments": [ + 15955 + ], + "declarations": [ + { + "constant": false, + "id": 15955, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15982, + "src": "27561:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15954, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27561:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 15957, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 15956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27573:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "27561:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 15963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "27603:3:26", + "subExpression": { + "argumentTypes": null, + "id": 15962, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15955, + "src": "27603:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15964, + "nodeType": "ExpressionStatement", + "src": "27603:3:26" + }, + "nodeType": "ForStatement", + "src": "27556:190:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 15983, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15946, + "src": "27764:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 15941, + "id": 15984, + "nodeType": "Return", + "src": "27757:21:26" + } + ] + }, + "documentation": { + "id": 15927, + "nodeType": "StructuredDocumentation", + "src": "26804:442:26", + "text": " @dev returns the amount of each reserve token entitled for a given amount of pool tokens\n @param _amount amount of pool tokens\n @param _reserveTokens address of each reserve token\n @param _totalSupply token total supply\n @param _formula formula contract\n @return the amount of each reserve token entitled for the given amount of pool tokens" + }, + "id": 15986, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReserveAmounts", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15937, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15929, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27291:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27291:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15932, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27308:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15930, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "27308:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15931, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27308:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15934, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27345:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27345:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15936, + "mutability": "mutable", + "name": "_formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27367:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 15935, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "27367:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27290:101:26" + }, + "returnParameters": { + "id": 15941, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15940, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 15986, + "src": "27441:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15938, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27441:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15939, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27441:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "27440:18:26" + }, + "scope": 16593, + "src": "27252:534:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16124, + "nodeType": "Block", + "src": "28459:1485:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16003, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "28470:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28470:21:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16005, + "nodeType": "ExpressionStatement", + "src": "28470:21:26" + }, + { + "assignments": [ + 16007 + ], + "declarations": [ + { + "constant": false, + "id": 16007, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28504:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 16006, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "28504:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16013, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16010, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "28554:14:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16009, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "28544:9:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28544:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16008, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "28529:14:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 16012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28529:41:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28504:66:26" + }, + { + "assignments": [ + 16015 + ], + "declarations": [ + { + "constant": false, + "id": 16015, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28581:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16014, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28581:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16020, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16018, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15997, + "src": "28627:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16016, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15995, + "src": "28610:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "28610:16:26", + "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": 16019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28610:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28581:54:26" + }, + { + "assignments": [ + 16025 + ], + "declarations": [ + { + "constant": false, + "id": 16025, + "mutability": "mutable", + "name": "reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16124, + "src": "28646:31:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28646:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16024, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28646:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16032, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16027, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15997, + "src": "28710:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16028, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28719:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 16029, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15995, + "src": "28735:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16030, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16007, + "src": "28749:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + ], + "id": 16026, + "name": "removeLiquidityReserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15986, + "src": "28680:29:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr_$_t_uint256_$_t_contract$_IBancorFormula_$13177_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256,contract IERC20Token[] memory,uint256,contract IBancorFormula) view returns (uint256[] memory)" + } + }, + "id": 16031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28680:77:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28646:111:26" + }, + { + "body": { + "id": 16120, + "nodeType": "Block", + "src": "28822:985:26", + "statements": [ + { + "assignments": [ + 16045 + ], + "declarations": [ + { + "constant": false, + "id": 16045, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "28837:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16044, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "28837:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16049, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16046, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28864:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16048, + "indexExpression": { + "argumentTypes": null, + "id": 16047, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28879:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28864:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28837:44:26" + }, + { + "assignments": [ + 16051 + ], + "declarations": [ + { + "constant": false, + "id": 16051, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "28896:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16050, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28896:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16055, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16052, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16025, + "src": "28920:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16054, + "indexExpression": { + "argumentTypes": null, + "id": 16053, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28935:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28920:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28896:41:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16057, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "28960:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16058, + "name": "_reserveMinReturnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15993, + "src": "28977:24:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16060, + "indexExpression": { + "argumentTypes": null, + "id": 16059, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "29002:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28977:27:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28960:44:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 16062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29006:24:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 16056, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28952:7:26", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28952:79:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16064, + "nodeType": "ExpressionStatement", + "src": "28952:79:26" + }, + { + "assignments": [ + 16066 + ], + "declarations": [ + { + "constant": false, + "id": 16066, + "mutability": "mutable", + "name": "newReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16120, + "src": "29048:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29048:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16074, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16072, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29111:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16067, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29076:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16069, + "indexExpression": { + "argumentTypes": null, + "id": 16068, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29085:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29076:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16070, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29076:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "29076:34:26", + "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": 16073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29076:49:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "29048:77:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16075, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29140:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16077, + "indexExpression": { + "argumentTypes": null, + "id": 16076, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29149:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29140:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16078, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29140:30:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16079, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29173:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29140:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16081, + "nodeType": "ExpressionStatement", + "src": "29140:50:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 16084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16082, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29294:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16083, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "29310:19:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "29294:35:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16094, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29432:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16095, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29446:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29446:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 16097, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29458:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16093, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "29419:12:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 16098, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29419:53:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16099, + "nodeType": "ExpressionStatement", + "src": "29419:53:26" + }, + "id": 16100, + "nodeType": "IfStatement", + "src": "29290:182:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16090, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29368:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16085, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29348:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29348:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 16089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29348:19:26", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 16091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29348:34:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16092, + "nodeType": "ExpressionStatement", + "src": "29348:34:26" + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16102, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "29511:3:26", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "29511:10:26", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 16104, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29523:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16105, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16051, + "src": "29537:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16106, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29552:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16107, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16015, + "src": "29571:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16101, + "name": "LiquidityRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13041, + "src": "29494:16:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 16108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29494:96:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16109, + "nodeType": "EmitStatement", + "src": "29489:101:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16111, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16015, + "src": "29712:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16112, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29732:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16113, + "name": "newReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16066, + "src": "29746:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16114, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29765:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16116, + "indexExpression": { + "argumentTypes": null, + "id": 16115, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16045, + "src": "29774:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29765:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29765:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16110, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "29679:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29679:116:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16119, + "nodeType": "ExpressionStatement", + "src": "29679:116:26" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16037, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28790:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16038, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15990, + "src": "28794:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28794:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28790:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16121, + "initializationExpression": { + "assignments": [ + 16034 + ], + "declarations": [ + { + "constant": false, + "id": 16034, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16121, + "src": "28775:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16033, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28775:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16036, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16035, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28787:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28775:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28817:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16041, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16034, + "src": "28817:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16043, + "nodeType": "ExpressionStatement", + "src": "28817:3:26" + }, + "nodeType": "ForStatement", + "src": "28770:1037:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16122, + "name": "reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16025, + "src": "29922:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 16002, + "id": 16123, + "nodeType": "Return", + "src": "29915:21:26" + } + ] + }, + "documentation": { + "id": 15987, + "nodeType": "StructuredDocumentation", + "src": "27794:449:26", + "text": " @dev removes liquidity (reserve) from the pool\n @param _reserveTokens address of each reserve token\n @param _reserveMinReturnAmounts minimum return-amount of each reserve token\n @param _totalSupply token total supply\n @param _amount token amount\n @return the amount of each reserve token granted for the given amount of pool tokens" + }, + "id": 16125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityFromPool", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 15998, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15990, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28282:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 15988, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "28282:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 15989, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28282:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15993, + "mutability": "mutable", + "name": "_reserveMinReturnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28319:41:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15991, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28319:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 15992, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28319:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15995, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28362:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28362:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15997, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28384:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 15996, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28281:119:26" + }, + "returnParameters": { + "id": 16002, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16001, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16125, + "src": "28436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 15999, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28436:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16000, + "length": null, + "nodeType": "ArrayTypeName", + "src": "28436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28435:18:26" + }, + "scope": 16593, + "src": "28249:1695:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16200, + "nodeType": "Block", + "src": "30121:439:26", + "statements": [ + { + "assignments": [ + 16141 + ], + "declarations": [ + { + "constant": false, + "id": 16141, + "mutability": "mutable", + "name": "minIndex", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16200, + "src": "30132:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30132:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16143, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30151:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30132:20:26" + }, + { + "body": { + "id": 16183, + "nodeType": "Block", + "src": "30215:197:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16159, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30257:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16163, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16160, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30266:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16162, + "indexExpression": { + "argumentTypes": null, + "id": 16161, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30281:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30266:24:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30257:34:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30257:42:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16155, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30234:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16157, + "indexExpression": { + "argumentTypes": null, + "id": 16156, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30250:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30234:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30234:22:26", + "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": 16165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30234:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16170, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30333:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16174, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16171, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30342:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16173, + "indexExpression": { + "argumentTypes": null, + "id": 16172, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30357:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30342:17:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30333:27:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30333:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16166, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30303:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16168, + "indexExpression": { + "argumentTypes": null, + "id": 16167, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30319:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30303:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30303:29:26", + "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": 16176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30303:66:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30234:135:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16182, + "nodeType": "IfStatement", + "src": "30230:170:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 16180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16178, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30388:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16179, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30399:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30388:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16181, + "nodeType": "ExpressionStatement", + "src": "30388:12:26" + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16148, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30183:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16149, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30187:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "30187:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "30183:25:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16184, + "initializationExpression": { + "assignments": [ + 16145 + ], + "declarations": [ + { + "constant": false, + "id": 16145, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16184, + "src": "30168:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16144, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30168:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16147, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 16146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30180:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30168:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "30210:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16152, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16145, + "src": "30210:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16154, + "nodeType": "ExpressionStatement", + "src": "30210:3:26" + }, + "nodeType": "ForStatement", + "src": "30163:249:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16187, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16129, + "src": "30454:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16188, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "30468:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16192, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16189, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16132, + "src": "30477:14:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + "id": 16191, + "indexExpression": { + "argumentTypes": null, + "id": 16190, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30492:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30477:24:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30468:34:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "30468:42:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16194, + "name": "reserveRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9043, + "src": "30512:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16195, + "name": "_reserveAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16135, + "src": "30526:15:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16197, + "indexExpression": { + "argumentTypes": null, + "id": 16196, + "name": "minIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16141, + "src": "30542:8:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30526:25:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16185, + "name": "formula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16127, + "src": "30429:7:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 16186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fundSupplyAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13146, + "src": "30429:24:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 16198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30429:123:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16139, + "id": 16199, + "nodeType": "Return", + "src": "30422:130:26" + } + ] + }, + "documentation": null, + "id": 16201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinShare", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16136, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16127, + "mutability": "mutable", + "name": "formula", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "29973:22:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + }, + "typeName": { + "contractScope": null, + "id": 16126, + "name": "IBancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13177, + "src": "29973:14:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16129, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "29997:20:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29997:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16132, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30019:35:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 16130, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "30019:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16131, + "length": null, + "nodeType": "ArrayTypeName", + "src": "30019:13:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16135, + "mutability": "mutable", + "name": "_reserveAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30056:32:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30056:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16134, + "length": null, + "nodeType": "ArrayTypeName", + "src": "30056:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29972:117:26" + }, + "returnParameters": { + "id": 16139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16138, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16201, + "src": "30112:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30112:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30111:9:26" + }, + "scope": 16593, + "src": "29952:608:26", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16230, + "nodeType": "Block", + "src": "30847:115:26", + "statements": [ + { + "assignments": [ + 16210 + ], + "declarations": [ + { + "constant": false, + "id": 16210, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16230, + "src": "30858:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30858:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16212, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30870:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "30858:13:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 16225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "30932:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16224, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16210, + "src": "30932:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16226, + "nodeType": "ExpressionStatement", + "src": "30932:3:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16217, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16214, + "src": "30903:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30907:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30903:5:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16227, + "initializationExpression": { + "assignments": [ + 16214 + ], + "declarations": [ + { + "constant": false, + "id": 16214, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16227, + "src": "30887:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30887:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16216, + "initialValue": { + "argumentTypes": null, + "id": 16215, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16204, + "src": "30899:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30887:14:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16220, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16214, + "src": "30910:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3130", + "id": 16221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30915:2:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "30910:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16223, + "nodeType": "ExpressionStatement", + "src": "30910:7:26" + }, + "nodeType": "ForStatement", + "src": "30882:53:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16228, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16210, + "src": "30953:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16208, + "id": 16229, + "nodeType": "Return", + "src": "30946:8:26" + } + ] + }, + "documentation": { + "id": 16202, + "nodeType": "StructuredDocumentation", + "src": "30568:208:26", + "text": " @dev returns the number of decimal digits in a given value\n @param _x value (assumed positive)\n @return the number of decimal digits in the given value" + }, + "functionSelector": "6aa5332c", + "id": 16231, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimalLength", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16204, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16231, + "src": "30805:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30805:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30804:12:26" + }, + "returnParameters": { + "id": 16208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16207, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16231, + "src": "30838:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30838:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30837:9:26" + }, + "scope": 16593, + "src": "30782:180:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16250, + "nodeType": "Block", + "src": "31280:44:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16241, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16234, + "src": "31299:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16242, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16236, + "src": "31304:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31309:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "31304:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31299:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16246, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31298:13:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 16247, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16236, + "src": "31314:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31298:18:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16240, + "id": 16249, + "nodeType": "Return", + "src": "31291:25:26" + } + ] + }, + "documentation": { + "id": 16232, + "nodeType": "StructuredDocumentation", + "src": "30970:232:26", + "text": " @dev returns the nearest integer to a given quotient\n @param _n quotient numerator\n @param _d quotient denominator\n @return the nearest integer to the given quotient" + }, + "functionSelector": "bbb7e5d8", + "id": 16251, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16234, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31226:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16233, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31226:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16236, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31238:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31238:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31225:24:26" + }, + "returnParameters": { + "id": 16240, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16239, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16251, + "src": "31271:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16238, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31271:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31270:9:26" + }, + "scope": 16593, + "src": "31208:116:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16301, + "nodeType": "Block", + "src": "31686:253:26", + "statements": [ + { + "assignments": [ + 16261 + ], + "declarations": [ + { + "constant": false, + "id": 16261, + "mutability": "mutable", + "name": "numOfDigits", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16301, + "src": "31697:19:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31697:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16263, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31719:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "31697:23:26" + }, + { + "assignments": [ + 16265 + ], + "declarations": [ + { + "constant": false, + "id": 16265, + "mutability": "mutable", + "name": "length", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16301, + "src": "31731:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31731:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16268, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16266, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16255, + "src": "31748:7:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "31748:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31731:31:26" + }, + { + "body": { + "expression": { + "argumentTypes": null, + "id": 16285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16279, + "name": "numOfDigits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16261, + "src": "31823:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16281, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16255, + "src": "31852:7:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 16283, + "indexExpression": { + "argumentTypes": null, + "id": 16282, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31860:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31852:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16280, + "name": "decimalLength", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16231, + "src": "31838:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 16284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31838:25:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31823:40:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16286, + "nodeType": "ExpressionStatement", + "src": "31823:40:26" + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16273, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31793:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 16274, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16265, + "src": "31797:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31793:10:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 16287, + "initializationExpression": { + "assignments": [ + 16270 + ], + "declarations": [ + { + "constant": false, + "id": 16270, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16287, + "src": "31778:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16269, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31778:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16272, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 16271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31790:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "31778:13:26" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 16277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "31805:3:26", + "subExpression": { + "argumentTypes": null, + "id": 16276, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16270, + "src": "31805:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16278, + "nodeType": "ExpressionStatement", + "src": "31805:3:26" + }, + "nodeType": "ForStatement", + "src": "31773:90:26" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 16290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31889:2:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 16289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31881:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 16288, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31881:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31881:11:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16293, + "name": "numOfDigits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16261, + "src": "31906:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16294, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16265, + "src": "31919:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16292, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16251, + "src": "31897:8:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 16295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31897:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31929:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "31897:33:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16298, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31896:35:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31881:50:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16259, + "id": 16300, + "nodeType": "Return", + "src": "31874:57:26" + } + ] + }, + "documentation": { + "id": 16252, + "nodeType": "StructuredDocumentation", + "src": "31332:269:26", + "text": " @dev returns the average number of decimal digits in a given list of values\n @param _values list of values (each of which assumed positive)\n @return the average number of decimal digits in the given list of values" + }, + "functionSelector": "a60e7724", + "id": 16302, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "geometricMean", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16256, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16255, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16302, + "src": "31630:24:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 16253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31630:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16254, + "length": null, + "nodeType": "ArrayTypeName", + "src": "31630:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31629:26:26" + }, + "returnParameters": { + "id": 16259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16258, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16302, + "src": "31677:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31677:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31676:9:26" + }, + "scope": 16593, + "src": "31607:332:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16396, + "nodeType": "Block", + "src": "32294:1231:26", + "statements": [ + { + "assignments": [ + 16311 + ], + "declarations": [ + { + "constant": false, + "id": 16311, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32305:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32305:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16320, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16315, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "32351:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32343:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16313, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32343:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32343:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16312, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "32331:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32331:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 16318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "32331:40:26", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 16319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32331:42:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32305:68:26" + }, + { + "assignments": [ + 16322 + ], + "declarations": [ + { + "constant": false, + "id": 16322, + "mutability": "mutable", + "name": "sourceReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32384:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32384:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16326, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16324, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32430:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16323, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "32415:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32415:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32384:59:26" + }, + { + "assignments": [ + 16328 + ], + "declarations": [ + { + "constant": false, + "id": 16328, + "mutability": "mutable", + "name": "targetReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32454:28:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16327, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32454:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16332, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16330, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32500:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16329, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "32485:14:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32485:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32454:59:26" + }, + { + "assignments": [ + 16334 + ], + "declarations": [ + { + "constant": false, + "id": 16334, + "mutability": "mutable", + "name": "sourceReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32524:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16333, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "32524:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16339, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16335, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "32553:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16337, + "indexExpression": { + "argumentTypes": null, + "id": 16336, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32562:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32553:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16338, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "32553:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32524:58:26" + }, + { + "assignments": [ + 16341 + ], + "declarations": [ + { + "constant": false, + "id": 16341, + "mutability": "mutable", + "name": "targetReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32593:26:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16340, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "32593:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16346, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16342, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "32622:8:26", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 16344, + "indexExpression": { + "argumentTypes": null, + "id": 16343, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32631:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32622:22:26", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 16345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "32622:29:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32593:58:26" + }, + { + "assignments": [ + 16348 + ], + "declarations": [ + { + "constant": false, + "id": 16348, + "mutability": "mutable", + "name": "rateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32732:13:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16347, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32732:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16353, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16351, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "32773:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16349, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "32748:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "32748:24:26", + "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": 16352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32748:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32732:61:26" + }, + { + "assignments": [ + 16355 + ], + "declarations": [ + { + "constant": false, + "id": 16355, + "mutability": "mutable", + "name": "rateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16396, + "src": "32804:13:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32804:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16360, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16358, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "32845:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16356, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "32820:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "32820:24:26", + "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": 16359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32820:45:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32804:61:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16362, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "32897:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16363, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "32911:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16364, + "name": "rateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16348, + "src": "32925:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16365, + "name": "rateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16355, + "src": "32932:5:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16361, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "32881:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 16366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32881:57:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16367, + "nodeType": "EmitStatement", + "src": "32876:62:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16369, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33049:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16370, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "33066:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16371, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "33080:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16372, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "33102:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16368, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "33016:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33016:106:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16374, + "nodeType": "ExpressionStatement", + "src": "33016:106:26" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16376, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33166:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16377, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "33183:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16378, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "33197:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16379, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "33219:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16375, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16428, + "src": "33133:32:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (uint256,contract IERC20Token,uint256,uint32)" + } + }, + "id": 16380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33133:106:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16381, + "nodeType": "ExpressionStatement", + "src": "33133:106:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16383, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16305, + "src": "33339:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16384, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33353:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16385, + "name": "sourceReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16322, + "src": "33370:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16386, + "name": "sourceReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16334, + "src": "33392:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16382, + "name": "PriceDataUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14455, + "src": "33323:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint256,uint256,uint32)" + } + }, + "id": 16387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33323:89:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16388, + "nodeType": "EmitStatement", + "src": "33318:94:26" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16390, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16307, + "src": "33444:12:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16391, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16311, + "src": "33458:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16392, + "name": "targetReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16328, + "src": "33475:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16393, + "name": "targetReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16341, + "src": "33497:19:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16389, + "name": "PriceDataUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14455, + "src": "33428:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint256,uint256,uint32)" + } + }, + "id": 16394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33428:89:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16395, + "nodeType": "EmitStatement", + "src": "33423:94:26" + } + ] + }, + "documentation": { + "id": 16303, + "nodeType": "StructuredDocumentation", + "src": "31947:242:26", + "text": " @dev dispatches token rate update events for the reserve tokens and the pool token\n @param _sourceToken address of the source reserve token\n @param _targetToken address of the target reserve token" + }, + "id": 16397, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchTokenRateUpdateEvents", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16308, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16305, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16397, + "src": "32234:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16304, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32234:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16307, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16397, + "src": "32260:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16306, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32260:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32233:52:26" + }, + "returnParameters": { + "id": 16309, + "nodeType": "ParameterList", + "parameters": [], + "src": "32294:0:26" + }, + "scope": 16593, + "src": "32195:1330:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16427, + "nodeType": "Block", + "src": "33994:159:26", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16413, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "34046:6:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "34038:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16411, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34038:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34038:15:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16410, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "34026:11:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34026:28:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 16416, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16402, + "src": "34056:13:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16419, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "34091:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16417, + "name": "_reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16404, + "src": "34071:15:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "34071:19:26", + "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": 16420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34071:35:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16423, + "name": "_reserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16406, + "src": "34129:14:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 16421, + "name": "_poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16400, + "src": "34108:16:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "34108:20:26", + "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": 16424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34108:36:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16409, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "34010:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 16425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34010:135:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16426, + "nodeType": "EmitStatement", + "src": "34005:140:26" + } + ] + }, + "documentation": { + "id": 16398, + "nodeType": "StructuredDocumentation", + "src": "33533:304:26", + "text": " @dev dispatches token rate update event for the pool token\n @param _poolTokenSupply total pool token supply\n @param _reserveToken address of the reserve token\n @param _reserveBalance reserve balance\n @param _reserveWeight reserve weight" + }, + "id": 16428, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16400, + "mutability": "mutable", + "name": "_poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33885:24:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33885:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16402, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33911:25:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16401, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "33911:11:26", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16404, + "mutability": "mutable", + "name": "_reserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33938:23:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33938:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16406, + "mutability": "mutable", + "name": "_reserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16428, + "src": "33963:21:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16405, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "33963:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "33884:101:26" + }, + "returnParameters": { + "id": 16408, + "nodeType": "ParameterList", + "parameters": [], + "src": "33994:0:26" + }, + "scope": 16593, + "src": "33843:310:26", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 16436, + "nodeType": "Block", + "src": "34319:29:26", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 16434, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "34337:3:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 16433, + "id": 16435, + "nodeType": "Return", + "src": "34330:10:26" + } + ] + }, + "documentation": { + "id": 16429, + "nodeType": "StructuredDocumentation", + "src": "34161:96:26", + "text": " @dev returns the current time\n utility to allow overrides for tests" + }, + "id": 16437, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16430, + "nodeType": "ParameterList", + "parameters": [], + "src": "34276:2:26" + }, + "returnParameters": { + "id": 16433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16432, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16437, + "src": "34310:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34310:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34309:9:26" + }, + "scope": 16593, + "src": "34263:85:26", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 16469, + "nodeType": "Block", + "src": "34709:122:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16451, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34724:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16452, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34729:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34724:9:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16454, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34737:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16455, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34737:9:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "34724:22:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16464, + "nodeType": "IfStatement", + "src": "34720:77:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16459, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34784:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16460, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34788:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16461, + "name": "_max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16444, + "src": "34792:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16458, + "name": "normalizedRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16521, + "src": "34768:15:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34768:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16450, + "id": 16463, + "nodeType": "Return", + "src": "34761:36:26" + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16465, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16440, + "src": "34816:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16466, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16442, + "src": "34820:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16467, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "34815:8:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16450, + "id": 16468, + "nodeType": "Return", + "src": "34808:15:26" + } + ] + }, + "documentation": { + "id": 16438, + "nodeType": "StructuredDocumentation", + "src": "34356:246:26", + "text": " @dev computes a reduced-scalar ratio\n @param _n ratio numerator\n @param _d ratio denominator\n @param _max maximum desired scalar\n @return ratio's numerator and denominator" + }, + "id": 16470, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "reducedRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16440, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34630:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34630:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16442, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34642:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34642:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16444, + "mutability": "mutable", + "name": "_max", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34654:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34654:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34629:38:26" + }, + "returnParameters": { + "id": 16450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16447, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34691:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34691:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16449, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16470, + "src": "34700:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34700:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34690:18:26" + }, + "scope": 16593, + "src": "34608:223:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16520, + "nodeType": "Block", + "src": "35034:239:26", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16484, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35049:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16485, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35055:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35049:8:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16495, + "nodeType": "IfStatement", + "src": "35045:58:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16487, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35080:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35089:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "35080:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16490, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35092:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35101:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "35092:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16493, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35079:24:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16494, + "nodeType": "Return", + "src": "35072:31:26" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16496, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35118:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 16497, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35123:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35118:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16505, + "nodeType": "IfStatement", + "src": "35114:62:26", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16500, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35161:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16501, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35165:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16502, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35169:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16499, + "name": "accurateRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16592, + "src": "35147:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35147:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16504, + "nodeType": "Return", + "src": "35140:36:26" + } + }, + { + "assignments": [ + 16507, + 16509 + ], + "declarations": [ + { + "constant": false, + "id": 16507, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16520, + "src": "35188:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16506, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35188:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16509, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16520, + "src": "35199:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35199:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16515, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16511, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16475, + "src": "35226:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16512, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16473, + "src": "35230:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16513, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16477, + "src": "35234:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16510, + "name": "accurateRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16592, + "src": "35212:13:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) pure returns (uint256,uint256)" + } + }, + "id": 16514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35212:29:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35187:54:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16516, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16509, + "src": "35260:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16517, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16507, + "src": "35263:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16518, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35259:6:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16483, + "id": 16519, + "nodeType": "Return", + "src": "35252:13:26" + } + ] + }, + "documentation": { + "id": 16471, + "nodeType": "StructuredDocumentation", + "src": "34839:83:26", + "text": " @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\"." + }, + "id": 16521, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16473, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34953:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16472, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34953:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16475, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34965:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34965:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16477, + "mutability": "mutable", + "name": "_scale", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "34977:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16476, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34977:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "34952:40:26" + }, + "returnParameters": { + "id": 16483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16480, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "35016:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16479, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35016:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16521, + "src": "35025:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35025:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35015:18:26" + }, + "scope": 16593, + "src": "34928:345:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16591, + "nodeType": "Block", + "src": "35497:300:26", + "statements": [ + { + "assignments": [ + 16536 + ], + "declarations": [ + { + "constant": false, + "id": 16536, + "mutability": "mutable", + "name": "maxVal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35508:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35508:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16544, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "-", + "prefix": true, + "src": "35533:2:26", + "subExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16539, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35534:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 16538, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35525:7:26", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 16537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35525:7:26", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16541, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35525:11:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 16542, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35539:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35525:20:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35508:37:26" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16545, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35560:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 16546, + "name": "maxVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16536, + "src": "35565:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35560:11:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16568, + "nodeType": "IfStatement", + "src": "35556:121:26", + "trueBody": { + "id": 16567, + "nodeType": "Block", + "src": "35573:104:26", + "statements": [ + { + "assignments": [ + 16549 + ], + "declarations": [ + { + "constant": false, + "id": 16549, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16567, + "src": "35588:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35588:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16558, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16550, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35600:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16551, + "name": "maxVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16536, + "src": "35606:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35615:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "35606:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16554, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35605:12:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35600:17:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35620:1:26", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "35600:21:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35588:33:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16559, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35636:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 16560, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16549, + "src": "35642:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35636:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16562, + "nodeType": "ExpressionStatement", + "src": "35636:7:26" + }, + { + "expression": { + "argumentTypes": null, + "id": 16565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16563, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16526, + "src": "35658:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "argumentTypes": null, + "id": 16564, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16549, + "src": "35664:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35658:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16566, + "nodeType": "ExpressionStatement", + "src": "35658:7:26" + } + ] + } + }, + { + "assignments": [ + 16570 + ], + "declarations": [ + { + "constant": false, + "id": 16570, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35687:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35687:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16580, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16572, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35708:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 16573, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35713:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35708:11:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16577, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16526, + "src": "35728:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 16575, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16524, + "src": "35721:2:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "35721:6:26", + "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": 16578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35721:10:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 16571, + "name": "roundDiv", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16251, + "src": "35699:8:26", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 16579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35699:33:26", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35687:45:26" + }, + { + "assignments": [ + 16582 + ], + "declarations": [ + { + "constant": false, + "id": 16582, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16591, + "src": "35743:9:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35743:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16586, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16583, + "name": "_scale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16528, + "src": "35755:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 16584, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16570, + "src": "35764:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35755:10:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35743:22:26" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 16587, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16570, + "src": "35784:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 16588, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16582, + "src": "35787:1:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 16589, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "35783:6:26", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 16534, + "id": 16590, + "nodeType": "Return", + "src": "35776:13:26" + } + ] + }, + "documentation": { + "id": 16522, + "nodeType": "StructuredDocumentation", + "src": "35281:106:26", + "text": " @dev computes \"scale * a / (a + b)\" and \"scale * b / (a + b)\", assuming that \"a < b\"." + }, + "id": 16592, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateRatio", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16524, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35416:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35416:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16526, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35428:10:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35428:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16528, + "mutability": "mutable", + "name": "_scale", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35440:14:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16527, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35440:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35415:40:26" + }, + "returnParameters": { + "id": 16534, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16531, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35479:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16530, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35479:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16533, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16592, + "src": "35488:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16532, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35488:7:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "35478:18:26" + }, + "scope": 16593, + "src": "35393:404:26", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 16594, + "src": "519:35281:26" + } + ], + "src": "52:35750:26" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.927Z", + "devdoc": { + "details": "Liquidity Pool v1 Converter The liquidity pool v1 converter is a specialized version of a converter that manages a classic bancor liquidity pool. Even though pools can have many reserves, the standard pool configuration is 2 reserves with 50%/50% weights.", + "events": { + "PriceDataUpdate(address,uint256,uint256,uint32)": { + "details": "triggered after a conversion with new price data deprecated, use `TokenRateUpdate` from version 28 and up", + "params": { + "_connectorBalance": "reserve balance", + "_connectorToken": "reserve token", + "_connectorWeight": "reserve weight", + "_tokenSupply": "smart token supply" + } + } + }, + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "addLiquidity(address[],uint256[],uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller note that prior to version 28, you should use 'fund' instead", + "params": { + "_minReturn": "token minimum return-amount", + "_reserveAmounts": "amount of each reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "amount of pool tokens issued" + } + }, + "addLiquidityCost(address[],uint256,uint256)": { + "details": "given the amount of one of the reserve tokens to add liquidity of, returns the required amount of each one of the other reserve tokens since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)", + "params": { + "_reserveAmount": "amount of the relevant reserve token", + "_reserveTokenIndex": "index of the relevant reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the required amount of each one of the reserve tokens" + } + }, + "addLiquidityReturn(address,uint256)": { + "details": "given the amount of one of the reserve tokens to add liquidity of, returns the amount of pool tokens entitled for it since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)", + "params": { + "_reserveAmount": "amount of the reserve token", + "_reserveToken": "address of the reserve token" + }, + "returns": { + "_0": "the amount of pool tokens entitled" + } + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "constructor": { + "details": "initializes a new LiquidityPoolV1Converter instance", + "params": { + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract", + "_token": "pool token governed by the converter" + } + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "converterType()": { + "details": "returns the converter type", + "returns": { + "_0": "see the converter types in the the main contract doc" + } + }, + "decimalLength(uint256)": { + "details": "returns the number of decimal digits in a given value", + "params": { + "_x": "value (assumed positive)" + }, + "returns": { + "_0": "the number of decimal digits in the given value" + } + }, + "fund(uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller for example, if the caller increases the supply by 10%, then it will cost an amount equal to 10% of each reserve token balance note that starting from version 28, you should use 'addLiquidity' instead", + "params": { + "_amount": "amount to increase the supply by (in the pool token)" + }, + "returns": { + "_0": "amount of pool tokens issued" + } + }, + "geometricMean(uint256[])": { + "details": "returns the average number of decimal digits in a given list of values", + "params": { + "_values": "list of values (each of which assumed positive)" + }, + "returns": { + "_0": "the average number of decimal digits in the given list of values" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "liquidate(uint256)": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool for example, if the holder sells 10% of the supply, then they will receive 10% of each reserve token balance in return note that starting from version 28, you should use 'removeLiquidity' instead", + "params": { + "_amount": "amount to liquidate (in the pool token)" + }, + "returns": { + "_0": "the amount of each reserve token granted for the given amount of pool tokens" + } + }, + "recentAverageRate(address)": { + "details": "returns the recent average rate of 1 `_token` in the other reserve token units note that the rate can only be queried for reserves in a standard pool", + "params": { + "_token": "token to get the rate for" + }, + "returns": { + "_0": "recent average rate between the reserves (numerator)", + "_1": "recent average rate between the reserves (denominator)" + } + }, + "removeLiquidity(uint256,address[],uint256[])": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool note that prior to version 28, you should use 'liquidate' instead", + "params": { + "_amount": "token amount", + "_reserveMinReturnAmounts": "minimum return-amount of each reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the amount of each reserve token granted for the given amount of pool tokens" + } + }, + "removeLiquidityReturn(uint256,address[])": { + "details": "returns the amount of each reserve token entitled for a given amount of pool tokens", + "params": { + "_amount": "amount of pool tokens", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the amount of each reserve token entitled for the given amount of pool tokens" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "roundDiv(uint256,uint256)": { + "details": "returns the nearest integer to a given quotient", + "params": { + "_d": "quotient denominator", + "_n": "quotient numerator" + }, + "returns": { + "_0": "the nearest integer to the given quotient" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "targetAmountAndFee(address,address,uint256)": { + "details": "returns the expected target amount of converting one reserve to another along with the fee", + "params": { + "_amount": "amount of tokens received from the user", + "_sourceToken": "contract address of the source reserve token", + "_targetToken": "contract address of the target reserve token" + }, + "returns": { + "_0": "expected target amount", + "_1": "expected fee" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1ConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1ConverterFactory.json new file mode 100644 index 00000000..d5c462cf --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV1ConverterFactory.json @@ -0,0 +1,1502 @@ +{ + "contractName": "LiquidityPoolV1ConverterFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"converterType()\":{\"details\":\"returns the converter type the factory is associated with\",\"returns\":{\"_0\":\"converter type\"}},\"createConverter(address,address,uint32)\":{\"details\":\"creates a new converter with the given arguments and transfers the ownership to the caller\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\"},\"returns\":{\"_0\":\"a new converter\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1ConverterFactory.sol\":\"LiquidityPoolV1ConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol\":{\"keccak256\":\"0xa85da56481d8c3e936853f4292f67bb41a534163c11fdb380507fa99b8453648\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://20ab9df64f764e0b050525e489165119026ff12af769bf417ed682b5f3ee70d3\",\"dweb:/ipfs/QmVupKPZQwoTd5ifKDx71iyFVZ7hQvMeimMz7VE4TBn53v\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1ConverterFactory.sol\":{\"keccak256\":\"0xdd3b195d641b2ac323931d242d14c86002781a09513743e36edcf5fdfac34a99\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9d6e66929e5214830d33ee20c7c66d6c215ef06832080c3401d6c0816d538494\",\"dweb:/ipfs/QmQ3P2dJomShyVGFF6kMQZHNzfXC5nsLV9HiTKMApEv26y\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061589a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600190565b6156ce806101978339019056fe60806040526003805460ff60a81b191690557fc0829421c1d260bd3cb3e0f06cfe2d52db2ce3150000000000000000000000006008556009805460ff191690553480156200004c57600080fd5b50604051620056ce380380620056ce833981810160405260608110156200007257600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a88162000142565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000df8162000142565b81620000eb81620001a1565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b199092169190911790555062000200945050505050565b6001600160a01b0381166200019e576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6154be80620002106000396000f3fe6080604052600436106103905760003560e01c806371f52bf3116101dc578063ca1d209d11610102578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611081578063ecbca55d146110c7578063f2fde38b146110f7578063fc0c546a1461112a57610421565b8063d66bd52414610fd3578063d895951214611006578063dc8de37914611039578063e2c524681461106c57610421565b8063d260529c116100dc578063d260529c14610f7f578063d3fb73b414610f94578063d4ee1d9014610fa9578063d55ec69714610fbe57610421565b8063ca1d209d14610f23578063cdc91c6914610f40578063d031370b14610f5557610421565b80639b99a8e21161017a578063b4a176d311610149578063b4a176d314610eb4578063bbb7e5d814610ec9578063bf75455814610ef9578063c45d3d9214610f0e57610421565b80639b99a8e214610c77578063a60e772414610c8c578063af94b8d814610d3a578063b127c0a514610d7d57610421565b80637d8916bd116101b65780637d8916bd14610a7557806380d9416d14610b9a5780638da5cb5b14610c4d57806394c275ad14610c6257610421565b806371f52bf314610a3657806379ba509714610a4b5780637b10399914610a6057610421565b806338e9f27a116102c157806354fd4d501161025f57806367b6d57c1161022e57806367b6d57c14610967578063690d83201461099a5780636a49d2c4146109cd5780636aa5332c14610a0c57610421565b806354fd4d50146108e5578063579cd3ca146108fa5780635e35359e1461090f57806361cd756e1461095257610421565b8063415f12401161029b578063415f12401461083a57806349d10b64146108645780634af80f0e146108795780634e40c260146108ac57610421565b806338e9f27a146107b6578063395900d4146107cb5780633e8ff43f1461080e57610421565b80631d4db7911161032e57806321e6b53d1161030857806321e6b53d1461074457806322f3e2d4146107775780632fe8a6ad1461078c57806338a5e016146107a157610421565b80631d4db7911461068e5780631e1401f8146106b55780631f0181bc1461071157610421565b806312c2aca41161036a57806312c2aca4146104e7578063154588371461051057806319b64015146106155780631cfab2901461065b57610421565b8063024c7ec7146104265780630c7d5cd8146104525780630e53aae91461048057610421565b366104215760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661041f576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561043257600080fd5b5061041f6004803603602081101561044957600080fd5b5035151561113f565b34801561045e57600080fd5b50610467611165565b6040805163ffffffff9092168252519081900360200190f35b34801561048c57600080fd5b506104b3600480360360208110156104a357600080fd5b50356001600160a01b0316611171565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156104f357600080fd5b506104fc611208565b604080519115158252519081900360200190f35b34801561051c57600080fd5b506105c56004803603604081101561053357600080fd5b81359190810190604081016020820135600160201b81111561055457600080fd5b82018360208201111561056657600080fd5b803590602001918460208302840111600160201b8311171561058757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061124f945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106015781810151838201526020016105e9565b505050509050019250505060405180910390f35b34801561062157600080fd5b5061063f6004803603602081101561063857600080fd5b50356112f6565b604080516001600160a01b039092168252519081900360200190f35b34801561066757600080fd5b506104676004803603602081101561067e57600080fd5b50356001600160a01b0316611320565b34801561069a57600080fd5b506106a3611352565b60408051918252519081900360200190f35b3480156106c157600080fd5b506106f8600480360360608110156106d857600080fd5b506001600160a01b03813581169160208101359091169060400135611358565b6040805192835260208301919091528051918290030190f35b34801561071d57600080fd5b506106f86004803603602081101561073457600080fd5b50356001600160a01b0316611373565b34801561075057600080fd5b5061041f6004803603602081101561076757600080fd5b50356001600160a01b031661142a565b34801561078357600080fd5b506104fc61143e565b34801561079857600080fd5b506104fc6114bd565b3480156107ad57600080fd5b5061041f6114cd565b3480156107c257600080fd5b506104fc6114df565b3480156107d757600080fd5b5061041f600480360360608110156107ee57600080fd5b506001600160a01b038135811691602081013590911690604001356114e8565b34801561081a57600080fd5b5061082361156e565b6040805161ffff9092168252519081900360200190f35b34801561084657600080fd5b506105c56004803603602081101561085d57600080fd5b5035611573565b34801561087057600080fd5b5061041f6117b1565b34801561088557600080fd5b5061041f6004803603602081101561089c57600080fd5b50356001600160a01b03166119b9565b3480156108b857600080fd5b506106a3600480360360408110156108cf57600080fd5b506001600160a01b0381351690602001356119ee565b3480156108f157600080fd5b50610823611b2a565b34801561090657600080fd5b50610467611b2f565b34801561091b57600080fd5b5061041f6004803603606081101561093257600080fd5b506001600160a01b03813581169160208101359091169060400135611b42565b34801561095e57600080fd5b5061063f611c73565b34801561097357600080fd5b5061041f6004803603602081101561098a57600080fd5b50356001600160a01b0316611c82565b3480156109a657600080fd5b5061041f600480360360208110156109bd57600080fd5b50356001600160a01b0316611d2e565b3480156109d957600080fd5b5061041f600480360360408110156109f057600080fd5b5080356001600160a01b0316906020013563ffffffff16611e55565b348015610a1857600080fd5b506106a360048036036020811015610a2f57600080fd5b5035611f1e565b348015610a4257600080fd5b50610823611f40565b348015610a5757600080fd5b5061041f611f4f565b348015610a6c57600080fd5b5061063f612006565b6106a360048036036060811015610a8b57600080fd5b810190602081018135600160201b811115610aa557600080fd5b820183602082011115610ab757600080fd5b803590602001918460208302840111600160201b83111715610ad857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2757600080fd5b820183602082011115610b3957600080fd5b803590602001918460208302840111600160201b83111715610b5a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250612015915050565b348015610ba657600080fd5b506105c560048036036060811015610bbd57600080fd5b810190602081018135600160201b811115610bd757600080fd5b820183602082011115610be957600080fd5b803590602001918460208302840111600160201b83111715610c0a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356122df565b348015610c5957600080fd5b5061063f61258e565b348015610c6e57600080fd5b5061046761259d565b348015610c8357600080fd5b506108236125b0565b348015610c9857600080fd5b506106a360048036036020811015610caf57600080fd5b810190602081018135600160201b811115610cc957600080fd5b820183602082011115610cdb57600080fd5b803590602001918460208302840111600160201b83111715610cfc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b6945050505050565b348015610d4657600080fd5b506106f860048036036060811015610d5d57600080fd5b506001600160a01b03813581169160208101359091169060400135612608565b348015610d8957600080fd5b506105c560048036036060811015610da057600080fd5b81359190810190604081016020820135600160201b811115610dc157600080fd5b820183602082011115610dd357600080fd5b803590602001918460208302840111600160201b83111715610df457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e4357600080fd5b820183602082011115610e5557600080fd5b803590602001918460208302840111600160201b83111715610e7657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506127ab945050505050565b348015610ec057600080fd5b5061041f6128e7565b348015610ed557600080fd5b506106a360048036036040811015610eec57600080fd5b5080359060200135612913565b348015610f0557600080fd5b506104fc61292b565b348015610f1a57600080fd5b5061063f612930565b6106a360048036036020811015610f3957600080fd5b503561293f565b348015610f4c57600080fd5b5061041f612dba565b348015610f6157600080fd5b5061063f60048036036020811015610f7857600080fd5b5035612e13565b348015610f8b57600080fd5b506104fc61156e565b348015610fa057600080fd5b5061063f612e3a565b348015610fb557600080fd5b5061063f612e49565b348015610fca57600080fd5b5061041f612e58565b348015610fdf57600080fd5b506104b360048036036020811015610ff657600080fd5b50356001600160a01b0316612f40565b34801561101257600080fd5b506106a36004803603602081101561102957600080fd5b50356001600160a01b0316612f82565b34801561104557600080fd5b506106a36004803603602081101561105c57600080fd5b50356001600160a01b0316612f89565b34801561107857600080fd5b506106f8612fb2565b6106a3600480360360a081101561109757600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612fbb565b3480156110d357600080fd5b5061041f600480360360208110156110ea57600080fd5b503563ffffffff166131cb565b34801561110357600080fd5b5061041f6004803603602081101561111a57600080fd5b50356001600160a01b03166132b2565b34801561113657600080fd5b5061063f613330565b61114761333f565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000611181615400565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561129457600080fd5b505afa1580156112a8573d6000803e3d6000fd5b505050506040513d60208110156112be57600080fd5b5051905060006112dd6c42616e636f72466f726d756c6160981b613392565b90506112eb85858484613410565b925050505b92915050565b60006006828154811061130557fe5b6000918252602090912001546001600160a01b031692915050565b60008161132c81613555565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b600080611366858585612608565b915091505b935093915050565b600954600090819060ff166113c7576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b6113cf61542e565b6113d76135c2565b905060066000815481106113e757fe5b6000918252602090912001546001600160a01b03858116911614156114185780516020909101519092509050611425565b6020810151905190925090505b915091565b61143261333f565b61143b81611c82565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d60208110156114ac57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b6114d561333f565b6114dd612dba565b565b60095460ff1681565b6114f061333f565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b600190565b606061157d61375d565b6003805460ff60a81b1916600160a81b179055816115d4576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d602081101561164e57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff811180156116db57600080fd5b50604051908082528060200260200182016040528015611705578160200160208202803683370190505b50905060005b815181101561173557600182828151811061172257fe5b602090810291909101015260010161170b565b5061179c600680548060200260200160405190810160405280929190818152602001828054801561178f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611771575b50505050508284876137ad565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b03163314806117d45750600354600160a01b900460ff16155b611819576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118376f436f6e7472616374526567697374727960801b613392565b6002549091506001600160a01b0380831691161480159061186057506001600160a01b03811615155b6118a8576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d602081101561193457600080fd5b50516001600160a01b03161415611989576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6119c161333f565b806119cb816139b8565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b505190506000611a7b6c42616e636f72466f726d756c6160981b613392565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611af557600080fd5b505afa158015611b09573d6000803e3d6000fd5b505050506040513d6020811015611b1f57600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611b4a61375d565b6003805460ff60a81b1916600160a81b179055611b6561333f565b6000611b8a762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611bc45750611bc261143e565b155b80611bdc57506000546001600160a01b038281169116145b611c21576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611c2c848484613a0c565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611c6057611c6084613a3d565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611c8a61333f565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611cae81613b16565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b505050505050565b611d3661375d565b6003805460ff60a81b1916600160a81b179055611d5161333f565b600080516020615449833981519152611d6981613555565b6000611d8e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b9050611d9861143e565b1580611db157506000546001600160a01b038281169116145b611df6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611e2b573d6000803e3d6000fd5b50611e43600080516020615449833981519152613a3d565b50506003805460ff60a81b1916905550565b611e5d61333f565b611e678282613b78565b6006546002148015611ebb5750600760006006600081548110611e8657fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611f095750600760006006600181548110611ed457fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611f395760019190910190600a9004611f23565b5092915050565b6000611f4a6125b0565b905090565b6001546001600160a01b03163314611fa2576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b600061201f61375d565b6003805460ff60a81b1916600160a81b17905561203a613d9a565b612045848484613de2565b60005b84518110156120f5576000805160206154498339815191526001600160a01b031685828151811061207557fe5b60200260200101516001600160a01b031614156120ed573484828151811061209957fe5b6020026020010151146120ed576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b600101612048565b5034156121855760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16612185576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d557600080fd5b505afa1580156121e9573d6000803e3d6000fd5b505050506040513d60208110156121ff57600080fd5b505190506000612210868684614077565b90508381101561225c576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156122fa57600080fd5b50604051908082528060200260200182016040528015612324578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561237757600080fd5b505afa15801561238b573d6000803e3d6000fd5b505050506040513d60208110156123a157600080fd5b5051905060006123c06c42616e636f72466f726d756c6160981b613392565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106123e457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d602081101561248857600080fd5b5051905060005b845181101561257f57826001600160a01b031663ebbb215885600760008d86815181106124b857fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d602081101561255c57600080fd5b5051855186908390811061256c57fe5b602090810291909101015260010161248f565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156125ef576125e38582815181106125d657fe5b6020026020010151611f1e565b909201916001016125bf565b5060016125fc8383612913565b03600a0a949350505050565b600080612613613d9a565b8461261d81613555565b8461262781613555565b856001600160a01b0316876001600160a01b03161415612687576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006126a26c42616e636f72466f726d756c6160981b613392565b6001600160a01b03166394491fab6126b98a612f89565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166126e48b612f89565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561275f57600080fd5b505afa158015612773573d6000803e3d6000fd5b505050506040513d602081101561278957600080fd5b505190506000612798826140a2565b9182900399919850909650505050505050565b60606127b561375d565b6003805460ff60a81b1916600160a81b1790556127d0613d9a565b6127db838386613de2565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156128ad57600080fd5b505af11580156128c1573d6000803e3d6000fd5b505050506128d1848483886137ad565b6003805460ff60a81b1916905595945050505050565b6128ef61333f565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000816002810484018161292357fe5b049392505050565b600181565b6005546001600160a01b031681565b600061294961375d565b6003805460ff60a81b1916600160a81b1790556129646140d3565b6000805160206154498339815191526000526007602052600080516020615469833981519152546129959034614113565b6000805160206154498339815191526000908152600760209081526000805160206154698339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612a0457600080fd5b505afa158015612a18573d6000803e3d6000fd5b505050506040513d6020811015612a2e57600080fd5b505190506000612a4d6c42616e636f72466f726d756c6160981b613392565b60065490915060005b81811015612d3757600060068281548110612a6d57fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612aef57600080fd5b505afa158015612b03573d6000803e3d6000fd5b505050506040513d6020811015612b1957600080fd5b505190506001600160a01b0383166000805160206154498339815191521415612c645780341115612b795760405133903483900380156108fc02916000818181858888f19350505050158015612b73573d6000803e3d6000fd5b50612c5f565b80341015612c5f573415612bcc576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612beb90600160601b90046001600160a01b0316333084614160565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505b612c70565b612c7083333084614160565b6000612c7c83836142cb565b6001600160a01b0385166000908152600760205260408120829055909150612ca4898c6142cb565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612d269082908790859063ffffffff16614314565b505060019093019250612a56915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612dc261333f565b612dca614383565b6004546001906001600160a01b0316612de161156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612e2057fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6001546001600160a01b031681565b612e6061333f565b6000612e85762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6004549091506000906001600160a01b0316612e9f61156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ed8816132b2565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612f2057600080fd5b505af1158015612f34573d6000803e3d6000fd5b5050505061143b611f4f565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b60006112f0825b600081612f9581613555565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000612fc561375d565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612ff281613b16565b856001600160a01b0316876001600160a01b03161415613052576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061315f575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156130b257600080fd5b505afa1580156130c6573d6000803e3d6000fd5b505050506040513d60208110156130dc57600080fd5b5051801561315f575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561313257600080fd5b505afa158015613146573d6000803e3d6000fd5b505050506040513d602081101561315c57600080fd5b50515b6131a6576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6131b387878787876143e7565b6003805460ff60a81b19169055979650505050505050565b6131d361333f565b60085463ffffffff600160201b9091048116908216111561323b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6132ba61333f565b6000546001600160a01b038281169116141561330e576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b031633146114dd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133de57600080fd5b505afa1580156133f2573d6000803e3d6000fd5b505050506040513d602081101561340857600080fd5b505192915050565b606080845167ffffffffffffffff8111801561342b57600080fd5b50604051908082528060200260200182016040528015613455578160200160208202803683370190505b50905060005b815181101561354b57836001600160a01b0316638074590a86600760008a868151811061348457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156134fe57600080fd5b505afa158015613512573d6000803e3d6000fd5b505050506040513d602081101561352857600080fd5b5051825183908390811061353857fe5b602090810291909101015260010161345b565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6135ca61542e565b6000600c546135d76146aa565b039050806135fd57505060408051808201909152600a548152600b54602082015261124c565b600060076000600660018154811061361157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061364b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549050610258831061369657604080518082019091529182526020820152915061124c9050565b61369e61542e565b5060408051808201909152600a548152600b54602082018190526000906136c590856146ae565b82519091506000906136d790856146ae565b905060006136fd6136e884896146ae565b6136f7846102588b90036146ae565b906142cb565b9050600061372461025861371e8888602001516146ae90919063ffffffff16565b906146ae565b905061373e82826c0c9f2c9cd04674edea4000000061470c565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff16156114dd576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60606137b76140d3565b60006137d26c42616e636f72466f726d756c6160981b613392565b905060006137e08585614113565b905060606137f085898886613410565b905060005b88518110156139ac57600089828151811061380c57fe5b60200260200101519050600083838151811061382457fe5b6020026020010151905089838151811061383a57fe5b602002602001015181101561388f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b0382166000908152600760205260408120546138b29083614113565b6001600160a01b0384166000818152600760205260409020829055909150600080516020615449833981519152141561391857604051339083156108fc029084906000818181858888f19350505050158015613912573d6000803e3d6000fd5b50613923565b61392383338461473e565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b0383166000908152600760205260409020600101546139a19087908590849063ffffffff16614314565b5050506001016137f5565b50979650505050505050565b6001600160a01b03811630141561143b576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613a1461333f565b82613a1e8161489e565b82613a288161489e565b83613a32816139b8565b611d2686868661473e565b80613a4781613555565b6001600160a01b0382166000805160206154498339815191521415613a86576001600160a01b0382166000908152600760205260409020479055613b12565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613acc57600080fd5b505afa158015613ae0573d6000803e3d6000fd5b505050506040513d6020811015613af657600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613b1f81613392565b6001600160a01b0316336001600160a01b03161461143b576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613b8061333f565b613b886148ef565b81613b928161489e565b82613b9c816139b8565b82613ba681614936565b6004546001600160a01b03868116911614801590613be757506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613c2e576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613c96576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613ca16125b0565b61ffff1610613cf3576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613da261143e565b6114dd576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613e35576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613e7f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140305760076000878581518110613e9c57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613f1c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b80821015613f7e57858281518110613f3557fe5b60200260200101516001600160a01b031660068481548110613f5357fe5b6000918252602090912001546001600160a01b03161415613f7357613f7e565b600190910190613f21565b808210613fc8576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000858481518110613fd657fe5b602002602001015111614025576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613e84565b60008411611d26576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161408f5761408884846149a6565b9050612587565b61409a848484614ac5565b949350505050565b6008546000906112f090620f4240906140cd908590600160401b900463ffffffff908116906146ae16565b90614df2565b60065460005b81811015613b125761410b600682815481106140f157fe5b6000918252602090912001546001600160a01b0316613a3d565b6001016140d9565b60008183101561415a576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106141e55780518252601f1990920191602091820191016141c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614247576040519150601f19603f3d011682016040523d82523d6000602084013e61424c565b606091505b509150915081801561427a57508051158061427a575080806020019051602081101561427757600080fd5b50515b611d26576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b600082820183811015612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461435285620f42406146ae565b6143658863ffffffff808816906146ae16565b6040805192835260208301919091528051918290030190a350505050565b600161438d6125b0565b61ffff16116143df576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6114dd614e51565b60008060006143f7888888612608565b91509150816000141561444a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61445387612f89565b821061445b57fe5b6001600160a01b03881660008051602061544983398151915214156144cd578534146144c8576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6145a4565b3415801561455e57508561455b6144e38a612f89565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b15801561452957600080fd5b505afa15801561453d573d6000803e3d6000fd5b505050506040513d602081101561455357600080fd5b505190614113565b10155b6145a4576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6145ad88613a3d565b6001600160a01b0387166000908152600760205260409020546145d09083614113565b6001600160a01b038816600081815260076020526040902091909155600080516020615449833981519152141561463d576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614637573d6000803e3d6000fd5b50614648565b61464887858461473e565b60095460ff168015614662575061465d6146aa565b600c54105b156146875761466f6135c2565b8051600a5560200151600b556146836146aa565b600c555b614695888887898686614f18565b61469f8888614f81565b509695505050505050565b4290565b6000826146bd575060006112f0565b828202828482816146ca57fe5b0414612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808285118061471c57508284115b156147355761472c858585615185565b9150915061136b565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106147bb5780518252601f19909201916020918201910161479c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461481d576040519150601f19603f3d011682016040523d82523d6000602084013e614822565b606091505b5091509150818015614850575080511580614850575080806020019051602081101561484d57600080fd5b50515b614897576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6148f761143e565b156114dd576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156149555750620f424063ffffffff821611155b61143b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6000806149b2836125b6565b905060005b8451811015614abd5760008582815181106149ce57fe5b6020026020010151905060008583815181106149e657fe5b602002602001015190506000805160206154498339815191526001600160a01b0316826001600160a01b031614614a2357614a2382333084614160565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614ab39085908490849063ffffffff16614314565b50506001016149b7565b509392505050565b6000614acf6140d3565b600080516020615449833981519152600052600760205260008051602061546983398151915254614b009034614113565b6000805160206154498339815191526000908152600760205260008051602061546983398151915291909155614b456c42616e636f72466f726d756c6160981b613392565b90506000614b55828588886151ca565b90506000614b6385836142cb565b905060005b8751811015614de6576000888281518110614b7f57fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614c0557600080fd5b505afa158015614c19573d6000803e3d6000fd5b505050506040513d6020811015614c2f57600080fd5b5051905080614c7e576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614c8a57fe5b6020026020010151811115614c9b57fe5b6001600160a01b03831660008051602061544983398151915214614cca57614cc583333084614160565b614d35565b808a8581518110614cd757fe5b60200260200101511115614d3557336001600160a01b03166108fc828c8781518110614cff57fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614d33573d6000803e3d6000fd5b505b6000614d4183836142cb565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614dd69087908690849063ffffffff16614314565b505060019092019150614b689050565b50909695505050505050565b6000808211614e3d576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614e4857fe5b04949350505050565b614e5961333f565b6000614e636125b0565b61ffff1611614eb5576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614ef857600080fd5b505af1158015614f0c573d6000803e3d6000fd5b505050506114dd6140d3565b600160ff1b8110614f2557fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015614fd157600080fd5b505afa158015614fe5573d6000803e3d6000fd5b505050506040513d6020811015614ffb57600080fd5b50519050600061500a84612f89565b9050600061501784612f89565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161505e90859085906146ae16565b905060006150758663ffffffff808616906146ae16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36150cc878a8887614314565b6150d887898786614314565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561519c575050600281048061136b565b838510156151af5761472c858585615390565b6000806151bd868887615390565b9890975095505050505050565b60008060015b84518110156152975761523a600760008784815181106151ec57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061522457fe5b60200260200101516146ae90919063ffffffff16565b6152856007600088868151811061524d57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061522457fe5b101561528f578091505b6001016151d0565b50856001600160a01b0316632f55bdb586600760008886815181106152b857fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff1687868151811061530357fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561535a57600080fd5b505afa15801561536e573d6000803e3d6000fd5b505050506040513d602081101561538457600080fd5b50519695505050505050565b600080600083600019816153a057fe5b049050808611156153d95760008160010187816153b957fe5b0460010190508087816153c857fe5b0496508086816153d457fe5b049550505b60006153f08786026153eb89896142cb565b612913565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea2646970667358221220dc4c1eb48a73c448bec71e9e69e5d49a32f99ae3d43ede630d3172fc61af9d7764736f6c634300060c0033a2646970667358221220b12b2e63b430974fa5c86e104ad274120338c3212ec1e4d8ab209fcbb832e59c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600190565b6156ce806101978339019056fe60806040526003805460ff60a81b191690557fc0829421c1d260bd3cb3e0f06cfe2d52db2ce3150000000000000000000000006008556009805460ff191690553480156200004c57600080fd5b50604051620056ce380380620056ce833981810160405260608110156200007257600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a88162000142565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000df8162000142565b81620000eb81620001a1565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b199092169190911790555062000200945050505050565b6001600160a01b0381166200019e576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6154be80620002106000396000f3fe6080604052600436106103905760003560e01c806371f52bf3116101dc578063ca1d209d11610102578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611081578063ecbca55d146110c7578063f2fde38b146110f7578063fc0c546a1461112a57610421565b8063d66bd52414610fd3578063d895951214611006578063dc8de37914611039578063e2c524681461106c57610421565b8063d260529c116100dc578063d260529c14610f7f578063d3fb73b414610f94578063d4ee1d9014610fa9578063d55ec69714610fbe57610421565b8063ca1d209d14610f23578063cdc91c6914610f40578063d031370b14610f5557610421565b80639b99a8e21161017a578063b4a176d311610149578063b4a176d314610eb4578063bbb7e5d814610ec9578063bf75455814610ef9578063c45d3d9214610f0e57610421565b80639b99a8e214610c77578063a60e772414610c8c578063af94b8d814610d3a578063b127c0a514610d7d57610421565b80637d8916bd116101b65780637d8916bd14610a7557806380d9416d14610b9a5780638da5cb5b14610c4d57806394c275ad14610c6257610421565b806371f52bf314610a3657806379ba509714610a4b5780637b10399914610a6057610421565b806338e9f27a116102c157806354fd4d501161025f57806367b6d57c1161022e57806367b6d57c14610967578063690d83201461099a5780636a49d2c4146109cd5780636aa5332c14610a0c57610421565b806354fd4d50146108e5578063579cd3ca146108fa5780635e35359e1461090f57806361cd756e1461095257610421565b8063415f12401161029b578063415f12401461083a57806349d10b64146108645780634af80f0e146108795780634e40c260146108ac57610421565b806338e9f27a146107b6578063395900d4146107cb5780633e8ff43f1461080e57610421565b80631d4db7911161032e57806321e6b53d1161030857806321e6b53d1461074457806322f3e2d4146107775780632fe8a6ad1461078c57806338a5e016146107a157610421565b80631d4db7911461068e5780631e1401f8146106b55780631f0181bc1461071157610421565b806312c2aca41161036a57806312c2aca4146104e7578063154588371461051057806319b64015146106155780631cfab2901461065b57610421565b8063024c7ec7146104265780630c7d5cd8146104525780630e53aae91461048057610421565b366104215760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661041f576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561043257600080fd5b5061041f6004803603602081101561044957600080fd5b5035151561113f565b34801561045e57600080fd5b50610467611165565b6040805163ffffffff9092168252519081900360200190f35b34801561048c57600080fd5b506104b3600480360360208110156104a357600080fd5b50356001600160a01b0316611171565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156104f357600080fd5b506104fc611208565b604080519115158252519081900360200190f35b34801561051c57600080fd5b506105c56004803603604081101561053357600080fd5b81359190810190604081016020820135600160201b81111561055457600080fd5b82018360208201111561056657600080fd5b803590602001918460208302840111600160201b8311171561058757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061124f945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106015781810151838201526020016105e9565b505050509050019250505060405180910390f35b34801561062157600080fd5b5061063f6004803603602081101561063857600080fd5b50356112f6565b604080516001600160a01b039092168252519081900360200190f35b34801561066757600080fd5b506104676004803603602081101561067e57600080fd5b50356001600160a01b0316611320565b34801561069a57600080fd5b506106a3611352565b60408051918252519081900360200190f35b3480156106c157600080fd5b506106f8600480360360608110156106d857600080fd5b506001600160a01b03813581169160208101359091169060400135611358565b6040805192835260208301919091528051918290030190f35b34801561071d57600080fd5b506106f86004803603602081101561073457600080fd5b50356001600160a01b0316611373565b34801561075057600080fd5b5061041f6004803603602081101561076757600080fd5b50356001600160a01b031661142a565b34801561078357600080fd5b506104fc61143e565b34801561079857600080fd5b506104fc6114bd565b3480156107ad57600080fd5b5061041f6114cd565b3480156107c257600080fd5b506104fc6114df565b3480156107d757600080fd5b5061041f600480360360608110156107ee57600080fd5b506001600160a01b038135811691602081013590911690604001356114e8565b34801561081a57600080fd5b5061082361156e565b6040805161ffff9092168252519081900360200190f35b34801561084657600080fd5b506105c56004803603602081101561085d57600080fd5b5035611573565b34801561087057600080fd5b5061041f6117b1565b34801561088557600080fd5b5061041f6004803603602081101561089c57600080fd5b50356001600160a01b03166119b9565b3480156108b857600080fd5b506106a3600480360360408110156108cf57600080fd5b506001600160a01b0381351690602001356119ee565b3480156108f157600080fd5b50610823611b2a565b34801561090657600080fd5b50610467611b2f565b34801561091b57600080fd5b5061041f6004803603606081101561093257600080fd5b506001600160a01b03813581169160208101359091169060400135611b42565b34801561095e57600080fd5b5061063f611c73565b34801561097357600080fd5b5061041f6004803603602081101561098a57600080fd5b50356001600160a01b0316611c82565b3480156109a657600080fd5b5061041f600480360360208110156109bd57600080fd5b50356001600160a01b0316611d2e565b3480156109d957600080fd5b5061041f600480360360408110156109f057600080fd5b5080356001600160a01b0316906020013563ffffffff16611e55565b348015610a1857600080fd5b506106a360048036036020811015610a2f57600080fd5b5035611f1e565b348015610a4257600080fd5b50610823611f40565b348015610a5757600080fd5b5061041f611f4f565b348015610a6c57600080fd5b5061063f612006565b6106a360048036036060811015610a8b57600080fd5b810190602081018135600160201b811115610aa557600080fd5b820183602082011115610ab757600080fd5b803590602001918460208302840111600160201b83111715610ad857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2757600080fd5b820183602082011115610b3957600080fd5b803590602001918460208302840111600160201b83111715610b5a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250612015915050565b348015610ba657600080fd5b506105c560048036036060811015610bbd57600080fd5b810190602081018135600160201b811115610bd757600080fd5b820183602082011115610be957600080fd5b803590602001918460208302840111600160201b83111715610c0a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356122df565b348015610c5957600080fd5b5061063f61258e565b348015610c6e57600080fd5b5061046761259d565b348015610c8357600080fd5b506108236125b0565b348015610c9857600080fd5b506106a360048036036020811015610caf57600080fd5b810190602081018135600160201b811115610cc957600080fd5b820183602082011115610cdb57600080fd5b803590602001918460208302840111600160201b83111715610cfc57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b6945050505050565b348015610d4657600080fd5b506106f860048036036060811015610d5d57600080fd5b506001600160a01b03813581169160208101359091169060400135612608565b348015610d8957600080fd5b506105c560048036036060811015610da057600080fd5b81359190810190604081016020820135600160201b811115610dc157600080fd5b820183602082011115610dd357600080fd5b803590602001918460208302840111600160201b83111715610df457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e4357600080fd5b820183602082011115610e5557600080fd5b803590602001918460208302840111600160201b83111715610e7657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506127ab945050505050565b348015610ec057600080fd5b5061041f6128e7565b348015610ed557600080fd5b506106a360048036036040811015610eec57600080fd5b5080359060200135612913565b348015610f0557600080fd5b506104fc61292b565b348015610f1a57600080fd5b5061063f612930565b6106a360048036036020811015610f3957600080fd5b503561293f565b348015610f4c57600080fd5b5061041f612dba565b348015610f6157600080fd5b5061063f60048036036020811015610f7857600080fd5b5035612e13565b348015610f8b57600080fd5b506104fc61156e565b348015610fa057600080fd5b5061063f612e3a565b348015610fb557600080fd5b5061063f612e49565b348015610fca57600080fd5b5061041f612e58565b348015610fdf57600080fd5b506104b360048036036020811015610ff657600080fd5b50356001600160a01b0316612f40565b34801561101257600080fd5b506106a36004803603602081101561102957600080fd5b50356001600160a01b0316612f82565b34801561104557600080fd5b506106a36004803603602081101561105c57600080fd5b50356001600160a01b0316612f89565b34801561107857600080fd5b506106f8612fb2565b6106a3600480360360a081101561109757600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612fbb565b3480156110d357600080fd5b5061041f600480360360208110156110ea57600080fd5b503563ffffffff166131cb565b34801561110357600080fd5b5061041f6004803603602081101561111a57600080fd5b50356001600160a01b03166132b2565b34801561113657600080fd5b5061063f613330565b61114761333f565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b6000806000806000611181615400565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561129457600080fd5b505afa1580156112a8573d6000803e3d6000fd5b505050506040513d60208110156112be57600080fd5b5051905060006112dd6c42616e636f72466f726d756c6160981b613392565b90506112eb85858484613410565b925050505b92915050565b60006006828154811061130557fe5b6000918252602090912001546001600160a01b031692915050565b60008161132c81613555565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b600080611366858585612608565b915091505b935093915050565b600954600090819060ff166113c7576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b6113cf61542e565b6113d76135c2565b905060066000815481106113e757fe5b6000918252602090912001546001600160a01b03858116911614156114185780516020909101519092509050611425565b6020810151905190925090505b915091565b61143261333f565b61143b81611c82565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d60208110156114ac57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b6114d561333f565b6114dd612dba565b565b60095460ff1681565b6114f061333f565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561155157600080fd5b505af1158015611565573d6000803e3d6000fd5b50505050505050565b600190565b606061157d61375d565b6003805460ff60a81b1916600160a81b179055816115d4576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d602081101561164e57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff811180156116db57600080fd5b50604051908082528060200260200182016040528015611705578160200160208202803683370190505b50905060005b815181101561173557600182828151811061172257fe5b602090810291909101015260010161170b565b5061179c600680548060200260200160405190810160405280929190818152602001828054801561178f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611771575b50505050508284876137ad565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b03163314806117d45750600354600160a01b900460ff16155b611819576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118376f436f6e7472616374526567697374727960801b613392565b6002549091506001600160a01b0380831691161480159061186057506001600160a01b03811615155b6118a8576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561190a57600080fd5b505afa15801561191e573d6000803e3d6000fd5b505050506040513d602081101561193457600080fd5b50516001600160a01b03161415611989576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6119c161333f565b806119cb816139b8565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b505190506000611a7b6c42616e636f72466f726d756c6160981b613392565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611af557600080fd5b505afa158015611b09573d6000803e3d6000fd5b505050506040513d6020811015611b1f57600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611b4a61375d565b6003805460ff60a81b1916600160a81b179055611b6561333f565b6000611b8a762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611bc45750611bc261143e565b155b80611bdc57506000546001600160a01b038281169116145b611c21576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611c2c848484613a0c565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611c6057611c6084613a3d565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611c8a61333f565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611cae81613b16565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b505050505050565b611d3661375d565b6003805460ff60a81b1916600160a81b179055611d5161333f565b600080516020615449833981519152611d6981613555565b6000611d8e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b9050611d9861143e565b1580611db157506000546001600160a01b038281169116145b611df6576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611e2b573d6000803e3d6000fd5b50611e43600080516020615449833981519152613a3d565b50506003805460ff60a81b1916905550565b611e5d61333f565b611e678282613b78565b6006546002148015611ebb5750600760006006600081548110611e8657fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611f095750600760006006600181548110611ed457fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611f395760019190910190600a9004611f23565b5092915050565b6000611f4a6125b0565b905090565b6001546001600160a01b03163314611fa2576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b600061201f61375d565b6003805460ff60a81b1916600160a81b17905561203a613d9a565b612045848484613de2565b60005b84518110156120f5576000805160206154498339815191526001600160a01b031685828151811061207557fe5b60200260200101516001600160a01b031614156120ed573484828151811061209957fe5b6020026020010151146120ed576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b600101612048565b5034156121855760008051602061544983398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16612185576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121d557600080fd5b505afa1580156121e9573d6000803e3d6000fd5b505050506040513d60208110156121ff57600080fd5b505190506000612210868684614077565b90508381101561225c576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b1580156122b057600080fd5b505af11580156122c4573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156122fa57600080fd5b50604051908082528060200260200182016040528015612324578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561237757600080fd5b505afa15801561238b573d6000803e3d6000fd5b505050506040513d60208110156123a157600080fd5b5051905060006123c06c42616e636f72466f726d756c6160981b613392565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106123e457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d602081101561248857600080fd5b5051905060005b845181101561257f57826001600160a01b031663ebbb215885600760008d86815181106124b857fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b15801561253257600080fd5b505afa158015612546573d6000803e3d6000fd5b505050506040513d602081101561255c57600080fd5b5051855186908390811061256c57fe5b602090810291909101015260010161248f565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156125ef576125e38582815181106125d657fe5b6020026020010151611f1e565b909201916001016125bf565b5060016125fc8383612913565b03600a0a949350505050565b600080612613613d9a565b8461261d81613555565b8461262781613555565b856001600160a01b0316876001600160a01b03161415612687576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006126a26c42616e636f72466f726d756c6160981b613392565b6001600160a01b03166394491fab6126b98a612f89565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166126e48b612f89565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561275f57600080fd5b505afa158015612773573d6000803e3d6000fd5b505050506040513d602081101561278957600080fd5b505190506000612798826140a2565b9182900399919850909650505050505050565b60606127b561375d565b6003805460ff60a81b1916600160a81b1790556127d0613d9a565b6127db838386613de2565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b1580156128ad57600080fd5b505af11580156128c1573d6000803e3d6000fd5b505050506128d1848483886137ad565b6003805460ff60a81b1916905595945050505050565b6128ef61333f565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000816002810484018161292357fe5b049392505050565b600181565b6005546001600160a01b031681565b600061294961375d565b6003805460ff60a81b1916600160a81b1790556129646140d3565b6000805160206154498339815191526000526007602052600080516020615469833981519152546129959034614113565b6000805160206154498339815191526000908152600760209081526000805160206154698339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612a0457600080fd5b505afa158015612a18573d6000803e3d6000fd5b505050506040513d6020811015612a2e57600080fd5b505190506000612a4d6c42616e636f72466f726d756c6160981b613392565b60065490915060005b81811015612d3757600060068281548110612a6d57fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612aef57600080fd5b505afa158015612b03573d6000803e3d6000fd5b505050506040513d6020811015612b1957600080fd5b505190506001600160a01b0383166000805160206154498339815191521415612c645780341115612b795760405133903483900380156108fc02916000818181858888f19350505050158015612b73573d6000803e3d6000fd5b50612c5f565b80341015612c5f573415612bcc576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612beb90600160601b90046001600160a01b0316333084614160565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b505050505b612c70565b612c7083333084614160565b6000612c7c83836142cb565b6001600160a01b0385166000908152600760205260408120829055909150612ca4898c6142cb565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612d269082908790859063ffffffff16614314565b505060019093019250612a56915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612dc261333f565b612dca614383565b6004546001906001600160a01b0316612de161156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612e2057fe5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b031681565b6001546001600160a01b031681565b612e6061333f565b6000612e85762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613392565b6004549091506000906001600160a01b0316612e9f61156e565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ed8816132b2565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612f2057600080fd5b505af1158015612f34573d6000803e3d6000fd5b5050505061143b611f4f565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b60006112f0825b600081612f9581613555565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000612fc561375d565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612ff281613b16565b856001600160a01b0316876001600160a01b03161415613052576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061315f575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156130b257600080fd5b505afa1580156130c6573d6000803e3d6000fd5b505050506040513d60208110156130dc57600080fd5b5051801561315f575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561313257600080fd5b505afa158015613146573d6000803e3d6000fd5b505050506040513d602081101561315c57600080fd5b50515b6131a6576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b6131b387878787876143e7565b6003805460ff60a81b19169055979650505050505050565b6131d361333f565b60085463ffffffff600160201b9091048116908216111561323b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b6132ba61333f565b6000546001600160a01b038281169116141561330e576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b031633146114dd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133de57600080fd5b505afa1580156133f2573d6000803e3d6000fd5b505050506040513d602081101561340857600080fd5b505192915050565b606080845167ffffffffffffffff8111801561342b57600080fd5b50604051908082528060200260200182016040528015613455578160200160208202803683370190505b50905060005b815181101561354b57836001600160a01b0316638074590a86600760008a868151811061348457fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156134fe57600080fd5b505afa158015613512573d6000803e3d6000fd5b505050506040513d602081101561352857600080fd5b5051825183908390811061353857fe5b602090810291909101015260010161345b565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6135ca61542e565b6000600c546135d76146aa565b039050806135fd57505060408051808201909152600a548152600b54602082015261124c565b600060076000600660018154811061361157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061364b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549050610258831061369657604080518082019091529182526020820152915061124c9050565b61369e61542e565b5060408051808201909152600a548152600b54602082018190526000906136c590856146ae565b82519091506000906136d790856146ae565b905060006136fd6136e884896146ae565b6136f7846102588b90036146ae565b906142cb565b9050600061372461025861371e8888602001516146ae90919063ffffffff16565b906146ae565b905061373e82826c0c9f2c9cd04674edea4000000061470c565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff16156114dd576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60606137b76140d3565b60006137d26c42616e636f72466f726d756c6160981b613392565b905060006137e08585614113565b905060606137f085898886613410565b905060005b88518110156139ac57600089828151811061380c57fe5b60200260200101519050600083838151811061382457fe5b6020026020010151905089838151811061383a57fe5b602002602001015181101561388f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b0382166000908152600760205260408120546138b29083614113565b6001600160a01b0384166000818152600760205260409020829055909150600080516020615449833981519152141561391857604051339083156108fc029084906000818181858888f19350505050158015613912573d6000803e3d6000fd5b50613923565b61392383338461473e565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b0383166000908152600760205260409020600101546139a19087908590849063ffffffff16614314565b5050506001016137f5565b50979650505050505050565b6001600160a01b03811630141561143b576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613a1461333f565b82613a1e8161489e565b82613a288161489e565b83613a32816139b8565b611d2686868661473e565b80613a4781613555565b6001600160a01b0382166000805160206154498339815191521415613a86576001600160a01b0382166000908152600760205260409020479055613b12565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613acc57600080fd5b505afa158015613ae0573d6000803e3d6000fd5b505050506040513d6020811015613af657600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613b1f81613392565b6001600160a01b0316336001600160a01b03161461143b576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613b8061333f565b613b886148ef565b81613b928161489e565b82613b9c816139b8565b82613ba681614936565b6004546001600160a01b03868116911614801590613be757506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613c2e576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613c96576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613ca16125b0565b61ffff1610613cf3576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613da261143e565b6114dd576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613e35576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613e7f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140305760076000878581518110613e9c57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613f1c576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b80821015613f7e57858281518110613f3557fe5b60200260200101516001600160a01b031660068481548110613f5357fe5b6000918252602090912001546001600160a01b03161415613f7357613f7e565b600190910190613f21565b808210613fc8576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000858481518110613fd657fe5b602002602001015111614025576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613e84565b60008411611d26576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161408f5761408884846149a6565b9050612587565b61409a848484614ac5565b949350505050565b6008546000906112f090620f4240906140cd908590600160401b900463ffffffff908116906146ae16565b90614df2565b60065460005b81811015613b125761410b600682815481106140f157fe5b6000918252602090912001546001600160a01b0316613a3d565b6001016140d9565b60008183101561415a576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106141e55780518252601f1990920191602091820191016141c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614247576040519150601f19603f3d011682016040523d82523d6000602084013e61424c565b606091505b509150915081801561427a57508051158061427a575080806020019051602081101561427757600080fd5b50515b611d26576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b600082820183811015612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461435285620f42406146ae565b6143658863ffffffff808816906146ae16565b6040805192835260208301919091528051918290030190a350505050565b600161438d6125b0565b61ffff16116143df576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6114dd614e51565b60008060006143f7888888612608565b91509150816000141561444a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61445387612f89565b821061445b57fe5b6001600160a01b03881660008051602061544983398151915214156144cd578534146144c8576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6145a4565b3415801561455e57508561455b6144e38a612f89565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b15801561452957600080fd5b505afa15801561453d573d6000803e3d6000fd5b505050506040513d602081101561455357600080fd5b505190614113565b10155b6145a4576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6145ad88613a3d565b6001600160a01b0387166000908152600760205260409020546145d09083614113565b6001600160a01b038816600081815260076020526040902091909155600080516020615449833981519152141561463d576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614637573d6000803e3d6000fd5b50614648565b61464887858461473e565b60095460ff168015614662575061465d6146aa565b600c54105b156146875761466f6135c2565b8051600a5560200151600b556146836146aa565b600c555b614695888887898686614f18565b61469f8888614f81565b509695505050505050565b4290565b6000826146bd575060006112f0565b828202828482816146ca57fe5b0414612587576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808285118061471c57508284115b156147355761472c858585615185565b9150915061136b565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106147bb5780518252601f19909201916020918201910161479c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461481d576040519150601f19603f3d011682016040523d82523d6000602084013e614822565b606091505b5091509150818015614850575080511580614850575080806020019051602081101561484d57600080fd5b50515b614897576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b03811661143b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6148f761143e565b156114dd576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff161180156149555750620f424063ffffffff821611155b61143b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6000806149b2836125b6565b905060005b8451811015614abd5760008582815181106149ce57fe5b6020026020010151905060008583815181106149e657fe5b602002602001015190506000805160206154498339815191526001600160a01b0316826001600160a01b031614614a2357614a2382333084614160565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614ab39085908490849063ffffffff16614314565b50506001016149b7565b509392505050565b6000614acf6140d3565b600080516020615449833981519152600052600760205260008051602061546983398151915254614b009034614113565b6000805160206154498339815191526000908152600760205260008051602061546983398151915291909155614b456c42616e636f72466f726d756c6160981b613392565b90506000614b55828588886151ca565b90506000614b6385836142cb565b905060005b8751811015614de6576000888281518110614b7f57fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614c0557600080fd5b505afa158015614c19573d6000803e3d6000fd5b505050506040513d6020811015614c2f57600080fd5b5051905080614c7e576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614c8a57fe5b6020026020010151811115614c9b57fe5b6001600160a01b03831660008051602061544983398151915214614cca57614cc583333084614160565b614d35565b808a8581518110614cd757fe5b60200260200101511115614d3557336001600160a01b03166108fc828c8781518110614cff57fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614d33573d6000803e3d6000fd5b505b6000614d4183836142cb565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614dd69087908690849063ffffffff16614314565b505060019092019150614b689050565b50909695505050505050565b6000808211614e3d576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614e4857fe5b04949350505050565b614e5961333f565b6000614e636125b0565b61ffff1611614eb5576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614ef857600080fd5b505af1158015614f0c573d6000803e3d6000fd5b505050506114dd6140d3565b600160ff1b8110614f2557fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015614fd157600080fd5b505afa158015614fe5573d6000803e3d6000fd5b505050506040513d6020811015614ffb57600080fd5b50519050600061500a84612f89565b9050600061501784612f89565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161505e90859085906146ae16565b905060006150758663ffffffff808616906146ae16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36150cc878a8887614314565b6150d887898786614314565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561519c575050600281048061136b565b838510156151af5761472c858585615390565b6000806151bd868887615390565b9890975095505050505050565b60008060015b84518110156152975761523a600760008784815181106151ec57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061522457fe5b60200260200101516146ae90919063ffffffff16565b6152856007600088868151811061524d57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061522457fe5b101561528f578091505b6001016151d0565b50856001600160a01b0316632f55bdb586600760008886815181106152b857fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff1687868151811061530357fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561535a57600080fd5b505afa15801561536e573d6000803e3d6000fd5b505050506040513d602081101561538457600080fd5b50519695505050505050565b600080600083600019816153a057fe5b049050808611156153d95760008160010187816153b957fe5b0460010190508087816153c857fe5b0496508086816153d457fe5b049550505b60006153f08786026153eb89896142cb565b612913565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea2646970667358221220dc4c1eb48a73c448bec71e9e69e5d49a32f99ae3d43ede630d3172fc61af9d7764736f6c634300060c0033a2646970667358221220b12b2e63b430974fa5c86e104ad274120338c3212ec1e4d8ab209fcbb832e59c64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "318:1063:27:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "318:1063:27:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1025:353;;;;;;;;;;;;;;;;-1:-1:-1;1025:353:27;;-1:-1:-1;;;;;1025:353:27;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1025:353:27;;;;;;;;;;;;;;522:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1025:353;1158:10;1181:20;1253:7;1264:9;1275:17;1204:89;;;;;:::i;:::-;;;-1:-1:-1;;;;;1204:89:27;;;;;;-1:-1:-1;;;;;1204:89:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1181:112;;1304:9;-1:-1:-1;;;;;1304:27:27;;1332:10;1304:39;;;;;;;;;;;;;-1:-1:-1;;;;;1304:39:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1361:9:27;;1025:353;-1:-1:-1;;;;;;;1025:353:27:o;522:92::-;605:1;522:92;:::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./LiquidityPoolV1Converter.sol\";\r\nimport \"../../interfaces/IConverter.sol\";\r\nimport \"../../interfaces/ITypedConverterFactory.sol\";\r\nimport \"../../../token/interfaces/ISmartToken.sol\";\r\n\r\n/*\r\n LiquidityPoolV1Converter Factory\r\n*/\r\ncontract LiquidityPoolV1ConverterFactory is ITypedConverterFactory {\r\n /**\r\n * @dev returns the converter type the factory is associated with\r\n *\r\n * @return converter type\r\n */\r\n function converterType() external pure override returns (uint16) {\r\n return 1;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n *\r\n * @return a new converter\r\n */\r\n function createConverter(IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external override returns (IConverter) {\r\n IConverter converter = new LiquidityPoolV1Converter(ISmartToken(address(_anchor)), _registry, _maxConversionFee);\r\n converter.transferOwnership(msg.sender);\r\n return converter;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1ConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1ConverterFactory.sol", + "exportedSymbols": { + "LiquidityPoolV1ConverterFactory": [ + 16649 + ] + }, + "id": 16650, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 16595, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:27" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "file": "./LiquidityPoolV1Converter.sol", + "id": 16596, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 16594, + "src": "77:40:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../interfaces/IConverter.sol", + "id": 16597, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 13341, + "src": "119:41:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 16598, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 13711, + "src": "162:53:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 16599, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 21517, + "src": "217:51:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 16600, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "362:22:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 16601, + "nodeType": "InheritanceSpecifier", + "src": "362:22:27" + } + ], + "contractDependencies": [ + 13710, + 16593 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 16649, + "linearizedBaseContracts": [ + 16649, + 13710 + ], + "name": "LiquidityPoolV1ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 16610, + "nodeType": "Block", + "src": "587:27:27", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "605:1:27", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 16607, + "id": 16609, + "nodeType": "Return", + "src": "598:8:27" + } + ] + }, + "documentation": { + "id": 16602, + "nodeType": "StructuredDocumentation", + "src": "392:124:27", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 16611, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16604, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "561:8:27" + }, + "parameters": { + "id": 16603, + "nodeType": "ParameterList", + "parameters": [], + "src": "544:2:27" + }, + "returnParameters": { + "id": 16607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16606, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16611, + "src": "579:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 16605, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "579:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "578:8:27" + }, + "scope": 16649, + "src": "522:92:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 16647, + "nodeType": "Block", + "src": "1170:208:27", + "statements": [ + { + "assignments": [ + 16625 + ], + "declarations": [ + { + "constant": false, + "id": 16625, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16647, + "src": "1181:20:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 16624, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1181:10:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16637, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16631, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16614, + "src": "1253:7:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1245:7:27", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16629, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1245:7:27", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1245:16:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16628, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "1233:11:27", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1233:29:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 16634, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16616, + "src": "1264:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 16635, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16618, + "src": "1275:17:27", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1204:28:27", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_ISmartToken_$21516_$_t_contract$_IContractRegistry_$23165_$_t_uint32_$returns$_t_contract$_LiquidityPoolV1Converter_$16593_$", + "typeString": "function (contract ISmartToken,contract IContractRegistry,uint32) returns (contract LiquidityPoolV1Converter)" + }, + "typeName": { + "contractScope": null, + "id": 16626, + "name": "LiquidityPoolV1Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16593, + "src": "1208:24:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + }, + "id": 16636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1204:89:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1181:112:27" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1332:3:27", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1332:10:27", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 16638, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16625, + "src": "1304:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 16640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23177, + "src": "1304:27:27", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 16643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1304:39:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16644, + "nodeType": "ExpressionStatement", + "src": "1304:39:27" + }, + { + "expression": { + "argumentTypes": null, + "id": 16645, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16625, + "src": "1361:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 16623, + "id": 16646, + "nodeType": "Return", + "src": "1354:16:27" + } + ] + }, + "documentation": { + "id": 16612, + "nodeType": "StructuredDocumentation", + "src": "622:397:27", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return a new converter" + }, + "functionSelector": "11413958", + "id": 16648, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16620, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1140:8:27" + }, + "parameters": { + "id": 16619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16614, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1050:24:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 16613, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1050:16:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16616, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1076:27:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 16615, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "1076:17:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16618, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1105:24:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16617, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1105:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1049:81:27" + }, + "returnParameters": { + "id": 16623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16622, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1158:10:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 16621, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1158:10:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1157:12:27" + }, + "scope": 16649, + "src": "1025:353:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 16650, + "src": "318:1063:27" + } + ], + "src": "52:1331:27" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1ConverterFactory.sol", + "exportedSymbols": { + "LiquidityPoolV1ConverterFactory": [ + 16649 + ] + }, + "id": 16650, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 16595, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:27" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "file": "./LiquidityPoolV1Converter.sol", + "id": 16596, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 16594, + "src": "77:40:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol", + "file": "../../interfaces/IConverter.sol", + "id": 16597, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 13341, + "src": "119:41:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 16598, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 13711, + "src": "162:53:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "../../../token/interfaces/ISmartToken.sol", + "id": 16599, + "nodeType": "ImportDirective", + "scope": 16650, + "sourceUnit": 21517, + "src": "217:51:27", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 16600, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "362:22:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 16601, + "nodeType": "InheritanceSpecifier", + "src": "362:22:27" + } + ], + "contractDependencies": [ + 13710, + 16593 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 16649, + "linearizedBaseContracts": [ + 16649, + 13710 + ], + "name": "LiquidityPoolV1ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 16610, + "nodeType": "Block", + "src": "587:27:27", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "605:1:27", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 16607, + "id": 16609, + "nodeType": "Return", + "src": "598:8:27" + } + ] + }, + "documentation": { + "id": 16602, + "nodeType": "StructuredDocumentation", + "src": "392:124:27", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 16611, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16604, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "561:8:27" + }, + "parameters": { + "id": 16603, + "nodeType": "ParameterList", + "parameters": [], + "src": "544:2:27" + }, + "returnParameters": { + "id": 16607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16606, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16611, + "src": "579:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 16605, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "579:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "578:8:27" + }, + "scope": 16649, + "src": "522:92:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 16647, + "nodeType": "Block", + "src": "1170:208:27", + "statements": [ + { + "assignments": [ + 16625 + ], + "declarations": [ + { + "constant": false, + "id": 16625, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16647, + "src": "1181:20:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 16624, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1181:10:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16637, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16631, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16614, + "src": "1253:7:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 16630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1245:7:27", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16629, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1245:7:27", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1245:16:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16628, + "name": "ISmartToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21516, + "src": "1233:11:27", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ISmartToken_$21516_$", + "typeString": "type(contract ISmartToken)" + } + }, + "id": 16633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1233:29:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 16634, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16616, + "src": "1264:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 16635, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16618, + "src": "1275:17:27", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1204:28:27", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_ISmartToken_$21516_$_t_contract$_IContractRegistry_$23165_$_t_uint32_$returns$_t_contract$_LiquidityPoolV1Converter_$16593_$", + "typeString": "function (contract ISmartToken,contract IContractRegistry,uint32) returns (contract LiquidityPoolV1Converter)" + }, + "typeName": { + "contractScope": null, + "id": 16626, + "name": "LiquidityPoolV1Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16593, + "src": "1208:24:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + } + }, + "id": 16636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1204:89:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1181:112:27" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 16641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1332:3:27", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1332:10:27", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 16638, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16625, + "src": "1304:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 16640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23177, + "src": "1304:27:27", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 16643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1304:39:27", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16644, + "nodeType": "ExpressionStatement", + "src": "1304:39:27" + }, + { + "expression": { + "argumentTypes": null, + "id": 16645, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16625, + "src": "1361:9:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 16623, + "id": 16646, + "nodeType": "Return", + "src": "1354:16:27" + } + ] + }, + "documentation": { + "id": 16612, + "nodeType": "StructuredDocumentation", + "src": "622:397:27", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return a new converter" + }, + "functionSelector": "11413958", + "id": 16648, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16620, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1140:8:27" + }, + "parameters": { + "id": 16619, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16614, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1050:24:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 16613, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1050:16:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16616, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1076:27:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 16615, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "1076:17:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16618, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1105:24:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16617, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1105:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1049:81:27" + }, + "returnParameters": { + "id": 16623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16622, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16648, + "src": "1158:10:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 16621, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1158:10:27", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1157:12:27" + }, + "scope": 16649, + "src": "1025:353:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 16650, + "src": "318:1063:27" + } + ], + "src": "52:1331:27" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.946Z", + "devdoc": { + "kind": "dev", + "methods": { + "converterType()": { + "details": "returns the converter type the factory is associated with", + "returns": { + "_0": "converter type" + } + }, + "createConverter(address,address,uint32)": { + "details": "creates a new converter with the given arguments and transfers the ownership to the caller", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract" + }, + "returns": { + "_0": "a new converter" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2Converter.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2Converter.json new file mode 100644 index 00000000..8ba610ab --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2Converter.json @@ -0,0 +1,48459 @@ +{ + "contractName": "LiquidityPoolV2Converter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IPoolTokensContainer", + "name": "_poolTokensContainer", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "OracleDeviationFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "externalRate", + "outputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalRateUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxStakedBalanceEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "maxStakedBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleDeviationFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceOracle", + "outputs": [ + { + "internalType": "contract IPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primaryReserveToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "secondaryReserveToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_primaryReserveToken", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_primaryReserveOracle", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_secondaryReserveOracle", + "type": "address" + } + ], + "name": "activate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_oracleDeviationFee", + "type": "uint32" + } + ], + "name": "setOracleDeviationFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveStakedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveAmplifiedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_balance", + "type": "uint256" + } + ], + "name": "setReserveStakedBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_reserve1MaxStakedBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserve2MaxStakedBalance", + "type": "uint256" + } + ], + "name": "setMaxStakedBalances", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableMaxStakedBalances", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "poolToken", + "outputs": [ + { + "internalType": "contract ISmartToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + } + ], + "name": "liquidationLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "effectiveTokensRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "removeLiquidityReturnAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "effectiveReserveWeights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IPoolTokensContainer\",\"name\":\"_poolTokensContainer\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"OracleDeviationFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_primaryReserveToken\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_primaryReserveOracle\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_secondaryReserveOracle\",\"type\":\"address\"}],\"name\":\"activate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableMaxStakedBalances\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"effectiveReserveWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"effectiveTokensRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"d\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalRateUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"}],\"name\":\"liquidationLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxStakedBalanceEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxStakedBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleDeviationFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"poolToken\",\"outputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"primaryReserveToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityReturnAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveAmplifiedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveStakedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"secondaryReserveToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_reserve1MaxStakedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserve2MaxStakedBalance\",\"type\":\"uint256\"}],\"name\":\"setMaxStakedBalances\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_oracleDeviationFee\",\"type\":\"uint32\"}],\"name\":\"setOracleDeviationFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_balance\",\"type\":\"uint256\"}],\"name\":\"setReserveStakedBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Liquidity Pool v2 Converter The liquidity pool v2 converter is a specialized version of a converter that uses price oracles to rebalance the reserve weights in such a way that the primary token balance always strives to match the staked balance. This type of liquidity pool always has 2 reserves and the reserve weights are dynamic.\",\"events\":{\"OracleDeviationFeeUpdate(uint32,uint32)\":{\"details\":\"triggered when the oracle deviation fee is updated\",\"params\":{\"_newFee\":\"new fee percentage, represented in ppm\",\"_prevFee\":\"previous fee percentage, represented in ppm\"}}},\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"activate(address,address,address)\":{\"details\":\"sets the pool's primary reserve token / price oracles and activates the pool each oracle must be able to provide the rate for each reserve token note that the oracle must be whitelisted prior to the call can only be called by the owner while the pool is inactive\",\"params\":{\"_primaryReserveOracle\":\"address of a chainlink price oracle for the primary reserve token\",\"_primaryReserveToken\":\"address of the pool's primary reserve token\",\"_secondaryReserveOracle\":\"address of a chainlink price oracle for the secondary reserve token\"}},\"addLiquidity(address,uint256,uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller\",\"params\":{\"_amount\":\"amount of liquidity to add\",\"_minReturn\":\"minimum return-amount of pool tokens\",\"_reserveToken\":\"address of the reserve token to add liquidity to\"},\"returns\":{\"_0\":\"amount of pool tokens minted\"}},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive and 2 reserves aren't defined yet\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"constructor\":{\"details\":\"initializes a new LiquidityPoolV2Converter instance\",\"params\":{\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_poolTokensContainer\":\"pool tokens container governed by the converter\",\"_registry\":\"address of a contract registry contract\"}},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"converterType()\":{\"details\":\"returns the converter type\",\"returns\":{\"_0\":\"see the converter types in the the main contract doc\"}},\"disableMaxStakedBalances()\":{\"details\":\"disables the max staked balance mechanism available as a temporary mechanism during the beta once disabled, it cannot be re-enabled can only be called by the owner\"},\"effectiveReserveWeights()\":{\"details\":\"returns the effective reserve tokens weights\",\"returns\":{\"_0\":\"reserve1 weight\",\"_1\":\"reserve2 weight\"}},\"effectiveTokensRate()\":{\"details\":\"returns the effective rate of 1 primary token in secondary tokens\",\"returns\":{\"_0\":\"rate of 1 primary token in secondary tokens (numerator)\",\"_1\":\"rate of 1 primary token in secondary tokens (denominator)\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"liquidationLimit(address)\":{\"details\":\"returns the maximum number of pool tokens that can currently be liquidated\",\"params\":{\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"liquidation limit\"}},\"poolToken(address)\":{\"details\":\"returns the pool token address by the reserve token address\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"pool token address\"}},\"removeLiquidity(address,uint256,uint256)\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool\",\"params\":{\"_amount\":\"amount of pool tokens to burn\",\"_minReturn\":\"minimum return-amount of reserve tokens\",\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"amount of liquidity removed\"}},\"removeLiquidityReturnAndFee(address,uint256)\":{\"details\":\"calculates the amount of reserve tokens entitled for a given amount of pool tokens note that a fee is applied according to the equilibrium level of the primary reserve token\",\"params\":{\"_amount\":\"amount of pool tokens\",\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"amount after fee and fee, in reserve token units\"}},\"reserveAmplifiedBalance(address)\":{\"details\":\"returns the amplified balance of a given reserve token\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"amplified balance\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveStakedBalance(address)\":{\"details\":\"returns the staked balance of a given reserve token\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"staked balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"setMaxStakedBalances(uint256,uint256)\":{\"details\":\"sets the max staked balance for both reserves available as a temporary mechanism during the beta can only be called by the owner\",\"params\":{\"_reserve1MaxStakedBalance\":\"max staked balance for reserve 1\",\"_reserve2MaxStakedBalance\":\"max staked balance for reserve 2\"}},\"setOracleDeviationFee(uint32)\":{\"details\":\"updates the current oracle deviation fee can only be called by the contract owner\",\"params\":{\"_oracleDeviationFee\":\"new oracle deviation fee, represented in ppm\"}},\"setReserveStakedBalance(address,uint256)\":{\"details\":\"sets the reserve's staked balance can only be called by the upgrader contract while the upgrader is the owner\",\"params\":{\"_balance\":\"new reserve staked balance\",\"_reserveToken\":\"reserve token address\"}},\"targetAmountAndFee(address,address,uint256)\":{\"details\":\"returns the expected target amount of converting one reserve to another along with the fee\",\"params\":{\"_amount\":\"amount of tokens received from the user\",\"_sourceToken\":\"contract address of the source reserve token\",\"_targetToken\":\"contract address of the target reserve token\"},\"returns\":{\"_0\":\"expected target amount\",\"_1\":\"expected fee\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol\":\"LiquidityPoolV2Converter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol\":{\"keccak256\":\"0xdd6e82cc0945131084abe0d5103cdf91326706658de33a94fd8fe3ff7b6b59b9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://53573685ad522fd72fea8f7ec09181fef4c48a12ce9366813500c5f1c1aa7155\",\"dweb:/ipfs/Qmdy3PpQy7rnAHpMScnWWaitDtvMDvXCf51wVzMW1R1hLu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol\":{\"keccak256\":\"0x7fc843e5f1b0de5cc1248b4f12396a2dc42fc089f4af0b20ddb222cfca096f92\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2f042d21817d6cabc0296f90ed45730353ff1a057c797104518b3a33dc01261b\",\"dweb:/ipfs/QmNgXdNtY1f2Ggg8PbB1MZVS9am8YAmPdj5fD7LFvApqC4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":{\"keccak256\":\"0x79e583ec380c8982f74d4f707ae26ed96e1c90a6b54b4fc058ab2316656e0ddb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3c900b396fefda767db8b99d9ed10c9a22151279b0f8229098d28a08e75046da\",\"dweb:/ipfs/QmZBqgB1CnKpjM8Bv6HMrYtzdwu8wBmS3FzpWuvhyfGLwd\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":{\"keccak256\":\"0x5d03fb3ec2ef50006712ad6fd47d14aed49c4d57971e8d918618093f690e6170\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8dae9bd9a95911008b10d316a1efaa6f05224bf37dec02ace44ef5a303aff3ee\",\"dweb:/ipfs/Qmeuv2c6R2KwFWganFF7US5s5TcYm1toGM2o4XkS1zGx4R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b19169055600880546001600160601b03191690556012805460ff191660011764ffffffff001916622710001790553480156200004857600080fd5b5060405162004d3738038062004d37833981810160405260608110156200006e57600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a4816200013e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000db816200013e565b81620000e7816200019d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001fc945050505050565b6001600160a01b0381166200019a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b614b2b806200020c6000396000f3fe6080604052600436106103e75760003560e01c8063690d832011610208578063d260529c11610118578063dc8de379116100ab578063ec2240f51161007a578063ec2240f514610e3f578063ecbca55d14610e54578063f2fde38b14610e84578063fc0c546a14610eb7578063fd2d6c7c14610ecc57610478565b8063dc8de37914610d57578063ddd9abbf14610d8a578063e38192e314610dba578063e8dc12ff14610df957610478565b8063d66bd524116100e7578063d66bd52414610cc7578063d895951214610cfa578063db2830a414610d2d578063dc75eb9a14610d4257610478565b8063d260529c14610c73578063d3fb73b414610c88578063d4ee1d9014610c9d578063d55ec69714610cb257610478565b80639b99a8e21161019b578063bf7545581161016a578063bf75455814610bd1578063bf7da6ba14610be6578063c45d3d9214610c1f578063cdc91c6914610c34578063d031370b14610c4957610478565b80639b99a8e214610b4f578063ab28b17414610b64578063af94b8d814610b79578063b4a176d314610bbc57610478565b80637b103999116101d75780637b10399914610add5780638da5cb5b14610af257806394c275ad14610b0757806398a71dcb14610b1c57610478565b8063690d832014610a415780636a49d2c414610a7457806371f52bf314610ab357806379ba509714610ac857610478565b80632bf0c985116103035780634af80f0e11610296578063579cd3ca11610265578063579cd3ca146109685780635e35359e1461097d57806361cd756e146109c057806367b6d57c146109d557806369067d9514610a0857610478565b80634af80f0e146108bb57806354fd4d50146108ee57806355776b77146109035780635768adcf1461093557610478565b8063395900d4116102d2578063395900d4146108075780633e8ff43f1461084a578063467494681461087657806349d10b64146108a657610478565b80632bf0c985146107955780632fe8a6ad146107c857806334d084b9146107dd57806338a5e016146107f257610478565b806316912f961161037b57806321e6b53d1161034a57806321e6b53d1461070557806322f3e2d4146107385780632630c12f1461074d5780632bd3c1071461076257610478565b806316912f961461063757806319b640151461064c5780631cfab290146106765780631e1401f8146106a957610478565b80630c7d5cd8116103b75780630c7d5cd8146105485780630e53aae914610576578063119b90cd146105dd57806312c2aca41461062257610478565b80625e319c1461047d578063024c7ec7146104c25780630337e3fb146104ee5780630a55fb3d1461051f57610478565b3661047857600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610476576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561048957600080fd5b506104b0600480360360208110156104a057600080fd5b50356001600160a01b0316610ee1565b60408051918252519081900360200190f35b3480156104ce57600080fd5b50610476600480360360208110156104e557600080fd5b50351515610f0a565b3480156104fa57600080fd5b50610503610f30565b604080516001600160a01b039092168252519081900360200190f35b34801561052b57600080fd5b50610534610f3f565b604080519115158252519081900360200190f35b34801561055457600080fd5b5061055d610f48565b6040805163ffffffff9092168252519081900360200190f35b34801561058257600080fd5b506105a96004803603602081101561059957600080fd5b50356001600160a01b0316610f54565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156105e957600080fd5b506104766004803603606081101561060057600080fd5b506001600160a01b038135811691602081013582169160409091013516610fec565b34801561062e57600080fd5b50610534611595565b34801561064357600080fd5b506104766115db565b34801561065857600080fd5b506105036004803603602081101561066f57600080fd5b50356115ef565b34801561068257600080fd5b5061055d6004803603602081101561069957600080fd5b50356001600160a01b0316611619565b3480156106b557600080fd5b506106ec600480360360608110156106cc57600080fd5b506001600160a01b0381358116916020810135909116906040013561164b565b6040805192835260208301919091528051918290030190f35b34801561071157600080fd5b506104766004803603602081101561072857600080fd5b50356001600160a01b0316611665565b34801561074457600080fd5b50610534611679565b34801561075957600080fd5b506105036116a5565b34801561076e57600080fd5b506104b06004803603602081101561078557600080fd5b50356001600160a01b03166116bb565b3480156107a157600080fd5b506104b0600480360360208110156107b857600080fd5b50356001600160a01b03166116d7565b3480156107d457600080fd5b506105346117a2565b3480156107e957600080fd5b5061055d6117b2565b3480156107fe57600080fd5b506104766117c3565b34801561081357600080fd5b506104766004803603606081101561082a57600080fd5b506001600160a01b038135811691602081013590911690604001356117d5565b34801561085657600080fd5b5061085f61185b565b6040805161ffff9092168252519081900360200190f35b34801561088257600080fd5b506104766004803603604081101561089957600080fd5b5080359060200135611860565b3480156108b257600080fd5b506104766118e2565b3480156108c757600080fd5b50610476600480360360208110156108de57600080fd5b50356001600160a01b0316611aea565b3480156108fa57600080fd5b5061085f611b1f565b6104b06004803603606081101561091957600080fd5b506001600160a01b038135169060208101359060400135611b24565b34801561094157600080fd5b506105036004803603602081101561095857600080fd5b50356001600160a01b0316612016565b34801561097457600080fd5b5061055d612034565b34801561098957600080fd5b50610476600480360360608110156109a057600080fd5b506001600160a01b03813581169160208101359091169060400135612047565b3480156109cc57600080fd5b50610503612178565b3480156109e157600080fd5b50610476600480360360208110156109f857600080fd5b50356001600160a01b0316612187565b348015610a1457600080fd5b506106ec60048036036040811015610a2b57600080fd5b506001600160a01b038135169060200135612233565b348015610a4d57600080fd5b5061047660048036036020811015610a6457600080fd5b50356001600160a01b0316612371565b348015610a8057600080fd5b5061047660048036036040811015610a9757600080fd5b5080356001600160a01b0316906020013563ffffffff16612498565b348015610abf57600080fd5b5061085f61250a565b348015610ad457600080fd5b50610476612514565b348015610ae957600080fd5b506105036125cb565b348015610afe57600080fd5b506105036125da565b348015610b1357600080fd5b5061055d6125e9565b348015610b2857600080fd5b506104b060048036036020811015610b3f57600080fd5b50356001600160a01b03166125fd565b348015610b5b57600080fd5b5061085f61260f565b348015610b7057600080fd5b506106ec612615565b348015610b8557600080fd5b506106ec60048036036060811015610b9c57600080fd5b506001600160a01b0381358116916020810135909116906040013561261e565b348015610bc857600080fd5b50610476612754565b348015610bdd57600080fd5b50610534612780565b348015610bf257600080fd5b5061047660048036036040811015610c0957600080fd5b506001600160a01b038135169060200135612785565b348015610c2b57600080fd5b506105036127d9565b348015610c4057600080fd5b506104766127e8565b348015610c5557600080fd5b5061050360048036036020811015610c6c57600080fd5b503561284c565b348015610c7f57600080fd5b50610534612873565b348015610c9457600080fd5b50610503612878565b348015610ca957600080fd5b50610503612887565b348015610cbe57600080fd5b50610476612896565b348015610cd357600080fd5b506105a960048036036020811015610cea57600080fd5b50356001600160a01b031661297e565b348015610d0657600080fd5b506104b060048036036020811015610d1d57600080fd5b50356001600160a01b03166129c1565b348015610d3957600080fd5b506106ec6129d2565b348015610d4e57600080fd5b506105036129f8565b348015610d6357600080fd5b506104b060048036036020811015610d7a57600080fd5b50356001600160a01b0316612a07565b348015610d9657600080fd5b5061047660048036036020811015610dad57600080fd5b503563ffffffff16612a30565b348015610dc657600080fd5b506104b060048036036060811015610ddd57600080fd5b506001600160a01b038135169060208101359060400135612b02565b6104b0600480360360a0811015610e0f57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612df7565b348015610e4b57600080fd5b506106ec613007565b348015610e6057600080fd5b5061047660048036036020811015610e7757600080fd5b503563ffffffff16613082565b348015610e9057600080fd5b5061047660048036036020811015610ea757600080fd5b50356001600160a01b031661316a565b348015610ec357600080fd5b506105036131e8565b348015610ed857600080fd5b506104b06131f7565b600081610eed816131fd565b50506001600160a01b03166000908152600b602052604090205490565b610f1261326a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000610f64614a8d565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b610ff46132bd565b610ffc61326a565b82611006816131fd565b8261101081613304565b8261101a81613304565b8461102481613358565b8461102e81613358565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561107357600080fd5b505afa158015611087573d6000803e3d6000fd5b505050506040513d602081101561109d57600080fd5b50516001600160a01b0316146110f1576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b600061111c7f436861696e6c696e6b4f7261636c6557686974656c69737400000000000000006133a9565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b505180156112185750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111eb57600080fd5b505afa1580156111ff573d6000803e3d6000fd5b505050506040513d602081101561121557600080fd5b50515b61125e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b611266613427565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061128e57fe5b6000918252602090912001546001600160a01b038a8116911614156112eb5760066001815481106112bb57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b03909216919091179055611325565b60066000815481106112f957fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006113436f436f6e766572746572466163746f727960801b6133a9565b6001600160a01b031663c977aed261135961185b565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561139157600080fd5b505afa1580156113a5573d6000803e3d6000fd5b505050506040513d60208110156113bb57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b505050506040513d602081101561145157600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055611486613689565b8051600e5560200151600f5561149a613741565b6010556009546000906114b5906001600160a01b0316610ee1565b6009549091506000906114d0906001600160a01b0316612a07565b600a549091506000906114eb906001600160a01b0316612a07565b9050818314156115165760008311806115045750600081115b1561151157611511613745565b61153f565b6000831180156115265750600082115b80156115325750600081115b1561153f5761153f613745565b6004546001906001600160a01b031661155661185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6115e361326a565b6012805460ff19169055565b6000600682815481106115fe57fe5b6000918252602090912001546001600160a01b031692915050565b600081611625816131fd565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061165985858561261e565b91509150935093915050565b61166d61326a565b61167681612187565b50565b60006116836137ba565b80156116a05750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b6000816116c7816131fd565b6116d083613839565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061176882612a07565b6001600160a01b0383166000908152600b6020526040902054909150611798816117928487613873565b906138d1565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b6117cb61326a565b6117d36127e8565b565b6117dd61326a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561183e57600080fd5b505af1158015611852573d6000803e3d6000fd5b50505050505050565b600290565b61186861326a565b8160116000600660008154811061187b57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001812091909155600680548392601192909160019081106118b957fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119055750600354600160a01b900460ff16155b61194a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006119686f436f6e7472616374526567697374727960801b6133a9565b6002549091506001600160a01b0380831691161480159061199157506001600160a01b03811615155b6119d9576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d6020811015611a6557600080fd5b50516001600160a01b03161415611aba576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611af261326a565b80611afc81613304565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611b2e613930565b6003805460ff60a81b1916600160a81b179055611b49613980565b83611b53816131fd565b83611b5d816139c8565b83611b67816139c8565b6001600160a01b038716600080516020614ad683398151915214611b8c573415611b90565b8534145b611bdb576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611be3613a0e565b6001600160a01b038716600080516020614ad68339815191521415611c7f57600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611c459034613a4e565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611d3a576001600160a01b0388166000908152601160205260409020541580611ce957506001600160a01b038816600090815260116020526040902054611ce68289613a9b565b11155b611d3a576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d6020811015611db557600080fd5b505190506001600160a01b038a16600080516020614ad683398151915214611de357611de38a33308c613ae4565b6001600160a01b038a16600090815260076020526040902054611e06908a613a9b565b6001600160a01b038b16600090815260076020526040902055611e29838a613a9b565b6001600160a01b038b166000908152600b6020526040812091909155831580611e50575081155b15611e5c575088611e6d565b611e6a846117928c85613873565b90505b88811015611eb7576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611f1657600080fd5b505af1158015611f2a573d6000803e3d6000fd5b50505050611f36613745565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c611f6d8882613a9b565b611f778787613a9b565b60408051938452602084019290925282820152519081900360600190a3611fa883611fa28484613a9b565b8d613c4f565b611ffb6006600081548110611fb957fe5b600091825260209091200154600680546001600160a01b03909216916001908110611fe057fe5b60009182526020822001546001600160a01b03169080613caf565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b61204f613930565b6003805460ff60a81b1916600160a81b17905561206a61326a565b600061208f762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff1615806120c957506120c7611679565b155b806120e157506000546001600160a01b038281169116145b612126576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b612131848484613d82565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156121655761216584613db3565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61218f61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6121b381613e8b565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227157600080fd5b505afa158015612285573d6000803e3d6000fd5b505050506040513d602081101561229b57600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b9052205490915081851015612362576009546001600160a01b03166000908152600b60205260408120546122f6906014613873565b600954909150600090612311906001600160a01b0316613839565b9050600080828410612324578284612327565b83835b9092509050600061233c876117928c89613873565b9050600061234e836117928487613873565b995050889003965061236a95505050505050565b925060009150505b9250929050565b612379613930565b6003805460ff60a81b1916600160a81b17905561239461326a565b600080516020614ad68339815191526123ac816131fd565b60006123d1762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b90506123db611679565b15806123f457506000546001600160a01b038281169116145b612439576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561246e573d6000803e3d6000fd5b50612486600080516020614ad6833981519152613db3565b50506003805460ff60a81b1916905550565b6124a061326a565b60026124aa61260f565b61ffff16106124fc576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6125068282613eed565b5050565b60006116a061260f565b6001546001600160a01b03163314612567576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b600080612629613980565b84612633816131fd565b8461263d816131fd565b856001600160a01b0316876001600160a01b0316141561269d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6000806126a8613741565b60105414156126e15750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f4240819003612730565b6126e9614abb565b6126f1613689565b90506000806126ff8361410f565b60095491935091506001600160a01b038d8116911614156127255781945080935061272c565b8094508193505b5050505b6000806127408b8b86868d614224565b919d919c50909a5050505050505050505050565b61275c61326a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61278d61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6127b181613e8b565b826127bb816131fd565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016127f261260f565b61ffff1611612844576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6117d3614355565b6006818154811061285957fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b61289e61326a565b60006128c3762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6004549091506000906001600160a01b03166128dd61185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a46129168161316a565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561295e57600080fd5b505af1158015612972573d6000803e3d6000fd5b50505050611676612514565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006129cc82612a07565b92915050565b6000806129dd614abb565b6129e5613689565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612a13816131fd565b50506001600160a01b031660009081526007602052604090205490565b612a3861326a565b620f424063ffffffff82161115612a96576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612b0c613930565b6003805460ff60a81b1916600160a81b179055612b27613980565b83612b318161441c565b83612b3b816139c8565b83612b45816139c8565b612b4d613a0e565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b8857600080fd5b505afa158015612b9c573d6000803e3d6000fd5b505050506040513d6020811015612bb257600080fd5b505190506000612bc28989612233565b50905086811015612c0f576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612c7d57600080fd5b505af1158015612c91573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612cb8915083613a4e565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612ce99084613a4e565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614ad68339815191521415612d4f57604051339084156108fc029085906000818181858888f19350505050158015612d49573d6000803e3d6000fd5b50612d5a565b612d5a823385614481565b612d62613745565b6000612d6e858c613a4e565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612dca8c8285613c4f565b612ddb6006600081548110611fb957fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612e01613930565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612e2e81613e8b565b856001600160a01b0316876001600160a01b03161415612e8e576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580612f9b575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612eee57600080fd5b505afa158015612f02573d6000803e3d6000fd5b505050506040513d6020811015612f1857600080fd5b50518015612f9b575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612f6e57600080fd5b505afa158015612f82573d6000803e3d6000fd5b505050506040513d6020811015612f9857600080fd5b50515b612fe2576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b612fef87878787876145da565b6003805460ff60a81b19169055979650505050505050565b600080613012614abb565b61301a613689565b90506000806130288361410f565b91509150600660008154811061303a57fe5b6000918252602090912001546009546001600160a01b03908116911614156130705763ffffffff91821694501691506129f49050565b63ffffffff9081169450169150509091565b61308a61326a565b60085463ffffffff640100000000909104811690821611156130f3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61317261326a565b6000546001600160a01b03828116911614156131c6576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146117d3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6132c5611679565b156117d3576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b038116301415611676576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b038116611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133f557600080fd5b505afa158015613409573d6000803e3d6000fd5b505050506040513d602081101561341f57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561347057600080fd5b505afa158015613484573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156134ad57600080fd5b81019080805160405193929190846401000000008211156134cd57600080fd5b9083019060208201858111156134e257600080fd5b82518660208202830111640100000000821117156134ff57600080fd5b82525081516020918201928201910280838360005b8381101561352c578181015183820152602001613514565b50505050919091016040525050825160065493945015929150600090505b8181101561368257600083156135c857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561359557600080fd5b505af11580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505190506135df565b8482815181106135d457fe5b602002602001015190505b80600c6000600685815481106135f157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b03191692909116919091179055600680548390811061363f57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b0319169290911691909117905560010161354a565b5050505050565b613691614abb565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b1580156136f357600080fd5b505afa158015613707573d6000803e3d6000fd5b505050506040513d604081101561371d57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b4290565b60408051808201909152600e548152600f5460208201526137659061410f565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156137fe57600080fd5b505afa158015613812573d6000803e3d6000fd5b505050506040513d602081101561382857600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b9092528220546129cc919061386d906013613873565b90613a9b565b600082613882575060006129cc565b8282028284828161388f57fe5b04146116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080821161391c576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161392757fe5b04949350505050565b600354600160a81b900460ff16156117d3576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613988611679565b6117d3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008111611676576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561250657613a4660068281548110613a2c57fe5b6000918252602090912001546001600160a01b0316613db3565b600101613a14565b600081831015613a95576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b695780518252601f199092019160209182019101613b4a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150818015613bfe575080511580613bfe5750808060200190516020811015613bfb57600080fd5b50515b61222b576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613cba85613839565b90506000613cc785613839565b905063ffffffff8416613cf9576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613d0d5783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613d4f8463ffffffff808a169061387316565b613d628663ffffffff808a169061387316565b6040805192835260208301919091528051918290030190a3505050505050565b613d8a61326a565b82613d9481613358565b82613d9e81613358565b83613da881613304565b61222b868686614481565b80613dbd816131fd565b6001600160a01b038216600080516020614ad68339815191521415613dfc576001600160a01b0382166000908152600760205260409020479055612506565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613e4257600080fd5b505afa158015613e56573d6000803e3d6000fd5b505050506040513d6020811015613e6c57600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b613e94816133a9565b6001600160a01b0316336001600160a01b031614611676576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613ef561326a565b613efd6132bd565b81613f0781613358565b82613f1181613304565b82613f1b81614989565b6004546001600160a01b03868116911614801590613f5c57506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613fa3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f4240038116908516111561400b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff61401661260f565b61ffff1610614068576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b60205260408120549091829190829061413a90613839565b600a54909150600090614155906001600160a01b0316613839565b90506141706c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b031663a11aa1b4614189856014613873565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b1580156141e457600080fd5b505afa1580156141f8573d6000803e3d6000fd5b505050506040513d604081101561420e57600080fd5b5080516020909101519095509350505050915091565b60008060008061423389613839565b9050600061424089613839565b9050600061425d6c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d60208110156142f657600080fd5b505190506000614305826149f9565b60125490915060009061433790839061386d90620f424090611792908890610100900463ffffffff9081169061387316565b90506143438382613a4e565b9d919c509a5098505050505050505050565b61435d61326a565b600061436761260f565b61ffff16116143b9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156143fc57600080fd5b505af1158015614410573d6000803e3d6000fd5b505050506117d3613a0e565b6001600160a01b038181166000908152600d602052604090205416611676576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106144fe5780518252601f1990920191602091820191016144df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614560576040519150601f19603f3d011682016040523d82523d6000602084013e614565565b606091505b5091509150818015614593575080511580614593575080806020019051602081101561459057600080fd5b50515b613682576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b60006145e4613980565b856145ee816131fd565b856145f8816131fd565b614600613741565b601054101561463057614611613741565b60105561461c613689565b8051600e5560200151600f55614630613745565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f424082900390808061466a8d8d87878f614224565b92509250925082600014156146bf576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614ad68339815191521415614731578a341461472c576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61480f565b341580156147c957508a6147c66147478f612a07565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561479457600080fd5b505afa1580156147a8573d6000803e3d6000fd5b505050506040513d60208110156147be57600080fd5b505190613a4e565b10155b61480f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6148188d613db3565b61482b836148258e612a07565b90613a4e565b6001600160a01b038d16600090815260076020908152604080832093909355600b9052205461485a9083613a9b565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614ad683398151915214156148c7576040516001600160a01b038a169084156108fc029085906000818181858888f193505050501580156148c1573d6000803e3d6000fd5b506148d2565b6148d28c8a85614481565b6148e08d8d8c8e8786614a24565b6148ec8d8d8787613caf565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b8152925193169261497792849283926318160ddd926004808201939291829003018186803b15801561494557600080fd5b505afa158015614959573d6000803e3d6000fd5b505050506040513d602081101561496f57600080fd5b50518f613c4f565b50919c9b505050505050505050505050565b60008163ffffffff161180156149a85750620f424063ffffffff821611155b611676576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6008546000906129cc90620f424090611792908590600160401b900463ffffffff9081169061387316565b600160ff1b8110614a3157fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea2646970667358221220ab264e1fed924691fd0f2a3f9bdc1b0e473332f2a35442af9e107888f6567ebe64736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106103e75760003560e01c8063690d832011610208578063d260529c11610118578063dc8de379116100ab578063ec2240f51161007a578063ec2240f514610e3f578063ecbca55d14610e54578063f2fde38b14610e84578063fc0c546a14610eb7578063fd2d6c7c14610ecc57610478565b8063dc8de37914610d57578063ddd9abbf14610d8a578063e38192e314610dba578063e8dc12ff14610df957610478565b8063d66bd524116100e7578063d66bd52414610cc7578063d895951214610cfa578063db2830a414610d2d578063dc75eb9a14610d4257610478565b8063d260529c14610c73578063d3fb73b414610c88578063d4ee1d9014610c9d578063d55ec69714610cb257610478565b80639b99a8e21161019b578063bf7545581161016a578063bf75455814610bd1578063bf7da6ba14610be6578063c45d3d9214610c1f578063cdc91c6914610c34578063d031370b14610c4957610478565b80639b99a8e214610b4f578063ab28b17414610b64578063af94b8d814610b79578063b4a176d314610bbc57610478565b80637b103999116101d75780637b10399914610add5780638da5cb5b14610af257806394c275ad14610b0757806398a71dcb14610b1c57610478565b8063690d832014610a415780636a49d2c414610a7457806371f52bf314610ab357806379ba509714610ac857610478565b80632bf0c985116103035780634af80f0e11610296578063579cd3ca11610265578063579cd3ca146109685780635e35359e1461097d57806361cd756e146109c057806367b6d57c146109d557806369067d9514610a0857610478565b80634af80f0e146108bb57806354fd4d50146108ee57806355776b77146109035780635768adcf1461093557610478565b8063395900d4116102d2578063395900d4146108075780633e8ff43f1461084a578063467494681461087657806349d10b64146108a657610478565b80632bf0c985146107955780632fe8a6ad146107c857806334d084b9146107dd57806338a5e016146107f257610478565b806316912f961161037b57806321e6b53d1161034a57806321e6b53d1461070557806322f3e2d4146107385780632630c12f1461074d5780632bd3c1071461076257610478565b806316912f961461063757806319b640151461064c5780631cfab290146106765780631e1401f8146106a957610478565b80630c7d5cd8116103b75780630c7d5cd8146105485780630e53aae914610576578063119b90cd146105dd57806312c2aca41461062257610478565b80625e319c1461047d578063024c7ec7146104c25780630337e3fb146104ee5780630a55fb3d1461051f57610478565b3661047857600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610476576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561048957600080fd5b506104b0600480360360208110156104a057600080fd5b50356001600160a01b0316610ee1565b60408051918252519081900360200190f35b3480156104ce57600080fd5b50610476600480360360208110156104e557600080fd5b50351515610f0a565b3480156104fa57600080fd5b50610503610f30565b604080516001600160a01b039092168252519081900360200190f35b34801561052b57600080fd5b50610534610f3f565b604080519115158252519081900360200190f35b34801561055457600080fd5b5061055d610f48565b6040805163ffffffff9092168252519081900360200190f35b34801561058257600080fd5b506105a96004803603602081101561059957600080fd5b50356001600160a01b0316610f54565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156105e957600080fd5b506104766004803603606081101561060057600080fd5b506001600160a01b038135811691602081013582169160409091013516610fec565b34801561062e57600080fd5b50610534611595565b34801561064357600080fd5b506104766115db565b34801561065857600080fd5b506105036004803603602081101561066f57600080fd5b50356115ef565b34801561068257600080fd5b5061055d6004803603602081101561069957600080fd5b50356001600160a01b0316611619565b3480156106b557600080fd5b506106ec600480360360608110156106cc57600080fd5b506001600160a01b0381358116916020810135909116906040013561164b565b6040805192835260208301919091528051918290030190f35b34801561071157600080fd5b506104766004803603602081101561072857600080fd5b50356001600160a01b0316611665565b34801561074457600080fd5b50610534611679565b34801561075957600080fd5b506105036116a5565b34801561076e57600080fd5b506104b06004803603602081101561078557600080fd5b50356001600160a01b03166116bb565b3480156107a157600080fd5b506104b0600480360360208110156107b857600080fd5b50356001600160a01b03166116d7565b3480156107d457600080fd5b506105346117a2565b3480156107e957600080fd5b5061055d6117b2565b3480156107fe57600080fd5b506104766117c3565b34801561081357600080fd5b506104766004803603606081101561082a57600080fd5b506001600160a01b038135811691602081013590911690604001356117d5565b34801561085657600080fd5b5061085f61185b565b6040805161ffff9092168252519081900360200190f35b34801561088257600080fd5b506104766004803603604081101561089957600080fd5b5080359060200135611860565b3480156108b257600080fd5b506104766118e2565b3480156108c757600080fd5b50610476600480360360208110156108de57600080fd5b50356001600160a01b0316611aea565b3480156108fa57600080fd5b5061085f611b1f565b6104b06004803603606081101561091957600080fd5b506001600160a01b038135169060208101359060400135611b24565b34801561094157600080fd5b506105036004803603602081101561095857600080fd5b50356001600160a01b0316612016565b34801561097457600080fd5b5061055d612034565b34801561098957600080fd5b50610476600480360360608110156109a057600080fd5b506001600160a01b03813581169160208101359091169060400135612047565b3480156109cc57600080fd5b50610503612178565b3480156109e157600080fd5b50610476600480360360208110156109f857600080fd5b50356001600160a01b0316612187565b348015610a1457600080fd5b506106ec60048036036040811015610a2b57600080fd5b506001600160a01b038135169060200135612233565b348015610a4d57600080fd5b5061047660048036036020811015610a6457600080fd5b50356001600160a01b0316612371565b348015610a8057600080fd5b5061047660048036036040811015610a9757600080fd5b5080356001600160a01b0316906020013563ffffffff16612498565b348015610abf57600080fd5b5061085f61250a565b348015610ad457600080fd5b50610476612514565b348015610ae957600080fd5b506105036125cb565b348015610afe57600080fd5b506105036125da565b348015610b1357600080fd5b5061055d6125e9565b348015610b2857600080fd5b506104b060048036036020811015610b3f57600080fd5b50356001600160a01b03166125fd565b348015610b5b57600080fd5b5061085f61260f565b348015610b7057600080fd5b506106ec612615565b348015610b8557600080fd5b506106ec60048036036060811015610b9c57600080fd5b506001600160a01b0381358116916020810135909116906040013561261e565b348015610bc857600080fd5b50610476612754565b348015610bdd57600080fd5b50610534612780565b348015610bf257600080fd5b5061047660048036036040811015610c0957600080fd5b506001600160a01b038135169060200135612785565b348015610c2b57600080fd5b506105036127d9565b348015610c4057600080fd5b506104766127e8565b348015610c5557600080fd5b5061050360048036036020811015610c6c57600080fd5b503561284c565b348015610c7f57600080fd5b50610534612873565b348015610c9457600080fd5b50610503612878565b348015610ca957600080fd5b50610503612887565b348015610cbe57600080fd5b50610476612896565b348015610cd357600080fd5b506105a960048036036020811015610cea57600080fd5b50356001600160a01b031661297e565b348015610d0657600080fd5b506104b060048036036020811015610d1d57600080fd5b50356001600160a01b03166129c1565b348015610d3957600080fd5b506106ec6129d2565b348015610d4e57600080fd5b506105036129f8565b348015610d6357600080fd5b506104b060048036036020811015610d7a57600080fd5b50356001600160a01b0316612a07565b348015610d9657600080fd5b5061047660048036036020811015610dad57600080fd5b503563ffffffff16612a30565b348015610dc657600080fd5b506104b060048036036060811015610ddd57600080fd5b506001600160a01b038135169060208101359060400135612b02565b6104b0600480360360a0811015610e0f57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612df7565b348015610e4b57600080fd5b506106ec613007565b348015610e6057600080fd5b5061047660048036036020811015610e7757600080fd5b503563ffffffff16613082565b348015610e9057600080fd5b5061047660048036036020811015610ea757600080fd5b50356001600160a01b031661316a565b348015610ec357600080fd5b506105036131e8565b348015610ed857600080fd5b506104b06131f7565b600081610eed816131fd565b50506001600160a01b03166000908152600b602052604090205490565b610f1261326a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000610f64614a8d565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b610ff46132bd565b610ffc61326a565b82611006816131fd565b8261101081613304565b8261101a81613304565b8461102481613358565b8461102e81613358565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561107357600080fd5b505afa158015611087573d6000803e3d6000fd5b505050506040513d602081101561109d57600080fd5b50516001600160a01b0316146110f1576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b600061111c7f436861696e6c696e6b4f7261636c6557686974656c69737400000000000000006133a9565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b505180156112185750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111eb57600080fd5b505afa1580156111ff573d6000803e3d6000fd5b505050506040513d602081101561121557600080fd5b50515b61125e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b611266613427565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061128e57fe5b6000918252602090912001546001600160a01b038a8116911614156112eb5760066001815481106112bb57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b03909216919091179055611325565b60066000815481106112f957fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006113436f436f6e766572746572466163746f727960801b6133a9565b6001600160a01b031663c977aed261135961185b565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561139157600080fd5b505afa1580156113a5573d6000803e3d6000fd5b505050506040513d60208110156113bb57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b505050506040513d602081101561145157600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055611486613689565b8051600e5560200151600f5561149a613741565b6010556009546000906114b5906001600160a01b0316610ee1565b6009549091506000906114d0906001600160a01b0316612a07565b600a549091506000906114eb906001600160a01b0316612a07565b9050818314156115165760008311806115045750600081115b1561151157611511613745565b61153f565b6000831180156115265750600082115b80156115325750600081115b1561153f5761153f613745565b6004546001906001600160a01b031661155661185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6115e361326a565b6012805460ff19169055565b6000600682815481106115fe57fe5b6000918252602090912001546001600160a01b031692915050565b600081611625816131fd565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061165985858561261e565b91509150935093915050565b61166d61326a565b61167681612187565b50565b60006116836137ba565b80156116a05750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b6000816116c7816131fd565b6116d083613839565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061176882612a07565b6001600160a01b0383166000908152600b6020526040902054909150611798816117928487613873565b906138d1565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b6117cb61326a565b6117d36127e8565b565b6117dd61326a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561183e57600080fd5b505af1158015611852573d6000803e3d6000fd5b50505050505050565b600290565b61186861326a565b8160116000600660008154811061187b57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001812091909155600680548392601192909160019081106118b957fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119055750600354600160a01b900460ff16155b61194a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006119686f436f6e7472616374526567697374727960801b6133a9565b6002549091506001600160a01b0380831691161480159061199157506001600160a01b03811615155b6119d9576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d6020811015611a6557600080fd5b50516001600160a01b03161415611aba576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611af261326a565b80611afc81613304565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611b2e613930565b6003805460ff60a81b1916600160a81b179055611b49613980565b83611b53816131fd565b83611b5d816139c8565b83611b67816139c8565b6001600160a01b038716600080516020614ad683398151915214611b8c573415611b90565b8534145b611bdb576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611be3613a0e565b6001600160a01b038716600080516020614ad68339815191521415611c7f57600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611c459034613a4e565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611d3a576001600160a01b0388166000908152601160205260409020541580611ce957506001600160a01b038816600090815260116020526040902054611ce68289613a9b565b11155b611d3a576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d6020811015611db557600080fd5b505190506001600160a01b038a16600080516020614ad683398151915214611de357611de38a33308c613ae4565b6001600160a01b038a16600090815260076020526040902054611e06908a613a9b565b6001600160a01b038b16600090815260076020526040902055611e29838a613a9b565b6001600160a01b038b166000908152600b6020526040812091909155831580611e50575081155b15611e5c575088611e6d565b611e6a846117928c85613873565b90505b88811015611eb7576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611f1657600080fd5b505af1158015611f2a573d6000803e3d6000fd5b50505050611f36613745565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c611f6d8882613a9b565b611f778787613a9b565b60408051938452602084019290925282820152519081900360600190a3611fa883611fa28484613a9b565b8d613c4f565b611ffb6006600081548110611fb957fe5b600091825260209091200154600680546001600160a01b03909216916001908110611fe057fe5b60009182526020822001546001600160a01b03169080613caf565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b61204f613930565b6003805460ff60a81b1916600160a81b17905561206a61326a565b600061208f762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff1615806120c957506120c7611679565b155b806120e157506000546001600160a01b038281169116145b612126576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b612131848484613d82565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156121655761216584613db3565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61218f61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6121b381613e8b565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227157600080fd5b505afa158015612285573d6000803e3d6000fd5b505050506040513d602081101561229b57600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b9052205490915081851015612362576009546001600160a01b03166000908152600b60205260408120546122f6906014613873565b600954909150600090612311906001600160a01b0316613839565b9050600080828410612324578284612327565b83835b9092509050600061233c876117928c89613873565b9050600061234e836117928487613873565b995050889003965061236a95505050505050565b925060009150505b9250929050565b612379613930565b6003805460ff60a81b1916600160a81b17905561239461326a565b600080516020614ad68339815191526123ac816131fd565b60006123d1762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b90506123db611679565b15806123f457506000546001600160a01b038281169116145b612439576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561246e573d6000803e3d6000fd5b50612486600080516020614ad6833981519152613db3565b50506003805460ff60a81b1916905550565b6124a061326a565b60026124aa61260f565b61ffff16106124fc576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6125068282613eed565b5050565b60006116a061260f565b6001546001600160a01b03163314612567576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b600080612629613980565b84612633816131fd565b8461263d816131fd565b856001600160a01b0316876001600160a01b0316141561269d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6000806126a8613741565b60105414156126e15750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f4240819003612730565b6126e9614abb565b6126f1613689565b90506000806126ff8361410f565b60095491935091506001600160a01b038d8116911614156127255781945080935061272c565b8094508193505b5050505b6000806127408b8b86868d614224565b919d919c50909a5050505050505050505050565b61275c61326a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61278d61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6127b181613e8b565b826127bb816131fd565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016127f261260f565b61ffff1611612844576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6117d3614355565b6006818154811061285957fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b61289e61326a565b60006128c3762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6004549091506000906001600160a01b03166128dd61185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a46129168161316a565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561295e57600080fd5b505af1158015612972573d6000803e3d6000fd5b50505050611676612514565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006129cc82612a07565b92915050565b6000806129dd614abb565b6129e5613689565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612a13816131fd565b50506001600160a01b031660009081526007602052604090205490565b612a3861326a565b620f424063ffffffff82161115612a96576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612b0c613930565b6003805460ff60a81b1916600160a81b179055612b27613980565b83612b318161441c565b83612b3b816139c8565b83612b45816139c8565b612b4d613a0e565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b8857600080fd5b505afa158015612b9c573d6000803e3d6000fd5b505050506040513d6020811015612bb257600080fd5b505190506000612bc28989612233565b50905086811015612c0f576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612c7d57600080fd5b505af1158015612c91573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612cb8915083613a4e565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612ce99084613a4e565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614ad68339815191521415612d4f57604051339084156108fc029085906000818181858888f19350505050158015612d49573d6000803e3d6000fd5b50612d5a565b612d5a823385614481565b612d62613745565b6000612d6e858c613a4e565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612dca8c8285613c4f565b612ddb6006600081548110611fb957fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612e01613930565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612e2e81613e8b565b856001600160a01b0316876001600160a01b03161415612e8e576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580612f9b575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612eee57600080fd5b505afa158015612f02573d6000803e3d6000fd5b505050506040513d6020811015612f1857600080fd5b50518015612f9b575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612f6e57600080fd5b505afa158015612f82573d6000803e3d6000fd5b505050506040513d6020811015612f9857600080fd5b50515b612fe2576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b612fef87878787876145da565b6003805460ff60a81b19169055979650505050505050565b600080613012614abb565b61301a613689565b90506000806130288361410f565b91509150600660008154811061303a57fe5b6000918252602090912001546009546001600160a01b03908116911614156130705763ffffffff91821694501691506129f49050565b63ffffffff9081169450169150509091565b61308a61326a565b60085463ffffffff640100000000909104811690821611156130f3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61317261326a565b6000546001600160a01b03828116911614156131c6576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146117d3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6132c5611679565b156117d3576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b038116301415611676576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b038116611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133f557600080fd5b505afa158015613409573d6000803e3d6000fd5b505050506040513d602081101561341f57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561347057600080fd5b505afa158015613484573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156134ad57600080fd5b81019080805160405193929190846401000000008211156134cd57600080fd5b9083019060208201858111156134e257600080fd5b82518660208202830111640100000000821117156134ff57600080fd5b82525081516020918201928201910280838360005b8381101561352c578181015183820152602001613514565b50505050919091016040525050825160065493945015929150600090505b8181101561368257600083156135c857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561359557600080fd5b505af11580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505190506135df565b8482815181106135d457fe5b602002602001015190505b80600c6000600685815481106135f157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b03191692909116919091179055600680548390811061363f57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b0319169290911691909117905560010161354a565b5050505050565b613691614abb565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b1580156136f357600080fd5b505afa158015613707573d6000803e3d6000fd5b505050506040513d604081101561371d57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b4290565b60408051808201909152600e548152600f5460208201526137659061410f565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156137fe57600080fd5b505afa158015613812573d6000803e3d6000fd5b505050506040513d602081101561382857600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b9092528220546129cc919061386d906013613873565b90613a9b565b600082613882575060006129cc565b8282028284828161388f57fe5b04146116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080821161391c576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161392757fe5b04949350505050565b600354600160a81b900460ff16156117d3576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613988611679565b6117d3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008111611676576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561250657613a4660068281548110613a2c57fe5b6000918252602090912001546001600160a01b0316613db3565b600101613a14565b600081831015613a95576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b695780518252601f199092019160209182019101613b4a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150818015613bfe575080511580613bfe5750808060200190516020811015613bfb57600080fd5b50515b61222b576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613cba85613839565b90506000613cc785613839565b905063ffffffff8416613cf9576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613d0d5783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613d4f8463ffffffff808a169061387316565b613d628663ffffffff808a169061387316565b6040805192835260208301919091528051918290030190a3505050505050565b613d8a61326a565b82613d9481613358565b82613d9e81613358565b83613da881613304565b61222b868686614481565b80613dbd816131fd565b6001600160a01b038216600080516020614ad68339815191521415613dfc576001600160a01b0382166000908152600760205260409020479055612506565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613e4257600080fd5b505afa158015613e56573d6000803e3d6000fd5b505050506040513d6020811015613e6c57600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b613e94816133a9565b6001600160a01b0316336001600160a01b031614611676576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613ef561326a565b613efd6132bd565b81613f0781613358565b82613f1181613304565b82613f1b81614989565b6004546001600160a01b03868116911614801590613f5c57506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613fa3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f4240038116908516111561400b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff61401661260f565b61ffff1610614068576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b60205260408120549091829190829061413a90613839565b600a54909150600090614155906001600160a01b0316613839565b90506141706c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b031663a11aa1b4614189856014613873565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b1580156141e457600080fd5b505afa1580156141f8573d6000803e3d6000fd5b505050506040513d604081101561420e57600080fd5b5080516020909101519095509350505050915091565b60008060008061423389613839565b9050600061424089613839565b9050600061425d6c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d60208110156142f657600080fd5b505190506000614305826149f9565b60125490915060009061433790839061386d90620f424090611792908890610100900463ffffffff9081169061387316565b90506143438382613a4e565b9d919c509a5098505050505050505050565b61435d61326a565b600061436761260f565b61ffff16116143b9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156143fc57600080fd5b505af1158015614410573d6000803e3d6000fd5b505050506117d3613a0e565b6001600160a01b038181166000908152600d602052604090205416611676576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106144fe5780518252601f1990920191602091820191016144df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614560576040519150601f19603f3d011682016040523d82523d6000602084013e614565565b606091505b5091509150818015614593575080511580614593575080806020019051602081101561459057600080fd5b50515b613682576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b60006145e4613980565b856145ee816131fd565b856145f8816131fd565b614600613741565b601054101561463057614611613741565b60105561461c613689565b8051600e5560200151600f55614630613745565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f424082900390808061466a8d8d87878f614224565b92509250925082600014156146bf576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614ad68339815191521415614731578a341461472c576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61480f565b341580156147c957508a6147c66147478f612a07565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561479457600080fd5b505afa1580156147a8573d6000803e3d6000fd5b505050506040513d60208110156147be57600080fd5b505190613a4e565b10155b61480f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6148188d613db3565b61482b836148258e612a07565b90613a4e565b6001600160a01b038d16600090815260076020908152604080832093909355600b9052205461485a9083613a9b565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614ad683398151915214156148c7576040516001600160a01b038a169084156108fc029085906000818181858888f193505050501580156148c1573d6000803e3d6000fd5b506148d2565b6148d28c8a85614481565b6148e08d8d8c8e8786614a24565b6148ec8d8d8787613caf565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b8152925193169261497792849283926318160ddd926004808201939291829003018186803b15801561494557600080fd5b505afa158015614959573d6000803e3d6000fd5b505050506040513d602081101561496f57600080fd5b50518f613c4f565b50919c9b505050505050505050505050565b60008163ffffffff161180156149a85750620f424063ffffffff821611155b611676576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6008546000906129cc90620f424090611792908590600160401b900463ffffffff9081169061387316565b600160ff1b8110614a3157fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea2646970667358221220ab264e1fed924691fd0f2a3f9bdc1b0e473332f2a35442af9e107888f6567ebe64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "741:31911:28:-:0;;;349:27:60;;;-1:-1:-1;;;;349:27:60;;;2899:30:8;;;-1:-1:-1;;3292:40:8;;;1938:42:28;;;-1:-1:-1;;1938:42:28;-1:-1:-1;1938:42:28;-1:-1:-1;;1989:40:28;;;;;2732:214;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2732:214:28;;;;;;;;;;;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;2732:214:28;;;;;;;;;;;594:23:65;2732:214:28;594:13:65;:23::i;:::-;-1:-1:-1;2122:8:57::1;:39:::0;;-1:-1:-1;;;;;2122:39:57;;;::::1;-1:-1:-1::0;;;;;;2122:39:57;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;6069:7:8;594:23:65;6069:7:8;594:13:65;:23::i;:::-;6168:17:8;7294:35:::2;6168:17:::0;7294:19:::2;:35::i;:::-;-1:-1:-1::0;;6203:6:8::3;:16:::0;;-1:-1:-1;;;;;;6203:16:8::3;-1:-1:-1::0;;;;;6203:16:8;;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;6230:16:8::3;:36:::0;;-1:-1:-1;;6230:36:8::3;::::0;::::3;::::0;;::::3;::::0;;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;741:31911:28;;-1:-1:-1;;;;;741:31911:28;692:128:65;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;7404:156:8:-;1846:7;7489:32;;;;;7481:71;;;;;-1:-1:-1;;;7481:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;741:31911:28;;;;;;;", + "deployedSourceMap": "741:31911:28:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;8454:29:8;:8;:29;;:35;;-1:-1:-1;;;8454:35:8;;;;8446:67;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;;;;741:31911:28;;;;;7900:211;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7900:211:28;-1:-1:-1;;;;;7900:211:28;;:::i;:::-;;;;;;;;;;;;;;;;3655:224:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:57;;;;:::i;1029:38:28:-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1029:38:28;;;;;;;;;;;;;;1938:42;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2899:30:8;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22514:248;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22514:248:8;-1:-1:-1;;;;;22514:248:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4504:2671:28;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4504:2671:28;;;;;;;;;;;;;;;;;;;:::i;17176:113:8:-;;;;;;;;;;;;;:::i;9912:103:28:-;;;;;;;;;;;;;:::i;22836:145:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22836:145:8;;:::i;16300:204::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16300:204:8;-1:-1:-1;;;;;16300:204:8;;:::i;23471:208::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;23471:208:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;22136:130;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22136:130:8;-1:-1:-1;;;;;22136:130:8;;:::i;3729:136:28:-;;;;;;;;;;;;;:::i;931:31::-;;;;;;;;;;;;;:::i;8312:216::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8312:216:28;-1:-1:-1;;;;;8312:216:28;;:::i;10586:610::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10586:610:28;-1:-1:-1;;;;;10586:610:28;;:::i;1333:38:57:-;;;;;;;;;;;;;:::i;1989:40:28:-;;;;;;;;;;;;;:::i;22340:100:8:-;;;;;;;;;;;;;:::i;12220:157::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12220:157:8;;;;;;;;;;;;;;;;;:::i;3468:90:28:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;9409:273;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9409:273:28;;;;;;;:::i;2300:925:57:-;;;;;;;;;;;;;:::i;10268:202:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10268:202:8;-1:-1:-1;;;;;10268:202:8;;:::i;2343:35::-;;;;;;;;;;;;;:::i;18573:3356:28:-;;;;;;;;;;;;;;;;-1:-1:-1;18573:3356:28;;-1:-1:-1;;;;;18573:3356:28;;;;;;;;;;;:::i;10223:141::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10223:141:28;-1:-1:-1;;;;;10223:141:28;;:::i;3292:40:8:-;;;;;;;;;;;;;:::i;13330:735::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13330:735:8;;;;;;;;;;;;;;;;;:::i;1243:37:57:-;;;;;;;;;;;;;:::i;11112:198:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11112:198:8;-1:-1:-1;;;;;11112:198:8;;:::i;24923:800:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24923:800:28;;-1:-1:-1;;;;;24923:800:28;;;;;;:::i;9086:554:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9086:554:8;-1:-1:-1;;;;;9086:554:8;;:::i;11531:272:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11531:272:28;;-1:-1:-1;;;;;11531:272:28;;;;;;;;:::i;23055:114:8:-;;;;;;;;;;;;;:::i;1422:217:58:-;;;;;;;;;;;;;:::i;1154:33:57:-;;;;;;;;;;;;;:::i;219:29:58:-;;;;;;;;;;;;;:::i;3041:43:8:-;;;;;;;;;;;;;:::i;1874:57:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1874:57:28;-1:-1:-1;;;;;1874:57:28;;:::i;14882:112:8:-;;;;;;;;;;;;;:::i;1603:28:28:-;;;;;;;;;;;;;:::i;13271:1585::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13271:1585:28;;;;;;;;;;;;;;;;;:::i;3304:137:57:-;;;;;;;;;;;;;:::i;3417:46:8:-;;;;;;;;;;;;;:::i;8810:248:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8810:248:28;;-1:-1:-1;;;;;8810:248:28;;;;;;:::i;2473:46:8:-;;;;;;;;;;;;;:::i;2501:239:13:-;;;;;;;;;;;;;:::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2613:34:8;;:::i;9815:82::-;;;;;;;;;;;;;:::i;2387:39::-;;;;;;;;;;;;;:::i;255:23:58:-;;;;;;;;;;;;;:::i;14288:374:8:-;;;;;;;;;;;;;:::i;2754:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2754:48:8;-1:-1:-1;;;;;2754:48:8;;:::i;23243:154::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23243:154:8;-1:-1:-1;;;;;23243:154:8;;:::i;12065:168:28:-;;;;;;;;;;;;;:::i;1133:40::-;;;;;;;;;;;;;:::i;16773:225:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16773:225:8;-1:-1:-1;;;;;16773:225:8;;:::i;7395:309:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7395:309:28;;;;:::i;22287:2224::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22287:2224:28;;-1:-1:-1;;;;;22287:2224:28;;;;;;;;;;;:::i;17872:782:8:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17872:782:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12392:444:28:-;;;;;;;;;;;;;:::i;12580:274:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12580:274:8;;;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;21965:97:8:-;;;;;;;;;;;;;:::i;1704:37:28:-;;;;;;;;;;;;;:::i;7900:211::-;8042:7;8009:13;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;8074:29:28::1;;::::0;;;:14:::1;:29;::::0;;;;;;7900:211::o;3655:224:57:-;726:12:58;:10;:12::i;:::-;3815:26:57::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:57::1;-1:-1:-1::0;;;;3815:56:57;;::::1;::::0;;;::::1;::::0;;3655:224::o;1029:38:28:-;;;-1:-1:-1;;;;;1029:38:28;;:::o;1938:42::-;;;;;;:::o;2899:30:8:-;;;;;;:::o;22514:248::-;22586:7;22595:6;22603:4;22609;22615;22632:22;;:::i;:::-;-1:-1:-1;;;;;;;;;22657:18:8;;;;;;;;:8;:18;;;;;;;;22632:43;;-1:-1:-1;22632:43:8;;;;;;;;;-1:-1:-1;22632:43:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;-1:-1:-1;22657:18:8;;-1:-1:-1;22657:18:8;;22632:43;22514:248::o;4504:2671:28:-;6615:11:8;:9;:11::i;:::-;726:12:58::1;:10;:12::i;:::-;4751:20:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;4798:21:28::3;948:18:65;957:8;948;:18::i;:::-;4847:23:28::4;948:18:65;957:8;948;:18::i;:::-;4903:21:28::5;594:23:65;608:8;594:13;:23::i;:::-;4957::28::6;594::65;608:8;594:13;:23::i;:::-;5045:6:28::7;::::0;;:14:::7;::::0;;-1:-1:-1;;;5045:14:28;;;;5071:4:::7;::::0;-1:-1:-1;;;;;5045:6:28;;::::7;::::0;-1:-1:-1;;5045:14:28;;::::7;::::0;::::7;::::0;;;;;;;;:6;:14;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5045:14:28;-1:-1:-1;;;;;5045:31:28::7;;5037:64;;;::::0;;-1:-1:-1;;;5037:64:28;;::::7;;::::0;::::7;::::0;::::7;::::0;;;;-1:-1:-1;;;5037:64:28;;;;;;;;;;;;;::::7;;5143:26;5183:37;5193:26;5183:9;:37::i;:::-;5240:61;::::0;;-1:-1:-1;;;5240:61:28;;-1:-1:-1;;;;;5240:61:28;;::::7;;::::0;::::7;::::0;;;5143:78;;-1:-1:-1;5240:29:28;;::::7;::::0;::::7;::::0;:61;;;;;::::7;::::0;;;;;;;;;:29;:61;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5240:61:28;:145;::::7;;;-1:-1:-1::0;5322:63:28::7;::::0;;-1:-1:-1;;;5322:63:28;;-1:-1:-1;;;;;5322:63:28;;::::7;;::::0;::::7;::::0;;;:29;;::::7;::::0;::::7;::::0;:63;;;;;::::7;::::0;;;;;;;;;:29;:63;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5322:63:28;5240:145:::7;5232:176;;;::::0;;-1:-1:-1;;;5232:176:28;;::::7;;::::0;::::7;::::0;::::7;::::0;;;;-1:-1:-1;;;5232:176:28;;;;;;;;;;;;;::::7;;5496:18;:16;:18::i;:::-;5583:19;:42:::0;;-1:-1:-1;;;;;;5583:42:28::7;-1:-1:-1::0;;;;;5583:42:28;::::7;;::::0;;5664:13:::7;:16:::0;;-1:-1:-1;;5664:16:28::7;;;;;::::0;;;::::7;::::0;;;::::7;::::0;-1:-1:-1;;;;;5640:40:28;;::::7;5664:16:::0;::::7;5640:40;5636:168;;;5719:13;5733:1;5719:16;;;;;;;;;::::0;;;::::7;::::0;;;::::7;::::0;5695:21:::7;:40:::0;;-1:-1:-1;;;;;;5695:40:28::7;-1:-1:-1::0;;;;;5719:16:28;;::::7;5695:40:::0;;;::::7;::::0;;5636:168:::7;;;5788:13;5802:1;5788:16;;;;;;;;;::::0;;;::::7;::::0;;;::::7;::::0;5764:21:::7;:40:::0;;-1:-1:-1;;;;;;5764:40:28::7;-1:-1:-1::0;;;;;5788:16:28;;::::7;5764:40:::0;;;::::7;::::0;;5636:168:::7;5892:51;6023:28;-1:-1:-1::0;;;6023:9:28::7;:28::i;:::-;-1:-1:-1::0;;;;;6005:63:28::7;;6069:15;:13;:15::i;:::-;6005:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;6005:80:28;6193:21:::7;::::0;6112:177:::7;::::0;;-1:-1:-1;;;6112:177:28;;-1:-1:-1;;;;;6112:177:28;;::::7;;::::0;::::7;::::0;6193:21;;::::7;6112:177:::0;;;;;;::::7;::::0;;;;;;::::7;::::0;;;;;;6005:80;;-1:-1:-1;6112:31:28;;::::7;::::0;::::7;::::0;:177;;;;;6005:80:::7;::::0;6112:177;;;;;;;;-1:-1:-1;6112:31:28;:177;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;6112:177:28;6098:11:::7;:191:::0;;-1:-1:-1;;;;;6098:191:28;;::::7;-1:-1:-1::0;;;6098:191:28::7;::::0;;;::::7;::::0;;;::::7;::::0;;6317:22:::7;:20;:22::i;:::-;6302:37:::0;;:12:::7;:37:::0;::::7;;::::0;;;6375:6:::7;:4;:6::i;:::-;6350:22;:31:::0;6568:19:::7;::::0;6509:35:::7;::::0;6547:41:::7;::::0;-1:-1:-1;;;;;6568:19:28::7;6547:20;:41::i;:::-;6646:19;::::0;6509:79;;-1:-1:-1;6599:29:28::7;::::0;6631:35:::7;::::0;-1:-1:-1;;;;;6646:19:28::7;6631:14;:35::i;:::-;6726:21;::::0;6599:67;;-1:-1:-1;6677:31:28::7;::::0;6711:37:::7;::::0;-1:-1:-1;;;;;6726:21:28::7;6711:14;:37::i;:::-;6677:71;;6796:21;6765:27;:52;6761:348;;;6868:1;6838:27;:31;:62;;;;6899:1;6873:23;:27;6838:62;6834:114;;;6921:11;:9;:11::i;:::-;6761:348;;;7008:1;6978:27;:31;:60;;;;;7037:1;7013:21;:25;6978:60;:91;;;;;7068:1;7042:23;:27;6978:91;6974:135;;;7086:11;:9;:11::i;:::-;7154:6;::::0;7162:4:::7;::::0;-1:-1:-1;;;;;7154:6:28::7;7137:15;:13;:15::i;:::-;7126:41;;;;;;;;;;;;628:1:65;;;;;::::6;977::::5;::::4;6993::8::3;749::58::2;4504:2671:28::0;;;:::o;17176:113:8:-;-1:-1:-1;;;;;;;;;;;;17246:29:8;:8;:29;;:35;;-1:-1:-1;;;17246:35:8;;;;;17176:113::o;9912:103:28:-;726:12:58;:10;:12::i;:::-;9976:23:28::1;:31:::0;;-1:-1:-1;;9976:31:28::1;::::0;;9912:103::o;22836:145:8:-;22907:11;22938:27;22966:6;22938:35;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22938:35:8;;;-1:-1:-1;;22836:145:8:o;16300:204::-;16435:6;16402:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16466:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;-1:-1:-1;16466:30:8::1;::::0;::::1;;::::0;16300:204::o;23471:208::-;23580:7;23589;23616:55;23635:12;23649;23663:7;23616:18;:55::i;:::-;23609:62;;;;23471:208;;;;;;:::o;22136:130::-;726:12:58;:10;:12::i;:::-;22224:34:8::1;22248:9;22224:23;:34::i;:::-;22136:130:::0;:::o;3729:136:28:-;3779:4;3803:16;:14;:16::i;:::-;:54;;;;-1:-1:-1;3831:11:28;;-1:-1:-1;;;3831:11:28;;-1:-1:-1;;;;;3831:11:28;3823:34;;3803:54;3796:61;;3729:136;:::o;931:31::-;;;-1:-1:-1;;;931:31:28;;-1:-1:-1;;;;;931:31:28;;:::o;8312:216::-;8457:7;8424:13;6959:23:8;6973:8;6959:13;:23::i;:::-;8489:31:28::1;8506:13;8489:16;:31::i;:::-;8482:38:::0;8312:216;-1:-1:-1;;;8312:216:28:o;10586:610::-;10657:7;10715:23;10741:10;-1:-1:-1;;;;;10741:22:28;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10741:24:28;-1:-1:-1;;;;;10903:32:28;;;10876:24;10903:32;;;:20;10741:24;10903:32;;;;;10741:24;;-1:-1:-1;10903:32:28;;;10964:28;10903:32;10964:14;:28::i;:::-;-1:-1:-1;;;;;11027:28:28;;11003:21;11027:28;;;:14;:28;;;;;;10946:46;;-1:-1:-1;11141:47:28;11027:28;11141;10946:46;11153:15;11141:11;:28::i;:::-;:32;;:47::i;:::-;11134:54;10586:610;-1:-1:-1;;;;;;10586:610:28:o;1333:38:57:-;;;-1:-1:-1;;;1333:38:57;;;;;:::o;1989:40:28:-;;;;;;;;;:::o;22340:100:8:-;726:12:58;:10;:12::i;:::-;22409:23:8::1;:21;:23::i;:::-;22340:100::o:0;12220:157::-;726:12:58;:10;:12::i;:::-;12326:6:8::1;::::0;;:43:::1;::::0;;-1:-1:-1;;;12326:43:8;;-1:-1:-1;;;;;12326:43:8;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;:6;;;::::1;::::0;:21:::1;::::0;:43;;;;;-1:-1:-1;;12326:43:8;;;;;;;;-1:-1:-1;12326:6:8;:43;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12220:157:::0;;;:::o;3468:90:28:-;3549:1;3468:90;:::o;9409:273::-;726:12:58;:10;:12::i;:::-;9575:25:28::1;9537:17;:35;9555:13;9569:1;9555:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;9555:16:28::1;9537:35:::0;;;::::1;::::0;;;;;;;;:63;;;;9629:13:::1;:16:::0;;9649:25;;9611:17:::1;::::0;9555:16;;-1:-1:-1;;9629:16:28;::::1;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;9629:16:28::1;9611:35:::0;;;::::1;::::0;;;;;;;;:63;-1:-1:-1;;9409:273:28:o;2300:925:57:-;2417:5;;-1:-1:-1;;;;;2417:5:57;2403:10;:19;;:50;;-1:-1:-1;2427:26:57;;-1:-1:-1;;;2427:26:57;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:57;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:57;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:57;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;;;;2907:40;;;-1:-1:-1;;;2907:40:57;;-1:-1:-1;;;2907:40:57;;;;;;2959:1;;-1:-1:-1;;;;;2907:21:57;;;;;:40;;;;;;;;;;;;;;;:21;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:57;-1:-1:-1;;;;;2907:54:57;;;2899:87;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:57;;;-1:-1:-1;;;;;;3078:23:57;;;;;;;3195:22;;;;;;;;;;;2300:925::o;10268:202:8:-;726:12:58;:10;:12::i;:::-;10401:10:8::1;948:18:65;957:8;948;:18::i;:::-;-1:-1:-1::0;10430:19:8::2;:32:::0;;-1:-1:-1;;;;;;10430:32:8::2;-1:-1:-1::0;;;;;10430:32:8;;;::::2;::::0;;;::::2;::::0;;10268:202::o;2343:35::-;2376:2;2343:35;:::o;18573:3356:28:-;18853:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;18749:13:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;18789:7:28::3;252:24:65;269:6;252:16;:24::i;:::-;18823:10:28::4;252:24:65;269:6;252:16;:24::i;:::-;-1:-1:-1::0;;;;;;;;18988:36:28;::::5;::::0;-1:-1:-1;;;;;;;;;18988:36:28::5;:76;;19050:9;:14:::0;18988:76:::5;;;19040:7;19027:9;:20;18988:76;18980:112;;;::::0;;-1:-1:-1;;;18980:112:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;18980:112:28;;;;;;;;;;;;;::::5;;19156:21;:19;:21::i;:::-;-1:-1:-1::0;;;;;;;;19300:36:28;::::5;::::0;-1:-1:-1;;;;;;;;;19300:36:28::5;19296:161;;;-1:-1:-1::0;;;;;;;;;;;19393:29:28::5;::::0;:8:::5;:29;::::0;;:37;:52:::5;::::0;19435:9:::5;19393:41;:52::i;:::-;-1:-1:-1::0;;;;;;;;;;;19353:29:28::5;::::0;:8:::5;:29;::::0;;:92;19296:161:::5;-1:-1:-1::0;;;;;19577:29:28;::::5;19546:28;19577:29:::0;;;:14:::5;:29;::::0;;;;;19720:23:::5;::::0;::::5;;19716:209;;;-1:-1:-1::0;;;;;19768:32:28;::::5;;::::0;;;:17:::5;:32;::::0;;;;;:37;;:110:::5;;-1:-1:-1::0;;;;;;19846:32:28;::::5;;::::0;;;:17:::5;:32;::::0;;;;;19809:33:::5;:20:::0;19834:7;19809:24:::5;:33::i;:::-;:69;;19768:110;19760:153;;;::::0;;-1:-1:-1;;;19760:153:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;20042:35:28;;::::5;20011:28;20042:35:::0;;;:20:::5;:35;::::0;;;;;;;;20114:30;;-1:-1:-1;;;20114:30:28;;;;20042:35;::::5;::::0;;;-1:-1:-1;;20114:30:28::5;::::0;;::::5;::::0;;;;;;;20042:35;20114:30;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;;;;;;;;::::0;::::5;;-1:-1:-1::0;20114:30:28;-1:-1:-1;;;20114:30:28;;-1:-1:-1;;;;;;20239:36:28;::::5;::::0;-1:-1:-1;;;;;;;;20239:36:28::5;20235:122;;20290:67;20307:13;20322:10;20342:4;20349:7;20290:16;:67::i;:::-;-1:-1:-1::0;;;;;20458:23:28;::::5;;::::0;;;:8:::5;:23;::::0;;;;:31;:44:::5;::::0;20494:7;20458:35:::5;:44::i;:::-;-1:-1:-1::0;;;;;20424:23:28;::::5;;::::0;;;:8:::5;:23;::::0;;;;:78;20545:33:::5;:20:::0;20570:7;20545:24:::5;:33::i;:::-;-1:-1:-1::0;;;;;20513:29:28;::::5;;::::0;;;:14:::5;:29;::::0;;;;:65;;;;20840:25;;;:49:::5;;-1:-1:-1::0;20869:20:28;;20840:49:::5;20836:194;;;-1:-1:-1::0;20922:7:28;20836:194:::5;;;20976:54;21009:20:::0;20976:28:::5;:7:::0;20988:15;20976:11:::5;:28::i;:54::-;20958:72;;20836:194;21068:10;21049:15;:29;;21041:60;;;::::0;;-1:-1:-1;;;21041:60:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;21041:60:28;;;;;;;;;;;;;::::5;;21190:6;::::0;;21161:89:::5;::::0;;-1:-1:-1;;;21161:89:28;;-1:-1:-1;;;;;21161:89:28;;::::5;::::0;;::::5;::::0;;;;21222:10:::5;21161:89:::0;;;;;;;;;;;;21190:6;;;::::5;::::0;21161:42:::5;::::0;:89;;;;;-1:-1:-1;;21161:89:28;;;;;;;;-1:-1:-1;21190:6:28;21161:89;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;21312:11;:9;:11::i;:::-;-1:-1:-1::0;;;;;21389:123:28;::::5;21404:10;21389:123;21431:7:::0;21440:33:::5;:20:::0;21431:7;21440:24:::5;:33::i;:::-;21475:36;:15:::0;21495;21475:19:::5;:36::i;:::-;21389:123;::::0;;;;;::::5;::::0;::::5;::::0;;;;;;;;;;;;;;;;::::5;21589:103;21622:16:::0;21640:36:::5;:15:::0;21660;21640:19:::5;:36::i;:::-;21678:13;21589:32;:103::i;:::-;21764:70;21793:13;21807:1;21793:16;;;;;;;;;::::0;;;::::5;::::0;;;::::5;::::0;21811:13:::5;:16:::0;;-1:-1:-1;;;;;21793:16:28;;::::5;::::0;-1:-1:-1;;21811:16:28;::::5;;;;;;::::0;;;::::5;::::0;;::::5;::::0;-1:-1:-1;;;;;21811:16:28::5;::::0;;21764:28:::5;:70::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;21906:15:28;;-1:-1:-1;;;;;;;;;;18573:3356:28:o;10223:141::-;-1:-1:-1;;;;;10321:35:28;;;10290:11;10321:35;;;:20;:35;;;;;;;;10223:141::o;3292:40:8:-;;;-1:-1:-1;;;3292:40:8;;;;;:::o;13330:735::-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;13517:25:8::2;13545:29;-1:-1:-1::0;;;13545:9:8::2;:29::i;:::-;-1:-1:-1::0;;;;;13765:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13765:22:8::2;::::0;13517:57;;-1:-1:-1;;;;13765:22:8;::::2;;;13764:23;::::0;:38:::2;;;13792:10;:8;:10::i;:::-;13791:11;13764:38;:68;;;-1:-1:-1::0;13806:5:8::2;::::0;-1:-1:-1;;;;;13806:26:8;;::::2;:5:::0;::::2;:26;13764:68;13756:98;;;::::0;;-1:-1:-1;;;13756:98:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13756:98:8;;;;;;;;;;;;;::::2;;13865:42;13886:6;13894:3;13899:7;13865:20;:42::i;:::-;-1:-1:-1::0;;;;;13994:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;-1:-1:-1;13994:22:8::2;::::0;-1:-1:-1;;;13994:22:8;::::2;;;13990:67;;;14031:26;14050:6;14031:18;:26::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;;13330:735:8:o;1243:37:57:-;;;-1:-1:-1;;;;;1243:37:57;;:::o;11112:198:8:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;-1:-1:-1::0;1627:5:57::1;:20::i;:::-;11267:6:8::2;::::0;;:35:::2;::::0;;-1:-1:-1;;;11267:35:8;;-1:-1:-1;;;;;11267:35:8;;::::2;::::0;;::::2;::::0;;;;;;:6;;;::::2;::::0;:24:::2;::::0;:35;;;;;:6:::2;::::0;:35;;;;;;;;:6;;:35;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;749:1:58::1;11112:198:8::0;:::o;24923:800:28:-;25022:7;25031;25051:19;25073:10;-1:-1:-1;;;;;25073:22:28;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25073:24:28;-1:-1:-1;;;;;25147:32:28;;;25108:21;25147:32;;;:20;25073:24;25147:32;;;;;;;;;;;25132:48;;:14;:48;;;;25073:24;;-1:-1:-1;25197:21:28;;;25193:487;;;25262:19;;-1:-1:-1;;;;;25262:19:28;25235:9;25247:35;;;:14;:35;;;;;;:61;;855:2;25247:39;:61::i;:::-;25352:19;;25235:73;;-1:-1:-1;25323:9:28;;25335:37;;-1:-1:-1;;;;;25352:19:28;25335:16;:37::i;:::-;25323:49;;25388:11;25401;25420:1;25416;:5;:23;;25434:1;25437;25416:23;;;25425:1;25428;25416:23;25387:52;;-1:-1:-1;25387:52:28;-1:-1:-1;25454:23:28;25480:43;25511:11;25480:26;:7;25492:13;25480:11;:26::i;:43::-;25454:69;-1:-1:-1;25538:22:28;25563:33;25592:3;25563:24;25454:69;25583:3;25563:19;:24::i;:33::-;25538:58;-1:-1:-1;;25635:32:28;;;;-1:-1:-1;25611:57:28;;-1:-1:-1;;;;;;25611:57:28;25193:487;25698:13;-1:-1:-1;25713:1:28;;-1:-1:-1;;24923:800:28;;;;;;:::o;9086:554:8:-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;-1:-1:-1::0;;;;;;;;;;;6959:23:8::2;6973:8;6959:13;:23::i;:::-;9259:25:::3;9287:29;-1:-1:-1::0;;;9287:9:8::3;:29::i;:::-;9259:57;;9431:10;:8;:10::i;:::-;9430:11;:41;;;-1:-1:-1::0;9445:5:8::3;::::0;-1:-1:-1;;;;;9445:26:8;;::::3;:5:::0;::::3;:26;9430:41;9422:71;;;::::0;;-1:-1:-1;;;9422:71:8;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;9422:71:8;;;;;;;;;;;;;::::3;;9504:35;::::0;-1:-1:-1;;;;;9504:12:8;::::3;::::0;9517:21:::3;9504:35:::0;::::3;;;::::0;::::3;::::0;;;9517:21;9504:12;:35;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;9593:39;-1:-1:-1::0;;;;;;;;;;;9593:18:8::3;:39::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;9086:554:8:o;11531:272:28:-;726:12:58;:10;:12::i;:::-;11720:1:28::1;11698:19;:17;:19::i;:::-;:23;;;11690:61;;;::::0;;-1:-1:-1;;;11690:61:28;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11690:61:28;;;;;;;;;;;;;::::1;;11762:33;11779:6;11787:7;11762:16;:33::i;:::-;11531:272:::0;;:::o;23055:114:8:-;23116:6;23142:19;:17;:19::i;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;1591:8:58;;-1:-1:-1;;;;;;1583:16:58;;;;;;;1610:21;;;1422:217::o;1154:33:57:-;;;-1:-1:-1;;;;;1154:33:57;;:::o;219:29:58:-;;;-1:-1:-1;;;;;219:29:58;;:::o;3041:43:8:-;;;;;;;;;:::o;1874:57:28:-;;;;;;;;;;;;;:::o;14882:112:8:-;14965:13;:20;14882:112;:::o;1603:28:28:-;;;;;;:::o;13271:1585::-;13522:7;13531;6356:9:8;:7;:9::i;:::-;13454:12:28::1;6959:23:8;6973:8;6959:13;:23::i;:::-;13490:12:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1::0;;;;;13591:28:28;;::::3;::::0;;::::3;;;13583:63;;;::::0;;-1:-1:-1;;;13583:63:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;13583:63:28;;;;;;;;;;;;;::::3;;13659:24;13694::::0;13876:6:::3;:4;:6::i;:::-;13850:22;;:32;13846:725;;;-1:-1:-1::0;;;;;;;13919:22:28;::::3;;::::0;;;:8:::3;:22;::::0;;;;-1:-1:-1;13919:29:28::3;::::0;::::3;;1846:7:8;13983:34:28::0;;::::3;13846:725;;;14059:20;;:::i;:::-;14082:22;:20;:22::i;:::-;14059:45;;14120:27;14149:29:::0;14182::::3;14206:4;14182:23;:29::i;:::-;14248:19;::::0;14119:92;;-1:-1:-1;14119:92:28;-1:-1:-1;;;;;;14232:35:28;;::::3;14248:19:::0;::::3;14232:35;14228:332;;;14308:20;14288:40;;14367:22;14347:42;;14228:332;;;14463:22;14443:42;;14524:20;14504:40;;14228:332;13846:725;;;;14678:20;14702:11:::0;14717:94:::3;14737:12;14751;14765:17;14784;14803:7;14717:19;:94::i;:::-;14677:134:::0;;;;-1:-1:-1;13271:1585:28;;-1:-1:-1;;;;;;;;;;;13271:1585:28:o;3304:137:57:-;726:12:58;:10;:12::i;:::-;3421::57::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:57::1;-1:-1:-1::0;;;;;3421:12:57;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;3417:46:8:-;3459:4;3417:46;:::o;8810:248:28:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;-1:-1:-1::0;1627:5:57::1;:20::i;:::-;8979:13:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1::0;;;;;;;9010:29:28;;;::::3;;::::0;;;:14:::3;:29;::::0;;;;:40;8810:248::o;2473:46:8:-;;;-1:-1:-1;;;;;2473:46:8;;:::o;2501:239:13:-;2661:1;2639:19;:17;:19::i;:::-;:23;;;2631:61;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;;;;2703:29;:27;:29::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2613:34:8;;-1:-1:-1;2613:34:8;:::o;9815:82::-;9885:4;9815:82;:::o;2387:39::-;;;-1:-1:-1;;;;;2387:39:8;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;14288:374:8:-;726:12:58;:10;:12::i;:::-;14335:36:8::1;14393:29;-1:-1:-1::0;;;14393:9:8::1;:29::i;:::-;14509:6;::::0;14335:88;;-1:-1:-1;14517:5:8::1;::::0;-1:-1:-1;;;;;14509:6:8::1;14492:15;:13;:15::i;:::-;14481:42;;;;;;;;;;;;14536:45;14562:17;14536;:45::i;:::-;14592:34;::::0;;-1:-1:-1;;;14592:34:8;;2376:2:::1;14592:34;::::0;::::1;::::0;;;-1:-1:-1;;;;;14592:25:8;::::1;::::0;::::1;::::0;:34;;;;;-1:-1:-1;;14592:34:8;;;;;;;-1:-1:-1;14592:25:8;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;14637:17;:15;:17::i;2754:48::-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;:::o;23243:154::-;23331:7;23358:31;23373:15;23358:14;:31::i;:::-;23351:38;23243:154;-1:-1:-1;;23243:154:8:o;12065:168:28:-;12117:7;12126;12146:20;;:::i;:::-;12169:22;:20;:22::i;:::-;12210:6;;12218;;;;;12210;;-1:-1:-1;12218:6:28;-1:-1:-1;;12065:168:28;;;:::o;1133:40::-;;;-1:-1:-1;;;;;1133:40:28;;:::o;16773:225:8:-;16927:7;16894:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16959:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:31;;16773:225::o;7395:309:28:-;726:12:58;:10;:12::i;:::-;1846:7:8::1;7490:37:28;::::0;::::1;;;7482:82;;;::::0;;-1:-1:-1;;;7482:82:28;;::::1;;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;;;::::1;;7605:18;::::0;7580:65:::1;::::0;;7605:18:::1;;::::0;;::::1;::::0;::::1;7580:65:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;7656:18;:40:::0;;::::1;::::0;;::::1;;;-1:-1:-1::0;;7656:40:28;;::::1;::::0;;;::::1;::::0;;7395:309::o;22287:2224::-;22549:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;22448:10:28::2;3055:25;3071:8;3055:15;:25::i;:::-;22485:7:::3;252:24:65;269:6;252:16;:24::i;:::-;22519:10:28::4;252:24:65;269:6;252:16;:24::i;:::-;22625:21:28::5;:19;:21::i;:::-;22732:25;22760:10;-1:-1:-1::0;;;;;22760:22:28::5;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;;;;;;;;::::0;::::5;;-1:-1:-1::0;22760:24:28;;-1:-1:-1;22874:21:28::5;22901:48;22929:10:::0;22941:7;22901:27:::5;:48::i;:::-;22873:76;;;22985:10;22968:13;:27;;22960:58;;;::::0;;-1:-1:-1;;;22960:58:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;22960:58:28;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;23123:32:28;;::::5;23096:24;23123:32:::0;;;:20:::5;:32;::::0;;;;;;23239:6:::5;::::0;;23210:75;;-1:-1:-1;;;23210:75:28;;;;::::5;::::0;;;;23265:10:::5;23210:75:::0;;;;;;;;;;;;23123:32;;::::5;::::0;23239:6;;;::::5;::::0;23210:42:::5;::::0;:75;;;;;23096:24;;23210:75;;;;;;23096:24;23239:6;23210:75;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;-1:-1:-1::0;;;;;;;;;23385:22:28;::::5;;::::0;;;:8:::5;:22;::::0;;;;:30;:49:::5;::::0;23420:13;23385:34:::5;:49::i;:::-;-1:-1:-1::0;;;;;23352:22:28;::::5;;::::0;;;:8:::5;:22;::::0;;;;;;;:82;;;;23472:14:::5;:28:::0;;;;;;:47:::5;::::0;23505:13;23472:32:::5;:47::i;:::-;-1:-1:-1::0;;;;;23530:28:28;::::5;;::::0;;;:14:::5;:28;::::0;;;;;;:47;;;;;-1:-1:-1;23530:28:28;;;;-1:-1:-1;23530:28:28;-1:-1:-1;;;;;23648:35:28::5;23644:170;;;23698:34;::::0;:10:::5;::::0;:34;::::5;;;::::0;23718:13;;23698:34:::5;::::0;;;23718:13;23698:10;:34;::::5;;;;;;;;;;;;;::::0;::::5;;;;;;23644:170;;;23761:53;23774:12;23788:10;23800:13;23761:12;:53::i;:::-;23876:11;:9;:11::i;:::-;23900:26;23929:30;:17:::0;23951:7;23929:21:::5;:30::i;:::-;24027:95;::::0;;;;;::::5;::::0;::::5;::::0;;;;;;;;;;;;;-1:-1:-1;;;;;;24027:95:28;::::5;::::0;24044:10:::5;::::0;24027:95:::5;::::0;;;;;;;;::::5;24199:78;24232:10;24244:18;24264:12;24199:32;:78::i;:::-;24349:70;24378:13;24392:1;24378:16;;;;;;;24349:70;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;24490:13:28;;-1:-1:-1;;;;;;;;22287:2224:28:o;17872:782:8:-;18123:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;-1:-1:-1;;;1627:20:57::1;-1:-1:-1::0;1627:5:57::1;:20::i;:::-;-1:-1:-1::0;;;;;18183:28:8;;::::2;::::0;;::::2;;;18175:63;;;::::0;;-1:-1:-1;;;18175:63:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18175:63:8;;;;;;;;;;;;;::::2;;18366:19;::::0;-1:-1:-1;;;;;18366:19:8::2;18358:42:::0;;:158:::2;;-1:-1:-1::0;18422:19:8::2;::::0;:42:::2;::::0;;-1:-1:-1;;;18422:42:8;;-1:-1:-1;;;;;18422:42:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18422:42:8;;;;;::::2;::::0;;;;;;;;:19;:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18422:42:8;:93;::::2;;;-1:-1:-1::0;18468:19:8::2;::::0;:47:::2;::::0;;-1:-1:-1;;;18468:47:8;;-1:-1:-1;;;;;18468:47:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;-1:-1:-1;;18468:47:8;;;;;::::2;::::0;;;;;;;;:19;:47;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18468:47:8;18422:93:::2;18350:207;;;::::0;;-1:-1:-1;;;18350:207:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18350:207:8;;;;;;;;;;;;;::::2;;18577:69;18587:12;18601;18615:7;18624;18633:12;18577:9;:69::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;18570:76:8;;-1:-1:-1;;;;;;;17872:782:8:o;12392:444:28:-;12448:7;12457;12477:20;;:::i;:::-;12500:22;:20;:22::i;:::-;12477:45;;12534:27;12563:29;12596;12620:4;12596:23;:29::i;:::-;12533:92;;;;12665:13;12679:1;12665:16;;;;;;;;;;;;;;;;;;12642:19;;-1:-1:-1;;;;;12665:16:28;;;12642:19;;:39;12638:125;;;12698:53;;;;;-1:-1:-1;12698:53:28;;-1:-1:-1;12698:53:28;;-1:-1:-1;12698:53:28;12638:125;12775:53;;;;;-1:-1:-1;12775:53:28;;-1:-1:-1;;12392:444:28;;:::o;12580:274:8:-;726:12:58;:10;:12::i;:::-;12692:16:8::1;::::0;::::1;::::0;;;::::1;::::0;::::1;12674:34:::0;;::::1;;;12666:73;;;::::0;;-1:-1:-1;;;12666:73:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;12775:13;::::0;12755:50:::1;::::0;;-1:-1:-1;;;12775:13:8;;::::1;;::::0;;::::1;12755:50:::0;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;12816:13;:30:::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;;12816:30:8::1;-1:-1:-1::0;;12816:30:8;;::::1;::::0;;;::::1;::::0;;12580:274::o;1164:167:58:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;21965:97:8:-;22048:6;;-1:-1:-1;;;;;22048:6:8;;21965:97::o;1704:37:28:-;;;;:::o;7057:134:8:-;-1:-1:-1;;;;;7135:18:8;;;;;;:8;:18;;;;;-1:-1:-1;7135:24:8;;-1:-1:-1;;;7135:24:8;;;;7127:56;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;;;813:104:58;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;6701:88:8;6756:10;:8;:10::i;:::-;6755:11;6747:34;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;;;1041:126:65;1130:4;-1:-1:-1;;;;;1110:25:65;;;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;692:128;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;4077:133:57;4169:8;;:33;;;-1:-1:-1;;;4169:33:57;;;;;;;;;;-1:-1:-1;;;;;;;4169:8:57;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:57;;4077:133;-1:-1:-1;;4077:133:57:o;27794:815:28:-;27904:6;;;27957:22;;;-1:-1:-1;;;27957:22:28;;;;-1:-1:-1;;;;;27904:6:28;;;;27923:31;;27904:6;;27957:20;;:22;;;;27842:30;;27957:22;;;;;;;;27904:6;27957:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;27957:22:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27957:22:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;27957:22:28;;;;;;-1:-1:-1;;28010:17:28;;28068:13;:20;27923:56;;-1:-1:-1;28010:22:28;;28068:20;-1:-1:-1;27990:17:28;;-1:-1:-1;28099:503:28;28123:12;28119:1;:16;28099:503;;;28157:28;28204:12;28200:181;;;28256:9;-1:-1:-1;;;;;28256:21:28;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28256:23:28;;-1:-1:-1;28200:181:28;;;28352:10;28363:1;28352:13;;;;;;;;;;;;;;28333:32;;28200:181;28502:16;28461:20;:38;28482:13;28496:1;28482:16;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28482:16:28;;;28461:38;;;;;;;;;;;;;;;:57;;-1:-1:-1;;;;;;28461:57:28;;;;;;;;;;;28574:13;:16;;28588:1;;28574:16;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28533:38:28;;;;;:20;:38;;;;;;;:57;;-1:-1:-1;;;;;;28533:57:28;28574:16;;;;28533:57;;;;;;-1:-1:-1;28137:3:28;28099:503;;;;27794:815;;;;:::o;28737:263::-;28791:15;;:::i;:::-;28864:11;;28887:19;;28908:21;;28864:66;;;-1:-1:-1;;;28864:66:28;;-1:-1:-1;;;;;28887:19:28;;;28864:66;;;;28908:21;;;28864:66;;;;;;-1:-1:-1;;;;;;;28864:11:28;;;;;:22;;:66;;;;;;;;;;;;:11;:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28864:66:28;;;;;;;;28948:44;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28737:263:28;:::o;32564:85::-;32638:3;32564:85;:::o;29180:166::-;29301:37;;;;;;;;;29325:12;29301:37;;;;;;;;;;;:23;:37::i;:::-;29230:19;;-1:-1:-1;;;;;29230:19:28;;;29221:29;;;;:8;:29;;;;;;29268:21;;;;;29259:31;;;;-1:-1:-1;29259:38:28;;;29220:118;;;;;;-1:-1:-1;;29220:118:28;;;;;;;29221:36;;29220:118;;;;;;;;;;;;;;29180:166::o;10641:121:8:-;10723:6;;;:14;;;-1:-1:-1;;;10723:14:8;;;;10699:4;;10749;;-1:-1:-1;;;;;10723:6:8;;-1:-1:-1;;10723:14:8;;;;;;;;;;;:6;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10723:14:8;-1:-1:-1;;;;;10723:31:8;;;10641:121;-1:-1:-1;10641:121:8:o;29615:207:28:-;-1:-1:-1;;;;;29782:23:28;;29691:7;29782:23;;;:8;:23;;;;;;;;:31;29718:14;:29;;;;;;:96;;29782:31;29718:59;;29752:24;29718:33;:59::i;:::-;:63;;:96::i;1149:250:61:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:61;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;;;1627:174;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:61:o;716:89:60:-;772:6;;-1:-1:-1;;;772:6:60;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;;;6440:87:8;6492:10;:8;:10::i;:::-;6484:35;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;;;351:112:65;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:65;;;;;;;;;;;;-1:-1:-1;;;418:37:65;;;;;;;;;;;;;;20456:205:8;20530:13;:20;20507;20561:92;20585:12;20581:1;:16;20561:92;;;20617:36;20636:13;20650:1;20636:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20636:16:8;20617:18;:36::i;:::-;20599:3;;20561:92;;778:147:61;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;2190:348:62;2355:71;;;-1:-1:-1;;;;;2355:71:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:62;-1:-1:-1;;;2355:71:62;;;2334:93;;;;-1:-1:-1;;2313:17:62;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:62;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:62;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:62;;;;;;;;;;;;;;;;;;;;;;;;;;;32258:242:28;-1:-1:-1;;;;;32401:91:28;;;32444:29;;;;:14;:29;;;;;;;;;;32401:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32258:242;;;:::o;31261:709::-;31443:21;31467:25;31484:7;31467:16;:25::i;:::-;31443:49;;31503:21;31527:25;31544:7;31527:16;:25::i;:::-;31503:49;-1:-1:-1;31608:18:28;;;31604:91;;-1:-1:-1;;;;;31659:17:28;;;;;;:8;:17;;;;;-1:-1:-1;31659:24:28;;;;;-1:-1:-1;31604:91:28;31751:18;;;31747:97;;31819:13;1846:7:8;31802:30:28;31786:46;;31747:97;-1:-1:-1;;;;;31861:101:28;;;;;;;31895:32;:13;:32;;;;;:17;:32;:::i;:::-;31929;:13;:32;;;;;:17;:32;:::i;:::-;31861:101;;;;;;;;;;;;;;;;;;;;;;31261:709;;;;;;:::o;1196:290:63:-;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;20061:322:8:-:0;20138:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;;20168:36:8;::::1;::::0;-1:-1:-1;;;;;;;;;20168:36:8::1;20164:211;;;-1:-1:-1::0;;;;;20219:23:8;::::1;;::::0;;;:8:::1;:23;::::0;;;;20253:21:::1;20219:55:::0;;20164:211:::1;;;20337:38;::::0;;-1:-1:-1;;;20337:38:8;;20369:4:::1;20337:38;::::0;::::1;::::0;;;-1:-1:-1;;;;;20337:23:8;::::1;::::0;-1:-1:-1;;20337:38:8;;;;;::::1;::::0;;;;;;;;:23;:38;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;20337:38:8;-1:-1:-1;;;;;20303:23:8;::::1;;::::0;;;:8:::1;20337:38;20303:23:::0;;;;:72;20061:322;;:::o;1722:139:57:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:57;:10;:38;1785:68;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;;;15286:803:8;726:12:58;:10;:12::i;:::-;6615:11:8::1;:9;:11::i;:::-;15460:6:::2;594:23:65;608:8;594:13;:23::i;:::-;15494:6:8::3;948:18:65;957:8;948;:18::i;:::-;15531:7:8::4;7656:28;7676:7;7656:19;:28::i;:::-;15618:6:::5;::::0;-1:-1:-1;;;;;15591:34:8;;::::5;15618:6:::0;::::5;15591:34;::::0;::::5;::::0;:61:::5;;-1:-1:-1::0;;;;;;15630:16:8;::::5;;::::0;;;:8:::5;:16;::::0;;;;-1:-1:-1;15630:22:8::5;::::0;-1:-1:-1;;;15630:22:8;::::5;;;15629:23;15591:61;15583:93;;;::::0;;-1:-1:-1;;;15583:93:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15583:93:8;;;;;;;;;;;;;::::5;;15723:12;::::0;::::5;::::0;;::::5;1846:7;15706:29;15695:40:::0;::::5;::::0;;::::5;;;15687:79;;;::::0;;-1:-1:-1;;;15687:79:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;15785:32;:19;:17;:19::i;:::-;:32;;;15777:70;;;::::0;;-1:-1:-1;;;15777:70:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15777:70:8;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;;;;15889:16:8;;;::::5;15860:26;15889:16:::0;;;:8:::5;:16;::::0;;;;15916:22;;;-1:-1:-1;15949:17:8;;::::5;:27:::0;;-1:-1:-1;;15949:27:8::5;::::0;;::::5;-1:-1:-1::0;;15949:27:8;;::::5;;15987:23:::0;;;::::5;-1:-1:-1::0;;;15987:23:8::5;::::0;;;:16:::5;16021:26:::0;;;;::::5;::::0;;;;;;;;::::5;::::0;;-1:-1:-1;;;;;;16021:26:8::5;::::0;;::::5;::::0;;;16058:12:::5;:23:::0;;;;::::5;::::0;;::::5;::::0;;::::5;::::0;::::5;::::0;;;::::5;::::0;;15286:803::o;30126:703:28:-;30328:19;;-1:-1:-1;;;;;30328:19:28;30204:6;30313:35;;;:14;:35;;;;;;30204:6;;;;30313:35;30204:6;;30432:37;;:16;:37::i;:::-;30524:21;;30407:62;;-1:-1:-1;30480:24:28;;30507:39;;-1:-1:-1;;;;;30524:21:28;30507:16;:39::i;:::-;30480:66;-1:-1:-1;30613:25:28;-1:-1:-1;;;30613:9:28;:25::i;:::-;-1:-1:-1;;;;;30598:57:28;;30670:46;:20;855:2;30670:24;:46::i;:::-;30791:7;;30813;;;;30598:223;;;-1:-1:-1;30598:223:28;;;-1:-1:-1;;;;;;30598:223:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30598:223:28;;;;;;;;;-1:-1:-1;30598:223:28;-1:-1:-1;;;;30126:703:28;;;:::o;26457:1089::-;26694:7;26703;26712;26783:21;26807:30;26824:12;26807:16;:30::i;:::-;26783:54;;26848:21;26872:30;26889:12;26872:16;:30::i;:::-;26848:54;-1:-1:-1;26949:20:28;26987:25;-1:-1:-1;;;26987:9:28;:25::i;:::-;26972:211;;;-1:-1:-1;;;26972:211:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;26972:66:28;;;;;;;:211;;;;;;;;;;;;;;;:66;:211;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26972:211:28;;-1:-1:-1;27196:19:28;27218:26;26972:211;27218:12;:26::i;:::-;27291:18;;27196:48;;-1:-1:-1;27255:16:28;;27274:73;;27196:48;;27274:56;;1846:7:8;;27274:36:28;;:12;;27291:18;;;27274:56;27291:18;;;;27274:16;:36;:::i;:73::-;27255:92;-1:-1:-1;27488:26:28;:12;27255:92;27488:16;:26::i;:::-;27480:58;27516:11;;-1:-1:-1;27516:11:28;-1:-1:-1;26457:1089:28;-1:-1:-1;;;;;;;;;26457:1089:28:o;11633:276:8:-;726:12:58;:10;:12::i;:::-;11803:1:8::1;11781:19;:17;:19::i;:::-;:23;;;11773:61;;;::::0;;-1:-1:-1;;;11773:61:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11773:61:8;;;;;;;;;;;;;::::1;;11845:6;::::0;;:24:::1;::::0;;-1:-1:-1;;;11845:24:8;;;;-1:-1:-1;;;;;11845:6:8;;::::1;::::0;-1:-1:-1;;11845:24:8;;::::1;::::0;:6:::1;::::0;:24;;;;;;:6;;:24;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11880:21;:19;:21::i;3155:168:28:-:0;-1:-1:-1;;;;;3243:30:28;;;3286:1;3243:30;;;:20;:30;;;;;;;3227:88;;;;;-1:-1:-1;;;3227:88:28;;;;;;;;;;;;-1:-1:-1;;;3227:88:28;;;;;;;;;;;;;;1485:312:62;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;-1:-1:-1;;1589:17:62;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;15439:2741:28;15716:7;6356:9:8;:7;:9::i;:::-;15648:12:28::1;6959:23:8;6973:8;6959:13;:23::i;:::-;15684:12:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;15831:6:28::3;:4;:6::i;:::-;15806:22;;:31;15802:173;;;15879:6;:4;:6::i;:::-;15854:22;:31:::0;15915:22:::3;:20;:22::i;:::-;15900:37:::0;;:12:::3;:37:::0;::::3;;::::0;;;15952:11:::3;:9;:11::i;:::-;-1:-1:-1::0;;;;;16014:22:28;::::3;15987:24;16014:22:::0;;;:8:::3;:22;::::0;;;;-1:-1:-1;16014:29:28::3;::::0;::::3;;::::0;1846:7:8::3;16081:34:28::0;;::::3;::::0;15987:24;;16234:94:::3;16014:22:::0;16268:12;16014:29;16081:34;16320:7;16234:19:::3;:94::i;:::-;16176:152;;;;;;16409:6;16419:1;16409:11;;16401:46;;;::::0;;-1:-1:-1;;;16401:46:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16401:46:28;;;;;;;;;;;;;::::3;;-1:-1:-1::0;;;;;;;;16527:35:28;::::3;::::0;-1:-1:-1;;;;;;;;;16527:35:28::3;16523:270;;;16598:7;16585:9;:20;16577:56;;;::::0;;-1:-1:-1;;;16577:56:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16577:56:28;;;;;;;;;;;;;::::3;;16523:270;;;16670:9;:14:::0;:100;::::3;;;;16763:7;16688:71;16730:28;16745:12;16730:14;:28::i;:::-;16688:12;-1:-1:-1::0;;;;;16688:22:28::3;;16719:4;16688:37;;;;;;;;;;;;;-1:-1:-1::0;;;;;16688:37:28::3;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;16688:37:28;;:41:::3;:71::i;:::-;:82;;16670:100;16662:131;;;::::0;;-1:-1:-1;;;16662:131:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16662:131:28;;;;;;;;;;;;;::::3;;16844:32;16863:12;16844:18;:32::i;:::-;16920:40;16953:6;16920:28;16935:12;16920:14;:28::i;:::-;:32:::0;::::3;:40::i;:::-;-1:-1:-1::0;;;;;16887:22:28;::::3;;::::0;;;:8:::3;:22;::::0;;;;;;;:73;;;;17062:14:::3;:28:::0;;;;:45:::3;::::0;17095:11;17062:32:::3;:45::i;:::-;-1:-1:-1::0;;;;;17031:28:28;::::3;;::::0;;;:14:::3;:28;::::0;;;;;;:76;;;;:28;;;;-1:-1:-1;17031:28:28;-1:-1:-1;;;;;17194:35:28::3;17190:187;;;17246:29;::::0;-1:-1:-1;;;;;17246:21:28;::::3;::::0;:29:::3;::::0;::::3;;::::0;;;::::3;::::0;;;;:21;:29;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;17190:187;;;17317:48;17330:12;17344;17358:6;17317:12;:48::i;:::-;17431:87;17455:12;17469;17483:7;17492;17501:6;17509:8;17431:23;:87::i;:::-;17590:94;17619:12;17633;17647:17;17666;17590:28;:94::i;:::-;-1:-1:-1::0;;;;;17959:34:28;;::::3;17929:27;17959:34:::0;;;:20:::3;:34;::::0;;;;;;;;;18054:29;;-1:-1:-1;;;18054:29:28;;;;17959:34;::::3;::::0;18004:94:::3;::::0;17959:34;;;;-1:-1:-1;;18054:29:28::3;::::0;;::::3;::::0;17959:34;18054:29;;;;;;17959:34;18054:29;::::3;;::::0;::::3;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;18054:29:28;18085:12;18004:32:::3;:94::i;:::-;-1:-1:-1::0;18166:6:28;;15439:2741;-1:-1:-1;;;;;;;;;;;;15439:2741:28:o;7759:157:8:-;7847:1;7837:7;:11;;;:40;;;;-1:-1:-1;1846:7:8;7852:25;;;;;7837:40;7829:79;;;;;-1:-1:-1;;;7829:79:8;;;;;;;;;;;;;;;;;;;;;;;;;;;19713:155;19826:13;;19781:7;;19808:52;;1846:7;;19808:32;;:13;;:52;-1:-1:-1;;;19826:13:8;;;;;;19808:17;:32;:::i;21084:758::-;-1:-1:-1;;;21705:21:8;;21698:29;;;;21743:91;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21743:91:8;;;;;;;;;;;;;;;;;;;;;21084:758;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./PoolTokensContainer.sol\";\r\nimport \"./LiquidityPoolV2ConverterCustomFactory.sol\";\r\nimport \"../../LiquidityPoolConverter.sol\";\r\nimport \"../../interfaces/IConverterFactory.sol\";\r\nimport \"../../../utility/interfaces/IPriceOracle.sol\";\r\nimport \"../../../utility/Types.sol\";\r\n\r\n/**\r\n * @dev Liquidity Pool v2 Converter\r\n *\r\n * The liquidity pool v2 converter is a specialized version of a converter that uses\r\n * price oracles to rebalance the reserve weights in such a way that the primary token\r\n * balance always strives to match the staked balance.\r\n *\r\n * This type of liquidity pool always has 2 reserves and the reserve weights are dynamic.\r\n*/\r\ncontract LiquidityPoolV2Converter is LiquidityPoolConverter {\r\n uint8 internal constant AMPLIFICATION_FACTOR = 20; // factor to use for conversion calculations (reduces slippage)\r\n\r\n IPriceOracle public priceOracle; // external price oracle\r\n IERC20Token public primaryReserveToken; // primary reserve in the pool\r\n IERC20Token public secondaryReserveToken; // secondary reserve in the pool (cache)\r\n mapping (IERC20Token => uint256) private stakedBalances; // tracks the staked liquidity in the pool plus the fees\r\n mapping (IERC20Token => ISmartToken) private reservesToPoolTokens; // maps each reserve to its pool token\r\n mapping (ISmartToken => IERC20Token) private poolTokensToReserves; // maps each pool token to its reserve\r\n\r\n Fraction public externalRate; // external rate of 1 primary token in secondary tokens\r\n uint256 public externalRateUpdateTime; // last time the external rate was updated (in seconds)\r\n\r\n // used by the temp liquidity limit mechanism during the beta\r\n mapping (IERC20Token => uint256) public maxStakedBalances;\r\n bool public maxStakedBalanceEnabled = true;\r\n\r\n uint32 public oracleDeviationFee = 10000; // oracle deviation fee, represented in ppm\r\n\r\n /**\r\n * @dev triggered when the oracle deviation fee is updated\r\n *\r\n * @param _prevFee previous fee percentage, represented in ppm\r\n * @param _newFee new fee percentage, represented in ppm\r\n */\r\n event OracleDeviationFeeUpdate(uint32 _prevFee, uint32 _newFee);\r\n\r\n /**\r\n * @dev initializes a new LiquidityPoolV2Converter instance\r\n *\r\n * @param _poolTokensContainer pool tokens container governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n */\r\n constructor(IPoolTokensContainer _poolTokensContainer, IContractRegistry _registry, uint32 _maxConversionFee)\r\n public LiquidityPoolConverter(_poolTokensContainer, _registry, _maxConversionFee)\r\n {\r\n }\r\n\r\n // ensures the address is a pool token\r\n modifier validPoolToken(ISmartToken _address) {\r\n _validPoolToken(_address);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validPoolToken(ISmartToken _address) internal view {\r\n require(address(poolTokensToReserves[_address]) != address(0), \"ERR_INVALID_POOL_TOKEN\");\r\n }\r\n\r\n /**\r\n * @dev returns the converter type\r\n *\r\n * @return see the converter types in the the main contract doc\r\n */\r\n function converterType() public pure override returns (uint16) {\r\n return 2;\r\n }\r\n\r\n /**\r\n * @dev returns true if the converter is active, false otherwise\r\n *\r\n * @return true if the converter is active, false otherwise\r\n */\r\n function isActive() public view override returns (bool) {\r\n return super.isActive() && address(priceOracle) != address(0);\r\n }\r\n\r\n /**\r\n * @dev sets the pool's primary reserve token / price oracles and activates the pool\r\n * each oracle must be able to provide the rate for each reserve token\r\n * note that the oracle must be whitelisted prior to the call\r\n * can only be called by the owner while the pool is inactive\r\n *\r\n * @param _primaryReserveToken address of the pool's primary reserve token\r\n * @param _primaryReserveOracle address of a chainlink price oracle for the primary reserve token\r\n * @param _secondaryReserveOracle address of a chainlink price oracle for the secondary reserve token\r\n */\r\n function activate(\r\n IERC20Token _primaryReserveToken,\r\n IChainlinkPriceOracle _primaryReserveOracle,\r\n IChainlinkPriceOracle _secondaryReserveOracle)\r\n public\r\n inactive\r\n ownerOnly\r\n validReserve(_primaryReserveToken)\r\n notThis(address(_primaryReserveOracle))\r\n notThis(address(_secondaryReserveOracle))\r\n validAddress(address(_primaryReserveOracle))\r\n validAddress(address(_secondaryReserveOracle))\r\n {\r\n // validate anchor ownership\r\n require(anchor.owner() == address(this), \"ERR_ANCHOR_NOT_OWNED\");\r\n\r\n // validate oracles\r\n IWhitelist oracleWhitelist = IWhitelist(addressOf(CHAINLINK_ORACLE_WHITELIST));\r\n require(oracleWhitelist.isWhitelisted(address(_primaryReserveOracle)) &&\r\n oracleWhitelist.isWhitelisted(address(_secondaryReserveOracle)), \"ERR_INVALID_ORACLE\");\r\n\r\n // create the converter's pool tokens if they don't already exist\r\n createPoolTokens();\r\n\r\n // sets the primary & secondary reserve tokens\r\n primaryReserveToken = _primaryReserveToken;\r\n if (_primaryReserveToken == reserveTokens[0])\r\n secondaryReserveToken = reserveTokens[1];\r\n else\r\n secondaryReserveToken = reserveTokens[0];\r\n\r\n // creates and initalizes the price oracle and sets initial rates\r\n LiquidityPoolV2ConverterCustomFactory customFactory =\r\n LiquidityPoolV2ConverterCustomFactory(address(IConverterFactory(addressOf(CONVERTER_FACTORY)).customFactories(converterType())));\r\n priceOracle = customFactory.createPriceOracle(\r\n _primaryReserveToken,\r\n secondaryReserveToken,\r\n _primaryReserveOracle,\r\n _secondaryReserveOracle);\r\n\r\n externalRate = _effectiveTokensRate();\r\n externalRateUpdateTime = time();\r\n\r\n // if we are upgrading from an older converter, make sure that reserve balances are in-sync and rebalance\r\n uint256 primaryReserveStakedBalance = reserveStakedBalance(primaryReserveToken);\r\n uint256 primaryReserveBalance = reserveBalance(primaryReserveToken);\r\n uint256 secondaryReserveBalance = reserveBalance(secondaryReserveToken);\r\n\r\n if (primaryReserveStakedBalance == primaryReserveBalance) {\r\n if (primaryReserveStakedBalance > 0 || secondaryReserveBalance > 0) {\r\n rebalance();\r\n }\r\n }\r\n else if (primaryReserveStakedBalance > 0 && primaryReserveBalance > 0 && secondaryReserveBalance > 0) {\r\n rebalance();\r\n }\r\n\r\n emit Activation(converterType(), anchor, true);\r\n }\r\n\r\n /**\r\n * @dev updates the current oracle deviation fee\r\n * can only be called by the contract owner\r\n *\r\n * @param _oracleDeviationFee new oracle deviation fee, represented in ppm\r\n */\r\n function setOracleDeviationFee(uint32 _oracleDeviationFee) public ownerOnly {\r\n require(_oracleDeviationFee <= PPM_RESOLUTION, \"ERR_INVALID_ORACLE_DEVIATION_FEE\");\r\n emit OracleDeviationFeeUpdate(oracleDeviationFee, _oracleDeviationFee);\r\n oracleDeviationFee = _oracleDeviationFee;\r\n }\r\n\r\n /**\r\n * @dev returns the staked balance of a given reserve token\r\n *\r\n * @param _reserveToken reserve token address\r\n *\r\n * @return staked balance\r\n */\r\n function reserveStakedBalance(IERC20Token _reserveToken)\r\n public\r\n view\r\n validReserve(_reserveToken)\r\n returns (uint256)\r\n {\r\n return stakedBalances[_reserveToken];\r\n }\r\n\r\n /**\r\n * @dev returns the amplified balance of a given reserve token\r\n *\r\n * @param _reserveToken reserve token address\r\n *\r\n * @return amplified balance\r\n */\r\n function reserveAmplifiedBalance(IERC20Token _reserveToken)\r\n public\r\n view\r\n validReserve(_reserveToken)\r\n returns (uint256)\r\n {\r\n return amplifiedBalance(_reserveToken);\r\n }\r\n\r\n /**\r\n * @dev sets the reserve's staked balance\r\n * can only be called by the upgrader contract while the upgrader is the owner\r\n *\r\n * @param _reserveToken reserve token address\r\n * @param _balance new reserve staked balance\r\n */\r\n function setReserveStakedBalance(IERC20Token _reserveToken, uint256 _balance)\r\n public\r\n ownerOnly\r\n only(CONVERTER_UPGRADER)\r\n validReserve(_reserveToken)\r\n {\r\n stakedBalances[_reserveToken] = _balance;\r\n }\r\n\r\n /**\r\n * @dev sets the max staked balance for both reserves\r\n * available as a temporary mechanism during the beta\r\n * can only be called by the owner\r\n *\r\n * @param _reserve1MaxStakedBalance max staked balance for reserve 1\r\n * @param _reserve2MaxStakedBalance max staked balance for reserve 2\r\n */\r\n function setMaxStakedBalances(uint256 _reserve1MaxStakedBalance, uint256 _reserve2MaxStakedBalance) public ownerOnly {\r\n maxStakedBalances[reserveTokens[0]] = _reserve1MaxStakedBalance;\r\n maxStakedBalances[reserveTokens[1]] = _reserve2MaxStakedBalance;\r\n }\r\n\r\n /**\r\n * @dev disables the max staked balance mechanism\r\n * available as a temporary mechanism during the beta\r\n * once disabled, it cannot be re-enabled\r\n * can only be called by the owner\r\n */\r\n function disableMaxStakedBalances() public ownerOnly {\r\n maxStakedBalanceEnabled = false;\r\n }\r\n\r\n /**\r\n * @dev returns the pool token address by the reserve token address\r\n *\r\n * @param _reserveToken reserve token address\r\n *\r\n * @return pool token address\r\n */\r\n function poolToken(IERC20Token _reserveToken) public view returns (ISmartToken) {\r\n return reservesToPoolTokens[_reserveToken];\r\n }\r\n\r\n /**\r\n * @dev returns the maximum number of pool tokens that can currently be liquidated\r\n *\r\n * @param _poolToken address of the pool token\r\n *\r\n * @return liquidation limit\r\n */\r\n function liquidationLimit(ISmartToken _poolToken) public view returns (uint256) {\r\n // get the pool token supply\r\n uint256 poolTokenSupply = _poolToken.totalSupply();\r\n\r\n // get the reserve token associated with the pool token and its balance / staked balance\r\n IERC20Token reserveToken = poolTokensToReserves[_poolToken];\r\n uint256 balance = reserveBalance(reserveToken);\r\n uint256 stakedBalance = stakedBalances[reserveToken];\r\n\r\n // calculate the amount that's available for liquidation\r\n return balance.mul(poolTokenSupply).div(stakedBalance);\r\n }\r\n\r\n /**\r\n * @dev defines a new reserve token for the converter\r\n * can only be called by the owner while the converter is inactive and\r\n * 2 reserves aren't defined yet\r\n *\r\n * @param _token address of the reserve token\r\n * @param _weight reserve weight, represented in ppm, 1-1000000\r\n */\r\n function addReserve(IERC20Token _token, uint32 _weight) public override ownerOnly {\r\n // verify that the converter doesn't have 2 reserves yet\r\n require(reserveTokenCount() < 2, \"ERR_INVALID_RESERVE_COUNT\");\r\n super.addReserve(_token, _weight);\r\n }\r\n\r\n /**\r\n * @dev returns the effective rate of 1 primary token in secondary tokens\r\n *\r\n * @return rate of 1 primary token in secondary tokens (numerator)\r\n * @return rate of 1 primary token in secondary tokens (denominator)\r\n */\r\n function effectiveTokensRate() public view returns (uint256, uint256) {\r\n Fraction memory rate = _effectiveTokensRate();\r\n return (rate.n, rate.d);\r\n }\r\n\r\n /**\r\n * @dev returns the effective reserve tokens weights\r\n *\r\n * @return reserve1 weight\r\n * @return reserve2 weight\r\n */\r\n function effectiveReserveWeights() public view returns (uint256, uint256) {\r\n Fraction memory rate = _effectiveTokensRate();\r\n (uint32 primaryReserveWeight, uint32 secondaryReserveWeight) = effectiveReserveWeights(rate);\r\n\r\n if (primaryReserveToken == reserveTokens[0]) {\r\n return (primaryReserveWeight, secondaryReserveWeight);\r\n }\r\n\r\n return (secondaryReserveWeight, primaryReserveWeight);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting one reserve to another along with the fee\r\n *\r\n * @param _sourceToken contract address of the source reserve token\r\n * @param _targetToken contract address of the target reserve token\r\n * @param _amount amount of tokens received from the user\r\n *\r\n * @return expected target amount\r\n * @return expected fee\r\n */\r\n function targetAmountAndFee(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount)\r\n public\r\n view\r\n override\r\n active\r\n validReserve(_sourceToken)\r\n validReserve(_targetToken)\r\n returns (uint256, uint256)\r\n {\r\n // validate input\r\n require(_sourceToken != _targetToken, \"ERR_SAME_SOURCE_TARGET\");\r\n\r\n uint32 sourceTokenWeight;\r\n uint32 targetTokenWeight;\r\n\r\n // if the rate was already checked in this block, use the current weights; otherwise, get the new weights\r\n if (externalRateUpdateTime == time()) {\r\n sourceTokenWeight = reserves[_sourceToken].weight;\r\n targetTokenWeight = PPM_RESOLUTION - sourceTokenWeight;\r\n }\r\n else {\r\n Fraction memory rate = _effectiveTokensRate();\r\n (uint32 primaryReserveWeight, uint32 secondaryReserveWeight) = effectiveReserveWeights(rate);\r\n\r\n if (_sourceToken == primaryReserveToken) {\r\n sourceTokenWeight = primaryReserveWeight;\r\n targetTokenWeight = secondaryReserveWeight;\r\n }\r\n else {\r\n sourceTokenWeight = secondaryReserveWeight;\r\n targetTokenWeight = primaryReserveWeight;\r\n }\r\n }\r\n\r\n // return the target amount and the conversion fee using the updated reserve weights\r\n (uint256 targetAmount, , uint256 fee) = targetAmountAndFees(_sourceToken, _targetToken, sourceTokenWeight, targetTokenWeight, _amount);\r\n return (targetAmount, fee);\r\n }\r\n\r\n /**\r\n * @dev converts a specific amount of source tokens to target tokens\r\n * can only be called by the bancor network contract\r\n *\r\n * @param _sourceToken source ERC20 token\r\n * @param _targetToken target ERC20 token\r\n * @param _amount amount of tokens to convert (in units of the source token)\r\n * @param _trader address of the caller who executed the conversion\r\n * @param _beneficiary wallet to receive the conversion result\r\n *\r\n * @return amount of tokens received (in units of the target token)\r\n */\r\n function doConvert(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, address _trader, address payable _beneficiary)\r\n internal\r\n override\r\n active\r\n validReserve(_sourceToken)\r\n validReserve(_targetToken)\r\n returns (uint256)\r\n {\r\n // avoid updating the rate more than once per block\r\n if (externalRateUpdateTime < time()) {\r\n externalRateUpdateTime = time();\r\n externalRate = _effectiveTokensRate();\r\n rebalance();\r\n }\r\n\r\n uint32 sourceTokenWeight = reserves[_sourceToken].weight;\r\n uint32 targetTokenWeight = PPM_RESOLUTION - sourceTokenWeight;\r\n\r\n // get expected target amount and fees\r\n (uint256 amount, uint256 standardFee, uint256 totalFee) = targetAmountAndFees(_sourceToken, _targetToken, sourceTokenWeight, targetTokenWeight, _amount);\r\n\r\n // ensure that the trade gives something in return\r\n require(amount != 0, \"ERR_ZERO_TARGET_AMOUNT\");\r\n\r\n // ensure that the input amount was already deposited\r\n if (_sourceToken == ETH_RESERVE_ADDRESS)\r\n require(msg.value == _amount, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n else\r\n require(msg.value == 0 && _sourceToken.balanceOf(address(this)).sub(reserveBalance(_sourceToken)) >= _amount, \"ERR_INVALID_AMOUNT\");\r\n\r\n // sync the reserve balances\r\n syncReserveBalance(_sourceToken);\r\n reserves[_targetToken].balance = reserveBalance(_targetToken).sub(amount);\r\n\r\n // update the target staked balance with the fee\r\n stakedBalances[_targetToken] = stakedBalances[_targetToken].add(standardFee);\r\n\r\n // transfer funds to the beneficiary in the to reserve token\r\n if (_targetToken == ETH_RESERVE_ADDRESS) {\r\n _beneficiary.transfer(amount);\r\n }\r\n else {\r\n safeTransfer(_targetToken, _beneficiary, amount);\r\n }\r\n\r\n // dispatch the conversion event\r\n dispatchConversionEvent(_sourceToken, _targetToken, _trader, _amount, amount, totalFee);\r\n\r\n // dispatch the rate event for the reserve tokens\r\n dispatchTokenRateUpdateEvent(_sourceToken, _targetToken, sourceTokenWeight, targetTokenWeight);\r\n\r\n // dispatch the rate event for the target reserve pool token\r\n // the target reserve pool token rate is the only one that's affected\r\n // by conversions since conversion fees are applied to the target reserve\r\n ISmartToken targetPoolToken = reservesToPoolTokens[_targetToken];\r\n dispatchPoolTokenRateUpdateEvent(targetPoolToken, targetPoolToken.totalSupply(), _targetToken);\r\n\r\n // return the conversion result amount\r\n return amount;\r\n }\r\n\r\n /**\r\n * @dev increases the pool's liquidity and mints new shares in the pool to the caller\r\n *\r\n * @param _reserveToken address of the reserve token to add liquidity to\r\n * @param _amount amount of liquidity to add\r\n * @param _minReturn minimum return-amount of pool tokens\r\n *\r\n * @return amount of pool tokens minted\r\n */\r\n function addLiquidity(IERC20Token _reserveToken, uint256 _amount, uint256 _minReturn)\r\n public\r\n payable\r\n protected\r\n active\r\n validReserve(_reserveToken)\r\n greaterThanZero(_amount)\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n // verify that msg.value is identical to the provided amount for ETH reserve, or 0 otherwise\r\n require(_reserveToken == ETH_RESERVE_ADDRESS ? msg.value == _amount : msg.value == 0, \"ERR_ETH_AMOUNT_MISMATCH\");\r\n\r\n // sync the reserve balances just in case\r\n syncReserveBalances();\r\n\r\n // for ETH reserve, deduct the amount that was just synced (since it's already in the converter)\r\n if (_reserveToken == ETH_RESERVE_ADDRESS) {\r\n reserves[ETH_RESERVE_ADDRESS].balance = reserves[ETH_RESERVE_ADDRESS].balance.sub(msg.value);\r\n }\r\n\r\n // get the reserve staked balance before adding the liquidity to it\r\n uint256 initialStakedBalance = stakedBalances[_reserveToken];\r\n\r\n // during the beta, ensure that the new staked balance isn't greater than the max limit\r\n if (maxStakedBalanceEnabled) {\r\n require(maxStakedBalances[_reserveToken] == 0 || initialStakedBalance.add(_amount) <= maxStakedBalances[_reserveToken], \"ERR_MAX_STAKED_BALANCE_REACHED\");\r\n }\r\n\r\n // get the pool token associated with the reserve and its supply\r\n ISmartToken reservePoolToken = reservesToPoolTokens[_reserveToken];\r\n uint256 poolTokenSupply = reservePoolToken.totalSupply();\r\n\r\n // for non ETH reserve, transfer the funds from the user to the pool\r\n if (_reserveToken != ETH_RESERVE_ADDRESS)\r\n safeTransferFrom(_reserveToken, msg.sender, address(this), _amount);\r\n\r\n // sync the reserve balance / staked balance\r\n reserves[_reserveToken].balance = reserves[_reserveToken].balance.add(_amount);\r\n stakedBalances[_reserveToken] = initialStakedBalance.add(_amount);\r\n\r\n // calculate how many pool tokens to mint\r\n // for an empty pool, the price is 1:1, otherwise the price is based on the ratio\r\n // between the pool token supply and the staked balance\r\n uint256 poolTokenAmount = 0;\r\n if (initialStakedBalance == 0 || poolTokenSupply == 0)\r\n poolTokenAmount = _amount;\r\n else\r\n poolTokenAmount = _amount.mul(poolTokenSupply).div(initialStakedBalance);\r\n require(poolTokenAmount >= _minReturn, \"ERR_RETURN_TOO_LOW\");\r\n\r\n // mint new pool tokens to the caller\r\n IPoolTokensContainer(address(anchor)).mint(reservePoolToken, msg.sender, poolTokenAmount);\r\n\r\n // rebalance the pool's reserve weights\r\n rebalance();\r\n\r\n // dispatch the `LiquidityAdded` event\r\n emit LiquidityAdded(msg.sender, _reserveToken, _amount, initialStakedBalance.add(_amount), poolTokenSupply.add(poolTokenAmount));\r\n\r\n // dispatch the rate event for the relevant pool token\r\n dispatchPoolTokenRateUpdateEvent(reservePoolToken, poolTokenSupply.add(poolTokenAmount), _reserveToken);\r\n\r\n // dispatch the rate event for the reserve tokens\r\n dispatchTokenRateUpdateEvent(reserveTokens[0], reserveTokens[1], 0, 0);\r\n\r\n // return the amount of pool tokens minted\r\n return poolTokenAmount;\r\n }\r\n\r\n /**\r\n * @dev decreases the pool's liquidity and burns the caller's shares in the pool\r\n *\r\n * @param _poolToken address of the pool token\r\n * @param _amount amount of pool tokens to burn\r\n * @param _minReturn minimum return-amount of reserve tokens\r\n *\r\n * @return amount of liquidity removed\r\n */\r\n function removeLiquidity(ISmartToken _poolToken, uint256 _amount, uint256 _minReturn)\r\n public\r\n protected\r\n active\r\n validPoolToken(_poolToken)\r\n greaterThanZero(_amount)\r\n greaterThanZero(_minReturn)\r\n returns (uint256)\r\n {\r\n // sync the reserve balances just in case\r\n syncReserveBalances();\r\n\r\n // get the pool token supply before burning the caller's shares\r\n uint256 initialPoolSupply = _poolToken.totalSupply();\r\n\r\n // get the reserve token return before burning the caller's shares\r\n (uint256 reserveAmount, ) = removeLiquidityReturnAndFee(_poolToken, _amount);\r\n require(reserveAmount >= _minReturn, \"ERR_RETURN_TOO_LOW\");\r\n\r\n // get the reserve token associated with the pool token\r\n IERC20Token reserveToken = poolTokensToReserves[_poolToken];\r\n\r\n // burn the caller's pool tokens\r\n IPoolTokensContainer(address(anchor)).burn(_poolToken, msg.sender, _amount);\r\n\r\n // sync the reserve balance / staked balance\r\n reserves[reserveToken].balance = reserves[reserveToken].balance.sub(reserveAmount);\r\n uint256 newStakedBalance = stakedBalances[reserveToken].sub(reserveAmount);\r\n stakedBalances[reserveToken] = newStakedBalance;\r\n\r\n // transfer the reserve amount to the caller\r\n if (reserveToken == ETH_RESERVE_ADDRESS)\r\n msg.sender.transfer(reserveAmount);\r\n else\r\n safeTransfer(reserveToken, msg.sender, reserveAmount);\r\n\r\n // rebalance the pool's reserve weights\r\n rebalance();\r\n\r\n uint256 newPoolTokenSupply = initialPoolSupply.sub(_amount);\r\n\r\n // dispatch the `LiquidityRemoved` event\r\n emit LiquidityRemoved(msg.sender, reserveToken, reserveAmount, newStakedBalance, newPoolTokenSupply);\r\n\r\n // dispatch the rate event for the relevant pool token\r\n dispatchPoolTokenRateUpdateEvent(_poolToken, newPoolTokenSupply, reserveToken);\r\n\r\n // dispatch the rate event for the reserve tokens\r\n dispatchTokenRateUpdateEvent(reserveTokens[0], reserveTokens[1], 0, 0);\r\n\r\n // return the amount of liquidity removed\r\n return reserveAmount;\r\n }\r\n\r\n /**\r\n * @dev calculates the amount of reserve tokens entitled for a given amount of pool tokens\r\n * note that a fee is applied according to the equilibrium level of the primary reserve token\r\n *\r\n * @param _poolToken address of the pool token\r\n * @param _amount amount of pool tokens\r\n *\r\n * @return amount after fee and fee, in reserve token units\r\n */\r\n function removeLiquidityReturnAndFee(ISmartToken _poolToken, uint256 _amount) public view returns (uint256, uint256) {\r\n uint256 totalSupply = _poolToken.totalSupply();\r\n uint256 stakedBalance = stakedBalances[poolTokensToReserves[_poolToken]];\r\n\r\n if (_amount < totalSupply) {\r\n uint256 x = stakedBalances[primaryReserveToken].mul(AMPLIFICATION_FACTOR);\r\n uint256 y = amplifiedBalance(primaryReserveToken);\r\n (uint256 min, uint256 max) = x < y ? (x, y) : (y, x);\r\n uint256 amountBeforeFee = _amount.mul(stakedBalance).div(totalSupply);\r\n uint256 amountAfterFee = amountBeforeFee.mul(min).div(max);\r\n return (amountAfterFee, amountBeforeFee - amountAfterFee);\r\n }\r\n return (stakedBalance, 0);\r\n }\r\n\r\n /**\r\n * @dev returns the expected target amount of converting one reserve to another along with the fees\r\n * this version of the function expects the reserve weights as an input (gas optimization)\r\n *\r\n * @param _sourceToken contract address of the source reserve token\r\n * @param _targetToken contract address of the target reserve token\r\n * @param _sourceWeight source reserve token weight\r\n * @param _targetWeight target reserve token weight\r\n * @param _amount amount of tokens received from the user\r\n *\r\n * @return expected target amount\r\n * @return expected standard conversion fee\r\n * @return expected total conversion fee\r\n */\r\n function targetAmountAndFees(\r\n IERC20Token _sourceToken,\r\n IERC20Token _targetToken,\r\n uint32 _sourceWeight,\r\n uint32 _targetWeight,\r\n uint256 _amount)\r\n private\r\n view\r\n returns (uint256, uint256, uint256)\r\n {\r\n // get the tokens amplified balances\r\n uint256 sourceBalance = amplifiedBalance(_sourceToken);\r\n uint256 targetBalance = amplifiedBalance(_targetToken);\r\n\r\n // get the target amount\r\n uint256 targetAmount = IBancorFormula(addressOf(BANCOR_FORMULA)).crossReserveTargetAmount(\r\n sourceBalance,\r\n _sourceWeight,\r\n targetBalance,\r\n _targetWeight,\r\n _amount\r\n );\r\n\r\n uint256 standardFee = calculateFee(targetAmount);\r\n uint256 totalFee = targetAmount.mul(oracleDeviationFee).div(PPM_RESOLUTION).add(standardFee);\r\n\r\n // return a tuple of [target amount minus total conversion fee, standard conversion fee, total conversion fee]\r\n return (targetAmount.sub(totalFee), standardFee, totalFee);\r\n }\r\n\r\n /**\r\n * @dev creates the converter's pool tokens\r\n * note that technically pool tokens can be created on deployment but gas limit\r\n * might get too high for a block, so creating them on first activation\r\n *\r\n */\r\n function createPoolTokens() internal {\r\n IPoolTokensContainer container = IPoolTokensContainer(address(anchor));\r\n ISmartToken[] memory poolTokens = container.poolTokens();\r\n bool initialSetup = poolTokens.length == 0;\r\n\r\n uint256 reserveCount = reserveTokens.length;\r\n for (uint256 i = 0; i < reserveCount; i++) {\r\n ISmartToken reservePoolToken;\r\n if (initialSetup) {\r\n reservePoolToken = container.createToken();\r\n }\r\n else {\r\n reservePoolToken = poolTokens[i];\r\n }\r\n\r\n // cache the pool token address (gas optimization)\r\n reservesToPoolTokens[reserveTokens[i]] = reservePoolToken;\r\n poolTokensToReserves[reservePoolToken] = reserveTokens[i];\r\n }\r\n }\r\n\r\n /**\r\n * @dev returns the effective rate between the two reserve tokens\r\n *\r\n * @return rate\r\n */\r\n function _effectiveTokensRate() private view returns (Fraction memory) {\r\n (uint256 latestRateN, uint256 latestRateD) = priceOracle.latestRate(primaryReserveToken, secondaryReserveToken);\r\n return Fraction({ n: latestRateN, d: latestRateD });\r\n }\r\n\r\n /**\r\n * @dev updates the pool's reserve weights with new values in order to push the current primary\r\n * reserve token balance to its staked balance\r\n */\r\n function rebalance() private {\r\n (reserves[primaryReserveToken].weight, reserves[secondaryReserveToken].weight) = effectiveReserveWeights(externalRate);\r\n }\r\n\r\n /**\r\n * @dev returns the amplified balance of a given reserve token\r\n * this version skips the input validation (gas optimization)\r\n *\r\n * @param _reserveToken reserve token address\r\n *\r\n * @return amplified balance\r\n */\r\n function amplifiedBalance(IERC20Token _reserveToken) internal view returns (uint256) {\r\n return stakedBalances[_reserveToken].mul(AMPLIFICATION_FACTOR - 1).add(reserves[_reserveToken].balance);\r\n }\r\n\r\n /**\r\n * @dev returns the effective reserve weights based on the staked balance, current balance and oracle price\r\n *\r\n * @param _rate rate between the reserve tokens\r\n *\r\n * @return new primary reserve weight\r\n * @return new secondary reserve weight\r\n */\r\n function effectiveReserveWeights(Fraction memory _rate) private view returns (uint32, uint32) {\r\n // get the primary reserve staked balance\r\n uint256 primaryStakedBalance = stakedBalances[primaryReserveToken];\r\n\r\n // get the tokens amplified balances\r\n uint256 primaryBalance = amplifiedBalance(primaryReserveToken);\r\n uint256 secondaryBalance = amplifiedBalance(secondaryReserveToken);\r\n\r\n // get the new weights\r\n return IBancorFormula(addressOf(BANCOR_FORMULA)).balancedWeights(\r\n primaryStakedBalance.mul(AMPLIFICATION_FACTOR),\r\n primaryBalance,\r\n secondaryBalance,\r\n _rate.n,\r\n _rate.d);\r\n }\r\n\r\n /**\r\n * @dev dispatches token rate update event for the reserve tokens\r\n *\r\n * @param _token1 contract address of the token to calculate the rate of one unit of\r\n * @param _token2 contract address of the token to calculate the rate of one `_token1` unit in\r\n * @param _token1Weight reserve weight of token1\r\n * @param _token2Weight reserve weight of token2\r\n */\r\n function dispatchTokenRateUpdateEvent(IERC20Token _token1, IERC20Token _token2, uint32 _token1Weight, uint32 _token2Weight) private {\r\n // get the amplified balances\r\n uint256 token1Balance = amplifiedBalance(_token1);\r\n uint256 token2Balance = amplifiedBalance(_token2);\r\n\r\n // get the first token weight\r\n if (_token1Weight == 0) {\r\n _token1Weight = reserves[_token1].weight;\r\n }\r\n\r\n // get the second token weight\r\n if (_token2Weight == 0) {\r\n _token2Weight = PPM_RESOLUTION - _token1Weight;\r\n }\r\n\r\n emit TokenRateUpdate(_token1, _token2, token2Balance.mul(_token1Weight), token1Balance.mul(_token2Weight));\r\n }\r\n\r\n /**\r\n * @dev dispatches token rate update event for one of the pool tokens\r\n *\r\n * @param _poolToken address of the pool token\r\n * @param _poolTokenSupply total pool token supply\r\n * @param _reserveToken address of the reserve token\r\n */\r\n function dispatchPoolTokenRateUpdateEvent(ISmartToken _poolToken, uint256 _poolTokenSupply, IERC20Token _reserveToken) private {\r\n emit TokenRateUpdate(_poolToken, _reserveToken, stakedBalances[_reserveToken], _poolTokenSupply);\r\n }\r\n\r\n /**\r\n * @dev returns the current time\r\n */\r\n function time() internal view virtual returns (uint256) {\r\n return now;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "exportedSymbols": { + "LiquidityPoolV2Converter": [ + 18367 + ] + }, + "id": 18368, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 16651, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:28" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "file": "./PoolTokensContainer.sol", + "id": 16652, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 18725, + "src": "77:35:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol", + "file": "./LiquidityPoolV2ConverterCustomFactory.sol", + "id": 16653, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 18457, + "src": "114:53:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "file": "../../LiquidityPoolConverter.sol", + "id": 16654, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 13078, + "src": "169:42:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "../../interfaces/IConverterFactory.sol", + "id": 16655, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 13390, + "src": "213:48:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "../../../utility/interfaces/IPriceOracle.sol", + "id": 16656, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 23226, + "src": "263:54:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol", + "file": "../../../utility/Types.sol", + "id": 16657, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 22917, + "src": "319:36:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 16659, + "name": "LiquidityPoolConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13077, + "src": "778:22:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolConverter_$13077", + "typeString": "contract LiquidityPoolConverter" + } + }, + "id": 16660, + "nodeType": "InheritanceSpecifier", + "src": "778:22:28" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": { + "id": 16658, + "nodeType": "StructuredDocumentation", + "src": "359:380:28", + "text": " @dev Liquidity Pool v2 Converter\n The liquidity pool v2 converter is a specialized version of a converter that uses\n price oracles to rebalance the reserve weights in such a way that the primary token\n balance always strives to match the staked balance.\n This type of liquidity pool always has 2 reserves and the reserve weights are dynamic." + }, + "fullyImplemented": true, + "id": 18367, + "linearizedBaseContracts": [ + 18367, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "LiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 16663, + "mutability": "constant", + "name": "AMPLIFICATION_FACTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "808:49:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 16661, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "808:5:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3230", + "id": 16662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "855:2:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "2630c12f", + "id": 16665, + "mutability": "mutable", + "name": "priceOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "931:31:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16664, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23225, + "src": "931:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0337e3fb", + "id": 16667, + "mutability": "mutable", + "name": "primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1029:38:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1029:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dc75eb9a", + "id": 16669, + "mutability": "mutable", + "name": "secondaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1133:40:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16668, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1133:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 16673, + "mutability": "mutable", + "name": "stakedBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1247:55:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "typeName": { + "id": 16672, + "keyType": { + "contractScope": null, + "id": 16670, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1256:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1247:32:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "valueType": { + "id": 16671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 16677, + "mutability": "mutable", + "name": "reservesToPoolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1377:65:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + }, + "typeName": { + "id": 16676, + "keyType": { + "contractScope": null, + "id": 16674, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1386:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1377:36:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + }, + "valueType": { + "contractScope": null, + "id": 16675, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "1401:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 16681, + "mutability": "mutable", + "name": "poolTokensToReserves", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1489:65:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + }, + "typeName": { + "id": 16680, + "keyType": { + "contractScope": null, + "id": 16678, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "1498:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Mapping", + "src": "1489:36:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + }, + "valueType": { + "contractScope": null, + "id": 16679, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1513:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "ab28b174", + "id": 16683, + "mutability": "mutable", + "name": "externalRate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1603:28:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 16682, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "1603:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "fd2d6c7c", + "id": 16685, + "mutability": "mutable", + "name": "externalRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1704:37:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16684, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1704:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "98a71dcb", + "id": 16689, + "mutability": "mutable", + "name": "maxStakedBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1874:57:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "typeName": { + "id": 16688, + "keyType": { + "contractScope": null, + "id": 16686, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1883:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1874:32:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "valueType": { + "id": 16687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0a55fb3d", + "id": 16692, + "mutability": "mutable", + "name": "maxStakedBalanceEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1938:42:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 16690, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1938:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 16691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:4:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "34d084b9", + "id": 16695, + "mutability": "mutable", + "name": "oracleDeviationFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1989:40:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16693, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1989:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 16694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2024:5:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 16696, + "nodeType": "StructuredDocumentation", + "src": "2082:226:28", + "text": " @dev triggered when the oracle deviation fee is updated\n @param _prevFee previous fee percentage, represented in ppm\n @param _newFee new fee percentage, represented in ppm" + }, + "id": 16702, + "name": "OracleDeviationFeeUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 16701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16698, + "indexed": false, + "mutability": "mutable", + "name": "_prevFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16702, + "src": "2345:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16697, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2345:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16700, + "indexed": false, + "mutability": "mutable", + "name": "_newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16702, + "src": "2362:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16699, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2362:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2344:33:28" + }, + "src": "2314:64:28" + }, + { + "body": { + "id": 16717, + "nodeType": "Block", + "src": "2938:8:28", + "statements": [] + }, + "documentation": { + "id": 16703, + "nodeType": "StructuredDocumentation", + "src": "2386:340:28", + "text": " @dev initializes a new LiquidityPoolV2Converter instance\n @param _poolTokensContainer pool tokens container governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 16718, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 16712, + "name": "_poolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16705, + "src": "2881:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 16713, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16707, + "src": "2903:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 16714, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16709, + "src": "2914:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 16715, + "modifierName": { + "argumentTypes": null, + "id": 16711, + "name": "LiquidityPoolConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13077, + "src": "2858:22:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolConverter_$13077_$", + "typeString": "type(contract LiquidityPoolConverter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2858:74:28" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16710, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16705, + "mutability": "mutable", + "name": "_poolTokensContainer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2744:41:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 16704, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "2744:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16707, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2787:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 16706, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "2787:17:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16709, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2816:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16708, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2816:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2743:98:28" + }, + "returnParameters": { + "id": 16716, + "nodeType": "ParameterList", + "parameters": [], + "src": "2938:0:28" + }, + "scope": 18367, + "src": "2732:214:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16727, + "nodeType": "Block", + "src": "3044:56:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16723, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16720, + "src": "3071:8:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + ], + "id": 16722, + "name": "_validPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16749, + "src": "3055:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_ISmartToken_$21516_$returns$__$", + "typeString": "function (contract ISmartToken) view" + } + }, + "id": 16724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3055:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16725, + "nodeType": "ExpressionStatement", + "src": "3055:25:28" + }, + { + "id": 16726, + "nodeType": "PlaceholderStatement", + "src": "3091:1:28" + } + ] + }, + "documentation": null, + "id": 16728, + "name": "validPoolToken", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 16721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16720, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16728, + "src": "3022:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 16719, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "3022:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3021:22:28" + }, + "src": "2998:102:28", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16748, + "nodeType": "Block", + "src": "3216:107:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16736, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "3243:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 16738, + "indexExpression": { + "argumentTypes": null, + "id": 16737, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16730, + "src": "3264:8:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3243:30:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3235:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16734, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3235:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:39:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 16742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3286:1:28", + "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": 16741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3278:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3278:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3278:10:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3235:53:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f504f4f4c5f544f4b454e", + "id": 16745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3290:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eed1b5de9a98cde04e371329406f26607f5671e3e7b23ea150ebcb6d35102f1f", + "typeString": "literal_string \"ERR_INVALID_POOL_TOKEN\"" + }, + "value": "ERR_INVALID_POOL_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eed1b5de9a98cde04e371329406f26607f5671e3e7b23ea150ebcb6d35102f1f", + "typeString": "literal_string \"ERR_INVALID_POOL_TOKEN\"" + } + ], + "id": 16733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3227:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3227:88:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16747, + "nodeType": "ExpressionStatement", + "src": "3227:88:28" + } + ] + }, + "documentation": null, + "id": 16749, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validPoolToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16730, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16749, + "src": "3180:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 16729, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "3180:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3179:22:28" + }, + "returnParameters": { + "id": 16732, + "nodeType": "ParameterList", + "parameters": [], + "src": "3216:0:28" + }, + "scope": 18367, + "src": "3155:168:28", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 16758, + "nodeType": "Block", + "src": "3531:27:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3549:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 16755, + "id": 16757, + "nodeType": "Return", + "src": "3542:8:28" + } + ] + }, + "documentation": { + "id": 16750, + "nodeType": "StructuredDocumentation", + "src": "3331:131:28", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 16759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16752, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3505:8:28" + }, + "parameters": { + "id": 16751, + "nodeType": "ParameterList", + "parameters": [], + "src": "3490:2:28" + }, + "returnParameters": { + "id": 16755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16754, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16759, + "src": "3523:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 16753, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3523:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3522:8:28" + }, + "scope": 18367, + "src": "3468:90:28", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9362 + ], + "body": { + "id": 16780, + "nodeType": "Block", + "src": "3785:80:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 16766, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3803:5:28", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV2Converter_$18367", + "typeString": "contract super LiquidityPoolV2Converter" + } + }, + "id": 16767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isActive", + "nodeType": "MemberAccess", + "referencedDeclaration": 9362, + "src": "3803:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 16768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3803:16:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16771, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "3831:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + ], + "id": 16770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3823:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3823:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3823:20:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 16775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3855:1:28", + "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": 16774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3847:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3847:10:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3823:34:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3803:54:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 16765, + "id": 16779, + "nodeType": "Return", + "src": "3796:61:28" + } + ] + }, + "documentation": { + "id": 16760, + "nodeType": "StructuredDocumentation", + "src": "3566:157:28", + "text": " @dev returns true if the converter is active, false otherwise\n @return true if the converter is active, false otherwise" + }, + "functionSelector": "22f3e2d4", + "id": 16781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16762, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3761:8:28" + }, + "parameters": { + "id": 16761, + "nodeType": "ParameterList", + "parameters": [], + "src": "3746:2:28" + }, + "returnParameters": { + "id": 16765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16764, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16781, + "src": "3779:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 16763, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3779:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3778:6:28" + }, + "scope": 18367, + "src": "3729:136:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16981, + "nodeType": "Block", + "src": "4988:2187:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 16823, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "5045:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 16824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 23172, + "src": "5045:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 16825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5045:14:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16828, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5071:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 16827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5063:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16826, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5063:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5063:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5045:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414e43484f525f4e4f545f4f574e4544", + "id": 16831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5078:22:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_177ebf4a5417e29571b85651bfed4f759bbb0c457a65f31f55950233ecfaf584", + "typeString": "literal_string \"ERR_ANCHOR_NOT_OWNED\"" + }, + "value": "ERR_ANCHOR_NOT_OWNED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_177ebf4a5417e29571b85651bfed4f759bbb0c457a65f31f55950233ecfaf584", + "typeString": "literal_string \"ERR_ANCHOR_NOT_OWNED\"" + } + ], + "id": 16822, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5037:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5037:64:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16833, + "nodeType": "ExpressionStatement", + "src": "5037:64:28" + }, + { + "assignments": [ + 16835 + ], + "declarations": [ + { + "constant": false, + "id": 16835, + "mutability": "mutable", + "name": "oracleWhitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "5143:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 16834, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23251, + "src": "5143:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16841, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16838, + "name": "CHAINLINK_ORACLE_WHITELIST", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21894, + "src": "5193:26:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16837, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "5183:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16836, + "name": "IWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23251, + "src": "5172:10:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IWhitelist_$23251_$", + "typeString": "type(contract IWhitelist)" + } + }, + "id": 16840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5172:49:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5143:78:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16847, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "5278:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5270:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5270:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5270:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 16843, + "name": "oracleWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16835, + "src": "5240:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "id": 16844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 23250, + "src": "5240:29:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 16849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5240:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16854, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "5360:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5352:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5352:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5352:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 16850, + "name": "oracleWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16835, + "src": "5322:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "id": 16851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 23250, + "src": "5322:29:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 16856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5322:63:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5240:145:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4f5241434c45", + "id": 16858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5387:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_838cc927fcaf7c7c6b40a2418c9d314e4eaed53a6395fa4bccbb5e6a4666df25", + "typeString": "literal_string \"ERR_INVALID_ORACLE\"" + }, + "value": "ERR_INVALID_ORACLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_838cc927fcaf7c7c6b40a2418c9d314e4eaed53a6395fa4bccbb5e6a4666df25", + "typeString": "literal_string \"ERR_INVALID_ORACLE\"" + } + ], + "id": 16842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5232:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:176:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16860, + "nodeType": "ExpressionStatement", + "src": "5232:176:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16861, + "name": "createPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18164, + "src": "5496:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5496:18:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16863, + "nodeType": "ExpressionStatement", + "src": "5496:18:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16864, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "5583:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16865, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "5605:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5583:42:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16867, + "nodeType": "ExpressionStatement", + "src": "5583:42:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 16872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16868, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "5640:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16869, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5664:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16871, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5678:1:28", + "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": "5664:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5640:40:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 16883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16879, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "5764:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16880, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5788:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16882, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5802:1:28", + "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": "5788:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5764:40:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16884, + "nodeType": "ExpressionStatement", + "src": "5764:40:28" + }, + "id": 16885, + "nodeType": "IfStatement", + "src": "5636:168:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 16877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16873, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "5695:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16874, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5719:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16876, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5733:1:28", + "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": "5719:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5695:40:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16878, + "nodeType": "ExpressionStatement", + "src": "5695:40:28" + } + }, + { + "assignments": [ + 16887 + ], + "declarations": [ + { + "constant": false, + "id": 16887, + "mutability": "mutable", + "name": "customFactory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "5892:51:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 16886, + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18456, + "src": "5892:37:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16902, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16897, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 16759 + ], + "referencedDeclaration": 16759, + "src": "6069:13:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 16898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16893, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21870, + "src": "6033:17:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16892, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "6023:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6023:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16891, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "6005:17:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 16895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6005:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 16896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "customFactories", + "nodeType": "MemberAccess", + "referencedDeclaration": 13388, + "src": "6005:63:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint16_$returns$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "function (uint16) view external returns (contract ITypedConverterCustomFactory)" + } + }, + "id": 16899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6005:80:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + ], + "id": 16890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5997:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5997:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5997:89:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16888, + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18456, + "src": "5959:37:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456_$", + "typeString": "type(contract LiquidityPoolV2ConverterCustomFactory)" + } + }, + "id": 16901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5959:128:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5892:195:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16903, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "6098:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16906, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "6158:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16907, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "6193:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16908, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "6229:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 16909, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "6265:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "expression": { + "argumentTypes": null, + "id": 16904, + "name": "customFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16887, + "src": "6112:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "id": 16905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPriceOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 18455, + "src": "6112:31:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_contract$_IChainlinkPriceOracle_$23155_$_t_contract$_IChainlinkPriceOracle_$23155_$returns$_t_contract$_IPriceOracle_$23225_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external returns (contract IPriceOracle)" + } + }, + "id": 16910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6112:177:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "src": "6098:191:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "id": 16912, + "nodeType": "ExpressionStatement", + "src": "6098:191:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16913, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "6302:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16914, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "6317:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 16915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6317:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "6302:37:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 16917, + "nodeType": "ExpressionStatement", + "src": "6302:37:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16918, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "6350:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16919, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "6375:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 16920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6375:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6350:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16922, + "nodeType": "ExpressionStatement", + "src": "6350:31:28" + }, + { + "assignments": [ + 16924 + ], + "declarations": [ + { + "constant": false, + "id": 16924, + "mutability": "mutable", + "name": "primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6509:35:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6509:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16928, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16926, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "6568:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16925, + "name": "reserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17023, + "src": "6547:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6509:79:28" + }, + { + "assignments": [ + 16930 + ], + "declarations": [ + { + "constant": false, + "id": 16930, + "mutability": "mutable", + "name": "primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6599:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6599:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16934, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16932, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "6646:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16931, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6631:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6631:35:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6599:67:28" + }, + { + "assignments": [ + 16936 + ], + "declarations": [ + { + "constant": false, + "id": 16936, + "mutability": "mutable", + "name": "secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6677:31:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6677:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16940, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16938, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "6726:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16937, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6711:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6711:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6677:71:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16941, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6765:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16942, + "name": "primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16930, + "src": "6796:21:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6765:52:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16957, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6978:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7008:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6978:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16960, + "name": "primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16930, + "src": "7013:21:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7037:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7013:25:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6978:60:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16964, + "name": "secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16936, + "src": "7042:23:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7068:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7042:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6978:91:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16972, + "nodeType": "IfStatement", + "src": "6974:135:28", + "trueBody": { + "id": 16971, + "nodeType": "Block", + "src": "7071:38:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16968, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "7086:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16970, + "nodeType": "ExpressionStatement", + "src": "7086:11:28" + } + ] + } + }, + "id": 16973, + "nodeType": "IfStatement", + "src": "6761:348:28", + "trueBody": { + "id": 16956, + "nodeType": "Block", + "src": "6819:140:28", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16944, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6838:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6868:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6838:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16947, + "name": "secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16936, + "src": "6873:23:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6899:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6873:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6838:62:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16955, + "nodeType": "IfStatement", + "src": "6834:114:28", + "trueBody": { + "id": 16954, + "nodeType": "Block", + "src": "6902:46:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16951, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "6921:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6921:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16953, + "nodeType": "ExpressionStatement", + "src": "6921:11:28" + } + ] + } + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16975, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 16759 + ], + "referencedDeclaration": 16759, + "src": "7137:13:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 16976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 16977, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "7154:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 16978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7162:4:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 16974, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "7126:10:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 16979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7126:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16980, + "nodeType": "EmitStatement", + "src": "7121:46:28" + } + ] + }, + "documentation": { + "id": 16782, + "nodeType": "StructuredDocumentation", + "src": "3873:625:28", + "text": " @dev sets the pool's primary reserve token / price oracles and activates the pool\n each oracle must be able to provide the rate for each reserve token\n note that the oracle must be whitelisted prior to the call\n can only be called by the owner while the pool is inactive\n @param _primaryReserveToken address of the pool's primary reserve token\n @param _primaryReserveOracle address of a chainlink price oracle for the primary reserve token\n @param _secondaryReserveOracle address of a chainlink price oracle for the secondary reserve token" + }, + "functionSelector": "119b90cd", + "id": 16982, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 16791, + "modifierName": { + "argumentTypes": null, + "id": 16790, + "name": "inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9151, + "src": "4701:8:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4701:8:28" + }, + { + "arguments": null, + "id": 16793, + "modifierName": { + "argumentTypes": null, + "id": 16792, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "4719:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4719:9:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 16795, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "4751:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 16796, + "modifierName": { + "argumentTypes": null, + "id": 16794, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4738:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4738:34:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16800, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "4798:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4790:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16798, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4790:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16802, + "modifierName": { + "argumentTypes": null, + "id": 16797, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22978, + "src": "4782:7:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4782:39:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16806, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "4847:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16804, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4839:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16808, + "modifierName": { + "argumentTypes": null, + "id": 16803, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22978, + "src": "4831:7:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4831:41:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16812, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "4903:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4895:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4895:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4895:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16814, + "modifierName": { + "argumentTypes": null, + "id": 16809, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4882:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4882:44:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16818, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "4957:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4949:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4949:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4949:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16820, + "modifierName": { + "argumentTypes": null, + "id": 16815, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4936:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4936:46:28" + } + ], + "name": "activate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16784, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4532:32:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16783, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4532:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16786, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4575:43:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16785, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23155, + "src": "4575:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16788, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4629:45:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16787, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23155, + "src": "4629:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4521:154:28" + }, + "returnParameters": { + "id": 16821, + "nodeType": "ParameterList", + "parameters": [], + "src": "4988:0:28" + }, + "scope": 18367, + "src": "4504:2671:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17006, + "nodeType": "Block", + "src": "7471:233:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 16993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16991, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7490:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 16992, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7513:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7490:37:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545", + "id": 16994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7529:34:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f9363eee098ac664b67b829736fb5ba7ccaf776da9324eed6c3da55aa01386f5", + "typeString": "literal_string \"ERR_INVALID_ORACLE_DEVIATION_FEE\"" + }, + "value": "ERR_INVALID_ORACLE_DEVIATION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f9363eee098ac664b67b829736fb5ba7ccaf776da9324eed6c3da55aa01386f5", + "typeString": "literal_string \"ERR_INVALID_ORACLE_DEVIATION_FEE\"" + } + ], + "id": 16990, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7482:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7482:82:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16996, + "nodeType": "ExpressionStatement", + "src": "7482:82:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16998, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "7605:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 16999, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7625:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16997, + "name": "OracleDeviationFeeUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16702, + "src": "7580:24:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (uint32,uint32)" + } + }, + "id": 17000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7580:65:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17001, + "nodeType": "EmitStatement", + "src": "7575:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17002, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "7656:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17003, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7677:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7656:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17005, + "nodeType": "ExpressionStatement", + "src": "7656:40:28" + } + ] + }, + "documentation": { + "id": 16983, + "nodeType": "StructuredDocumentation", + "src": "7183:206:28", + "text": " @dev updates the current oracle deviation fee\n can only be called by the contract owner\n @param _oracleDeviationFee new oracle deviation fee, represented in ppm" + }, + "functionSelector": "ddd9abbf", + "id": 17007, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 16988, + "modifierName": { + "argumentTypes": null, + "id": 16987, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "7461:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7461:9:28" + } + ], + "name": "setOracleDeviationFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16985, + "mutability": "mutable", + "name": "_oracleDeviationFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17007, + "src": "7426:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16984, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7426:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7425:28:28" + }, + "returnParameters": { + "id": 16989, + "nodeType": "ParameterList", + "parameters": [], + "src": "7471:0:28" + }, + "scope": 18367, + "src": "7395:309:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17022, + "nodeType": "Block", + "src": "8056:55:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17018, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "8074:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17020, + "indexExpression": { + "argumentTypes": null, + "id": 17019, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17010, + "src": "8089:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8074:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17017, + "id": 17021, + "nodeType": "Return", + "src": "8067:36:28" + } + ] + }, + "documentation": { + "id": 17008, + "nodeType": "StructuredDocumentation", + "src": "7712:182:28", + "text": " @dev returns the staked balance of a given reserve token\n @param _reserveToken reserve token address\n @return staked balance" + }, + "functionSelector": "005e319c", + "id": 17023, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 17013, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17010, + "src": "8009:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17014, + "modifierName": { + "argumentTypes": null, + "id": 17012, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "7996:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7996:27:28" + } + ], + "name": "reserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17010, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17023, + "src": "7930:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17009, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "7930:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7929:27:28" + }, + "returnParameters": { + "id": 17017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17016, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17023, + "src": "8042:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8042:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:9:28" + }, + "scope": 18367, + "src": "7900:211:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17038, + "nodeType": "Block", + "src": "8471:57:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17035, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17026, + "src": "8506:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17034, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "8489:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8489:31:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17033, + "id": 17037, + "nodeType": "Return", + "src": "8482:38:28" + } + ] + }, + "documentation": { + "id": 17024, + "nodeType": "StructuredDocumentation", + "src": "8119:187:28", + "text": " @dev returns the amplified balance of a given reserve token\n @param _reserveToken reserve token address\n @return amplified balance" + }, + "functionSelector": "2bd3c107", + "id": 17039, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 17029, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17026, + "src": "8424:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17030, + "modifierName": { + "argumentTypes": null, + "id": 17028, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "8411:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8411:27:28" + } + ], + "name": "reserveAmplifiedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17026, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17039, + "src": "8345:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17025, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "8345:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8344:27:28" + }, + "returnParameters": { + "id": 17033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17039, + "src": "8457:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8457:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8456:9:28" + }, + "scope": 18367, + "src": "8312:216:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17061, + "nodeType": "Block", + "src": "8999:59:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17055, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "9010:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17057, + "indexExpression": { + "argumentTypes": null, + "id": 17056, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17042, + "src": "9025:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9010:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17058, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17044, + "src": "9042:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9010:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17060, + "nodeType": "ExpressionStatement", + "src": "9010:40:28" + } + ] + }, + "documentation": { + "id": 17040, + "nodeType": "StructuredDocumentation", + "src": "8536:268:28", + "text": " @dev sets the reserve's staked balance\n can only be called by the upgrader contract while the upgrader is the owner\n @param _reserveToken reserve token address\n @param _balance new reserve staked balance" + }, + "functionSelector": "bf7da6ba", + "id": 17062, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17047, + "modifierName": { + "argumentTypes": null, + "id": 17046, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "8913:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8913:9:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17049, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21876, + "src": "8937:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 17050, + "modifierName": { + "argumentTypes": null, + "id": 17048, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21911, + "src": "8932:4:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8932:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17052, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17042, + "src": "8979:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17053, + "modifierName": { + "argumentTypes": null, + "id": 17051, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "8966:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8966:27:28" + } + ], + "name": "setReserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17042, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17062, + "src": "8843:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17041, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "8843:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17044, + "mutability": "mutable", + "name": "_balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17062, + "src": "8870:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17043, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8870:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8842:45:28" + }, + "returnParameters": { + "id": 17054, + "nodeType": "ParameterList", + "parameters": [], + "src": "8999:0:28" + }, + "scope": 18367, + "src": "8810:248:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17088, + "nodeType": "Block", + "src": "9526:156:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17072, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "9537:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17076, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17073, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9555:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17075, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9569:1:28", + "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": "9555:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9537:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17077, + "name": "_reserve1MaxStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17065, + "src": "9575:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9537:63:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17079, + "nodeType": "ExpressionStatement", + "src": "9537:63:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17080, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "9611:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17084, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17081, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9629:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17083, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9643:1:28", + "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": "9629:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9611:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17085, + "name": "_reserve2MaxStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17067, + "src": "9649:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9611:63:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17087, + "nodeType": "ExpressionStatement", + "src": "9611:63:28" + } + ] + }, + "documentation": { + "id": 17063, + "nodeType": "StructuredDocumentation", + "src": "9066:337:28", + "text": " @dev sets the max staked balance for both reserves\n available as a temporary mechanism during the beta\n can only be called by the owner\n @param _reserve1MaxStakedBalance max staked balance for reserve 1\n @param _reserve2MaxStakedBalance max staked balance for reserve 2" + }, + "functionSelector": "46749468", + "id": 17089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17070, + "modifierName": { + "argumentTypes": null, + "id": 17069, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "9516:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9516:9:28" + } + ], + "name": "setMaxStakedBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17065, + "mutability": "mutable", + "name": "_reserve1MaxStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17089, + "src": "9439:33:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9439:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17067, + "mutability": "mutable", + "name": "_reserve2MaxStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17089, + "src": "9474:33:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9474:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9438:70:28" + }, + "returnParameters": { + "id": 17071, + "nodeType": "ParameterList", + "parameters": [], + "src": "9526:0:28" + }, + "scope": 18367, + "src": "9409:273:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17099, + "nodeType": "Block", + "src": "9965:50:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17095, + "name": "maxStakedBalanceEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16692, + "src": "9976:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 17096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10002:5:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "9976:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 17098, + "nodeType": "ExpressionStatement", + "src": "9976:31:28" + } + ] + }, + "documentation": { + "id": 17090, + "nodeType": "StructuredDocumentation", + "src": "9690:216:28", + "text": " @dev disables the max staked balance mechanism\n available as a temporary mechanism during the beta\n once disabled, it cannot be re-enabled\n can only be called by the owner" + }, + "functionSelector": "16912f96", + "id": 17100, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17093, + "modifierName": { + "argumentTypes": null, + "id": 17092, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "9955:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9955:9:28" + } + ], + "name": "disableMaxStakedBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17091, + "nodeType": "ParameterList", + "parameters": [], + "src": "9945:2:28" + }, + "returnParameters": { + "id": 17094, + "nodeType": "ParameterList", + "parameters": [], + "src": "9965:0:28" + }, + "scope": 18367, + "src": "9912:103:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17112, + "nodeType": "Block", + "src": "10303:61:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17108, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "10321:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17110, + "indexExpression": { + "argumentTypes": null, + "id": 17109, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17103, + "src": "10342:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10321:35:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "functionReturnParameters": 17107, + "id": 17111, + "nodeType": "Return", + "src": "10314:42:28" + } + ] + }, + "documentation": { + "id": 17101, + "nodeType": "StructuredDocumentation", + "src": "10023:194:28", + "text": " @dev returns the pool token address by the reserve token address\n @param _reserveToken reserve token address\n @return pool token address" + }, + "functionSelector": "5768adcf", + "id": 17113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "poolToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17103, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17113, + "src": "10242:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17102, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10242:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10241:27:28" + }, + "returnParameters": { + "id": 17107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17113, + "src": "10290:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17105, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "10290:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10289:13:28" + }, + "scope": 18367, + "src": "10223:141:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17153, + "nodeType": "Block", + "src": "10666:530:28", + "statements": [ + { + "assignments": [ + 17122 + ], + "declarations": [ + { + "constant": false, + "id": 17122, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10715:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10715:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17126, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17123, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17116, + "src": "10741:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "10741:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10741:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10715:50:28" + }, + { + "assignments": [ + 17128 + ], + "declarations": [ + { + "constant": false, + "id": 17128, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10876:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17127, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10876:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17132, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17129, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "10903:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17131, + "indexExpression": { + "argumentTypes": null, + "id": 17130, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17116, + "src": "10924:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10903:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10876:59:28" + }, + { + "assignments": [ + 17134 + ], + "declarations": [ + { + "constant": false, + "id": 17134, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10946:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10946:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17138, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17136, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17128, + "src": "10979:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17135, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "10964:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10964:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10946:46:28" + }, + { + "assignments": [ + 17140 + ], + "declarations": [ + { + "constant": false, + "id": 17140, + "mutability": "mutable", + "name": "stakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "11003:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17139, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11003:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17144, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17141, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "11027:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17143, + "indexExpression": { + "argumentTypes": null, + "id": 17142, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17128, + "src": "11042:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11027:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11003:52:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17150, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17140, + "src": "11174:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17147, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17122, + "src": "11153:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17145, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17134, + "src": "11141:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "11141:11:28", + "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": 17148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11141:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "11141:32:28", + "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": 17151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11141:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17120, + "id": 17152, + "nodeType": "Return", + "src": "11134:54:28" + } + ] + }, + "documentation": { + "id": 17114, + "nodeType": "StructuredDocumentation", + "src": "10372:208:28", + "text": " @dev returns the maximum number of pool tokens that can currently be liquidated\n @param _poolToken address of the pool token\n @return liquidation limit" + }, + "functionSelector": "2bf0c985", + "id": 17154, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidationLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17116, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17154, + "src": "10612:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17115, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "10612:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10611:24:28" + }, + "returnParameters": { + "id": 17120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17154, + "src": "10657:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10657:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10656:9:28" + }, + "scope": 18367, + "src": "10586:610:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 17180, + "nodeType": "Block", + "src": "11613:190:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 17169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17166, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "11698:17:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 17167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11698:19:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 17168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11720:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "11698:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 17170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11723:27:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 17165, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11690:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11690:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17172, + "nodeType": "ExpressionStatement", + "src": "11690:61:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17176, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17157, + "src": "11779:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17177, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17159, + "src": "11787:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 17173, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "11762:5:28", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV2Converter_$18367", + "typeString": "contract super LiquidityPoolV2Converter" + } + }, + "id": 17175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "11762:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 17178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11762:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17179, + "nodeType": "ExpressionStatement", + "src": "11762:33:28" + } + ] + }, + "documentation": { + "id": 17155, + "nodeType": "StructuredDocumentation", + "src": "11204:321:28", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive and\n 2 reserves aren't defined yet\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 17181, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17163, + "modifierName": { + "argumentTypes": null, + "id": 17162, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "11603:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11603:9:28" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17161, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11594:8:28" + }, + "parameters": { + "id": 17160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17157, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17181, + "src": "11551:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17156, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "11551:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17159, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17181, + "src": "11571:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17158, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "11571:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11550:36:28" + }, + "returnParameters": { + "id": 17164, + "nodeType": "ParameterList", + "parameters": [], + "src": "11613:0:28" + }, + "scope": 18367, + "src": "11531:272:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17200, + "nodeType": "Block", + "src": "12135:98:28", + "statements": [ + { + "assignments": [ + 17190 + ], + "declarations": [ + { + "constant": false, + "id": 17190, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17200, + "src": "12146:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17189, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "12146:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17193, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17191, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "12169:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12169:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12146:45:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17194, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17190, + "src": "12210:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 17195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "12210:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17196, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17190, + "src": "12218:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 17197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "12218:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17198, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12209:16:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17188, + "id": 17199, + "nodeType": "Return", + "src": "12202:23:28" + } + ] + }, + "documentation": { + "id": 17182, + "nodeType": "StructuredDocumentation", + "src": "11811:248:28", + "text": " @dev returns the effective rate of 1 primary token in secondary tokens\n @return rate of 1 primary token in secondary tokens (numerator)\n @return rate of 1 primary token in secondary tokens (denominator)" + }, + "functionSelector": "db2830a4", + "id": 17201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveTokensRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17183, + "nodeType": "ParameterList", + "parameters": [], + "src": "12093:2:28" + }, + "returnParameters": { + "id": 17188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17185, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17201, + "src": "12117:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12117:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17187, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17201, + "src": "12126:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12126:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12116:18:28" + }, + "scope": 18367, + "src": "12065:168:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17237, + "nodeType": "Block", + "src": "12466:370:28", + "statements": [ + { + "assignments": [ + 17210 + ], + "declarations": [ + { + "constant": false, + "id": 17210, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12477:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17209, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "12477:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17213, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17211, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "12500:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12500:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12477:45:28" + }, + { + "assignments": [ + 17215, + 17217 + ], + "declarations": [ + { + "constant": false, + "id": 17215, + "mutability": "mutable", + "name": "primaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12534:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17214, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12534:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17217, + "mutability": "mutable", + "name": "secondaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12563:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17216, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12563:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17221, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17219, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17210, + "src": "12620:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + ], + "id": 17218, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "12596:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 17220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12596:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12533:92:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17222, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "12642:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17223, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "12665:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17225, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12679:1:28", + "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": "12665:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "12642:39:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17232, + "nodeType": "IfStatement", + "src": "12638:125:28", + "trueBody": { + "id": 17231, + "nodeType": "Block", + "src": "12683:80:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17227, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17215, + "src": "12706:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17228, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17217, + "src": "12728:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 17229, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12705:46:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 17208, + "id": 17230, + "nodeType": "Return", + "src": "12698:53:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17233, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17217, + "src": "12783:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17234, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17215, + "src": "12807:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 17235, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12782:46:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 17208, + "id": 17236, + "nodeType": "Return", + "src": "12775:53:28" + } + ] + }, + "documentation": { + "id": 17202, + "nodeType": "StructuredDocumentation", + "src": "12241:145:28", + "text": " @dev returns the effective reserve tokens weights\n @return reserve1 weight\n @return reserve2 weight" + }, + "functionSelector": "ec2240f5", + "id": 17238, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveReserveWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17203, + "nodeType": "ParameterList", + "parameters": [], + "src": "12424:2:28" + }, + "returnParameters": { + "id": 17208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17205, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17238, + "src": "12448:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12448:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17207, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17238, + "src": "12457:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12457:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12447:18:28" + }, + "scope": 18367, + "src": "12392:444:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 17345, + "nodeType": "Block", + "src": "13545:1311:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17262, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13591:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 17263, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "13607:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "13591:28:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 17265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13621:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 17261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13583:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13583:63:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17267, + "nodeType": "ExpressionStatement", + "src": "13583:63:28" + }, + { + "assignments": [ + 17269 + ], + "declarations": [ + { + "constant": false, + "id": 17269, + "mutability": "mutable", + "name": "sourceTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "13659:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17268, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "13659:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17270, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "13659:24:28" + }, + { + "assignments": [ + 17272 + ], + "declarations": [ + { + "constant": false, + "id": 17272, + "mutability": "mutable", + "name": "targetTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "13694:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17271, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "13694:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17273, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "13694:24:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17274, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "13850:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17275, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "13876:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13876:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13850:32:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17327, + "nodeType": "Block", + "src": "14044:527:28", + "statements": [ + { + "assignments": [ + 17293 + ], + "declarations": [ + { + "constant": false, + "id": 17293, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14059:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17292, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "14059:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17296, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17294, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "14082:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14082:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14059:45:28" + }, + { + "assignments": [ + 17298, + 17300 + ], + "declarations": [ + { + "constant": false, + "id": 17298, + "mutability": "mutable", + "name": "primaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14120:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17297, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14120:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17300, + "mutability": "mutable", + "name": "secondaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14149:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17299, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14149:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17304, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17302, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17293, + "src": "14206:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + ], + "id": 17301, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "14182:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 17303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14182:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14119:92:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17305, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "14232:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17306, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "14248:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "14232:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17325, + "nodeType": "Block", + "src": "14424:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17317, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14443:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17318, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17300, + "src": "14463:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14443:42:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17320, + "nodeType": "ExpressionStatement", + "src": "14443:42:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17321, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14504:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17322, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17298, + "src": "14524:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14504:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17324, + "nodeType": "ExpressionStatement", + "src": "14504:40:28" + } + ] + }, + "id": 17326, + "nodeType": "IfStatement", + "src": "14228:332:28", + "trueBody": { + "id": 17316, + "nodeType": "Block", + "src": "14269:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17308, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14288:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17309, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17298, + "src": "14308:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14288:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17311, + "nodeType": "ExpressionStatement", + "src": "14288:40:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17312, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14347:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17313, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17300, + "src": "14367:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14347:42:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17315, + "nodeType": "ExpressionStatement", + "src": "14347:42:28" + } + ] + } + } + ] + }, + "id": 17328, + "nodeType": "IfStatement", + "src": "13846:725:28", + "trueBody": { + "id": 17291, + "nodeType": "Block", + "src": "13884:145:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17278, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "13899:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17279, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13919:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17281, + "indexExpression": { + "argumentTypes": null, + "id": 17280, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13928:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13919:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "13919:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13899:49:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17284, + "nodeType": "ExpressionStatement", + "src": "13899:49:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17285, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "13963:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 17288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17286, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "13983:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17287, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14000:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13983:34:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13963:54:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17290, + "nodeType": "ExpressionStatement", + "src": "13963:54:28" + } + ] + } + }, + { + "assignments": [ + 17330, + null, + 17332 + ], + "declarations": [ + { + "constant": false, + "id": 17330, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "14678:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17329, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14678:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + null, + { + "constant": false, + "id": 17332, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "14702:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14702:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17340, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17334, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "14737:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17335, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "14751:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17336, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14765:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17337, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14784:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17338, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17245, + "src": "14803:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17333, + "name": "targetAmountAndFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18083, + "src": "14717:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32,uint256) view returns (uint256,uint256,uint256)" + } + }, + "id": 17339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14717:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14677:134:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17341, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17330, + "src": "14830:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17342, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17332, + "src": "14844:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17343, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14829:19:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17260, + "id": 17344, + "nodeType": "Return", + "src": "14822:26:28" + } + ] + }, + "documentation": { + "id": 17239, + "nodeType": "StructuredDocumentation", + "src": "12844:421:28", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fee\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 17346, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17249, + "modifierName": { + "argumentTypes": null, + "id": 17248, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "13425:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13425:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17251, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13454:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17252, + "modifierName": { + "argumentTypes": null, + "id": 17250, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "13441:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13441:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17254, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "13490:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17255, + "modifierName": { + "argumentTypes": null, + "id": 17253, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "13477:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13477:26:28" + } + ], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17247, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13407:8:28" + }, + "parameters": { + "id": 17246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17241, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13299:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "13299:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17243, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13325:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17242, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "13325:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17245, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13351:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13351:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13298:69:28" + }, + "returnParameters": { + "id": 17260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17257, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13522:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13522:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17259, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13531:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17258, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13531:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13521:18:28" + }, + "scope": 18367, + "src": "13271:1585:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 17536, + "nodeType": "Block", + "src": "15730:2450:28", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17371, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "15806:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17372, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "15831:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15831:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15806:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17389, + "nodeType": "IfStatement", + "src": "15802:173:28", + "trueBody": { + "id": 17388, + "nodeType": "Block", + "src": "15839:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17375, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "15854:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17376, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "15879:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15879:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15854:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17379, + "nodeType": "ExpressionStatement", + "src": "15854:31:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17380, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "15900:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17381, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "15915:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15915:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "15900:37:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 17384, + "nodeType": "ExpressionStatement", + "src": "15900:37:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17385, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "15952:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15952:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17387, + "nodeType": "ExpressionStatement", + "src": "15952:11:28" + } + ] + } + }, + { + "assignments": [ + 17391 + ], + "declarations": [ + { + "constant": false, + "id": 17391, + "mutability": "mutable", + "name": "sourceTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "15987:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17390, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15987:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17396, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17392, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16014:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17394, + "indexExpression": { + "argumentTypes": null, + "id": 17393, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16023:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16014:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17395, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16014:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15987:56:28" + }, + { + "assignments": [ + 17398 + ], + "declarations": [ + { + "constant": false, + "id": 17398, + "mutability": "mutable", + "name": "targetTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16054:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17397, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "16054:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17402, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 17401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17399, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "16081:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17400, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "16098:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "16081:34:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16054:61:28" + }, + { + "assignments": [ + 17404, + 17406, + 17408 + ], + "declarations": [ + { + "constant": false, + "id": 17404, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16177:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16177:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17406, + "mutability": "mutable", + "name": "standardFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16193:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16193:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17408, + "mutability": "mutable", + "name": "totalFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16214:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17407, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16214:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17416, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17410, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16254:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17411, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16268:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17412, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "16282:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17413, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17398, + "src": "16301:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17414, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16320:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17409, + "name": "targetAmountAndFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18083, + "src": "16234:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32,uint256) view returns (uint256,uint256,uint256)" + } + }, + "id": 17415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16176:152:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17418, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "16409:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16419:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16409:11:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 17421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16422:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 17417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16401:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16401:46:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17423, + "nodeType": "ExpressionStatement", + "src": "16401:46:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17424, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16527:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17425, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "16543:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "16527:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17436, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16670:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16670:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16683:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16670:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17449, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16745:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17448, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "16730:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16730:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17444, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "16719:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 17443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16711:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16711:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16711:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 17440, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16688:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 17441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21422, + "src": "16688:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 17446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16688:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "16688:41:28", + "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": 17451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16688:71:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17452, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16763:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16688:82:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16670:100:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 17455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16772:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 17435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16662:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16662:131:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17457, + "nodeType": "ExpressionStatement", + "src": "16662:131:28" + }, + "id": 17458, + "nodeType": "IfStatement", + "src": "16523:270:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16585:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16585:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17430, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16598:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16585:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 17432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16607:25:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 17427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16577:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16577:56:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17434, + "nodeType": "ExpressionStatement", + "src": "16577:56:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17460, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16863:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17459, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "16844:18:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 17461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16844:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17462, + "nodeType": "ExpressionStatement", + "src": "16844:32:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17463, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16887:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17465, + "indexExpression": { + "argumentTypes": null, + "id": 17464, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16896:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16887:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17466, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "16887:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17471, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "16953:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17468, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16935:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17467, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "16920:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16920:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "16920:32:28", + "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": 17472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16920:40:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16887:73:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17474, + "nodeType": "ExpressionStatement", + "src": "16887:73:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17475, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "17031:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17477, + "indexExpression": { + "argumentTypes": null, + "id": 17476, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17046:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17031:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17482, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17406, + "src": "17095:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17478, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "17062:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17480, + "indexExpression": { + "argumentTypes": null, + "id": 17479, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17077:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17062:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "17062:32:28", + "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": 17483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17062:45:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17031:76:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17485, + "nodeType": "ExpressionStatement", + "src": "17031:76:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17486, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17194:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17487, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "17210:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "17194:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17502, + "nodeType": "Block", + "src": "17302:75:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17497, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17330:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17498, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17357, + "src": "17344:12:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17499, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17358:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17496, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "17317:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 17500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17317:48:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17501, + "nodeType": "ExpressionStatement", + "src": "17317:48:28" + } + ] + }, + "id": 17503, + "nodeType": "IfStatement", + "src": "17190:187:28", + "trueBody": { + "id": 17495, + "nodeType": "Block", + "src": "17231:56:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17492, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17268:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17489, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17357, + "src": "17246:12:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 17491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17246:21:28", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 17493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17246:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17494, + "nodeType": "ExpressionStatement", + "src": "17246:29:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17505, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "17455:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17506, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17469:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17507, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17355, + "src": "17483:7:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 17508, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "17492:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17509, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17501:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17510, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17408, + "src": "17509:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17504, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "17431:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 17511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17431:87:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17512, + "nodeType": "ExpressionStatement", + "src": "17431:87:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17514, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "17619:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17515, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17633:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17516, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "17647:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17517, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17398, + "src": "17666:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 17513, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "17590:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17590:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17519, + "nodeType": "ExpressionStatement", + "src": "17590:94:28" + }, + { + "assignments": [ + 17521 + ], + "declarations": [ + { + "constant": false, + "id": 17521, + "mutability": "mutable", + "name": "targetPoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "17929:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17520, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "17929:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17525, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17522, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "17959:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17524, + "indexExpression": { + "argumentTypes": null, + "id": 17523, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17980:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17959:34:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17929:64:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17527, + "name": "targetPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17521, + "src": "18037:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17528, + "name": "targetPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17521, + "src": "18054:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "18054:27:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18054:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17531, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "18085:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17526, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "18004:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18004:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17533, + "nodeType": "ExpressionStatement", + "src": "18004:94:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17534, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "18166:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17370, + "id": 17535, + "nodeType": "Return", + "src": "18159:13:28" + } + ] + }, + "documentation": { + "id": 17347, + "nodeType": "StructuredDocumentation", + "src": "14864:569:28", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 17537, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17361, + "modifierName": { + "argumentTypes": null, + "id": 17360, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "15619:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15619:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17363, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "15648:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17364, + "modifierName": { + "argumentTypes": null, + "id": 17362, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "15635:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15635:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17366, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "15684:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17367, + "modifierName": { + "argumentTypes": null, + "id": 17365, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "15671:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15671:26:28" + } + ], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15601:8:28" + }, + "parameters": { + "id": 17358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17349, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15458:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17348, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "15458:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17351, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15484:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17350, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "15484:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17353, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15510:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15510:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17355, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15527:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 17354, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15527:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17357, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15544:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 17356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15544:15:28", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15457:116:28" + }, + "returnParameters": { + "id": 17370, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17369, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15716:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17368, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15716:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15715:9:28" + }, + "scope": 18367, + "src": "15439:2741:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 17762, + "nodeType": "Block", + "src": "18867:3062:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17563, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "18988:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17564, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19005:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "18988:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17570, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19050:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19050:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19063:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19050:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 17574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "18988:76:28", + "trueExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17566, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19027:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19027:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17568, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "19040:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19027:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 17575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19066:25:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 17562, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18980:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18980:112:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17577, + "nodeType": "ExpressionStatement", + "src": "18980:112:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17578, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "19156:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19156:21:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17580, + "nodeType": "ExpressionStatement", + "src": "19156:21:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17581, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19300:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17582, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19317:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "19300:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17599, + "nodeType": "IfStatement", + "src": "19296:161:28", + "trueBody": { + "id": 17598, + "nodeType": "Block", + "src": "19338:119:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17584, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19353:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17586, + "indexExpression": { + "argumentTypes": null, + "id": 17585, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19362:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19353:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17587, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19353:37:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17593, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19435:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19435:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17588, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19393:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17590, + "indexExpression": { + "argumentTypes": null, + "id": 17589, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19402:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19393:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19393:37:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "19393:41:28", + "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": 17595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19393:52:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19353:92:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17597, + "nodeType": "ExpressionStatement", + "src": "19353:92:28" + } + ] + } + }, + { + "assignments": [ + 17601 + ], + "declarations": [ + { + "constant": false, + "id": 17601, + "mutability": "mutable", + "name": "initialStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "19546:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19546:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17605, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17602, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "19577:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17604, + "indexExpression": { + "argumentTypes": null, + "id": 17603, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19592:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19577:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19546:60:28" + }, + { + "condition": { + "argumentTypes": null, + "id": 17606, + "name": "maxStakedBalanceEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16692, + "src": "19720:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17626, + "nodeType": "IfStatement", + "src": "19716:209:28", + "trueBody": { + "id": 17625, + "nodeType": "Block", + "src": "19745:180:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17608, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "19768:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17610, + "indexExpression": { + "argumentTypes": null, + "id": 17609, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19786:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19768:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19804:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19768:37:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17615, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "19834:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17613, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "19809:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "19809:24:28", + "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": 17616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19809:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17617, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "19846:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17619, + "indexExpression": { + "argumentTypes": null, + "id": 17618, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19864:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19846:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19809:69:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19768:110:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f5354414b45445f42414c414e43455f52454143484544", + "id": 17622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19880:32:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e71abaa0836b516acb5bcc1418977bbb31101745086dfce64d3b60d38c4171f5", + "typeString": "literal_string \"ERR_MAX_STAKED_BALANCE_REACHED\"" + }, + "value": "ERR_MAX_STAKED_BALANCE_REACHED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e71abaa0836b516acb5bcc1418977bbb31101745086dfce64d3b60d38c4171f5", + "typeString": "literal_string \"ERR_MAX_STAKED_BALANCE_REACHED\"" + } + ], + "id": 17607, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19760:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19760:153:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17624, + "nodeType": "ExpressionStatement", + "src": "19760:153:28" + } + ] + } + }, + { + "assignments": [ + 17628 + ], + "declarations": [ + { + "constant": false, + "id": 17628, + "mutability": "mutable", + "name": "reservePoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20011:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17627, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "20011:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17632, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17629, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "20042:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17631, + "indexExpression": { + "argumentTypes": null, + "id": 17630, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20063:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20042:35:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20011:66:28" + }, + { + "assignments": [ + 17634 + ], + "declarations": [ + { + "constant": false, + "id": 17634, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20088:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17633, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20088:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17638, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17635, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "20114:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "20114:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20114:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20088:56:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17639, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20239:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 17640, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "20256:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "20239:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17653, + "nodeType": "IfStatement", + "src": "20235:122:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17643, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20307:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17644, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20322:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20322:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20342:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 17647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20334:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20334:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20334:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17650, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20349:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17642, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "20290:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 17651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:67:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17652, + "nodeType": "ExpressionStatement", + "src": "20290:67:28" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 17665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17654, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20424:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17656, + "indexExpression": { + "argumentTypes": null, + "id": 17655, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20433:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20424:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17657, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20424:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17663, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20494:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17658, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20458:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17660, + "indexExpression": { + "argumentTypes": null, + "id": 17659, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20467:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20458:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17661, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20458:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "20458:35:28", + "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": 17664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20458:44:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20424:78:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17666, + "nodeType": "ExpressionStatement", + "src": "20424:78:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17667, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "20513:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17669, + "indexExpression": { + "argumentTypes": null, + "id": 17668, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20528:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20513:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17672, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20570:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17670, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "20545:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "20545:24:28", + "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": 17673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20545:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20513:65:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17675, + "nodeType": "ExpressionStatement", + "src": "20513:65:28" + }, + { + "assignments": [ + 17677 + ], + "declarations": [ + { + "constant": false, + "id": 17677, + "mutability": "mutable", + "name": "poolTokenAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20798:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20798:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17679, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 17678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20824:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20798:27:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17680, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "20840:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20864:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20840:25:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17683, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "20869:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20888:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20869:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20840:49:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 17699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17691, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "20958:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17697, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "21009:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17694, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "20988:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20976:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "20976:11:28", + "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": 17695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "20976:32:28", + "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": 17698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:54:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20958:72:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17700, + "nodeType": "ExpressionStatement", + "src": "20958:72:28" + }, + "id": 17701, + "nodeType": "IfStatement", + "src": "20836:194:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 17689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17687, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "20904:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17688, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20922:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20904:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17690, + "nodeType": "ExpressionStatement", + "src": "20904:25:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17703, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21049:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17704, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17544, + "src": "21068:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21049:29:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 17706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21080:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 17702, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21041:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21041:60:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17708, + "nodeType": "ExpressionStatement", + "src": "21041:60:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17716, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "21204:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17717, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21222:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21222:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17719, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21234:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17712, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "21190:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 17711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21182:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17710, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21182:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21182:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 17709, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "21161:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 17714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21161:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 17715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 18791, + "src": "21161:42:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ISmartToken_$21516_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ISmartToken,address,uint256) external" + } + }, + "id": 17720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21161:89:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17721, + "nodeType": "ExpressionStatement", + "src": "21161:89:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17722, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "21312:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21312:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17724, + "nodeType": "ExpressionStatement", + "src": "21312:11:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17726, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21404:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21404:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17728, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "21416:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17729, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "21431:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17732, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "21465:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17730, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "21440:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21440:24:28", + "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": 17733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21440:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17736, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21495:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17734, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "21475:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21475:19:28", + "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": 17737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21475:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17725, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "21389:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 17738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21389:123:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17739, + "nodeType": "EmitStatement", + "src": "21384:128:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17741, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "21622:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17744, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21660:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17742, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "21640:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21640:19:28", + "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": 17745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17746, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "21678:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17740, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "21589:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21589:103:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17748, + "nodeType": "ExpressionStatement", + "src": "21589:103:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17750, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21793:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17752, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21807:1:28", + "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": "21793:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17753, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21811:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17755, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21825:1:28", + "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": "21811:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21829:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21832:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 17749, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "21764:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21764:70:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17759, + "nodeType": "ExpressionStatement", + "src": "21764:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17760, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21906:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17561, + "id": 17761, + "nodeType": "Return", + "src": "21899:22:28" + } + ] + }, + "documentation": { + "id": 17538, + "nodeType": "StructuredDocumentation", + "src": "18188:379:28", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n @param _reserveToken address of the reserve token to add liquidity to\n @param _amount amount of liquidity to add\n @param _minReturn minimum return-amount of pool tokens\n @return amount of pool tokens minted" + }, + "functionSelector": "55776b77", + "id": 17763, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17547, + "modifierName": { + "argumentTypes": null, + "id": 17546, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "18701:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18701:9:28" + }, + { + "arguments": null, + "id": 17549, + "modifierName": { + "argumentTypes": null, + "id": 17548, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "18720:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18720:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17551, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "18749:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17552, + "modifierName": { + "argumentTypes": null, + "id": 17550, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "18736:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18736:27:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17554, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "18789:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17555, + "modifierName": { + "argumentTypes": null, + "id": 17553, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "18773:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18773:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17557, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17544, + "src": "18823:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17558, + "modifierName": { + "argumentTypes": null, + "id": 17556, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "18807:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18807:27:28" + } + ], + "name": "addLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17540, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18595:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17539, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "18595:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17542, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18622:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17541, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18622:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17544, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18639:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18639:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18594:64:28" + }, + "returnParameters": { + "id": 17561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17560, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18853:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17559, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18853:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18852:9:28" + }, + "scope": 18367, + "src": "18573:3356:28", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17915, + "nodeType": "Block", + "src": "22563:1948:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17788, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "22625:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22625:21:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17790, + "nodeType": "ExpressionStatement", + "src": "22625:21:28" + }, + { + "assignments": [ + 17792 + ], + "declarations": [ + { + "constant": false, + "id": 17792, + "mutability": "mutable", + "name": "initialPoolSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "22732:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22732:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17796, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17793, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22760:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "22760:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22760:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22732:52:28" + }, + { + "assignments": [ + 17798, + null + ], + "declarations": [ + { + "constant": false, + "id": 17798, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "22874:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17797, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22874:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 17803, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17800, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22929:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 17801, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "22941:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17799, + "name": "removeLiquidityReturnAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18008, + "src": "22901:27:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_ISmartToken_$21516_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract ISmartToken,uint256) view returns (uint256,uint256)" + } + }, + "id": 17802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22901:48:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22873:76:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17805, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "22968:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17806, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17770, + "src": "22985:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22968:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 17808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22997:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 17804, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22960:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22960:58:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17810, + "nodeType": "ExpressionStatement", + "src": "22960:58:28" + }, + { + "assignments": [ + 17812 + ], + "declarations": [ + { + "constant": false, + "id": 17812, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23096:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17811, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23096:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17816, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17813, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "23123:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17815, + "indexExpression": { + "argumentTypes": null, + "id": 17814, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "23144:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23123:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23096:59:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17824, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "23253:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17825, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23265:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23265:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17827, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "23277:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17820, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "23239:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 17819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23231:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17818, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23231:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23231:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 17817, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "23210:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 17822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23210:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 17823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 18800, + "src": "23210:42:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ISmartToken_$21516_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ISmartToken,address,uint256) external" + } + }, + "id": 17828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23210:75:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17829, + "nodeType": "ExpressionStatement", + "src": "23210:75:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17830, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "23352:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17832, + "indexExpression": { + "argumentTypes": null, + "id": 17831, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23361:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23352:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "23352:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17839, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23420:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17834, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "23385:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17836, + "indexExpression": { + "argumentTypes": null, + "id": 17835, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23394:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23385:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17837, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "23385:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23385:34:28", + "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": 17840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23385:49:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23352:82:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17842, + "nodeType": "ExpressionStatement", + "src": "23352:82:28" + }, + { + "assignments": [ + 17844 + ], + "declarations": [ + { + "constant": false, + "id": 17844, + "mutability": "mutable", + "name": "newStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23445:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23445:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17851, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17849, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23505:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17845, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "23472:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17847, + "indexExpression": { + "argumentTypes": null, + "id": 17846, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23487:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23472:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23472:32:28", + "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": 17850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23472:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23445:74:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17852, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "23530:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17854, + "indexExpression": { + "argumentTypes": null, + "id": 17853, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23545:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23530:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17855, + "name": "newStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17844, + "src": "23561:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23530:47:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17857, + "nodeType": "ExpressionStatement", + "src": "23530:47:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17858, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23648:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17859, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "23664:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "23648:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17870, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23774:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17871, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23788:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23788:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17873, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23800:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17869, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "23761:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 17874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23761:53:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17875, + "nodeType": "ExpressionStatement", + "src": "23761:53:28" + }, + "id": 17876, + "nodeType": "IfStatement", + "src": "23644:170:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17866, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23718:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23698:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23698:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 17865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23698:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 17867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23698:34:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17868, + "nodeType": "ExpressionStatement", + "src": "23698:34:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17877, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "23876:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23876:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17879, + "nodeType": "ExpressionStatement", + "src": "23876:11:28" + }, + { + "assignments": [ + 17881 + ], + "declarations": [ + { + "constant": false, + "id": 17881, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23900:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17880, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23900:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17886, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17884, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "23951:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17882, + "name": "initialPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17792, + "src": "23929:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23929:21:28", + "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": 17885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23929:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23900:59:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24044:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24044:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17890, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "24056:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17891, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "24070:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17892, + "name": "newStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17844, + "src": "24085:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17893, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17881, + "src": "24103:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17887, + "name": "LiquidityRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13041, + "src": "24027:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 17894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24027:95:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17895, + "nodeType": "EmitStatement", + "src": "24022:100:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17897, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "24232:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 17898, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17881, + "src": "24244:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17899, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "24264:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17896, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "24199:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24199:78:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17901, + "nodeType": "ExpressionStatement", + "src": "24199:78:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17903, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "24378:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17905, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24392:1:28", + "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": "24378:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17906, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "24396:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17908, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24410:1:28", + "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": "24396:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24414:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24417:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 17902, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "24349:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24349:70:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17912, + "nodeType": "ExpressionStatement", + "src": "24349:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17913, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "24490:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17787, + "id": 17914, + "nodeType": "Return", + "src": "24483:20:28" + } + ] + }, + "documentation": { + "id": 17764, + "nodeType": "StructuredDocumentation", + "src": "21937:344:28", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n @param _poolToken address of the pool token\n @param _amount amount of pool tokens to burn\n @param _minReturn minimum return-amount of reserve tokens\n @return amount of liquidity removed" + }, + "functionSelector": "e38192e3", + "id": 17916, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17773, + "modifierName": { + "argumentTypes": null, + "id": 17772, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "22398:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22398:9:28" + }, + { + "arguments": null, + "id": 17775, + "modifierName": { + "argumentTypes": null, + "id": 17774, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "22417:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22417:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17777, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22448:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + ], + "id": 17778, + "modifierName": { + "argumentTypes": null, + "id": 17776, + "name": "validPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16728, + "src": "22433:14:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_ISmartToken_$21516_$", + "typeString": "modifier (contract ISmartToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22433:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17780, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "22485:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17781, + "modifierName": { + "argumentTypes": null, + "id": 17779, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "22469:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22469:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17783, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17770, + "src": "22519:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17784, + "modifierName": { + "argumentTypes": null, + "id": 17782, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "22503:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22503:27:28" + } + ], + "name": "removeLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17766, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22312:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17765, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "22312:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17768, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22336:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17767, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22336:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17770, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22353:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17769, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22353:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22311:61:28" + }, + "returnParameters": { + "id": 17787, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17786, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22549:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22549:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22548:9:28" + }, + "scope": 18367, + "src": "22287:2224:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18007, + "nodeType": "Block", + "src": "25040:683:28", + "statements": [ + { + "assignments": [ + 17929 + ], + "declarations": [ + { + "constant": false, + "id": 17929, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18007, + "src": "25051:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25051:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17933, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17930, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17919, + "src": "25073:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "25073:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25073:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25051:46:28" + }, + { + "assignments": [ + 17935 + ], + "declarations": [ + { + "constant": false, + "id": 17935, + "mutability": "mutable", + "name": "stakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18007, + "src": "25108:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17934, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25108:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17941, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17936, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "25132:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17940, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17937, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "25147:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17939, + "indexExpression": { + "argumentTypes": null, + "id": 17938, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17919, + "src": "25168:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25147:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25132:48:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25108:72:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17942, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17921, + "src": "25197:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 17943, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17929, + "src": "25207:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25197:21:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18002, + "nodeType": "IfStatement", + "src": "25193:487:28", + "trueBody": { + "id": 18001, + "nodeType": "Block", + "src": "25220:460:28", + "statements": [ + { + "assignments": [ + 17946 + ], + "declarations": [ + { + "constant": false, + "id": 17946, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25235:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17945, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25235:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17953, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17951, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "25287:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17947, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "25247:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17949, + "indexExpression": { + "argumentTypes": null, + "id": 17948, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "25262:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25247:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25247:39:28", + "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": 17952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25247:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25235:73:28" + }, + { + "assignments": [ + 17955 + ], + "declarations": [ + { + "constant": false, + "id": 17955, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25323:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17954, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25323:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17959, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17957, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "25352:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17956, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "25335:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25335:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25323:49:28" + }, + { + "assignments": [ + 17961, + 17963 + ], + "declarations": [ + { + "constant": false, + "id": 17961, + "mutability": "mutable", + "name": "min", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25388:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17960, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25388:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17963, + "mutability": "mutable", + "name": "max", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25401:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25401:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17974, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17964, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25416:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 17965, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25420:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25416:5:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17970, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25434:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17971, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25437:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17972, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25433:6:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "id": 17973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "25416:23:28", + "trueExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17967, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25425:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17968, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25428:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17969, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25424:6:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25387:52:28" + }, + { + "assignments": [ + 17976 + ], + "declarations": [ + { + "constant": false, + "id": 17976, + "mutability": "mutable", + "name": "amountBeforeFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25454:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17975, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25454:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17984, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17982, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17929, + "src": "25511:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17979, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17935, + "src": "25492:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17977, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17921, + "src": "25480:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25480:11:28", + "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": 17980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25480:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "25480:30:28", + "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": 17983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25480:43:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25454:69:28" + }, + { + "assignments": [ + 17986 + ], + "declarations": [ + { + "constant": false, + "id": 17986, + "mutability": "mutable", + "name": "amountAfterFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25538:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25538:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17994, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17992, + "name": "max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17963, + "src": "25592:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17989, + "name": "min", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17961, + "src": "25583:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17987, + "name": "amountBeforeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17976, + "src": "25563:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25563:19:28", + "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": 17990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25563:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "25563:28:28", + "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": 17993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25563:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25538:58:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17995, + "name": "amountAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17986, + "src": "25619:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17996, + "name": "amountBeforeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17976, + "src": "25635:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17997, + "name": "amountAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17986, + "src": "25653:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25635:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17999, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25618:50:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17927, + "id": 18000, + "nodeType": "Return", + "src": "25611:57:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18003, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17935, + "src": "25698:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 18004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25713:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 18005, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25697:18:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 17927, + "id": 18006, + "nodeType": "Return", + "src": "25690:25:28" + } + ] + }, + "documentation": { + "id": 17917, + "nodeType": "StructuredDocumentation", + "src": "24519:398:28", + "text": " @dev calculates the amount of reserve tokens entitled for a given amount of pool tokens\n note that a fee is applied according to the equilibrium level of the primary reserve token\n @param _poolToken address of the pool token\n @param _amount amount of pool tokens\n @return amount after fee and fee, in reserve token units" + }, + "functionSelector": "69067d95", + "id": 18008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReturnAndFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17919, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "24960:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17918, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "24960:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17921, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "24984:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17920, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24984:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24959:41:28" + }, + "returnParameters": { + "id": 17927, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17924, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "25022:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25022:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17926, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "25031:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25031:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25021:18:28" + }, + "scope": 18367, + "src": "24923:800:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18082, + "nodeType": "Block", + "src": "26726:820:28", + "statements": [ + { + "assignments": [ + 18029 + ], + "declarations": [ + { + "constant": false, + "id": 18029, + "mutability": "mutable", + "name": "sourceBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26783:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18028, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26783:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18033, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18031, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18011, + "src": "26824:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18030, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "26807:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26807:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26783:54:28" + }, + { + "assignments": [ + 18035 + ], + "declarations": [ + { + "constant": false, + "id": 18035, + "mutability": "mutable", + "name": "targetBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26848:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26848:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18039, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18037, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18013, + "src": "26889:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18036, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "26872:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26872:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26848:54:28" + }, + { + "assignments": [ + 18041 + ], + "declarations": [ + { + "constant": false, + "id": 18041, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26949:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26949:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18054, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18048, + "name": "sourceBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18029, + "src": "27053:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18049, + "name": "_sourceWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18015, + "src": "27081:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18050, + "name": "targetBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18035, + "src": "27109:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18051, + "name": "_targetWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18017, + "src": "27137:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18052, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18019, + "src": "27165:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18044, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "26997:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 18043, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "26987:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 18045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26987:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18042, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "26972:14:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 18046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26972:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 18047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "crossReserveTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13120, + "src": "26972:66:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 18053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26972:211:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26949:234:28" + }, + { + "assignments": [ + 18056 + ], + "declarations": [ + { + "constant": false, + "id": 18056, + "mutability": "mutable", + "name": "standardFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "27196:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27196:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18060, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18058, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27231:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18057, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "27218:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 18059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27218:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27196:48:28" + }, + { + "assignments": [ + 18062 + ], + "declarations": [ + { + "constant": false, + "id": 18062, + "mutability": "mutable", + "name": "totalFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "27255:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27255:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18073, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18071, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18056, + "src": "27335:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18068, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "27315:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18065, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "27291:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18063, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27274:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "27274:16:28", + "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": 18066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "27274:40:28", + "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": 18069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:56:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "27274:60:28", + "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": 18072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:73:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27255:92:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18076, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18062, + "src": "27505:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18074, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27488:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "27488:16:28", + "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": 18077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27488:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18078, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18056, + "src": "27516:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18079, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18062, + "src": "27529:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18080, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27487:51:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 18027, + "id": 18081, + "nodeType": "Return", + "src": "27480:58:28" + } + ] + }, + "documentation": { + "id": 18009, + "nodeType": "StructuredDocumentation", + "src": "25731:720:28", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fees\n this version of the function expects the reserve weights as an input (gas optimization)\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _sourceWeight source reserve token weight\n @param _targetWeight target reserve token weight\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected standard conversion fee\n @return expected total conversion fee" + }, + "id": 18083, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFees", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18020, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18011, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26496:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18010, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "26496:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18013, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26531:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18012, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "26531:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18015, + "mutability": "mutable", + "name": "_sourceWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26566:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18014, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "26566:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18017, + "mutability": "mutable", + "name": "_targetWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26597:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18016, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "26597:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18019, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26628:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18018, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26628:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26485:159:28" + }, + "returnParameters": { + "id": 18027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18022, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26694:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26694:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18024, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26703:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26703:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18026, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26712:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18025, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26712:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26693:27:28" + }, + "scope": 18367, + "src": "26457:1089:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18163, + "nodeType": "Block", + "src": "27831:778:28", + "statements": [ + { + "assignments": [ + 18088 + ], + "declarations": [ + { + "constant": false, + "id": 18088, + "mutability": "mutable", + "name": "container", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27842:30:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 18087, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "27842:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18095, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18092, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "27904:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 18091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27896:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 18090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27896:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27896:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18089, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "27875:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 18094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27875:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27842:70:28" + }, + { + "assignments": [ + 18099 + ], + "declarations": [ + { + "constant": false, + "id": 18099, + "mutability": "mutable", + "name": "poolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27923:31:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18097, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "27923:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18098, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27923:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18103, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 18100, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18088, + "src": "27957:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "poolTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 18777, + "src": "27957:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr_$", + "typeString": "function () view external returns (contract ISmartToken[] memory)" + } + }, + "id": 18102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27957:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27923:56:28" + }, + { + "assignments": [ + 18105 + ], + "declarations": [ + { + "constant": false, + "id": 18105, + "mutability": "mutable", + "name": "initialSetup", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27990:17:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 18104, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "27990:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18110, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18106, + "name": "poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18099, + "src": "28010:10:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "id": 18107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28010:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28031:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28010:22:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27990:42:28" + }, + { + "assignments": [ + 18112 + ], + "declarations": [ + { + "constant": false, + "id": 18112, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "28045:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28045:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18115, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18113, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28068:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28068:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28045:43:28" + }, + { + "body": { + "id": 18161, + "nodeType": "Block", + "src": "28142:460:28", + "statements": [ + { + "assignments": [ + 18127 + ], + "declarations": [ + { + "constant": false, + "id": 18127, + "mutability": "mutable", + "name": "reservePoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18161, + "src": "28157:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18126, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "28157:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18128, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28157:28:28" + }, + { + "condition": { + "argumentTypes": null, + "id": 18129, + "name": "initialSetup", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18105, + "src": "28204:12:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 18143, + "nodeType": "Block", + "src": "28314:67:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18137, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28333:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18138, + "name": "poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18099, + "src": "28352:10:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "id": 18140, + "indexExpression": { + "argumentTypes": null, + "id": 18139, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28363:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28352:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28333:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18142, + "nodeType": "ExpressionStatement", + "src": "28333:32:28" + } + ] + }, + "id": 18144, + "nodeType": "IfStatement", + "src": "28200:181:28", + "trueBody": { + "id": 18136, + "nodeType": "Block", + "src": "28218:77:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18130, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28237:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 18131, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18088, + "src": "28256:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 18782, + "src": "28256:21:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_contract$_ISmartToken_$21516_$", + "typeString": "function () external returns (contract ISmartToken)" + } + }, + "id": 18133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28256:23:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28237:42:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18135, + "nodeType": "ExpressionStatement", + "src": "28237:42:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 18151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18145, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "28461:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 18149, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18146, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28482:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18148, + "indexExpression": { + "argumentTypes": null, + "id": 18147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28496:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28482:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28461:38:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18150, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28502:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28461:57:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18152, + "nodeType": "ExpressionStatement", + "src": "28461:57:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 18159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18153, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "28533:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 18155, + "indexExpression": { + "argumentTypes": null, + "id": 18154, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28554:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28533:38:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18156, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28574:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18158, + "indexExpression": { + "argumentTypes": null, + "id": 18157, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28588:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28574:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "28533:57:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 18160, + "nodeType": "ExpressionStatement", + "src": "28533:57:28" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18120, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28119:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 18121, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18112, + "src": "28123:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28119:16:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 18162, + "initializationExpression": { + "assignments": [ + 18117 + ], + "declarations": [ + { + "constant": false, + "id": 18117, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18162, + "src": "28104:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28104:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18119, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 18118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28116:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28104:13:28" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 18124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28137:3:28", + "subExpression": { + "argumentTypes": null, + "id": 18123, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28137:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18125, + "nodeType": "ExpressionStatement", + "src": "28137:3:28" + }, + "nodeType": "ForStatement", + "src": "28099:503:28" + } + ] + }, + "documentation": { + "id": 18084, + "nodeType": "StructuredDocumentation", + "src": "27554:234:28", + "text": " @dev creates the converter's pool tokens\n note that technically pool tokens can be created on deployment but gas limit\n might get too high for a block, so creating them on first activation" + }, + "id": 18164, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createPoolTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18085, + "nodeType": "ParameterList", + "parameters": [], + "src": "27819:2:28" + }, + "returnParameters": { + "id": 18086, + "nodeType": "ParameterList", + "parameters": [], + "src": "27831:0:28" + }, + "scope": 18367, + "src": "27794:815:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 18185, + "nodeType": "Block", + "src": "28808:192:28", + "statements": [ + { + "assignments": [ + 18171, + 18173 + ], + "declarations": [ + { + "constant": false, + "id": 18171, + "mutability": "mutable", + "name": "latestRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18185, + "src": "28820:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28820:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18173, + "mutability": "mutable", + "name": "latestRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18185, + "src": "28841:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28841:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18179, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18176, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "28887:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18177, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "28908:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 18174, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "28864:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "id": 18175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 23206, + "src": "28864:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (uint256,uint256)" + } + }, + "id": 18178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28864:66:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28819:111:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18181, + "name": "latestRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18171, + "src": "28962:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18182, + "name": "latestRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18173, + "src": "28978:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18180, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "28948:8:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 18183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "28948:44:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 18169, + "id": 18184, + "nodeType": "Return", + "src": "28941:51:28" + } + ] + }, + "documentation": { + "id": 18165, + "nodeType": "StructuredDocumentation", + "src": "28617:114:28", + "text": " @dev returns the effective rate between the two reserve tokens\n @return rate" + }, + "id": 18186, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_effectiveTokensRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18166, + "nodeType": "ParameterList", + "parameters": [], + "src": "28766:2:28" + }, + "returnParameters": { + "id": 18169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18168, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18186, + "src": "28791:15:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 18167, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "28791:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28790:17:28" + }, + "scope": 18367, + "src": "28737:263:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18204, + "nodeType": "Block", + "src": "29209:137:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18190, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29221:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18192, + "indexExpression": { + "argumentTypes": null, + "id": 18191, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "29230:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29221:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29221:36:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18194, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29259:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18196, + "indexExpression": { + "argumentTypes": null, + "id": 18195, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "29268:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29259:31:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29259:38:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 18198, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "29220:78:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18200, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "29325:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + ], + "id": 18199, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "29301:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 18201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29301:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "src": "29220:118:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18203, + "nodeType": "ExpressionStatement", + "src": "29220:118:28" + } + ] + }, + "documentation": { + "id": 18187, + "nodeType": "StructuredDocumentation", + "src": "29008:166:28", + "text": " @dev updates the pool's reserve weights with new values in order to push the current primary\n reserve token balance to its staked balance" + }, + "id": 18205, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rebalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18188, + "nodeType": "ParameterList", + "parameters": [], + "src": "29198:2:28" + }, + "returnParameters": { + "id": 18189, + "nodeType": "ParameterList", + "parameters": [], + "src": "29209:0:28" + }, + "scope": 18367, + "src": "29180:166:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18228, + "nodeType": "Block", + "src": "29700:122:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18222, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29782:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18224, + "indexExpression": { + "argumentTypes": null, + "id": 18223, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18208, + "src": "29791:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29782:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18225, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29782:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 18219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18217, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "29752:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29775:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "29752:24:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18213, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "29718:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18215, + "indexExpression": { + "argumentTypes": null, + "id": 18214, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18208, + "src": "29733:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29718:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "29718:33:28", + "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": 18220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29718:59:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "29718:63:28", + "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": 18226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29718:96:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18212, + "id": 18227, + "nodeType": "Return", + "src": "29711:103:28" + } + ] + }, + "documentation": { + "id": 18206, + "nodeType": "StructuredDocumentation", + "src": "29354:255:28", + "text": " @dev returns the amplified balance of a given reserve token\n this version skips the input validation (gas optimization)\n @param _reserveToken reserve token address\n @return amplified balance" + }, + "id": 18229, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "amplifiedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18208, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18229, + "src": "29641:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18207, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "29641:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29640:27:28" + }, + "returnParameters": { + "id": 18212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18211, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18229, + "src": "29691:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29691:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29690:9:28" + }, + "scope": 18367, + "src": "29615:207:28", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 18275, + "nodeType": "Block", + "src": "30220:609:28", + "statements": [ + { + "assignments": [ + 18240 + ], + "declarations": [ + { + "constant": false, + "id": 18240, + "mutability": "mutable", + "name": "primaryStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30282:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30282:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18244, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18241, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "30313:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18243, + "indexExpression": { + "argumentTypes": null, + "id": 18242, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "30328:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30313:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30282:66:28" + }, + { + "assignments": [ + 18246 + ], + "declarations": [ + { + "constant": false, + "id": 18246, + "mutability": "mutable", + "name": "primaryBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30407:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30407:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18248, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "30449:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18247, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "30432:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30432:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30407:62:28" + }, + { + "assignments": [ + 18252 + ], + "declarations": [ + { + "constant": false, + "id": 18252, + "mutability": "mutable", + "name": "secondaryBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30480:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30480:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18256, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18254, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "30524:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18253, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "30507:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30507:39:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30480:66:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18265, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "30695:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18263, + "name": "primaryStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18240, + "src": "30670:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30670:24:28", + "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": 18266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30670:46:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18267, + "name": "primaryBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18246, + "src": "30731:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18268, + "name": "secondaryBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18252, + "src": "30760:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18269, + "name": "_rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18232, + "src": "30791:5:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 18270, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "30791:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18271, + "name": "_rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18232, + "src": "30813:5:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 18272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "30813:7:28", + "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" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18259, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "30623:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 18258, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "30613:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 18260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30613:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18257, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "30598:14:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 18261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30598:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 18262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balancedWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 13176, + "src": "30598:57:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) view external returns (uint32,uint32)" + } + }, + "id": 18273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30598:223:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18238, + "id": 18274, + "nodeType": "Return", + "src": "30591:230:28" + } + ] + }, + "documentation": { + "id": 18230, + "nodeType": "StructuredDocumentation", + "src": "29830:290:28", + "text": " @dev returns the effective reserve weights based on the staked balance, current balance and oracle price\n @param _rate rate between the reserve tokens\n @return new primary reserve weight\n @return new secondary reserve weight" + }, + "id": 18276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveReserveWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18232, + "mutability": "mutable", + "name": "_rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30159:21:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 18231, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "30159:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30158:23:28" + }, + "returnParameters": { + "id": 18238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18235, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30204:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18234, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "30204:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18237, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30212:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18236, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "30212:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30203:16:28" + }, + "scope": 18367, + "src": "30126:703:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18336, + "nodeType": "Block", + "src": "31393:577:28", + "statements": [ + { + "assignments": [ + 18289 + ], + "declarations": [ + { + "constant": false, + "id": 18289, + "mutability": "mutable", + "name": "token1Balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18336, + "src": "31443:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18288, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31443:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18293, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18291, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31484:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18290, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "31467:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31467:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31443:49:28" + }, + { + "assignments": [ + 18295 + ], + "declarations": [ + { + "constant": false, + "id": 18295, + "mutability": "mutable", + "name": "token2Balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18336, + "src": "31503:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31503:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18299, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18297, + "name": "_token2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18281, + "src": "31544:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18296, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "31527:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31527:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31503:49:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18300, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31608:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31608:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18311, + "nodeType": "IfStatement", + "src": "31604:91:28", + "trueBody": { + "id": 18310, + "nodeType": "Block", + "src": "31628:67:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18303, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31643:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18304, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "31659:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18306, + "indexExpression": { + "argumentTypes": null, + "id": 18305, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31668:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31659:17:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18307, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "31659:24:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31643:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 18309, + "nodeType": "ExpressionStatement", + "src": "31643:40:28" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18312, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31751:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31768:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31751:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18322, + "nodeType": "IfStatement", + "src": "31747:97:28", + "trueBody": { + "id": 18321, + "nodeType": "Block", + "src": "31771:73:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18315, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31786:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18316, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "31802:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 18317, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31819:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31802:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31786:46:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 18320, + "nodeType": "ExpressionStatement", + "src": "31786:46:28" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18324, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31877:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18325, + "name": "_token2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18281, + "src": "31886:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18328, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31913:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18326, + "name": "token2Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18295, + "src": "31895:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "31895:17:28", + "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": 18329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31895:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18332, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31947:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18330, + "name": "token1Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18289, + "src": "31929:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "31929:17:28", + "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": 18333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31929:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18323, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "31861:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 18334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31861:101:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18335, + "nodeType": "EmitStatement", + "src": "31856:106:28" + } + ] + }, + "documentation": { + "id": 18277, + "nodeType": "StructuredDocumentation", + "src": "30837:418:28", + "text": " @dev dispatches token rate update event for the reserve tokens\n @param _token1 contract address of the token to calculate the rate of one unit of\n @param _token2 contract address of the token to calculate the rate of one `_token1` unit in\n @param _token1Weight reserve weight of token1\n @param _token2Weight reserve weight of token2" + }, + "id": 18337, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18279, + "mutability": "mutable", + "name": "_token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31299:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18278, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "31299:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18281, + "mutability": "mutable", + "name": "_token2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31320:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18280, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "31320:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18283, + "mutability": "mutable", + "name": "_token1Weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31341:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18282, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "31341:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18285, + "mutability": "mutable", + "name": "_token2Weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31363:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18284, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "31363:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31298:86:28" + }, + "returnParameters": { + "id": 18287, + "nodeType": "ParameterList", + "parameters": [], + "src": "31393:0:28" + }, + "scope": 18367, + "src": "31261:709:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18356, + "nodeType": "Block", + "src": "32385:115:28", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18348, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18340, + "src": "32417:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 18349, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18344, + "src": "32429:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18350, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "32444:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18352, + "indexExpression": { + "argumentTypes": null, + "id": 18351, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18344, + "src": "32459:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32444:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18353, + "name": "_poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18342, + "src": "32475:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18347, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "32401:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 18354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32401:91:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18355, + "nodeType": "EmitStatement", + "src": "32396:96:28" + } + ] + }, + "documentation": { + "id": 18338, + "nodeType": "StructuredDocumentation", + "src": "31978:274:28", + "text": " @dev dispatches token rate update event for one of the pool tokens\n @param _poolToken address of the pool token\n @param _poolTokenSupply total pool token supply\n @param _reserveToken address of the reserve token" + }, + "id": 18357, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18345, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18340, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32300:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18339, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "32300:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18342, + "mutability": "mutable", + "name": "_poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32324:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32324:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18344, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32350:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18343, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32350:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32299:77:28" + }, + "returnParameters": { + "id": 18346, + "nodeType": "ParameterList", + "parameters": [], + "src": "32385:0:28" + }, + "scope": 18367, + "src": "32258:242:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18365, + "nodeType": "Block", + "src": "32620:29:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18363, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "32638:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18362, + "id": 18364, + "nodeType": "Return", + "src": "32631:10:28" + } + ] + }, + "documentation": { + "id": 18358, + "nodeType": "StructuredDocumentation", + "src": "32508:50:28", + "text": " @dev returns the current time" + }, + "id": 18366, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18359, + "nodeType": "ParameterList", + "parameters": [], + "src": "32577:2:28" + }, + "returnParameters": { + "id": 18362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18361, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18366, + "src": "32611:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32611:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32610:9:28" + }, + "scope": 18367, + "src": "32564:85:28", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 18368, + "src": "741:31911:28" + } + ], + "src": "52:32602:28" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "exportedSymbols": { + "LiquidityPoolV2Converter": [ + 18367 + ] + }, + "id": 18368, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 16651, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:28" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "file": "./PoolTokensContainer.sol", + "id": 16652, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 18725, + "src": "77:35:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol", + "file": "./LiquidityPoolV2ConverterCustomFactory.sol", + "id": 16653, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 18457, + "src": "114:53:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol", + "file": "../../LiquidityPoolConverter.sol", + "id": 16654, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 13078, + "src": "169:42:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol", + "file": "../../interfaces/IConverterFactory.sol", + "id": 16655, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 13390, + "src": "213:48:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "../../../utility/interfaces/IPriceOracle.sol", + "id": 16656, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 23226, + "src": "263:54:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol", + "file": "../../../utility/Types.sol", + "id": 16657, + "nodeType": "ImportDirective", + "scope": 18368, + "sourceUnit": 22917, + "src": "319:36:28", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 16659, + "name": "LiquidityPoolConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13077, + "src": "778:22:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolConverter_$13077", + "typeString": "contract LiquidityPoolConverter" + } + }, + "id": 16660, + "nodeType": "InheritanceSpecifier", + "src": "778:22:28" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": { + "id": 16658, + "nodeType": "StructuredDocumentation", + "src": "359:380:28", + "text": " @dev Liquidity Pool v2 Converter\n The liquidity pool v2 converter is a specialized version of a converter that uses\n price oracles to rebalance the reserve weights in such a way that the primary token\n balance always strives to match the staked balance.\n This type of liquidity pool always has 2 reserves and the reserve weights are dynamic." + }, + "fullyImplemented": true, + "id": 18367, + "linearizedBaseContracts": [ + 18367, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "LiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 16663, + "mutability": "constant", + "name": "AMPLIFICATION_FACTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "808:49:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 16661, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "808:5:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3230", + "id": 16662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "855:2:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "2630c12f", + "id": 16665, + "mutability": "mutable", + "name": "priceOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "931:31:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16664, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23225, + "src": "931:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0337e3fb", + "id": 16667, + "mutability": "mutable", + "name": "primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1029:38:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16666, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1029:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dc75eb9a", + "id": 16669, + "mutability": "mutable", + "name": "secondaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1133:40:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16668, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1133:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 16673, + "mutability": "mutable", + "name": "stakedBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1247:55:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "typeName": { + "id": 16672, + "keyType": { + "contractScope": null, + "id": 16670, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1256:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1247:32:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "valueType": { + "id": 16671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 16677, + "mutability": "mutable", + "name": "reservesToPoolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1377:65:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + }, + "typeName": { + "id": 16676, + "keyType": { + "contractScope": null, + "id": 16674, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1386:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1377:36:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + }, + "valueType": { + "contractScope": null, + "id": 16675, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "1401:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 16681, + "mutability": "mutable", + "name": "poolTokensToReserves", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1489:65:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + }, + "typeName": { + "id": 16680, + "keyType": { + "contractScope": null, + "id": 16678, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "1498:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Mapping", + "src": "1489:36:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + }, + "valueType": { + "contractScope": null, + "id": 16679, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1513:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "ab28b174", + "id": 16683, + "mutability": "mutable", + "name": "externalRate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1603:28:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 16682, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "1603:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "fd2d6c7c", + "id": 16685, + "mutability": "mutable", + "name": "externalRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1704:37:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16684, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1704:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "98a71dcb", + "id": 16689, + "mutability": "mutable", + "name": "maxStakedBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1874:57:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "typeName": { + "id": 16688, + "keyType": { + "contractScope": null, + "id": 16686, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "1883:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1874:32:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + }, + "valueType": { + "id": 16687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "0a55fb3d", + "id": 16692, + "mutability": "mutable", + "name": "maxStakedBalanceEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1938:42:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 16690, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1938:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 16691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:4:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "34d084b9", + "id": 16695, + "mutability": "mutable", + "name": "oracleDeviationFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18367, + "src": "1989:40:28", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16693, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1989:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3130303030", + "id": 16694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2024:5:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000_by_1", + "typeString": "int_const 10000" + }, + "value": "10000" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 16696, + "nodeType": "StructuredDocumentation", + "src": "2082:226:28", + "text": " @dev triggered when the oracle deviation fee is updated\n @param _prevFee previous fee percentage, represented in ppm\n @param _newFee new fee percentage, represented in ppm" + }, + "id": 16702, + "name": "OracleDeviationFeeUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 16701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16698, + "indexed": false, + "mutability": "mutable", + "name": "_prevFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16702, + "src": "2345:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16697, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2345:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16700, + "indexed": false, + "mutability": "mutable", + "name": "_newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16702, + "src": "2362:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16699, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2362:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2344:33:28" + }, + "src": "2314:64:28" + }, + { + "body": { + "id": 16717, + "nodeType": "Block", + "src": "2938:8:28", + "statements": [] + }, + "documentation": { + "id": 16703, + "nodeType": "StructuredDocumentation", + "src": "2386:340:28", + "text": " @dev initializes a new LiquidityPoolV2Converter instance\n @param _poolTokensContainer pool tokens container governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm" + }, + "id": 16718, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 16712, + "name": "_poolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16705, + "src": "2881:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 16713, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16707, + "src": "2903:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 16714, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16709, + "src": "2914:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 16715, + "modifierName": { + "argumentTypes": null, + "id": 16711, + "name": "LiquidityPoolConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13077, + "src": "2858:22:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolConverter_$13077_$", + "typeString": "type(contract LiquidityPoolConverter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2858:74:28" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16710, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16705, + "mutability": "mutable", + "name": "_poolTokensContainer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2744:41:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 16704, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "2744:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16707, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2787:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 16706, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "2787:17:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16709, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16718, + "src": "2816:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16708, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "2816:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2743:98:28" + }, + "returnParameters": { + "id": 16716, + "nodeType": "ParameterList", + "parameters": [], + "src": "2938:0:28" + }, + "scope": 18367, + "src": "2732:214:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16727, + "nodeType": "Block", + "src": "3044:56:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16723, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16720, + "src": "3071:8:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + ], + "id": 16722, + "name": "_validPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16749, + "src": "3055:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_ISmartToken_$21516_$returns$__$", + "typeString": "function (contract ISmartToken) view" + } + }, + "id": 16724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3055:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16725, + "nodeType": "ExpressionStatement", + "src": "3055:25:28" + }, + { + "id": 16726, + "nodeType": "PlaceholderStatement", + "src": "3091:1:28" + } + ] + }, + "documentation": null, + "id": 16728, + "name": "validPoolToken", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 16721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16720, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16728, + "src": "3022:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 16719, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "3022:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3021:22:28" + }, + "src": "2998:102:28", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 16748, + "nodeType": "Block", + "src": "3216:107:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16736, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "3243:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 16738, + "indexExpression": { + "argumentTypes": null, + "id": 16737, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16730, + "src": "3264:8:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3243:30:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3235:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16734, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3235:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:39:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 16742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3286:1:28", + "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": 16741, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3278:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3278:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16743, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3278:10:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3235:53:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f504f4f4c5f544f4b454e", + "id": 16745, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3290:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_eed1b5de9a98cde04e371329406f26607f5671e3e7b23ea150ebcb6d35102f1f", + "typeString": "literal_string \"ERR_INVALID_POOL_TOKEN\"" + }, + "value": "ERR_INVALID_POOL_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_eed1b5de9a98cde04e371329406f26607f5671e3e7b23ea150ebcb6d35102f1f", + "typeString": "literal_string \"ERR_INVALID_POOL_TOKEN\"" + } + ], + "id": 16733, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3227:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3227:88:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16747, + "nodeType": "ExpressionStatement", + "src": "3227:88:28" + } + ] + }, + "documentation": null, + "id": 16749, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validPoolToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16731, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16730, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16749, + "src": "3180:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 16729, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "3180:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3179:22:28" + }, + "returnParameters": { + "id": 16732, + "nodeType": "ParameterList", + "parameters": [], + "src": "3216:0:28" + }, + "scope": 18367, + "src": "3155:168:28", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9242 + ], + "body": { + "id": 16758, + "nodeType": "Block", + "src": "3531:27:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 16756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3549:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 16755, + "id": 16757, + "nodeType": "Return", + "src": "3542:8:28" + } + ] + }, + "documentation": { + "id": 16750, + "nodeType": "StructuredDocumentation", + "src": "3331:131:28", + "text": " @dev returns the converter type\n @return see the converter types in the the main contract doc" + }, + "functionSelector": "3e8ff43f", + "id": 16759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16752, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3505:8:28" + }, + "parameters": { + "id": 16751, + "nodeType": "ParameterList", + "parameters": [], + "src": "3490:2:28" + }, + "returnParameters": { + "id": 16755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16754, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16759, + "src": "3523:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 16753, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "3523:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3522:8:28" + }, + "scope": 18367, + "src": "3468:90:28", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9362 + ], + "body": { + "id": 16780, + "nodeType": "Block", + "src": "3785:80:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 16766, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3803:5:28", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV2Converter_$18367", + "typeString": "contract super LiquidityPoolV2Converter" + } + }, + "id": 16767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isActive", + "nodeType": "MemberAccess", + "referencedDeclaration": 9362, + "src": "3803:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 16768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3803:16:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16771, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "3831:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + ], + "id": 16770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3823:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16769, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3823:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3823:20:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 16775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3855:1:28", + "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": 16774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3847:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3847:10:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3823:34:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3803:54:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 16765, + "id": 16779, + "nodeType": "Return", + "src": "3796:61:28" + } + ] + }, + "documentation": { + "id": 16760, + "nodeType": "StructuredDocumentation", + "src": "3566:157:28", + "text": " @dev returns true if the converter is active, false otherwise\n @return true if the converter is active, false otherwise" + }, + "functionSelector": "22f3e2d4", + "id": 16781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 16762, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3761:8:28" + }, + "parameters": { + "id": 16761, + "nodeType": "ParameterList", + "parameters": [], + "src": "3746:2:28" + }, + "returnParameters": { + "id": 16765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16764, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16781, + "src": "3779:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 16763, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3779:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3778:6:28" + }, + "scope": 18367, + "src": "3729:136:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 16981, + "nodeType": "Block", + "src": "4988:2187:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 16830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 16823, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "5045:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 16824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 23172, + "src": "5045:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 16825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5045:14:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16828, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5071:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 16827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5063:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16826, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5063:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5063:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5045:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414e43484f525f4e4f545f4f574e4544", + "id": 16831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5078:22:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_177ebf4a5417e29571b85651bfed4f759bbb0c457a65f31f55950233ecfaf584", + "typeString": "literal_string \"ERR_ANCHOR_NOT_OWNED\"" + }, + "value": "ERR_ANCHOR_NOT_OWNED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_177ebf4a5417e29571b85651bfed4f759bbb0c457a65f31f55950233ecfaf584", + "typeString": "literal_string \"ERR_ANCHOR_NOT_OWNED\"" + } + ], + "id": 16822, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5037:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5037:64:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16833, + "nodeType": "ExpressionStatement", + "src": "5037:64:28" + }, + { + "assignments": [ + 16835 + ], + "declarations": [ + { + "constant": false, + "id": 16835, + "mutability": "mutable", + "name": "oracleWhitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "5143:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + }, + "typeName": { + "contractScope": null, + "id": 16834, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23251, + "src": "5143:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16841, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16838, + "name": "CHAINLINK_ORACLE_WHITELIST", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21894, + "src": "5193:26:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16837, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "5183:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5183:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16836, + "name": "IWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 23251, + "src": "5172:10:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IWhitelist_$23251_$", + "typeString": "type(contract IWhitelist)" + } + }, + "id": 16840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5172:49:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5143:78:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16847, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "5278:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16846, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5270:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5270:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5270:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 16843, + "name": "oracleWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16835, + "src": "5240:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "id": 16844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 23250, + "src": "5240:29:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 16849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5240:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16854, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "5360:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5352:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5352:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5352:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 16850, + "name": "oracleWhitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16835, + "src": "5322:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$23251", + "typeString": "contract IWhitelist" + } + }, + "id": 16851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isWhitelisted", + "nodeType": "MemberAccess", + "referencedDeclaration": 23250, + "src": "5322:29:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 16856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5322:63:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5240:145:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4f5241434c45", + "id": 16858, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5387:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_838cc927fcaf7c7c6b40a2418c9d314e4eaed53a6395fa4bccbb5e6a4666df25", + "typeString": "literal_string \"ERR_INVALID_ORACLE\"" + }, + "value": "ERR_INVALID_ORACLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_838cc927fcaf7c7c6b40a2418c9d314e4eaed53a6395fa4bccbb5e6a4666df25", + "typeString": "literal_string \"ERR_INVALID_ORACLE\"" + } + ], + "id": 16842, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5232:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:176:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16860, + "nodeType": "ExpressionStatement", + "src": "5232:176:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16861, + "name": "createPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18164, + "src": "5496:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5496:18:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16863, + "nodeType": "ExpressionStatement", + "src": "5496:18:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16864, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "5583:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 16865, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "5605:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5583:42:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16867, + "nodeType": "ExpressionStatement", + "src": "5583:42:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 16872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16868, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "5640:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16869, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5664:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16871, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5678:1:28", + "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": "5664:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5640:40:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 16883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16879, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "5764:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16880, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5788:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16882, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5802:1:28", + "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": "5788:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5764:40:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16884, + "nodeType": "ExpressionStatement", + "src": "5764:40:28" + }, + "id": 16885, + "nodeType": "IfStatement", + "src": "5636:168:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 16877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16873, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "5695:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 16874, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "5719:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 16876, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 16875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5733:1:28", + "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": "5719:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "5695:40:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 16878, + "nodeType": "ExpressionStatement", + "src": "5695:40:28" + } + }, + { + "assignments": [ + 16887 + ], + "declarations": [ + { + "constant": false, + "id": 16887, + "mutability": "mutable", + "name": "customFactory", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "5892:51:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + }, + "typeName": { + "contractScope": null, + "id": 16886, + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18456, + "src": "5892:37:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16902, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16897, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 16759 + ], + "referencedDeclaration": 16759, + "src": "6069:13:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 16898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6069:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16893, + "name": "CONVERTER_FACTORY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21870, + "src": "6033:17:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 16892, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "6023:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 16894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6023:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16891, + "name": "IConverterFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13389, + "src": "6005:17:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverterFactory_$13389_$", + "typeString": "type(contract IConverterFactory)" + } + }, + "id": 16895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6005:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterFactory_$13389", + "typeString": "contract IConverterFactory" + } + }, + "id": 16896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "customFactories", + "nodeType": "MemberAccess", + "referencedDeclaration": 13388, + "src": "6005:63:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint16_$returns$_t_contract$_ITypedConverterCustomFactory_$13688_$", + "typeString": "function (uint16) view external returns (contract ITypedConverterCustomFactory)" + } + }, + "id": 16899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6005:80:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + ], + "id": 16890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5997:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5997:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5997:89:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 16888, + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18456, + "src": "5959:37:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456_$", + "typeString": "type(contract LiquidityPoolV2ConverterCustomFactory)" + } + }, + "id": 16901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5959:128:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5892:195:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16903, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "6098:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16906, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "6158:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16907, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "6193:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 16908, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "6229:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 16909, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "6265:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "expression": { + "argumentTypes": null, + "id": 16904, + "name": "customFactory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16887, + "src": "6112:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2ConverterCustomFactory_$18456", + "typeString": "contract LiquidityPoolV2ConverterCustomFactory" + } + }, + "id": 16905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPriceOracle", + "nodeType": "MemberAccess", + "referencedDeclaration": 18455, + "src": "6112:31:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_contract$_IChainlinkPriceOracle_$23155_$_t_contract$_IChainlinkPriceOracle_$23155_$returns$_t_contract$_IPriceOracle_$23225_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) external returns (contract IPriceOracle)" + } + }, + "id": 16910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6112:177:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "src": "6098:191:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "id": 16912, + "nodeType": "ExpressionStatement", + "src": "6098:191:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16913, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "6302:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16914, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "6317:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 16915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6317:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "6302:37:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 16917, + "nodeType": "ExpressionStatement", + "src": "6302:37:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 16921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 16918, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "6350:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16919, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "6375:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 16920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6375:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6350:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 16922, + "nodeType": "ExpressionStatement", + "src": "6350:31:28" + }, + { + "assignments": [ + 16924 + ], + "declarations": [ + { + "constant": false, + "id": 16924, + "mutability": "mutable", + "name": "primaryReserveStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6509:35:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6509:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16928, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16926, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "6568:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16925, + "name": "reserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17023, + "src": "6547:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6509:79:28" + }, + { + "assignments": [ + 16930 + ], + "declarations": [ + { + "constant": false, + "id": 16930, + "mutability": "mutable", + "name": "primaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6599:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6599:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16934, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16932, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "6646:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16931, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6631:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6631:35:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6599:67:28" + }, + { + "assignments": [ + 16936 + ], + "declarations": [ + { + "constant": false, + "id": 16936, + "mutability": "mutable", + "name": "secondaryReserveBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16981, + "src": "6677:31:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6677:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 16940, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16938, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "6726:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 16937, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "6711:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 16939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6711:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6677:71:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16941, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6765:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 16942, + "name": "primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16930, + "src": "6796:21:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6765:52:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16957, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6978:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16958, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7008:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6978:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16960, + "name": "primaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16930, + "src": "7013:21:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7037:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7013:25:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6978:60:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16964, + "name": "secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16936, + "src": "7042:23:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16965, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7068:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7042:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6978:91:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16972, + "nodeType": "IfStatement", + "src": "6974:135:28", + "trueBody": { + "id": 16971, + "nodeType": "Block", + "src": "7071:38:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16968, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "7086:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16970, + "nodeType": "ExpressionStatement", + "src": "7086:11:28" + } + ] + } + }, + "id": 16973, + "nodeType": "IfStatement", + "src": "6761:348:28", + "trueBody": { + "id": 16956, + "nodeType": "Block", + "src": "6819:140:28", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 16950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16944, + "name": "primaryReserveStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16924, + "src": "6838:27:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6868:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6838:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16947, + "name": "secondaryReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16936, + "src": "6873:23:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 16948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6899:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6873:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6838:62:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 16955, + "nodeType": "IfStatement", + "src": "6834:114:28", + "trueBody": { + "id": 16954, + "nodeType": "Block", + "src": "6902:46:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16951, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "6921:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 16952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6921:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16953, + "nodeType": "ExpressionStatement", + "src": "6921:11:28" + } + ] + } + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 16975, + "name": "converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 16759 + ], + "referencedDeclaration": 16759, + "src": "7137:13:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_uint16_$", + "typeString": "function () pure returns (uint16)" + } + }, + "id": 16976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7137:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 16977, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "7154:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 16978, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7162:4:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 16974, + "name": "Activation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9063, + "src": "7126:10:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_bool_$returns$__$", + "typeString": "function (uint16,contract IConverterAnchor,bool)" + } + }, + "id": 16979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7126:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16980, + "nodeType": "EmitStatement", + "src": "7121:46:28" + } + ] + }, + "documentation": { + "id": 16782, + "nodeType": "StructuredDocumentation", + "src": "3873:625:28", + "text": " @dev sets the pool's primary reserve token / price oracles and activates the pool\n each oracle must be able to provide the rate for each reserve token\n note that the oracle must be whitelisted prior to the call\n can only be called by the owner while the pool is inactive\n @param _primaryReserveToken address of the pool's primary reserve token\n @param _primaryReserveOracle address of a chainlink price oracle for the primary reserve token\n @param _secondaryReserveOracle address of a chainlink price oracle for the secondary reserve token" + }, + "functionSelector": "119b90cd", + "id": 16982, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 16791, + "modifierName": { + "argumentTypes": null, + "id": 16790, + "name": "inactive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9151, + "src": "4701:8:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4701:8:28" + }, + { + "arguments": null, + "id": 16793, + "modifierName": { + "argumentTypes": null, + "id": 16792, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "4719:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4719:9:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 16795, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16784, + "src": "4751:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 16796, + "modifierName": { + "argumentTypes": null, + "id": 16794, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "4738:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4738:34:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16800, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "4798:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4790:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16798, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4790:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4790:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16802, + "modifierName": { + "argumentTypes": null, + "id": 16797, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22978, + "src": "4782:7:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4782:39:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16806, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "4847:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16805, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4839:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16804, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4839:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4839:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16808, + "modifierName": { + "argumentTypes": null, + "id": 16803, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22978, + "src": "4831:7:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4831:41:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16812, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16786, + "src": "4903:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4895:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4895:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4895:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16814, + "modifierName": { + "argumentTypes": null, + "id": 16809, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4882:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4882:44:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16818, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16788, + "src": "4957:23:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 16817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4949:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4949:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 16819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4949:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 16820, + "modifierName": { + "argumentTypes": null, + "id": 16815, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22952, + "src": "4936:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4936:46:28" + } + ], + "name": "activate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16784, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4532:32:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 16783, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "4532:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16786, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4575:43:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16785, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23155, + "src": "4575:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 16788, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 16982, + "src": "4629:45:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 16787, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23155, + "src": "4629:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$23155", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4521:154:28" + }, + "returnParameters": { + "id": 16821, + "nodeType": "ParameterList", + "parameters": [], + "src": "4988:0:28" + }, + "scope": 18367, + "src": "4504:2671:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17006, + "nodeType": "Block", + "src": "7471:233:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 16993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 16991, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7490:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 16992, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "7513:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7490:37:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545", + "id": 16994, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7529:34:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f9363eee098ac664b67b829736fb5ba7ccaf776da9324eed6c3da55aa01386f5", + "typeString": "literal_string \"ERR_INVALID_ORACLE_DEVIATION_FEE\"" + }, + "value": "ERR_INVALID_ORACLE_DEVIATION_FEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f9363eee098ac664b67b829736fb5ba7ccaf776da9324eed6c3da55aa01386f5", + "typeString": "literal_string \"ERR_INVALID_ORACLE_DEVIATION_FEE\"" + } + ], + "id": 16990, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7482:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 16995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7482:82:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16996, + "nodeType": "ExpressionStatement", + "src": "7482:82:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 16998, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "7605:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 16999, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7625:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 16997, + "name": "OracleDeviationFeeUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16702, + "src": "7580:24:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (uint32,uint32)" + } + }, + "id": 17000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7580:65:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17001, + "nodeType": "EmitStatement", + "src": "7575:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17002, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "7656:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17003, + "name": "_oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16985, + "src": "7677:19:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "7656:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17005, + "nodeType": "ExpressionStatement", + "src": "7656:40:28" + } + ] + }, + "documentation": { + "id": 16983, + "nodeType": "StructuredDocumentation", + "src": "7183:206:28", + "text": " @dev updates the current oracle deviation fee\n can only be called by the contract owner\n @param _oracleDeviationFee new oracle deviation fee, represented in ppm" + }, + "functionSelector": "ddd9abbf", + "id": 17007, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 16988, + "modifierName": { + "argumentTypes": null, + "id": 16987, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "7461:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7461:9:28" + } + ], + "name": "setOracleDeviationFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 16986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 16985, + "mutability": "mutable", + "name": "_oracleDeviationFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17007, + "src": "7426:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 16984, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "7426:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7425:28:28" + }, + "returnParameters": { + "id": 16989, + "nodeType": "ParameterList", + "parameters": [], + "src": "7471:0:28" + }, + "scope": 18367, + "src": "7395:309:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17022, + "nodeType": "Block", + "src": "8056:55:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17018, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "8074:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17020, + "indexExpression": { + "argumentTypes": null, + "id": 17019, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17010, + "src": "8089:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8074:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17017, + "id": 17021, + "nodeType": "Return", + "src": "8067:36:28" + } + ] + }, + "documentation": { + "id": 17008, + "nodeType": "StructuredDocumentation", + "src": "7712:182:28", + "text": " @dev returns the staked balance of a given reserve token\n @param _reserveToken reserve token address\n @return staked balance" + }, + "functionSelector": "005e319c", + "id": 17023, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 17013, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17010, + "src": "8009:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17014, + "modifierName": { + "argumentTypes": null, + "id": 17012, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "7996:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "7996:27:28" + } + ], + "name": "reserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17010, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17023, + "src": "7930:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17009, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "7930:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7929:27:28" + }, + "returnParameters": { + "id": 17017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17016, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17023, + "src": "8042:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8042:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:9:28" + }, + "scope": 18367, + "src": "7900:211:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17038, + "nodeType": "Block", + "src": "8471:57:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17035, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17026, + "src": "8506:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17034, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "8489:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8489:31:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17033, + "id": 17037, + "nodeType": "Return", + "src": "8482:38:28" + } + ] + }, + "documentation": { + "id": 17024, + "nodeType": "StructuredDocumentation", + "src": "8119:187:28", + "text": " @dev returns the amplified balance of a given reserve token\n @param _reserveToken reserve token address\n @return amplified balance" + }, + "functionSelector": "2bd3c107", + "id": 17039, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 17029, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17026, + "src": "8424:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17030, + "modifierName": { + "argumentTypes": null, + "id": 17028, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "8411:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8411:27:28" + } + ], + "name": "reserveAmplifiedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17026, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17039, + "src": "8345:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17025, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "8345:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8344:27:28" + }, + "returnParameters": { + "id": 17033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17039, + "src": "8457:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8457:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8456:9:28" + }, + "scope": 18367, + "src": "8312:216:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17061, + "nodeType": "Block", + "src": "8999:59:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17055, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "9010:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17057, + "indexExpression": { + "argumentTypes": null, + "id": 17056, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17042, + "src": "9025:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9010:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17058, + "name": "_balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17044, + "src": "9042:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9010:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17060, + "nodeType": "ExpressionStatement", + "src": "9010:40:28" + } + ] + }, + "documentation": { + "id": 17040, + "nodeType": "StructuredDocumentation", + "src": "8536:268:28", + "text": " @dev sets the reserve's staked balance\n can only be called by the upgrader contract while the upgrader is the owner\n @param _reserveToken reserve token address\n @param _balance new reserve staked balance" + }, + "functionSelector": "bf7da6ba", + "id": 17062, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17047, + "modifierName": { + "argumentTypes": null, + "id": 17046, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "8913:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8913:9:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17049, + "name": "CONVERTER_UPGRADER", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21876, + "src": "8937:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "id": 17050, + "modifierName": { + "argumentTypes": null, + "id": 17048, + "name": "only", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21911, + "src": "8932:4:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_bytes32_$", + "typeString": "modifier (bytes32)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8932:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17052, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17042, + "src": "8979:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17053, + "modifierName": { + "argumentTypes": null, + "id": 17051, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "8966:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8966:27:28" + } + ], + "name": "setReserveStakedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17042, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17062, + "src": "8843:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17041, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "8843:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17044, + "mutability": "mutable", + "name": "_balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17062, + "src": "8870:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17043, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8870:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8842:45:28" + }, + "returnParameters": { + "id": 17054, + "nodeType": "ParameterList", + "parameters": [], + "src": "8999:0:28" + }, + "scope": 18367, + "src": "8810:248:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17088, + "nodeType": "Block", + "src": "9526:156:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17072, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "9537:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17076, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17073, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9555:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17075, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17074, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9569:1:28", + "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": "9555:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9537:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17077, + "name": "_reserve1MaxStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17065, + "src": "9575:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9537:63:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17079, + "nodeType": "ExpressionStatement", + "src": "9537:63:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17080, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "9611:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17084, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17081, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "9629:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17083, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17082, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9643:1:28", + "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": "9629:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9611:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17085, + "name": "_reserve2MaxStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17067, + "src": "9649:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9611:63:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17087, + "nodeType": "ExpressionStatement", + "src": "9611:63:28" + } + ] + }, + "documentation": { + "id": 17063, + "nodeType": "StructuredDocumentation", + "src": "9066:337:28", + "text": " @dev sets the max staked balance for both reserves\n available as a temporary mechanism during the beta\n can only be called by the owner\n @param _reserve1MaxStakedBalance max staked balance for reserve 1\n @param _reserve2MaxStakedBalance max staked balance for reserve 2" + }, + "functionSelector": "46749468", + "id": 17089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17070, + "modifierName": { + "argumentTypes": null, + "id": 17069, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "9516:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9516:9:28" + } + ], + "name": "setMaxStakedBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17065, + "mutability": "mutable", + "name": "_reserve1MaxStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17089, + "src": "9439:33:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9439:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17067, + "mutability": "mutable", + "name": "_reserve2MaxStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17089, + "src": "9474:33:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17066, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9474:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9438:70:28" + }, + "returnParameters": { + "id": 17071, + "nodeType": "ParameterList", + "parameters": [], + "src": "9526:0:28" + }, + "scope": 18367, + "src": "9409:273:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17099, + "nodeType": "Block", + "src": "9965:50:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17095, + "name": "maxStakedBalanceEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16692, + "src": "9976:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 17096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10002:5:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "9976:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 17098, + "nodeType": "ExpressionStatement", + "src": "9976:31:28" + } + ] + }, + "documentation": { + "id": 17090, + "nodeType": "StructuredDocumentation", + "src": "9690:216:28", + "text": " @dev disables the max staked balance mechanism\n available as a temporary mechanism during the beta\n once disabled, it cannot be re-enabled\n can only be called by the owner" + }, + "functionSelector": "16912f96", + "id": 17100, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17093, + "modifierName": { + "argumentTypes": null, + "id": 17092, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "9955:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9955:9:28" + } + ], + "name": "disableMaxStakedBalances", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17091, + "nodeType": "ParameterList", + "parameters": [], + "src": "9945:2:28" + }, + "returnParameters": { + "id": 17094, + "nodeType": "ParameterList", + "parameters": [], + "src": "9965:0:28" + }, + "scope": 18367, + "src": "9912:103:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17112, + "nodeType": "Block", + "src": "10303:61:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17108, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "10321:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17110, + "indexExpression": { + "argumentTypes": null, + "id": 17109, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17103, + "src": "10342:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10321:35:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "functionReturnParameters": 17107, + "id": 17111, + "nodeType": "Return", + "src": "10314:42:28" + } + ] + }, + "documentation": { + "id": 17101, + "nodeType": "StructuredDocumentation", + "src": "10023:194:28", + "text": " @dev returns the pool token address by the reserve token address\n @param _reserveToken reserve token address\n @return pool token address" + }, + "functionSelector": "5768adcf", + "id": 17113, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "poolToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17103, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17113, + "src": "10242:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17102, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10242:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10241:27:28" + }, + "returnParameters": { + "id": 17107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17113, + "src": "10290:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17105, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "10290:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10289:13:28" + }, + "scope": 18367, + "src": "10223:141:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17153, + "nodeType": "Block", + "src": "10666:530:28", + "statements": [ + { + "assignments": [ + 17122 + ], + "declarations": [ + { + "constant": false, + "id": 17122, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10715:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17121, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10715:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17126, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17123, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17116, + "src": "10741:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "10741:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10741:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10715:50:28" + }, + { + "assignments": [ + 17128 + ], + "declarations": [ + { + "constant": false, + "id": 17128, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10876:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17127, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "10876:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17132, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17129, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "10903:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17131, + "indexExpression": { + "argumentTypes": null, + "id": 17130, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17116, + "src": "10924:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10903:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10876:59:28" + }, + { + "assignments": [ + 17134 + ], + "declarations": [ + { + "constant": false, + "id": 17134, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "10946:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10946:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17138, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17136, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17128, + "src": "10979:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17135, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "10964:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10964:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10946:46:28" + }, + { + "assignments": [ + 17140 + ], + "declarations": [ + { + "constant": false, + "id": 17140, + "mutability": "mutable", + "name": "stakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17153, + "src": "11003:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17139, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11003:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17144, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17141, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "11027:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17143, + "indexExpression": { + "argumentTypes": null, + "id": 17142, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17128, + "src": "11042:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11027:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11003:52:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17150, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17140, + "src": "11174:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17147, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17122, + "src": "11153:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17145, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17134, + "src": "11141:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "11141:11:28", + "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": 17148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11141:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "11141:32:28", + "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": 17151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11141:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17120, + "id": 17152, + "nodeType": "Return", + "src": "11134:54:28" + } + ] + }, + "documentation": { + "id": 17114, + "nodeType": "StructuredDocumentation", + "src": "10372:208:28", + "text": " @dev returns the maximum number of pool tokens that can currently be liquidated\n @param _poolToken address of the pool token\n @return liquidation limit" + }, + "functionSelector": "2bf0c985", + "id": 17154, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "liquidationLimit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17116, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17154, + "src": "10612:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17115, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "10612:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10611:24:28" + }, + "returnParameters": { + "id": 17120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17154, + "src": "10657:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17118, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10657:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10656:9:28" + }, + "scope": 18367, + "src": "10586:610:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9664 + ], + "body": { + "id": 17180, + "nodeType": "Block", + "src": "11613:190:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 17169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17166, + "name": "reserveTokenCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9561, + "src": "11698:17:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint16_$", + "typeString": "function () view returns (uint16)" + } + }, + "id": 17167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11698:19:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 17168, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11720:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "11698:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f524553455256455f434f554e54", + "id": 17170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11723:27:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + }, + "value": "ERR_INVALID_RESERVE_COUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ed94f14d8dcbb423a259b4072978fc0c494c6af1fea066a19023afb1a76ac87f", + "typeString": "literal_string \"ERR_INVALID_RESERVE_COUNT\"" + } + ], + "id": 17165, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11690:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11690:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17172, + "nodeType": "ExpressionStatement", + "src": "11690:61:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17176, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17157, + "src": "11779:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17177, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17159, + "src": "11787:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 17173, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "11762:5:28", + "typeDescriptions": { + "typeIdentifier": "t_super$_LiquidityPoolV2Converter_$18367", + "typeString": "contract super LiquidityPoolV2Converter" + } + }, + "id": 17175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addReserve", + "nodeType": "MemberAccess", + "referencedDeclaration": 9664, + "src": "11762:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,uint32)" + } + }, + "id": 17178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11762:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17179, + "nodeType": "ExpressionStatement", + "src": "11762:33:28" + } + ] + }, + "documentation": { + "id": 17155, + "nodeType": "StructuredDocumentation", + "src": "11204:321:28", + "text": " @dev defines a new reserve token for the converter\n can only be called by the owner while the converter is inactive and\n 2 reserves aren't defined yet\n @param _token address of the reserve token\n @param _weight reserve weight, represented in ppm, 1-1000000" + }, + "functionSelector": "6a49d2c4", + "id": 17181, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17163, + "modifierName": { + "argumentTypes": null, + "id": 17162, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22088, + "src": "11603:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11603:9:28" + } + ], + "name": "addReserve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17161, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11594:8:28" + }, + "parameters": { + "id": 17160, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17157, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17181, + "src": "11551:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17156, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "11551:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17159, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17181, + "src": "11571:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17158, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "11571:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11550:36:28" + }, + "returnParameters": { + "id": 17164, + "nodeType": "ParameterList", + "parameters": [], + "src": "11613:0:28" + }, + "scope": 18367, + "src": "11531:272:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17200, + "nodeType": "Block", + "src": "12135:98:28", + "statements": [ + { + "assignments": [ + 17190 + ], + "declarations": [ + { + "constant": false, + "id": 17190, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17200, + "src": "12146:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17189, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "12146:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17193, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17191, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "12169:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12169:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12146:45:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17194, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17190, + "src": "12210:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 17195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "12210:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17196, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17190, + "src": "12218:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 17197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "12218:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17198, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12209:16:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17188, + "id": 17199, + "nodeType": "Return", + "src": "12202:23:28" + } + ] + }, + "documentation": { + "id": 17182, + "nodeType": "StructuredDocumentation", + "src": "11811:248:28", + "text": " @dev returns the effective rate of 1 primary token in secondary tokens\n @return rate of 1 primary token in secondary tokens (numerator)\n @return rate of 1 primary token in secondary tokens (denominator)" + }, + "functionSelector": "db2830a4", + "id": 17201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveTokensRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17183, + "nodeType": "ParameterList", + "parameters": [], + "src": "12093:2:28" + }, + "returnParameters": { + "id": 17188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17185, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17201, + "src": "12117:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12117:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17187, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17201, + "src": "12126:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12126:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12116:18:28" + }, + "scope": 18367, + "src": "12065:168:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17237, + "nodeType": "Block", + "src": "12466:370:28", + "statements": [ + { + "assignments": [ + 17210 + ], + "declarations": [ + { + "constant": false, + "id": 17210, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12477:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17209, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "12477:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17213, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17211, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "12500:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12500:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12477:45:28" + }, + { + "assignments": [ + 17215, + 17217 + ], + "declarations": [ + { + "constant": false, + "id": 17215, + "mutability": "mutable", + "name": "primaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12534:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17214, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12534:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17217, + "mutability": "mutable", + "name": "secondaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17237, + "src": "12563:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17216, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "12563:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17221, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17219, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17210, + "src": "12620:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + ], + "id": 17218, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "12596:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 17220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12596:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12533:92:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17222, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "12642:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17223, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "12665:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17225, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12679:1:28", + "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": "12665:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "12642:39:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17232, + "nodeType": "IfStatement", + "src": "12638:125:28", + "trueBody": { + "id": 17231, + "nodeType": "Block", + "src": "12683:80:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17227, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17215, + "src": "12706:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17228, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17217, + "src": "12728:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 17229, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12705:46:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 17208, + "id": 17230, + "nodeType": "Return", + "src": "12698:53:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17233, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17217, + "src": "12783:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17234, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17215, + "src": "12807:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 17235, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12782:46:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 17208, + "id": 17236, + "nodeType": "Return", + "src": "12775:53:28" + } + ] + }, + "documentation": { + "id": 17202, + "nodeType": "StructuredDocumentation", + "src": "12241:145:28", + "text": " @dev returns the effective reserve tokens weights\n @return reserve1 weight\n @return reserve2 weight" + }, + "functionSelector": "ec2240f5", + "id": 17238, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveReserveWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17203, + "nodeType": "ParameterList", + "parameters": [], + "src": "12424:2:28" + }, + "returnParameters": { + "id": 17208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17205, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17238, + "src": "12448:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17204, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12448:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17207, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17238, + "src": "12457:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12457:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12447:18:28" + }, + "scope": 18367, + "src": "12392:444:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9256 + ], + "body": { + "id": 17345, + "nodeType": "Block", + "src": "13545:1311:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17262, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13591:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 17263, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "13607:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "13591:28:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f534f555243455f544152474554", + "id": 17265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13621:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + }, + "value": "ERR_SAME_SOURCE_TARGET" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_238302f57e4481fe6a4c903e930919efa155f2aabe0b5da37da1448cea5fd634", + "typeString": "literal_string \"ERR_SAME_SOURCE_TARGET\"" + } + ], + "id": 17261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13583:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13583:63:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17267, + "nodeType": "ExpressionStatement", + "src": "13583:63:28" + }, + { + "assignments": [ + 17269 + ], + "declarations": [ + { + "constant": false, + "id": 17269, + "mutability": "mutable", + "name": "sourceTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "13659:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17268, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "13659:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17270, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "13659:24:28" + }, + { + "assignments": [ + 17272 + ], + "declarations": [ + { + "constant": false, + "id": 17272, + "mutability": "mutable", + "name": "targetTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "13694:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17271, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "13694:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17273, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "13694:24:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17274, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "13850:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17275, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "13876:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13876:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13850:32:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17327, + "nodeType": "Block", + "src": "14044:527:28", + "statements": [ + { + "assignments": [ + 17293 + ], + "declarations": [ + { + "constant": false, + "id": 17293, + "mutability": "mutable", + "name": "rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14059:20:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 17292, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "14059:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17296, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17294, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "14082:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14082:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14059:45:28" + }, + { + "assignments": [ + 17298, + 17300 + ], + "declarations": [ + { + "constant": false, + "id": 17298, + "mutability": "mutable", + "name": "primaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14120:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17297, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14120:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17300, + "mutability": "mutable", + "name": "secondaryReserveWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17327, + "src": "14149:29:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17299, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "14149:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17304, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17302, + "name": "rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17293, + "src": "14206:4:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + ], + "id": 17301, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "14182:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 17303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14182:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14119:92:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17305, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "14232:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17306, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "14248:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "14232:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17325, + "nodeType": "Block", + "src": "14424:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17317, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14443:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17318, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17300, + "src": "14463:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14443:42:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17320, + "nodeType": "ExpressionStatement", + "src": "14443:42:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17321, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14504:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17322, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17298, + "src": "14524:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14504:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17324, + "nodeType": "ExpressionStatement", + "src": "14504:40:28" + } + ] + }, + "id": 17326, + "nodeType": "IfStatement", + "src": "14228:332:28", + "trueBody": { + "id": 17316, + "nodeType": "Block", + "src": "14269:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17308, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14288:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17309, + "name": "primaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17298, + "src": "14308:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14288:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17311, + "nodeType": "ExpressionStatement", + "src": "14288:40:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17312, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14347:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17313, + "name": "secondaryReserveWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17300, + "src": "14367:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "14347:42:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17315, + "nodeType": "ExpressionStatement", + "src": "14347:42:28" + } + ] + } + } + ] + }, + "id": 17328, + "nodeType": "IfStatement", + "src": "13846:725:28", + "trueBody": { + "id": 17291, + "nodeType": "Block", + "src": "13884:145:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17278, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "13899:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17279, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "13919:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17281, + "indexExpression": { + "argumentTypes": null, + "id": 17280, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13928:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13919:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17282, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "13919:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13899:49:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17284, + "nodeType": "ExpressionStatement", + "src": "13899:49:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17285, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "13963:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 17288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17286, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "13983:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17287, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14000:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13983:34:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "13963:54:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 17290, + "nodeType": "ExpressionStatement", + "src": "13963:54:28" + } + ] + } + }, + { + "assignments": [ + 17330, + null, + 17332 + ], + "declarations": [ + { + "constant": false, + "id": 17330, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "14678:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17329, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14678:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + null, + { + "constant": false, + "id": 17332, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17345, + "src": "14702:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14702:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17340, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17334, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "14737:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17335, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "14751:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17336, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17269, + "src": "14765:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17337, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17272, + "src": "14784:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17338, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17245, + "src": "14803:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17333, + "name": "targetAmountAndFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18083, + "src": "14717:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32,uint256) view returns (uint256,uint256,uint256)" + } + }, + "id": 17339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14717:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14677:134:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17341, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17330, + "src": "14830:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17342, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17332, + "src": "14844:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17343, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14829:19:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17260, + "id": 17344, + "nodeType": "Return", + "src": "14822:26:28" + } + ] + }, + "documentation": { + "id": 17239, + "nodeType": "StructuredDocumentation", + "src": "12844:421:28", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fee\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected fee" + }, + "functionSelector": "af94b8d8", + "id": 17346, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17249, + "modifierName": { + "argumentTypes": null, + "id": 17248, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "13425:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13425:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17251, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17241, + "src": "13454:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17252, + "modifierName": { + "argumentTypes": null, + "id": 17250, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "13441:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13441:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17254, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17243, + "src": "13490:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17255, + "modifierName": { + "argumentTypes": null, + "id": 17253, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "13477:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "13477:26:28" + } + ], + "name": "targetAmountAndFee", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17247, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13407:8:28" + }, + "parameters": { + "id": 17246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17241, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13299:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17240, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "13299:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17243, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13325:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17242, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "13325:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17245, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13351:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13351:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13298:69:28" + }, + "returnParameters": { + "id": 17260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17257, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13522:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13522:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17259, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17346, + "src": "13531:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17258, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13531:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13521:18:28" + }, + "scope": 18367, + "src": "13271:1585:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9789 + ], + "body": { + "id": 17536, + "nodeType": "Block", + "src": "15730:2450:28", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17371, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "15806:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17372, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "15831:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15831:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15806:31:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17389, + "nodeType": "IfStatement", + "src": "15802:173:28", + "trueBody": { + "id": 17388, + "nodeType": "Block", + "src": "15839:136:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17375, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "15854:22:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17376, + "name": "time", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18366, + "src": "15879:4:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 17377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15879:6:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15854:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17379, + "nodeType": "ExpressionStatement", + "src": "15854:31:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17380, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "15900:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17381, + "name": "_effectiveTokensRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18186, + "src": "15915:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_Fraction_$22916_memory_ptr_$", + "typeString": "function () view returns (struct Fraction memory)" + } + }, + "id": 17382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15915:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "src": "15900:37:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + }, + "id": 17384, + "nodeType": "ExpressionStatement", + "src": "15900:37:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17385, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "15952:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15952:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17387, + "nodeType": "ExpressionStatement", + "src": "15952:11:28" + } + ] + } + }, + { + "assignments": [ + 17391 + ], + "declarations": [ + { + "constant": false, + "id": 17391, + "mutability": "mutable", + "name": "sourceTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "15987:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17390, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "15987:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17396, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17392, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16014:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17394, + "indexExpression": { + "argumentTypes": null, + "id": 17393, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16023:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16014:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17395, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "16014:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15987:56:28" + }, + { + "assignments": [ + 17398 + ], + "declarations": [ + { + "constant": false, + "id": 17398, + "mutability": "mutable", + "name": "targetTokenWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16054:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 17397, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "16054:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17402, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 17401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17399, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "16081:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17400, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "16098:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "16081:34:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16054:61:28" + }, + { + "assignments": [ + 17404, + 17406, + 17408 + ], + "declarations": [ + { + "constant": false, + "id": 17404, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16177:14:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16177:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17406, + "mutability": "mutable", + "name": "standardFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16193:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16193:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17408, + "mutability": "mutable", + "name": "totalFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "16214:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17407, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16214:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17416, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17410, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16254:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17411, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16268:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17412, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "16282:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17413, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17398, + "src": "16301:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17414, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16320:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17409, + "name": "targetAmountAndFees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18083, + "src": "16234:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32,uint256) view returns (uint256,uint256,uint256)" + } + }, + "id": 17415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16234:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16176:152:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17418, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "16409:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16419:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16409:11:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f5441524745545f414d4f554e54", + "id": 17421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16422:24:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + }, + "value": "ERR_ZERO_TARGET_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29cb0846c2d5a859f661a5b4c4a8be47a80ca27c24af6f007bda101871b53e03", + "typeString": "literal_string \"ERR_ZERO_TARGET_AMOUNT\"" + } + ], + "id": 17417, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16401:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16401:46:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17423, + "nodeType": "ExpressionStatement", + "src": "16401:46:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17424, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16527:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17425, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "16543:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "16527:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17436, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16670:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16670:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16683:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "16670:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17449, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16745:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17448, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "16730:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16730:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17444, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "16719:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 17443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16711:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16711:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16711:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 17440, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16688:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 17441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 21422, + "src": "16688:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 17446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16688:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "16688:41:28", + "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": 17451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16688:71:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17452, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16763:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16688:82:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16670:100:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f414d4f554e54", + "id": 17455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16772:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + }, + "value": "ERR_INVALID_AMOUNT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c44007bfe4e704be0ed1393660a827b4f88825f4b6fe1bc10cd38fc3fcb7d839", + "typeString": "literal_string \"ERR_INVALID_AMOUNT\"" + } + ], + "id": 17435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16662:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16662:131:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17457, + "nodeType": "ExpressionStatement", + "src": "16662:131:28" + }, + "id": 17458, + "nodeType": "IfStatement", + "src": "16523:270:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16585:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "16585:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17430, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "16598:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16585:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 17432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16607:25:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 17427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16577:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16577:56:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17434, + "nodeType": "ExpressionStatement", + "src": "16577:56:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17460, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "16863:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17459, + "name": "syncReserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9844, + "src": "16844:18:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract IERC20Token)" + } + }, + "id": 17461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16844:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17462, + "nodeType": "ExpressionStatement", + "src": "16844:32:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17463, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "16887:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17465, + "indexExpression": { + "argumentTypes": null, + "id": 17464, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16896:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16887:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17466, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "16887:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17471, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "16953:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17468, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "16935:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17467, + "name": "reserveBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9699, + "src": "16920:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16920:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "16920:32:28", + "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": 17472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16920:40:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16887:73:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17474, + "nodeType": "ExpressionStatement", + "src": "16887:73:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17475, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "17031:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17477, + "indexExpression": { + "argumentTypes": null, + "id": 17476, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17046:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17031:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17482, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17406, + "src": "17095:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17478, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "17062:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17480, + "indexExpression": { + "argumentTypes": null, + "id": 17479, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17077:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17062:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "17062:32:28", + "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": 17483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17062:45:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17031:76:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17485, + "nodeType": "ExpressionStatement", + "src": "17031:76:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17486, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17194:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17487, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "17210:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "17194:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 17502, + "nodeType": "Block", + "src": "17302:75:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17497, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17330:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17498, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17357, + "src": "17344:12:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17499, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17358:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17496, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "17317:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 17500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17317:48:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17501, + "nodeType": "ExpressionStatement", + "src": "17317:48:28" + } + ] + }, + "id": 17503, + "nodeType": "IfStatement", + "src": "17190:187:28", + "trueBody": { + "id": 17495, + "nodeType": "Block", + "src": "17231:56:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17492, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17268:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17489, + "name": "_beneficiary", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17357, + "src": "17246:12:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 17491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "17246:21:28", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 17493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17246:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17494, + "nodeType": "ExpressionStatement", + "src": "17246:29:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17505, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "17455:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17506, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17469:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17507, + "name": "_trader", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17355, + "src": "17483:7:28", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 17508, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17353, + "src": "17492:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17509, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "17501:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17510, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17408, + "src": "17509:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17504, + "name": "dispatchConversionEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9908, + "src": "17431:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,address,uint256,uint256,uint256)" + } + }, + "id": 17511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17431:87:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17512, + "nodeType": "ExpressionStatement", + "src": "17431:87:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17514, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "17619:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17515, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17633:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17516, + "name": "sourceTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17391, + "src": "17647:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 17517, + "name": "targetTokenWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17398, + "src": "17666:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 17513, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "17590:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17590:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17519, + "nodeType": "ExpressionStatement", + "src": "17590:94:28" + }, + { + "assignments": [ + 17521 + ], + "declarations": [ + { + "constant": false, + "id": 17521, + "mutability": "mutable", + "name": "targetPoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17536, + "src": "17929:27:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17520, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "17929:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17525, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17522, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "17959:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17524, + "indexExpression": { + "argumentTypes": null, + "id": 17523, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "17980:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17959:34:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17929:64:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17527, + "name": "targetPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17521, + "src": "18037:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17528, + "name": "targetPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17521, + "src": "18054:15:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "18054:27:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18054:29:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17531, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "18085:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17526, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "18004:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18004:94:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17533, + "nodeType": "ExpressionStatement", + "src": "18004:94:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17534, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17404, + "src": "18166:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17370, + "id": 17535, + "nodeType": "Return", + "src": "18159:13:28" + } + ] + }, + "documentation": { + "id": 17347, + "nodeType": "StructuredDocumentation", + "src": "14864:569:28", + "text": " @dev converts a specific amount of source tokens to target tokens\n can only be called by the bancor network contract\n @param _sourceToken source ERC20 token\n @param _targetToken target ERC20 token\n @param _amount amount of tokens to convert (in units of the source token)\n @param _trader address of the caller who executed the conversion\n @param _beneficiary wallet to receive the conversion result\n @return amount of tokens received (in units of the target token)" + }, + "id": 17537, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17361, + "modifierName": { + "argumentTypes": null, + "id": 17360, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "15619:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15619:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17363, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17349, + "src": "15648:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17364, + "modifierName": { + "argumentTypes": null, + "id": 17362, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "15635:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15635:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17366, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17351, + "src": "15684:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17367, + "modifierName": { + "argumentTypes": null, + "id": 17365, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "15671:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "15671:26:28" + } + ], + "name": "doConvert", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 17359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15601:8:28" + }, + "parameters": { + "id": 17358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17349, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15458:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17348, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "15458:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17351, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15484:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17350, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "15484:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17353, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15510:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17352, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15510:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17355, + "mutability": "mutable", + "name": "_trader", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15527:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 17354, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15527:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17357, + "mutability": "mutable", + "name": "_beneficiary", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15544:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 17356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15544:15:28", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15457:116:28" + }, + "returnParameters": { + "id": 17370, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17369, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17537, + "src": "15716:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17368, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15716:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15715:9:28" + }, + "scope": 18367, + "src": "15439:2741:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 17762, + "nodeType": "Block", + "src": "18867:3062:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17563, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "18988:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17564, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19005:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "18988:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17570, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19050:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19050:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19063:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19050:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 17574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "18988:76:28", + "trueExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17566, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19027:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19027:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17568, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "19040:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19027:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4554485f414d4f554e545f4d49534d41544348", + "id": 17575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19066:25:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + }, + "value": "ERR_ETH_AMOUNT_MISMATCH" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b27c160ac497b67c4fef6b5554e0b1a41f3c9b44e4bd8482662df760b76c093b", + "typeString": "literal_string \"ERR_ETH_AMOUNT_MISMATCH\"" + } + ], + "id": 17562, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18980:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18980:112:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17577, + "nodeType": "ExpressionStatement", + "src": "18980:112:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17578, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "19156:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19156:21:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17580, + "nodeType": "ExpressionStatement", + "src": "19156:21:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17581, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19300:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17582, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19317:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "19300:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17599, + "nodeType": "IfStatement", + "src": "19296:161:28", + "trueBody": { + "id": 17598, + "nodeType": "Block", + "src": "19338:119:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 17596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17584, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19353:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17586, + "indexExpression": { + "argumentTypes": null, + "id": 17585, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19362:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19353:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17587, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19353:37:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17593, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19435:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "19435:9:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17588, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "19393:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17590, + "indexExpression": { + "argumentTypes": null, + "id": 17589, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "19402:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19393:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "19393:37:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "19393:41:28", + "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": 17595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19393:52:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19353:92:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17597, + "nodeType": "ExpressionStatement", + "src": "19353:92:28" + } + ] + } + }, + { + "assignments": [ + 17601 + ], + "declarations": [ + { + "constant": false, + "id": 17601, + "mutability": "mutable", + "name": "initialStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "19546:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17600, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19546:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17605, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17602, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "19577:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17604, + "indexExpression": { + "argumentTypes": null, + "id": 17603, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19592:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19577:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19546:60:28" + }, + { + "condition": { + "argumentTypes": null, + "id": 17606, + "name": "maxStakedBalanceEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16692, + "src": "19720:23:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17626, + "nodeType": "IfStatement", + "src": "19716:209:28", + "trueBody": { + "id": 17625, + "nodeType": "Block", + "src": "19745:180:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17608, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "19768:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17610, + "indexExpression": { + "argumentTypes": null, + "id": 17609, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19786:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19768:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17611, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19804:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "19768:37:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17615, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "19834:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17613, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "19809:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "19809:24:28", + "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": 17616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19809:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17617, + "name": "maxStakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16689, + "src": "19846:17:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17619, + "indexExpression": { + "argumentTypes": null, + "id": 17618, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "19864:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19846:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19809:69:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19768:110:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f5354414b45445f42414c414e43455f52454143484544", + "id": 17622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19880:32:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e71abaa0836b516acb5bcc1418977bbb31101745086dfce64d3b60d38c4171f5", + "typeString": "literal_string \"ERR_MAX_STAKED_BALANCE_REACHED\"" + }, + "value": "ERR_MAX_STAKED_BALANCE_REACHED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e71abaa0836b516acb5bcc1418977bbb31101745086dfce64d3b60d38c4171f5", + "typeString": "literal_string \"ERR_MAX_STAKED_BALANCE_REACHED\"" + } + ], + "id": 17607, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19760:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19760:153:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17624, + "nodeType": "ExpressionStatement", + "src": "19760:153:28" + } + ] + } + }, + { + "assignments": [ + 17628 + ], + "declarations": [ + { + "constant": false, + "id": 17628, + "mutability": "mutable", + "name": "reservePoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20011:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17627, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "20011:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17632, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17629, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "20042:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 17631, + "indexExpression": { + "argumentTypes": null, + "id": 17630, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20063:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20042:35:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20011:66:28" + }, + { + "assignments": [ + 17634 + ], + "declarations": [ + { + "constant": false, + "id": 17634, + "mutability": "mutable", + "name": "poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20088:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17633, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20088:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17638, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17635, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "20114:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "20114:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20114:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20088:56:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17639, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20239:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 17640, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "20256:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "20239:36:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 17653, + "nodeType": "IfStatement", + "src": "20235:122:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17643, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20307:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17644, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20322:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "20322:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20342:4:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + ], + "id": 17647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20334:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20334:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20334:13:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17650, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20349:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17642, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22859, + "src": "20290:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 17651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20290:67:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17652, + "nodeType": "ExpressionStatement", + "src": "20290:67:28" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 17665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17654, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20424:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17656, + "indexExpression": { + "argumentTypes": null, + "id": 17655, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20433:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20424:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17657, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20424:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17663, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20494:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17658, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "20458:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17660, + "indexExpression": { + "argumentTypes": null, + "id": 17659, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20467:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20458:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17661, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "20458:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "20458:35:28", + "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": 17664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20458:44:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20424:78:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17666, + "nodeType": "ExpressionStatement", + "src": "20424:78:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17667, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "20513:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17669, + "indexExpression": { + "argumentTypes": null, + "id": 17668, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "20528:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20513:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17672, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20570:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17670, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "20545:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "20545:24:28", + "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": 17673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20545:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20513:65:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17675, + "nodeType": "ExpressionStatement", + "src": "20513:65:28" + }, + { + "assignments": [ + 17677 + ], + "declarations": [ + { + "constant": false, + "id": 17677, + "mutability": "mutable", + "name": "poolTokenAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17762, + "src": "20798:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17676, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20798:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17679, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 17678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20824:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "20798:27:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 17686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17680, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "20840:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20864:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20840:25:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17683, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "20869:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20888:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "20869:20:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20840:49:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "id": 17699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17691, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "20958:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17697, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "21009:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17694, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "20988:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17692, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20976:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "20976:11:28", + "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": 17695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:28:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "20976:32:28", + "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": 17698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:54:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20958:72:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17700, + "nodeType": "ExpressionStatement", + "src": "20958:72:28" + }, + "id": 17701, + "nodeType": "IfStatement", + "src": "20836:194:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "id": 17689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 17687, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "20904:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17688, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "20922:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20904:25:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17690, + "nodeType": "ExpressionStatement", + "src": "20904:25:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17703, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21049:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17704, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17544, + "src": "21068:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21049:29:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 17706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21080:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 17702, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21041:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21041:60:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17708, + "nodeType": "ExpressionStatement", + "src": "21041:60:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17716, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "21204:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17717, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21222:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21222:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17719, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21234:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17712, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "21190:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 17711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21182:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17710, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21182:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21182:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 17709, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "21161:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 17714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21161:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 17715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 18791, + "src": "21161:42:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ISmartToken_$21516_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ISmartToken,address,uint256) external" + } + }, + "id": 17720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21161:89:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17721, + "nodeType": "ExpressionStatement", + "src": "21161:89:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17722, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "21312:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21312:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17724, + "nodeType": "ExpressionStatement", + "src": "21312:11:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17726, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21404:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "21404:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17728, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "21416:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17729, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "21431:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17732, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "21465:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17730, + "name": "initialStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17601, + "src": "21440:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21440:24:28", + "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": 17733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21440:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17736, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21495:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17734, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "21475:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21475:19:28", + "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": 17737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21475:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17725, + "name": "LiquidityAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13028, + "src": "21389:14:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 17738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21389:123:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17739, + "nodeType": "EmitStatement", + "src": "21384:128:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17741, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17628, + "src": "21622:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17744, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21660:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17742, + "name": "poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17634, + "src": "21640:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "21640:19:28", + "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": 17745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21640:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17746, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "21678:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17740, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "21589:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21589:103:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17748, + "nodeType": "ExpressionStatement", + "src": "21589:103:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17750, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21793:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17752, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21807:1:28", + "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": "21793:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17753, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "21811:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17755, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21825:1:28", + "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": "21811:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21829:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21832:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 17749, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "21764:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21764:70:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17759, + "nodeType": "ExpressionStatement", + "src": "21764:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17760, + "name": "poolTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17677, + "src": "21906:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17561, + "id": 17761, + "nodeType": "Return", + "src": "21899:22:28" + } + ] + }, + "documentation": { + "id": 17538, + "nodeType": "StructuredDocumentation", + "src": "18188:379:28", + "text": " @dev increases the pool's liquidity and mints new shares in the pool to the caller\n @param _reserveToken address of the reserve token to add liquidity to\n @param _amount amount of liquidity to add\n @param _minReturn minimum return-amount of pool tokens\n @return amount of pool tokens minted" + }, + "functionSelector": "55776b77", + "id": 17763, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17547, + "modifierName": { + "argumentTypes": null, + "id": 17546, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "18701:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18701:9:28" + }, + { + "arguments": null, + "id": 17549, + "modifierName": { + "argumentTypes": null, + "id": 17548, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "18720:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "18720:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17551, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17540, + "src": "18749:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 17552, + "modifierName": { + "argumentTypes": null, + "id": 17550, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "18736:12:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18736:27:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17554, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17542, + "src": "18789:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17555, + "modifierName": { + "argumentTypes": null, + "id": 17553, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "18773:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18773:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17557, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17544, + "src": "18823:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17558, + "modifierName": { + "argumentTypes": null, + "id": 17556, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "18807:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "18807:27:28" + } + ], + "name": "addLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17545, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17540, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18595:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17539, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "18595:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17542, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18622:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17541, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18622:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17544, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18639:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17543, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18639:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18594:64:28" + }, + "returnParameters": { + "id": 17561, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17560, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17763, + "src": "18853:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17559, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18853:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "18852:9:28" + }, + "scope": 18367, + "src": "18573:3356:28", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 17915, + "nodeType": "Block", + "src": "22563:1948:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17788, + "name": "syncReserveBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9871, + "src": "22625:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22625:21:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17790, + "nodeType": "ExpressionStatement", + "src": "22625:21:28" + }, + { + "assignments": [ + 17792 + ], + "declarations": [ + { + "constant": false, + "id": 17792, + "mutability": "mutable", + "name": "initialPoolSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "22732:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22732:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17796, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17793, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22760:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "22760:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22760:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22732:52:28" + }, + { + "assignments": [ + 17798, + null + ], + "declarations": [ + { + "constant": false, + "id": 17798, + "mutability": "mutable", + "name": "reserveAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "22874:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17797, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22874:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 17803, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17800, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22929:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 17801, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "22941:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17799, + "name": "removeLiquidityReturnAndFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18008, + "src": "22901:27:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_ISmartToken_$21516_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract ISmartToken,uint256) view returns (uint256,uint256)" + } + }, + "id": 17802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22901:48:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22873:76:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17805, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "22968:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 17806, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17770, + "src": "22985:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22968:27:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f52455455524e5f544f4f5f4c4f57", + "id": 17808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22997:20:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + }, + "value": "ERR_RETURN_TOO_LOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c3237cc40443cfd1e0e9492ef35b7447eab6349fb6eac5eb1ec626edd3c555aa", + "typeString": "literal_string \"ERR_RETURN_TOO_LOW\"" + } + ], + "id": 17804, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22960:7:28", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 17809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22960:58:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17810, + "nodeType": "ExpressionStatement", + "src": "22960:58:28" + }, + { + "assignments": [ + 17812 + ], + "declarations": [ + { + "constant": false, + "id": 17812, + "mutability": "mutable", + "name": "reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23096:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 17811, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "23096:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17816, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17813, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "23123:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17815, + "indexExpression": { + "argumentTypes": null, + "id": 17814, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "23144:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23123:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23096:59:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17824, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "23253:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17825, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23265:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23265:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17827, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "23277:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17820, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "23239:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 17819, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23231:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 17818, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23231:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 17821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23231:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 17817, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "23210:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 17822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23210:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 17823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 18800, + "src": "23210:42:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_contract$_ISmartToken_$21516_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract ISmartToken,address,uint256) external" + } + }, + "id": 17828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23210:75:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17829, + "nodeType": "ExpressionStatement", + "src": "23210:75:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17830, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "23352:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17832, + "indexExpression": { + "argumentTypes": null, + "id": 17831, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23361:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23352:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "23352:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17839, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23420:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17834, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "23385:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 17836, + "indexExpression": { + "argumentTypes": null, + "id": 17835, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23394:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23385:22:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 17837, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "23385:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23385:34:28", + "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": 17840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23385:49:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23352:82:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17842, + "nodeType": "ExpressionStatement", + "src": "23352:82:28" + }, + { + "assignments": [ + 17844 + ], + "declarations": [ + { + "constant": false, + "id": 17844, + "mutability": "mutable", + "name": "newStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23445:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23445:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17851, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17849, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23505:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17845, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "23472:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17847, + "indexExpression": { + "argumentTypes": null, + "id": 17846, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23487:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23472:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23472:32:28", + "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": 17850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23472:47:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23445:74:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17852, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "23530:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17854, + "indexExpression": { + "argumentTypes": null, + "id": 17853, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23545:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23530:28:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 17855, + "name": "newStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17844, + "src": "23561:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23530:47:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17857, + "nodeType": "ExpressionStatement", + "src": "23530:47:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 17860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17858, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23648:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17859, + "name": "ETH_RESERVE_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9012, + "src": "23664:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "23648:35:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17870, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "23774:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17871, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23788:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23788:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17873, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23800:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17869, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22809, + "src": "23761:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 17874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23761:53:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17875, + "nodeType": "ExpressionStatement", + "src": "23761:53:28" + }, + "id": 17876, + "nodeType": "IfStatement", + "src": "23644:170:28", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17866, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "23718:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "23698:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23698:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 17865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "23698:19:28", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 17867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23698:34:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17868, + "nodeType": "ExpressionStatement", + "src": "23698:34:28" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 17877, + "name": "rebalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18205, + "src": "23876:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 17878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23876:11:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17879, + "nodeType": "ExpressionStatement", + "src": "23876:11:28" + }, + { + "assignments": [ + 17881 + ], + "declarations": [ + { + "constant": false, + "id": 17881, + "mutability": "mutable", + "name": "newPoolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17915, + "src": "23900:26:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17880, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23900:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17886, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17884, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "23951:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17882, + "name": "initialPoolSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17792, + "src": "23929:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "23929:21:28", + "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": 17885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23929:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "23900:59:28" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 17888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24044:3:28", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 17889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "24044:10:28", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 17890, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "24056:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 17891, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "24070:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17892, + "name": "newStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17844, + "src": "24085:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17893, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17881, + "src": "24103:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 17887, + "name": "LiquidityRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13041, + "src": "24027:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,contract IERC20Token,uint256,uint256,uint256)" + } + }, + "id": 17894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24027:95:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17895, + "nodeType": "EmitStatement", + "src": "24022:100:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17897, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "24232:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 17898, + "name": "newPoolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17881, + "src": "24244:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17899, + "name": "reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17812, + "src": "24264:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17896, + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18357, + "src": "24199:32:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_ISmartToken_$21516_$_t_uint256_$_t_contract$_IERC20Token_$21461_$returns$__$", + "typeString": "function (contract ISmartToken,uint256,contract IERC20Token)" + } + }, + "id": 17900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24199:78:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17901, + "nodeType": "ExpressionStatement", + "src": "24199:78:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17903, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "24378:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17905, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 17904, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24392:1:28", + "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": "24378:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17906, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "24396:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 17908, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 17907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24410:1:28", + "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": "24396:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24414:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 17910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24417:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 17902, + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18337, + "src": "24349:28:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint32_$_t_uint32_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint32,uint32)" + } + }, + "id": 17911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24349:70:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 17912, + "nodeType": "ExpressionStatement", + "src": "24349:70:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 17913, + "name": "reserveAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17798, + "src": "24490:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 17787, + "id": 17914, + "nodeType": "Return", + "src": "24483:20:28" + } + ] + }, + "documentation": { + "id": 17764, + "nodeType": "StructuredDocumentation", + "src": "21937:344:28", + "text": " @dev decreases the pool's liquidity and burns the caller's shares in the pool\n @param _poolToken address of the pool token\n @param _amount amount of pool tokens to burn\n @param _minReturn minimum return-amount of reserve tokens\n @return amount of liquidity removed" + }, + "functionSelector": "e38192e3", + "id": 17916, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 17773, + "modifierName": { + "argumentTypes": null, + "id": 17772, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22565, + "src": "22398:9:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22398:9:28" + }, + { + "arguments": null, + "id": 17775, + "modifierName": { + "argumentTypes": null, + "id": 17774, + "name": "active", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9134, + "src": "22417:6:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "22417:6:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17777, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17766, + "src": "22448:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + } + ], + "id": 17778, + "modifierName": { + "argumentTypes": null, + "id": 17776, + "name": "validPoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16728, + "src": "22433:14:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_ISmartToken_$21516_$", + "typeString": "modifier (contract ISmartToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22433:26:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17780, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17768, + "src": "22485:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17781, + "modifierName": { + "argumentTypes": null, + "id": 17779, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "22469:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22469:24:28" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 17783, + "name": "_minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17770, + "src": "22519:10:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17784, + "modifierName": { + "argumentTypes": null, + "id": 17782, + "name": "greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22929, + "src": "22503:15:28", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$", + "typeString": "modifier (uint256)" + } + }, + "nodeType": "ModifierInvocation", + "src": "22503:27:28" + } + ], + "name": "removeLiquidity", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17771, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17766, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22312:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17765, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "22312:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17768, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22336:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17767, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22336:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17770, + "mutability": "mutable", + "name": "_minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22353:18:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17769, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22353:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22311:61:28" + }, + "returnParameters": { + "id": 17787, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17786, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 17916, + "src": "22549:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17785, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22549:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "22548:9:28" + }, + "scope": 18367, + "src": "22287:2224:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18007, + "nodeType": "Block", + "src": "25040:683:28", + "statements": [ + { + "assignments": [ + 17929 + ], + "declarations": [ + { + "constant": false, + "id": 17929, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18007, + "src": "25051:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17928, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25051:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17933, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 17930, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17919, + "src": "25073:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 17931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "totalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 21415, + "src": "25073:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 17932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25073:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25051:46:28" + }, + { + "assignments": [ + 17935 + ], + "declarations": [ + { + "constant": false, + "id": 17935, + "mutability": "mutable", + "name": "stakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18007, + "src": "25108:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17934, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25108:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17941, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17936, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "25132:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17940, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17937, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "25147:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 17939, + "indexExpression": { + "argumentTypes": null, + "id": 17938, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17919, + "src": "25168:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25147:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25132:48:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25108:72:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17942, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17921, + "src": "25197:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 17943, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17929, + "src": "25207:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25197:21:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18002, + "nodeType": "IfStatement", + "src": "25193:487:28", + "trueBody": { + "id": 18001, + "nodeType": "Block", + "src": "25220:460:28", + "statements": [ + { + "assignments": [ + 17946 + ], + "declarations": [ + { + "constant": false, + "id": 17946, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25235:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17945, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25235:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17953, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17951, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "25287:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 17947, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "25247:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 17949, + "indexExpression": { + "argumentTypes": null, + "id": 17948, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "25262:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25247:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25247:39:28", + "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": 17952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25247:61:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25235:73:28" + }, + { + "assignments": [ + 17955 + ], + "declarations": [ + { + "constant": false, + "id": 17955, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25323:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17954, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25323:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17959, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17957, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "25352:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 17956, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "25335:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 17958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25335:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25323:49:28" + }, + { + "assignments": [ + 17961, + 17963 + ], + "declarations": [ + { + "constant": false, + "id": 17961, + "mutability": "mutable", + "name": "min", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25388:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17960, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25388:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17963, + "mutability": "mutable", + "name": "max", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25401:11:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17962, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25401:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17974, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17964, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25416:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 17965, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25420:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25416:5:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17970, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25434:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17971, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25437:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17972, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25433:6:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "id": 17973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "25416:23:28", + "trueExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17967, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17946, + "src": "25425:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 17968, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17955, + "src": "25428:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17969, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25424:6:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25387:52:28" + }, + { + "assignments": [ + 17976 + ], + "declarations": [ + { + "constant": false, + "id": 17976, + "mutability": "mutable", + "name": "amountBeforeFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25454:23:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17975, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25454:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17984, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17982, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17929, + "src": "25511:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17979, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17935, + "src": "25492:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17977, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17921, + "src": "25480:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25480:11:28", + "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": 17980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25480:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "25480:30:28", + "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": 17983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25480:43:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25454:69:28" + }, + { + "assignments": [ + 17986 + ], + "declarations": [ + { + "constant": false, + "id": 17986, + "mutability": "mutable", + "name": "amountAfterFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18001, + "src": "25538:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25538:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 17994, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17992, + "name": "max", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17963, + "src": "25592:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 17989, + "name": "min", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17961, + "src": "25583:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 17987, + "name": "amountBeforeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17976, + "src": "25563:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "25563:19:28", + "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": 17990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25563:24:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 17991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "25563:28:28", + "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": 17993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25563:33:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25538:58:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 17995, + "name": "amountAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17986, + "src": "25619:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 17996, + "name": "amountBeforeFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17976, + "src": "25635:15:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 17997, + "name": "amountAfterFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17986, + "src": "25653:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25635:32:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17999, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25618:50:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 17927, + "id": 18000, + "nodeType": "Return", + "src": "25611:57:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18003, + "name": "stakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17935, + "src": "25698:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 18004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25713:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 18005, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "25697:18:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_rational_0_by_1_$", + "typeString": "tuple(uint256,int_const 0)" + } + }, + "functionReturnParameters": 17927, + "id": 18006, + "nodeType": "Return", + "src": "25690:25:28" + } + ] + }, + "documentation": { + "id": 17917, + "nodeType": "StructuredDocumentation", + "src": "24519:398:28", + "text": " @dev calculates the amount of reserve tokens entitled for a given amount of pool tokens\n note that a fee is applied according to the equilibrium level of the primary reserve token\n @param _poolToken address of the pool token\n @param _amount amount of pool tokens\n @return amount after fee and fee, in reserve token units" + }, + "functionSelector": "69067d95", + "id": 18008, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeLiquidityReturnAndFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 17922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17919, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "24960:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 17918, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "24960:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17921, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "24984:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17920, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24984:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "24959:41:28" + }, + "returnParameters": { + "id": 17927, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17924, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "25022:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17923, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25022:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 17926, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18008, + "src": "25031:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 17925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25031:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "25021:18:28" + }, + "scope": 18367, + "src": "24923:800:28", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18082, + "nodeType": "Block", + "src": "26726:820:28", + "statements": [ + { + "assignments": [ + 18029 + ], + "declarations": [ + { + "constant": false, + "id": 18029, + "mutability": "mutable", + "name": "sourceBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26783:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18028, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26783:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18033, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18031, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18011, + "src": "26824:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18030, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "26807:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26807:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26783:54:28" + }, + { + "assignments": [ + 18035 + ], + "declarations": [ + { + "constant": false, + "id": 18035, + "mutability": "mutable", + "name": "targetBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26848:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26848:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18039, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18037, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18013, + "src": "26889:12:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18036, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "26872:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26872:30:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26848:54:28" + }, + { + "assignments": [ + 18041 + ], + "declarations": [ + { + "constant": false, + "id": 18041, + "mutability": "mutable", + "name": "targetAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "26949:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18040, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26949:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18054, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18048, + "name": "sourceBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18029, + "src": "27053:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18049, + "name": "_sourceWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18015, + "src": "27081:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18050, + "name": "targetBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18035, + "src": "27109:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18051, + "name": "_targetWeight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18017, + "src": "27137:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18052, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18019, + "src": "27165:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18044, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "26997:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 18043, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "26987:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 18045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26987:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18042, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "26972:14:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 18046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26972:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 18047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "crossReserveTargetAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 13120, + "src": "26972:66:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint32_$_t_uint256_$_t_uint32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint32,uint256,uint32,uint256) view external returns (uint256)" + } + }, + "id": 18053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26972:211:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26949:234:28" + }, + { + "assignments": [ + 18056 + ], + "declarations": [ + { + "constant": false, + "id": 18056, + "mutability": "mutable", + "name": "standardFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "27196:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27196:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18060, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18058, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27231:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18057, + "name": "calculateFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9806, + "src": "27218:12:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view returns (uint256)" + } + }, + "id": 18059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27218:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27196:48:28" + }, + { + "assignments": [ + 18062 + ], + "declarations": [ + { + "constant": false, + "id": 18062, + "mutability": "mutable", + "name": "totalFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18082, + "src": "27255:16:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27255:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18073, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18071, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18056, + "src": "27335:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18068, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "27315:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18065, + "name": "oracleDeviationFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16695, + "src": "27291:18:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18063, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27274:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "27274:16:28", + "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": 18066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:36:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22687, + "src": "27274:40:28", + "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": 18069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:56:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "27274:60:28", + "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": 18072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27274:73:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27255:92:28" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18076, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18062, + "src": "27505:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18074, + "name": "targetAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18041, + "src": "27488:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22627, + "src": "27488:16:28", + "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": 18077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27488:26:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18078, + "name": "standardFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18056, + "src": "27516:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18079, + "name": "totalFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18062, + "src": "27529:8:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18080, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "27487:51:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 18027, + "id": 18081, + "nodeType": "Return", + "src": "27480:58:28" + } + ] + }, + "documentation": { + "id": 18009, + "nodeType": "StructuredDocumentation", + "src": "25731:720:28", + "text": " @dev returns the expected target amount of converting one reserve to another along with the fees\n this version of the function expects the reserve weights as an input (gas optimization)\n @param _sourceToken contract address of the source reserve token\n @param _targetToken contract address of the target reserve token\n @param _sourceWeight source reserve token weight\n @param _targetWeight target reserve token weight\n @param _amount amount of tokens received from the user\n @return expected target amount\n @return expected standard conversion fee\n @return expected total conversion fee" + }, + "id": 18083, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "targetAmountAndFees", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18020, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18011, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26496:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18010, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "26496:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18013, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26531:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18012, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "26531:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18015, + "mutability": "mutable", + "name": "_sourceWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26566:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18014, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "26566:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18017, + "mutability": "mutable", + "name": "_targetWeight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26597:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18016, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "26597:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18019, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26628:15:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18018, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26628:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26485:159:28" + }, + "returnParameters": { + "id": 18027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18022, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26694:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18021, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26694:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18024, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26703:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18023, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26703:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18026, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18083, + "src": "26712:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18025, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26712:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "26693:27:28" + }, + "scope": 18367, + "src": "26457:1089:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18163, + "nodeType": "Block", + "src": "27831:778:28", + "statements": [ + { + "assignments": [ + 18088 + ], + "declarations": [ + { + "constant": false, + "id": 18088, + "mutability": "mutable", + "name": "container", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27842:30:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 18087, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "27842:20:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18095, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18092, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9030, + "src": "27904:6:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 18091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27896:7:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 18090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27896:7:28", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27896:15:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18089, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "27875:20:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 18094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27875:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27842:70:28" + }, + { + "assignments": [ + 18099 + ], + "declarations": [ + { + "constant": false, + "id": 18099, + "mutability": "mutable", + "name": "poolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27923:31:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18097, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "27923:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18098, + "length": null, + "nodeType": "ArrayTypeName", + "src": "27923:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18103, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 18100, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18088, + "src": "27957:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "poolTokens", + "nodeType": "MemberAccess", + "referencedDeclaration": 18777, + "src": "27957:20:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr_$", + "typeString": "function () view external returns (contract ISmartToken[] memory)" + } + }, + "id": 18102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27957:22:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27923:56:28" + }, + { + "assignments": [ + 18105 + ], + "declarations": [ + { + "constant": false, + "id": 18105, + "mutability": "mutable", + "name": "initialSetup", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "27990:17:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 18104, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "27990:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18110, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18106, + "name": "poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18099, + "src": "28010:10:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "id": 18107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28010:17:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28031:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "28010:22:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27990:42:28" + }, + { + "assignments": [ + 18112 + ], + "declarations": [ + { + "constant": false, + "id": 18112, + "mutability": "mutable", + "name": "reserveCount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18163, + "src": "28045:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28045:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18115, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18113, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28068:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "28068:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28045:43:28" + }, + { + "body": { + "id": 18161, + "nodeType": "Block", + "src": "28142:460:28", + "statements": [ + { + "assignments": [ + 18127 + ], + "declarations": [ + { + "constant": false, + "id": 18127, + "mutability": "mutable", + "name": "reservePoolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18161, + "src": "28157:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18126, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "28157:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18128, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "28157:28:28" + }, + { + "condition": { + "argumentTypes": null, + "id": 18129, + "name": "initialSetup", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18105, + "src": "28204:12:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 18143, + "nodeType": "Block", + "src": "28314:67:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18137, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28333:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18138, + "name": "poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18099, + "src": "28352:10:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21516_$dyn_memory_ptr", + "typeString": "contract ISmartToken[] memory" + } + }, + "id": 18140, + "indexExpression": { + "argumentTypes": null, + "id": 18139, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28363:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28352:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28333:32:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18142, + "nodeType": "ExpressionStatement", + "src": "28333:32:28" + } + ] + }, + "id": 18144, + "nodeType": "IfStatement", + "src": "28200:181:28", + "trueBody": { + "id": 18136, + "nodeType": "Block", + "src": "28218:77:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18130, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28237:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 18131, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18088, + "src": "28256:9:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 18782, + "src": "28256:21:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$_t_contract$_ISmartToken_$21516_$", + "typeString": "function () external returns (contract ISmartToken)" + } + }, + "id": 18133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28256:23:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28237:42:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18135, + "nodeType": "ExpressionStatement", + "src": "28237:42:28" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 18151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18145, + "name": "reservesToPoolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16677, + "src": "28461:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_contract$_ISmartToken_$21516_$", + "typeString": "mapping(contract IERC20Token => contract ISmartToken)" + } + }, + "id": 18149, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18146, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28482:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18148, + "indexExpression": { + "argumentTypes": null, + "id": 18147, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28496:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28482:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28461:38:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18150, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28502:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "src": "28461:57:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "id": 18152, + "nodeType": "ExpressionStatement", + "src": "28461:57:28" + }, + { + "expression": { + "argumentTypes": null, + "id": 18159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18153, + "name": "poolTokensToReserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16681, + "src": "28533:20:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_ISmartToken_$21516_$_t_contract$_IERC20Token_$21461_$", + "typeString": "mapping(contract ISmartToken => contract IERC20Token)" + } + }, + "id": 18155, + "indexExpression": { + "argumentTypes": null, + "id": 18154, + "name": "reservePoolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18127, + "src": "28554:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28533:38:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18156, + "name": "reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9036, + "src": "28574:13:28", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21461_$dyn_storage", + "typeString": "contract IERC20Token[] storage ref" + } + }, + "id": 18158, + "indexExpression": { + "argumentTypes": null, + "id": 18157, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28588:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28574:16:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "28533:57:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "id": 18160, + "nodeType": "ExpressionStatement", + "src": "28533:57:28" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18120, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28119:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 18121, + "name": "reserveCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18112, + "src": "28123:12:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28119:16:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 18162, + "initializationExpression": { + "assignments": [ + 18117 + ], + "declarations": [ + { + "constant": false, + "id": 18117, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18162, + "src": "28104:9:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28104:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18119, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 18118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28116:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "28104:13:28" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 18124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "28137:3:28", + "subExpression": { + "argumentTypes": null, + "id": 18123, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18117, + "src": "28137:1:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18125, + "nodeType": "ExpressionStatement", + "src": "28137:3:28" + }, + "nodeType": "ForStatement", + "src": "28099:503:28" + } + ] + }, + "documentation": { + "id": 18084, + "nodeType": "StructuredDocumentation", + "src": "27554:234:28", + "text": " @dev creates the converter's pool tokens\n note that technically pool tokens can be created on deployment but gas limit\n might get too high for a block, so creating them on first activation" + }, + "id": 18164, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createPoolTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18085, + "nodeType": "ParameterList", + "parameters": [], + "src": "27819:2:28" + }, + "returnParameters": { + "id": 18086, + "nodeType": "ParameterList", + "parameters": [], + "src": "27831:0:28" + }, + "scope": 18367, + "src": "27794:815:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 18185, + "nodeType": "Block", + "src": "28808:192:28", + "statements": [ + { + "assignments": [ + 18171, + 18173 + ], + "declarations": [ + { + "constant": false, + "id": 18171, + "mutability": "mutable", + "name": "latestRateN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18185, + "src": "28820:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28820:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18173, + "mutability": "mutable", + "name": "latestRateD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18185, + "src": "28841:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28841:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18179, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18176, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "28887:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18177, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "28908:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "expression": { + "argumentTypes": null, + "id": 18174, + "name": "priceOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16665, + "src": "28864:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$23225", + "typeString": "contract IPriceOracle" + } + }, + "id": 18175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestRate", + "nodeType": "MemberAccess", + "referencedDeclaration": 23206, + "src": "28864:22:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view external returns (uint256,uint256)" + } + }, + "id": 18178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28864:66:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28819:111:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18181, + "name": "latestRateN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18171, + "src": "28962:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18182, + "name": "latestRateD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18173, + "src": "28978:11:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18180, + "name": "Fraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22916, + "src": "28948:8:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fraction_$22916_storage_ptr_$", + "typeString": "type(struct Fraction storage pointer)" + } + }, + "id": 18183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "n", + "d" + ], + "nodeType": "FunctionCall", + "src": "28948:44:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "functionReturnParameters": 18169, + "id": 18184, + "nodeType": "Return", + "src": "28941:51:28" + } + ] + }, + "documentation": { + "id": 18165, + "nodeType": "StructuredDocumentation", + "src": "28617:114:28", + "text": " @dev returns the effective rate between the two reserve tokens\n @return rate" + }, + "id": 18186, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_effectiveTokensRate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18166, + "nodeType": "ParameterList", + "parameters": [], + "src": "28766:2:28" + }, + "returnParameters": { + "id": 18169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18168, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18186, + "src": "28791:15:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 18167, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "28791:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "28790:17:28" + }, + "scope": 18367, + "src": "28737:263:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18204, + "nodeType": "Block", + "src": "29209:137:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18190, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29221:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18192, + "indexExpression": { + "argumentTypes": null, + "id": 18191, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "29230:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29221:29:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29221:36:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18194, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29259:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18196, + "indexExpression": { + "argumentTypes": null, + "id": 18195, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "29268:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29259:31:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "29259:38:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 18198, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "29220:78:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18200, + "name": "externalRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16683, + "src": "29325:12:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Fraction_$22916_storage", + "typeString": "struct Fraction storage ref" + } + ], + "id": 18199, + "name": "effectiveReserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 17238, + 18276 + ], + "referencedDeclaration": 18276, + "src": "29301:23:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Fraction_$22916_memory_ptr_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (struct Fraction memory) view returns (uint32,uint32)" + } + }, + "id": 18201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29301:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "src": "29220:118:28", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18203, + "nodeType": "ExpressionStatement", + "src": "29220:118:28" + } + ] + }, + "documentation": { + "id": 18187, + "nodeType": "StructuredDocumentation", + "src": "29008:166:28", + "text": " @dev updates the pool's reserve weights with new values in order to push the current primary\n reserve token balance to its staked balance" + }, + "id": 18205, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "rebalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18188, + "nodeType": "ParameterList", + "parameters": [], + "src": "29198:2:28" + }, + "returnParameters": { + "id": 18189, + "nodeType": "ParameterList", + "parameters": [], + "src": "29209:0:28" + }, + "scope": 18367, + "src": "29180:166:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18228, + "nodeType": "Block", + "src": "29700:122:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18222, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "29782:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18224, + "indexExpression": { + "argumentTypes": null, + "id": 18223, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18208, + "src": "29791:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29782:23:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18225, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 9014, + "src": "29782:31:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 18219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18217, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "29752:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29775:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "29752:24:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18213, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "29718:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18215, + "indexExpression": { + "argumentTypes": null, + "id": 18214, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18208, + "src": "29733:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29718:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "29718:33:28", + "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": 18220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29718:59:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22605, + "src": "29718:63:28", + "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": 18226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29718:96:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18212, + "id": 18227, + "nodeType": "Return", + "src": "29711:103:28" + } + ] + }, + "documentation": { + "id": 18206, + "nodeType": "StructuredDocumentation", + "src": "29354:255:28", + "text": " @dev returns the amplified balance of a given reserve token\n this version skips the input validation (gas optimization)\n @param _reserveToken reserve token address\n @return amplified balance" + }, + "id": 18229, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "amplifiedBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18208, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18229, + "src": "29641:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18207, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "29641:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29640:27:28" + }, + "returnParameters": { + "id": 18212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18211, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18229, + "src": "29691:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29691:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "29690:9:28" + }, + "scope": 18367, + "src": "29615:207:28", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 18275, + "nodeType": "Block", + "src": "30220:609:28", + "statements": [ + { + "assignments": [ + 18240 + ], + "declarations": [ + { + "constant": false, + "id": 18240, + "mutability": "mutable", + "name": "primaryStakedBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30282:28:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30282:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18244, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18241, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "30313:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18243, + "indexExpression": { + "argumentTypes": null, + "id": 18242, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "30328:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30313:35:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30282:66:28" + }, + { + "assignments": [ + 18246 + ], + "declarations": [ + { + "constant": false, + "id": 18246, + "mutability": "mutable", + "name": "primaryBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30407:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30407:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18250, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18248, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "30449:19:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18247, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "30432:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30432:37:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30407:62:28" + }, + { + "assignments": [ + 18252 + ], + "declarations": [ + { + "constant": false, + "id": 18252, + "mutability": "mutable", + "name": "secondaryBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18275, + "src": "30480:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30480:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18256, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18254, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "30524:21:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18253, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "30507:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30507:39:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30480:66:28" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18265, + "name": "AMPLIFICATION_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16663, + "src": "30695:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18263, + "name": "primaryStakedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18240, + "src": "30670:20:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "30670:24:28", + "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": 18266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30670:46:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18267, + "name": "primaryBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18246, + "src": "30731:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18268, + "name": "secondaryBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18252, + "src": "30760:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18269, + "name": "_rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18232, + "src": "30791:5:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 18270, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "n", + "nodeType": "MemberAccess", + "referencedDeclaration": 22913, + "src": "30791:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18271, + "name": "_rate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18232, + "src": "30813:5:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction memory" + } + }, + "id": 18272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "d", + "nodeType": "MemberAccess", + "referencedDeclaration": 22915, + "src": "30813:7:28", + "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" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18259, + "name": "BANCOR_FORMULA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "30623:14:28", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 18258, + "name": "addressOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22052, + "src": "30613:9:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32) view returns (address)" + } + }, + "id": 18260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30613:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18257, + "name": "IBancorFormula", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13177, + "src": "30598:14:28", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBancorFormula_$13177_$", + "typeString": "type(contract IBancorFormula)" + } + }, + "id": 18261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30598:41:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBancorFormula_$13177", + "typeString": "contract IBancorFormula" + } + }, + "id": 18262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balancedWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 13176, + "src": "30598:57:28", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256) view external returns (uint32,uint32)" + } + }, + "id": 18273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30598:223:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18238, + "id": 18274, + "nodeType": "Return", + "src": "30591:230:28" + } + ] + }, + "documentation": { + "id": 18230, + "nodeType": "StructuredDocumentation", + "src": "29830:290:28", + "text": " @dev returns the effective reserve weights based on the staked balance, current balance and oracle price\n @param _rate rate between the reserve tokens\n @return new primary reserve weight\n @return new secondary reserve weight" + }, + "id": 18276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "effectiveReserveWeights", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18233, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18232, + "mutability": "mutable", + "name": "_rate", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30159:21:28", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_memory_ptr", + "typeString": "struct Fraction" + }, + "typeName": { + "contractScope": null, + "id": 18231, + "name": "Fraction", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22916, + "src": "30159:8:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fraction_$22916_storage_ptr", + "typeString": "struct Fraction" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30158:23:28" + }, + "returnParameters": { + "id": 18238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18235, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30204:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18234, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "30204:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18237, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18276, + "src": "30212:6:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18236, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "30212:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "30203:16:28" + }, + "scope": 18367, + "src": "30126:703:28", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18336, + "nodeType": "Block", + "src": "31393:577:28", + "statements": [ + { + "assignments": [ + 18289 + ], + "declarations": [ + { + "constant": false, + "id": 18289, + "mutability": "mutable", + "name": "token1Balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18336, + "src": "31443:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18288, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31443:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18293, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18291, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31484:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18290, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "31467:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31467:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31443:49:28" + }, + { + "assignments": [ + 18295 + ], + "declarations": [ + { + "constant": false, + "id": 18295, + "mutability": "mutable", + "name": "token2Balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18336, + "src": "31503:21:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31503:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18299, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18297, + "name": "_token2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18281, + "src": "31544:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + ], + "id": 18296, + "name": "amplifiedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18229, + "src": "31527:16:28", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21461_$returns$_t_uint256_$", + "typeString": "function (contract IERC20Token) view returns (uint256)" + } + }, + "id": 18298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31527:25:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31503:49:28" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18300, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31608:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31625:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31608:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18311, + "nodeType": "IfStatement", + "src": "31604:91:28", + "trueBody": { + "id": 18310, + "nodeType": "Block", + "src": "31628:67:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18303, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31643:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18304, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "31659:8:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 18306, + "indexExpression": { + "argumentTypes": null, + "id": 18305, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31668:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31659:17:28", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 18307, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "31659:24:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31643:40:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 18309, + "nodeType": "ExpressionStatement", + "src": "31643:40:28" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18312, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31751:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31768:1:28", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31751:18:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 18322, + "nodeType": "IfStatement", + "src": "31747:97:28", + "trueBody": { + "id": 18321, + "nodeType": "Block", + "src": "31771:73:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18315, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31786:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 18318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 18316, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "31802:14:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 18317, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31819:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31802:30:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "31786:46:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 18320, + "nodeType": "ExpressionStatement", + "src": "31786:46:28" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18324, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18279, + "src": "31877:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18325, + "name": "_token2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18281, + "src": "31886:7:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18328, + "name": "_token1Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18283, + "src": "31913:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18326, + "name": "token2Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18295, + "src": "31895:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "31895:17:28", + "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": 18329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31895:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18332, + "name": "_token2Weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18285, + "src": "31947:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18330, + "name": "token1Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18289, + "src": "31929:13:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22661, + "src": "31929:17:28", + "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": 18333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31929:32:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18323, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "31861:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 18334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31861:101:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18335, + "nodeType": "EmitStatement", + "src": "31856:106:28" + } + ] + }, + "documentation": { + "id": 18277, + "nodeType": "StructuredDocumentation", + "src": "30837:418:28", + "text": " @dev dispatches token rate update event for the reserve tokens\n @param _token1 contract address of the token to calculate the rate of one unit of\n @param _token2 contract address of the token to calculate the rate of one `_token1` unit in\n @param _token1Weight reserve weight of token1\n @param _token2Weight reserve weight of token2" + }, + "id": 18337, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18279, + "mutability": "mutable", + "name": "_token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31299:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18278, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "31299:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18281, + "mutability": "mutable", + "name": "_token2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31320:19:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18280, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "31320:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18283, + "mutability": "mutable", + "name": "_token1Weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31341:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18282, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "31341:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18285, + "mutability": "mutable", + "name": "_token2Weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18337, + "src": "31363:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18284, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "31363:6:28", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "31298:86:28" + }, + "returnParameters": { + "id": 18287, + "nodeType": "ParameterList", + "parameters": [], + "src": "31393:0:28" + }, + "scope": 18367, + "src": "31261:709:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18356, + "nodeType": "Block", + "src": "32385:115:28", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18348, + "name": "_poolToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18340, + "src": "32417:10:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 18349, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18344, + "src": "32429:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 18350, + "name": "stakedBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16673, + "src": "32444:14:28", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_uint256_$", + "typeString": "mapping(contract IERC20Token => uint256)" + } + }, + "id": 18352, + "indexExpression": { + "argumentTypes": null, + "id": 18351, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18344, + "src": "32459:13:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32444:29:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18353, + "name": "_poolTokenSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18342, + "src": "32475:16:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18347, + "name": "TokenRateUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9089, + "src": "32401:15:28", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_contract$_IERC20Token_$21461_$_t_contract$_IERC20Token_$21461_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token,uint256,uint256)" + } + }, + "id": 18354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32401:91:28", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18355, + "nodeType": "EmitStatement", + "src": "32396:96:28" + } + ] + }, + "documentation": { + "id": 18338, + "nodeType": "StructuredDocumentation", + "src": "31978:274:28", + "text": " @dev dispatches token rate update event for one of the pool tokens\n @param _poolToken address of the pool token\n @param _poolTokenSupply total pool token supply\n @param _reserveToken address of the reserve token" + }, + "id": 18357, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "dispatchPoolTokenRateUpdateEvent", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18345, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18340, + "mutability": "mutable", + "name": "_poolToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32300:22:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18339, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "32300:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18342, + "mutability": "mutable", + "name": "_poolTokenSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32324:24:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32324:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18344, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18357, + "src": "32350:25:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18343, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "32350:11:28", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32299:77:28" + }, + "returnParameters": { + "id": 18346, + "nodeType": "ParameterList", + "parameters": [], + "src": "32385:0:28" + }, + "scope": 18367, + "src": "32258:242:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 18365, + "nodeType": "Block", + "src": "32620:29:28", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18363, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "32638:3:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18362, + "id": 18364, + "nodeType": "Return", + "src": "32631:10:28" + } + ] + }, + "documentation": { + "id": 18358, + "nodeType": "StructuredDocumentation", + "src": "32508:50:28", + "text": " @dev returns the current time" + }, + "id": 18366, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18359, + "nodeType": "ParameterList", + "parameters": [], + "src": "32577:2:28" + }, + "returnParameters": { + "id": 18362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18361, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18366, + "src": "32611:7:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32611:7:28", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "32610:9:28" + }, + "scope": 18367, + "src": "32564:85:28", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 18368, + "src": "741:31911:28" + } + ], + "src": "52:32602:28" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.956Z", + "devdoc": { + "details": "Liquidity Pool v2 Converter The liquidity pool v2 converter is a specialized version of a converter that uses price oracles to rebalance the reserve weights in such a way that the primary token balance always strives to match the staked balance. This type of liquidity pool always has 2 reserves and the reserve weights are dynamic.", + "events": { + "OracleDeviationFeeUpdate(uint32,uint32)": { + "details": "triggered when the oracle deviation fee is updated", + "params": { + "_newFee": "new fee percentage, represented in ppm", + "_prevFee": "previous fee percentage, represented in ppm" + } + } + }, + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "activate(address,address,address)": { + "details": "sets the pool's primary reserve token / price oracles and activates the pool each oracle must be able to provide the rate for each reserve token note that the oracle must be whitelisted prior to the call can only be called by the owner while the pool is inactive", + "params": { + "_primaryReserveOracle": "address of a chainlink price oracle for the primary reserve token", + "_primaryReserveToken": "address of the pool's primary reserve token", + "_secondaryReserveOracle": "address of a chainlink price oracle for the secondary reserve token" + } + }, + "addLiquidity(address,uint256,uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller", + "params": { + "_amount": "amount of liquidity to add", + "_minReturn": "minimum return-amount of pool tokens", + "_reserveToken": "address of the reserve token to add liquidity to" + }, + "returns": { + "_0": "amount of pool tokens minted" + } + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive and 2 reserves aren't defined yet", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "constructor": { + "details": "initializes a new LiquidityPoolV2Converter instance", + "params": { + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_poolTokensContainer": "pool tokens container governed by the converter", + "_registry": "address of a contract registry contract" + } + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "converterType()": { + "details": "returns the converter type", + "returns": { + "_0": "see the converter types in the the main contract doc" + } + }, + "disableMaxStakedBalances()": { + "details": "disables the max staked balance mechanism available as a temporary mechanism during the beta once disabled, it cannot be re-enabled can only be called by the owner" + }, + "effectiveReserveWeights()": { + "details": "returns the effective reserve tokens weights", + "returns": { + "_0": "reserve1 weight", + "_1": "reserve2 weight" + } + }, + "effectiveTokensRate()": { + "details": "returns the effective rate of 1 primary token in secondary tokens", + "returns": { + "_0": "rate of 1 primary token in secondary tokens (numerator)", + "_1": "rate of 1 primary token in secondary tokens (denominator)" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "liquidationLimit(address)": { + "details": "returns the maximum number of pool tokens that can currently be liquidated", + "params": { + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "liquidation limit" + } + }, + "poolToken(address)": { + "details": "returns the pool token address by the reserve token address", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "pool token address" + } + }, + "removeLiquidity(address,uint256,uint256)": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool", + "params": { + "_amount": "amount of pool tokens to burn", + "_minReturn": "minimum return-amount of reserve tokens", + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "amount of liquidity removed" + } + }, + "removeLiquidityReturnAndFee(address,uint256)": { + "details": "calculates the amount of reserve tokens entitled for a given amount of pool tokens note that a fee is applied according to the equilibrium level of the primary reserve token", + "params": { + "_amount": "amount of pool tokens", + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "amount after fee and fee, in reserve token units" + } + }, + "reserveAmplifiedBalance(address)": { + "details": "returns the amplified balance of a given reserve token", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "amplified balance" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveStakedBalance(address)": { + "details": "returns the staked balance of a given reserve token", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "staked balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "setMaxStakedBalances(uint256,uint256)": { + "details": "sets the max staked balance for both reserves available as a temporary mechanism during the beta can only be called by the owner", + "params": { + "_reserve1MaxStakedBalance": "max staked balance for reserve 1", + "_reserve2MaxStakedBalance": "max staked balance for reserve 2" + } + }, + "setOracleDeviationFee(uint32)": { + "details": "updates the current oracle deviation fee can only be called by the contract owner", + "params": { + "_oracleDeviationFee": "new oracle deviation fee, represented in ppm" + } + }, + "setReserveStakedBalance(address,uint256)": { + "details": "sets the reserve's staked balance can only be called by the upgrader contract while the upgrader is the owner", + "params": { + "_balance": "new reserve staked balance", + "_reserveToken": "reserve token address" + } + }, + "targetAmountAndFee(address,address,uint256)": { + "details": "returns the expected target amount of converting one reserve to another along with the fee", + "params": { + "_amount": "amount of tokens received from the user", + "_sourceToken": "contract address of the source reserve token", + "_targetToken": "contract address of the target reserve token" + }, + "returns": { + "_0": "expected target amount", + "_1": "expected fee" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterAnchorFactory.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterAnchorFactory.json new file mode 100644 index 00000000..45f2eea2 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterAnchorFactory.json @@ -0,0 +1,1280 @@ +{ + "contractName": "LiquidityPoolV2ConverterAnchorFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"converterType()\":{\"details\":\"returns the converter type the factory is associated with\",\"returns\":{\"_0\":\"converter type\"}},\"createAnchor(string,string,uint8)\":{\"details\":\"creates a new converter anchor with the given arguments and transfers the ownership to the caller\",\"params\":{\"_decimals\":\"pool decimals\",\"_name\":\"pool name\",\"_symbol\":\"pool symbol\"},\"returns\":{\"_0\":\"new anchor\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterAnchorFactory.sol\":\"LiquidityPoolV2ConverterAnchorFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterAnchorFactory.sol\":{\"keccak256\":\"0xe1d372a7eb6ee1986d557343643117901da945ca03b07cd5d560624ce35131af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://4ef150bcaa24995781a3dc16872e8b22b61f5df5d9befa702b3487b6477908e5\",\"dweb:/ipfs/QmRgjNJzeocqFq9hri4PuY7fpjERpRJWrYwpCqmBH5kjMW\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":{\"keccak256\":\"0x79e583ec380c8982f74d4f707ae26ed96e1c90a6b54b4fc058ab2316656e0ddb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3c900b396fefda767db8b99d9ed10c9a22151279b0f8229098d28a08e75046da\",\"dweb:/ipfs/QmZBqgB1CnKpjM8Bv6HMrYtzdwu8wBmS3FzpWuvhyfGLwd\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506125b4806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633e8ff43f1461003b578063a9fd4a2a1461005a575b600080fd5b6100436101a8565b6040805161ffff9092168252519081900360200190f35b61018c6004803603606081101561007057600080fd5b81019060208101813564010000000081111561008b57600080fd5b82018360208201111561009d57600080fd5b803590602001918460018302840111640100000000831117156100bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561011257600080fd5b82018360208201111561012457600080fd5b8035906020019184600183028401116401000000008311171561014657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506101ad9050565b604080516001600160a01b039092168252519081900360200190f35b600290565b6000808484846040516101bf90610327565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b838110156102035781810151838201526020016101eb565b50505050905090810190601f1680156102305780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561026357818101518382015260200161024b565b50505050905090810190601f1680156102905780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f0801580156102b4573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561030657600080fd5b505af115801561031a573d6000803e3d6000fd5b5092979650505050505050565b61224a806103358339019056fe60806040523480156200001157600080fd5b506040516200224a3803806200224a833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b0319163317905584519092501515905062000200576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008251116200024c576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b82516200026190600290602086019062000295565b5081516200027790600390602085019062000295565b506004805460ff191660ff9290921691909117905550620003319050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002d857805160ff191683800117855562000308565b8280016001018555821562000308579182015b8281111562000308578251825591602001919060010190620002eb565b50620003169291506200031a565b5090565b5b808211156200031657600081556001016200031b565b611f0980620003416000396000f3fe60806040523480156200001157600080fd5b5060043610620000c45760003560e01c806395d89b41116200007b57806395d89b4114620002325780639cbf9e36146200023c578063c6c3bbe61462000246578063d4ee1d90146200027f578063f2fde38b1462000289578063f6b911bc14620002b257620000c4565b806306fdde0314620000c9578063313ce567146200014b5780635e35359e146200016b5780636d3e313e14620001a657806379ba509714620002025780638da5cb5b146200020c575b600080fd5b620000d3620002eb565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200010f578181015183820152602001620000f5565b50505050905090810190601f1680156200013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001556200037a565b6040805160ff9092168252519081900360200190f35b620001a4600480360360608110156200018357600080fd5b506001600160a01b0381358116916020810135909116906040013562000383565b005b620001b0620003c6565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015620001ee578181015183820152602001620001d4565b505050509050019250505060405180910390f35b620001a46200042a565b62000216620004e2565b604080516001600160a01b039092168252519081900360200190f35b620000d3620004f1565b620002166200054f565b620001a4600480360360608110156200025e57600080fd5b506001600160a01b038135811691602081013590911690604001356200082e565b62000216620008ae565b620001a460048036036020811015620002a157600080fd5b50356001600160a01b0316620008bd565b620001a460048036036060811015620002ca57600080fd5b506001600160a01b038135811691602081013590911690604001356200093e565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b820191906000526020600020905b8154815290600101906020018083116200035457829003601f168201915b505050505081565b60045460ff1681565b6200038d620009a0565b826200039981620009f6565b82620003a581620009f6565b83620003b18162000a4b565b620003be86868662000aa0565b505050505050565b606060058054806020026020016040519081016040528092919081815260200182805480156200042057602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000401575b5050505050905090565b6001546001600160a01b031633146200047e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b60006200055b620009a0565b6005805410620005aa576040805162461bcd60e51b815260206004820152601560248201527411549497d3505617d31253525517d4915050d21151605a1b604482015290519081900360640190fd5b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181526060936200064e93919290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b820191906000526020600020905b8154815290600101906020018083116200061d57829003601f168201915b5050600554600101925062000c08915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450606093620006ba93909290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b905060008282600460009054906101000a900460ff16604051620006de9062000c92565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620007245781810151838201526020016200070a565b50505050905090810190601f168015620007525780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620007875781810151838201526020016200076d565b50505050905090810190601f168015620007b55780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f080158015620007da573d6000803e3d6000fd5b50600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038316179055949350505050565b62000838620009a0565b826001600160a01b031663867904b483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b505af1158015620008a5573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031681565b620008c7620009a0565b6000546001600160a01b03828116911614156200091c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b62000948620009a0565b826001600160a01b031663a24835d183836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b6000546001600160a01b03163314620009f4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811662000a48576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b03811630141562000a48576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831062000b1f5780518252601f19909201916020918201910162000afe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462000b83576040519150601f19603f3d011682016040523d82523d6000602084013e62000b88565b606091505b509150915081801562000bb957508051158062000bb9575080806020019051602081101562000bb657600080fd5b50515b62000c01576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b60608282600360fc1b60f81c016040516020018083805190602001908083835b6020831062000c495780518252601f19909201916020918201910162000c28565b6001836020036101000a0380198251168184511680821785525050505050509050018260ff1660f81b815260010192505050604051602081830303815290604052905092915050565b6112338062000ca18339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212204f09fb1778cc831abb7f873219dbed978e552fc8cd81237b1adc3e5d9ff2530f64736f6c634300060c0033a2646970667358221220b0b49abf6ef09302c1faf84e87552fb7fd738f5e90ad689ba03eb219b6cb130864736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80633e8ff43f1461003b578063a9fd4a2a1461005a575b600080fd5b6100436101a8565b6040805161ffff9092168252519081900360200190f35b61018c6004803603606081101561007057600080fd5b81019060208101813564010000000081111561008b57600080fd5b82018360208201111561009d57600080fd5b803590602001918460018302840111640100000000831117156100bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561011257600080fd5b82018360208201111561012457600080fd5b8035906020019184600183028401116401000000008311171561014657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506101ad9050565b604080516001600160a01b039092168252519081900360200190f35b600290565b6000808484846040516101bf90610327565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b838110156102035781810151838201526020016101eb565b50505050905090810190601f1680156102305780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561026357818101518382015260200161024b565b50505050905090810190601f1680156102905780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f0801580156102b4573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561030657600080fd5b505af115801561031a573d6000803e3d6000fd5b5092979650505050505050565b61224a806103358339019056fe60806040523480156200001157600080fd5b506040516200224a3803806200224a833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b0319163317905584519092501515905062000200576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008251116200024c576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b82516200026190600290602086019062000295565b5081516200027790600390602085019062000295565b506004805460ff191660ff9290921691909117905550620003319050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002d857805160ff191683800117855562000308565b8280016001018555821562000308579182015b8281111562000308578251825591602001919060010190620002eb565b50620003169291506200031a565b5090565b5b808211156200031657600081556001016200031b565b611f0980620003416000396000f3fe60806040523480156200001157600080fd5b5060043610620000c45760003560e01c806395d89b41116200007b57806395d89b4114620002325780639cbf9e36146200023c578063c6c3bbe61462000246578063d4ee1d90146200027f578063f2fde38b1462000289578063f6b911bc14620002b257620000c4565b806306fdde0314620000c9578063313ce567146200014b5780635e35359e146200016b5780636d3e313e14620001a657806379ba509714620002025780638da5cb5b146200020c575b600080fd5b620000d3620002eb565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200010f578181015183820152602001620000f5565b50505050905090810190601f1680156200013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001556200037a565b6040805160ff9092168252519081900360200190f35b620001a4600480360360608110156200018357600080fd5b506001600160a01b0381358116916020810135909116906040013562000383565b005b620001b0620003c6565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015620001ee578181015183820152602001620001d4565b505050509050019250505060405180910390f35b620001a46200042a565b62000216620004e2565b604080516001600160a01b039092168252519081900360200190f35b620000d3620004f1565b620002166200054f565b620001a4600480360360608110156200025e57600080fd5b506001600160a01b038135811691602081013590911690604001356200082e565b62000216620008ae565b620001a460048036036020811015620002a157600080fd5b50356001600160a01b0316620008bd565b620001a460048036036060811015620002ca57600080fd5b506001600160a01b038135811691602081013590911690604001356200093e565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b820191906000526020600020905b8154815290600101906020018083116200035457829003601f168201915b505050505081565b60045460ff1681565b6200038d620009a0565b826200039981620009f6565b82620003a581620009f6565b83620003b18162000a4b565b620003be86868662000aa0565b505050505050565b606060058054806020026020016040519081016040528092919081815260200182805480156200042057602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000401575b5050505050905090565b6001546001600160a01b031633146200047e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b60006200055b620009a0565b6005805410620005aa576040805162461bcd60e51b815260206004820152601560248201527411549497d3505617d31253525517d4915050d21151605a1b604482015290519081900360640190fd5b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181526060936200064e93919290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b820191906000526020600020905b8154815290600101906020018083116200061d57829003601f168201915b5050600554600101925062000c08915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450606093620006ba93909290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b905060008282600460009054906101000a900460ff16604051620006de9062000c92565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620007245781810151838201526020016200070a565b50505050905090810190601f168015620007525780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620007875781810151838201526020016200076d565b50505050905090810190601f168015620007b55780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f080158015620007da573d6000803e3d6000fd5b50600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038316179055949350505050565b62000838620009a0565b826001600160a01b031663867904b483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b505af1158015620008a5573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031681565b620008c7620009a0565b6000546001600160a01b03828116911614156200091c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b62000948620009a0565b826001600160a01b031663a24835d183836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b6000546001600160a01b03163314620009f4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811662000a48576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b03811630141562000a48576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831062000b1f5780518252601f19909201916020918201910162000afe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462000b83576040519150601f19603f3d011682016040523d82523d6000602084013e62000b88565b606091505b509150915081801562000bb957508051158062000bb9575080806020019051602081101562000bb657600080fd5b50515b62000c01576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b60608282600360fc1b60f81c016040516020018083805190602001908083835b6020831062000c495780518252601f19909201916020918201910162000c28565b6001836020036101000a0380198251168184511680821785525050505050509050018260ff1660f81b815260010192505050604051602081830303815290604052905092915050565b6112338062000ca18339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212204f09fb1778cc831abb7f873219dbed978e552fc8cd81237b1adc3e5d9ff2530f64736f6c634300060c0033a2646970667358221220b0b49abf6ef09302c1faf84e87552fb7fd738f5e90ad689ba03eb219b6cb130864736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "236:933:29:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "236:933:29:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;452:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;859:307;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;859:307:29;;;;;;;;-1:-1:-1;859:307:29;;-1:-1:-1;;859:307:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;859:307:29;;-1:-1:-1;;;859:307:29;;;;;-1:-1:-1;859:307:29;;-1:-1:-1;859:307:29:i;:::-;;;;-1:-1:-1;;;;;859:307:29;;;;;;;;;;;;;;452:92;535:1;452:92;:::o;859:307::-;969:16;998:30;1055:5;1062:7;1071:9;1031:50;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1031:50:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;998:83;;1092:9;-1:-1:-1;;;;;1092:27:29;;1120:10;1092:39;;;;;;;;;;;;;-1:-1:-1;;;;;1092:39:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:9:29;;859:307;-1:-1:-1;;;;;;;859:307:29:o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./PoolTokensContainer.sol\";\r\nimport \"../../interfaces/ITypedConverterAnchorFactory.sol\";\r\n\r\n/*\r\n LiquidityPoolV2ConverterAnchorFactory Factory\r\n*/\r\ncontract LiquidityPoolV2ConverterAnchorFactory is ITypedConverterAnchorFactory {\r\n /**\r\n * @dev returns the converter type the factory is associated with\r\n *\r\n * @return converter type\r\n */\r\n function converterType() external pure override returns (uint16) {\r\n return 2;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter anchor with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _name pool name\r\n * @param _symbol pool symbol\r\n * @param _decimals pool decimals\r\n *\r\n * @return new anchor\r\n */\r\n function createAnchor(string memory _name, string memory _symbol, uint8 _decimals) external override returns (IConverterAnchor) {\r\n IPoolTokensContainer container = new PoolTokensContainer(_name, _symbol, _decimals);\r\n container.transferOwnership(msg.sender);\r\n return container;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterAnchorFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterAnchorFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterAnchorFactory": [ + 18416 + ] + }, + "id": 18417, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18369, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:29" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "file": "./PoolTokensContainer.sol", + "id": 18370, + "nodeType": "ImportDirective", + "scope": 18417, + "sourceUnit": 18725, + "src": "77:35:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "../../interfaces/ITypedConverterAnchorFactory.sol", + "id": 18371, + "nodeType": "ImportDirective", + "scope": 18417, + "sourceUnit": 13681, + "src": "114:59:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18372, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "286:28:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 18373, + "nodeType": "InheritanceSpecifier", + "src": "286:28:29" + } + ], + "contractDependencies": [ + 13680, + 18724 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18416, + "linearizedBaseContracts": [ + 18416, + 13680 + ], + "name": "LiquidityPoolV2ConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13668 + ], + "body": { + "id": 18382, + "nodeType": "Block", + "src": "517:27:29", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "535:1:29", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18379, + "id": 18381, + "nodeType": "Return", + "src": "528:8:29" + } + ] + }, + "documentation": { + "id": 18374, + "nodeType": "StructuredDocumentation", + "src": "322:124:29", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18383, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18376, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "491:8:29" + }, + "parameters": { + "id": 18375, + "nodeType": "ParameterList", + "parameters": [], + "src": "474:2:29" + }, + "returnParameters": { + "id": 18379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18378, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18383, + "src": "509:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18377, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "509:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:8:29" + }, + "scope": 18416, + "src": "452:92:29", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13679 + ], + "body": { + "id": 18414, + "nodeType": "Block", + "src": "987:179:29", + "statements": [ + { + "assignments": [ + 18397 + ], + "declarations": [ + { + "constant": false, + "id": 18397, + "mutability": "mutable", + "name": "container", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18414, + "src": "998:30:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 18396, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "998:20:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18404, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18400, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18386, + "src": "1055:5:29", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18401, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18388, + "src": "1062:7:29", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18402, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18390, + "src": "1071:9:29", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1031:23:29", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_PoolTokensContainer_$18724_$", + "typeString": "function (string memory,string memory,uint8) returns (contract PoolTokensContainer)" + }, + "typeName": { + "contractScope": null, + "id": 18398, + "name": "PoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18724, + "src": "1035:19:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PoolTokensContainer_$18724", + "typeString": "contract PoolTokensContainer" + } + } + }, + "id": 18403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1031:50:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_PoolTokensContainer_$18724", + "typeString": "contract PoolTokensContainer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "998:83:29" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18408, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1120:3:29", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 18409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1120:10:29", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 18405, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18397, + "src": "1092:9:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "1092:27:29", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 18410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1092:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18411, + "nodeType": "ExpressionStatement", + "src": "1092:39:29" + }, + { + "expression": { + "argumentTypes": null, + "id": 18412, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18397, + "src": "1149:9:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "functionReturnParameters": 18395, + "id": 18413, + "nodeType": "Return", + "src": "1142:16:29" + } + ] + }, + "documentation": { + "id": 18384, + "nodeType": "StructuredDocumentation", + "src": "552:301:29", + "text": " @dev creates a new converter anchor with the given arguments and transfers\n the ownership to the caller\n @param _name pool name\n @param _symbol pool symbol\n @param _decimals pool decimals\n @return new anchor" + }, + "functionSelector": "a9fd4a2a", + "id": 18415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "951:8:29" + }, + "parameters": { + "id": 18391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18386, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "881:19:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18385, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "881:6:29", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18388, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "902:21:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "902:6:29", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18390, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "925:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18389, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "925:5:29", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "880:61:29" + }, + "returnParameters": { + "id": 18395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18394, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "969:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 18393, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "969:16:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "968:18:29" + }, + "scope": 18416, + "src": "859:307:29", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18417, + "src": "236:933:29" + } + ], + "src": "52:1119:29" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterAnchorFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterAnchorFactory": [ + 18416 + ] + }, + "id": 18417, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18369, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:29" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "file": "./PoolTokensContainer.sol", + "id": 18370, + "nodeType": "ImportDirective", + "scope": 18417, + "sourceUnit": 18725, + "src": "77:35:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "../../interfaces/ITypedConverterAnchorFactory.sol", + "id": 18371, + "nodeType": "ImportDirective", + "scope": 18417, + "sourceUnit": 13681, + "src": "114:59:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18372, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "286:28:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 18373, + "nodeType": "InheritanceSpecifier", + "src": "286:28:29" + } + ], + "contractDependencies": [ + 13680, + 18724 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18416, + "linearizedBaseContracts": [ + 18416, + 13680 + ], + "name": "LiquidityPoolV2ConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13668 + ], + "body": { + "id": 18382, + "nodeType": "Block", + "src": "517:27:29", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "535:1:29", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18379, + "id": 18381, + "nodeType": "Return", + "src": "528:8:29" + } + ] + }, + "documentation": { + "id": 18374, + "nodeType": "StructuredDocumentation", + "src": "322:124:29", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18383, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18376, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "491:8:29" + }, + "parameters": { + "id": 18375, + "nodeType": "ParameterList", + "parameters": [], + "src": "474:2:29" + }, + "returnParameters": { + "id": 18379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18378, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18383, + "src": "509:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18377, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "509:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:8:29" + }, + "scope": 18416, + "src": "452:92:29", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13679 + ], + "body": { + "id": 18414, + "nodeType": "Block", + "src": "987:179:29", + "statements": [ + { + "assignments": [ + 18397 + ], + "declarations": [ + { + "constant": false, + "id": 18397, + "mutability": "mutable", + "name": "container", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18414, + "src": "998:30:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 18396, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "998:20:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18404, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18400, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18386, + "src": "1055:5:29", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18401, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18388, + "src": "1062:7:29", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18402, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18390, + "src": "1071:9:29", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1031:23:29", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_PoolTokensContainer_$18724_$", + "typeString": "function (string memory,string memory,uint8) returns (contract PoolTokensContainer)" + }, + "typeName": { + "contractScope": null, + "id": 18398, + "name": "PoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18724, + "src": "1035:19:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PoolTokensContainer_$18724", + "typeString": "contract PoolTokensContainer" + } + } + }, + "id": 18403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1031:50:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_PoolTokensContainer_$18724", + "typeString": "contract PoolTokensContainer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "998:83:29" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18408, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1120:3:29", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 18409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1120:10:29", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 18405, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18397, + "src": "1092:9:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "1092:27:29", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 18410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1092:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18411, + "nodeType": "ExpressionStatement", + "src": "1092:39:29" + }, + { + "expression": { + "argumentTypes": null, + "id": 18412, + "name": "container", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18397, + "src": "1149:9:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "functionReturnParameters": 18395, + "id": 18413, + "nodeType": "Return", + "src": "1142:16:29" + } + ] + }, + "documentation": { + "id": 18384, + "nodeType": "StructuredDocumentation", + "src": "552:301:29", + "text": " @dev creates a new converter anchor with the given arguments and transfers\n the ownership to the caller\n @param _name pool name\n @param _symbol pool symbol\n @param _decimals pool decimals\n @return new anchor" + }, + "functionSelector": "a9fd4a2a", + "id": 18415, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "951:8:29" + }, + "parameters": { + "id": 18391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18386, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "881:19:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18385, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "881:6:29", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18388, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "902:21:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18387, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "902:6:29", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18390, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "925:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18389, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "925:5:29", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "880:61:29" + }, + "returnParameters": { + "id": 18395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18394, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18415, + "src": "969:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 18393, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "969:16:29", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "968:18:29" + }, + "scope": 18416, + "src": "859:307:29", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18417, + "src": "236:933:29" + } + ], + "src": "52:1119:29" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-09T23:40:29.183Z", + "devdoc": { + "kind": "dev", + "methods": { + "converterType()": { + "details": "returns the converter type the factory is associated with", + "returns": { + "_0": "converter type" + } + }, + "createAnchor(string,string,uint8)": { + "details": "creates a new converter anchor with the given arguments and transfers the ownership to the caller", + "params": { + "_decimals": "pool decimals", + "_name": "pool name", + "_symbol": "pool symbol" + }, + "returns": { + "_0": "new anchor" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterCustomFactory.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterCustomFactory.json new file mode 100644 index 00000000..b035ec60 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterCustomFactory.json @@ -0,0 +1,1093 @@ +{ + "contractName": "LiquidityPoolV2ConverterCustomFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_primaryReserveToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_secondaryReserveToken", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_primaryReserveOracle", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_secondaryReserveOracle", + "type": "address" + } + ], + "name": "createPriceOracle", + "outputs": [ + { + "internalType": "contract IPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_primaryReserveToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_secondaryReserveToken\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_primaryReserveOracle\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_secondaryReserveOracle\",\"type\":\"address\"}],\"name\":\"createPriceOracle\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"converterType()\":{\"details\":\"returns the converter type the factory is associated with\",\"returns\":{\"_0\":\"converter type\"}},\"createPriceOracle(address,address,address,address)\":{\"details\":\"creates a new price oracle note that the oracles must have the same common denominator (USD, ETH etc.)\",\"params\":{\"_primaryReserveOracle\":\"primary reserve oracle address\",\"_primaryReserveToken\":\"primary reserve token address\",\"_secondaryReserveOracle\":\"secondary reserve oracle address\",\"_secondaryReserveToken\":\"secondary reserve token address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol\":\"LiquidityPoolV2ConverterCustomFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol\":{\"keccak256\":\"0x7fc843e5f1b0de5cc1248b4f12396a2dc42fc089f4af0b20ddb222cfca096f92\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2f042d21817d6cabc0296f90ed45730353ff1a057c797104518b3a33dc01261b\",\"dweb:/ipfs/QmNgXdNtY1f2Ggg8PbB1MZVS9am8YAmPdj5fD7LFvApqC4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":{\"keccak256\":\"0x5d03fb3ec2ef50006712ad6fd47d14aed49c4d57971e8d918618093f690e6170\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8dae9bd9a95911008b10d316a1efaa6f05224bf37dec02ace44ef5a303aff3ee\",\"dweb:/ipfs/Qmeuv2c6R2KwFWganFF7US5s5TcYm1toGM2o4XkS1zGx4R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610b3b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80631b27444e1461003b5780633e8ff43f14610095575b600080fd5b6100796004803603608081101561005157600080fd5b506001600160a01b0381358116916020810135821691604082013581169160600135166100b4565b604080516001600160a01b039092168252519081900360200190f35b61009d610117565b6040805161ffff9092168252519081900360200190f35b6000848484846040516100c69061011c565b6001600160a01b039485168152928416602084015290831660408084019190915292166060820152905190819003608001906000f08015801561010d573d6000803e3d6000fd5b5095945050505050565b600290565b6109dc8061012a8339019056fe608060405234801561001057600080fd5b506040516109dc3803806109dc8339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909183836100568282610157565b83836100628282610157565b600080546001600160a01b03808b166001600160a01b03199283161790925560018054928a169290911691909117905561009b886101c7565b6001600160a01b0389166000908152600260205260409020805460ff191660ff929092169190911790556100ce876101c7565b6001600160a01b039788166000818152600260209081526040808320805460ff9690961660ff1990961695909517909455600380549a8c166001600160a01b03199b8c168117909155600480549a8d169a8c168b1790559b909a168152600590995281892080548916909a179099559787525050509390922080549091169091179055506102c1565b61016082610263565b61016981610263565b806001600160a01b0316826001600160a01b031614156101c3576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156101f65750601261025e565b816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561022f57600080fd5b505afa158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505190505b919050565b6001600160a01b0381166102be576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61070c806102d06000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b1772d7a11610066578063b1772d7a14610147578063b9e1715b14610193578063c8f33c911461019b578063cbd962d1146101b5578063f997fda7146101db57610093565b80630fc63d10146100985780635f64b55b146100bc5780638ee573ac146100c4578063ae81800414610100575b600080fd5b6100a06101e3565b604080516001600160a01b039092168252519081900360200190f35b6100a06101f2565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b0316610201565b6040805160ff9092168252519081900360200190f35b61012e6004803603604081101561011657600080fd5b506001600160a01b0381358116916020013516610216565b6040805192835260208301919091528051918290030190f35b6101756004803603604081101561015d57600080fd5b506001600160a01b03813581169160200135166103a5565b60408051938452602084019290925282820152519081900360600190f35b6100a06103d4565b6101a36103e3565b60408051918252519081900360200190f35b6100a0600480360360208110156101cb57600080fd5b50356001600160a01b03166104ec565b6100a0610507565b6000546001600160a01b031681565b6001546001600160a01b031681565b60026020526000908152604090205460ff1681565b60008083836102258282610516565b6001600160a01b0380871660009081526005602090815260408083205481516350d25bcd60e01b81529151939416926350d25bcd92600480840193919291829003018186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b50516001600160a01b0380881660009081526005602090815260408083205481516350d25bcd60e01b81529151959650929492909316926350d25bcd9260048083019392829003018186803b1580156102f957600080fd5b505afa15801561030d573d6000803e3d6000fd5b505050506040513d602081101561032357600080fd5b50516001600160a01b03808a1660009081526002602052604080822054928b16825290205491925060ff9081169116808211156103735761036c8360ff83850316600a0a6105af565b9250610396565b8060ff168260ff161015610396576103938460ff84840316600a0a6105af565b93505b50919890975095505050505050565b60008060008060006103b78787610216565b9150915081816103c56103e3565b94509450945050509250925092565b6003546001600160a01b031681565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b50516004805460408051634102dfb560e11b815290519394506000936001600160a01b0390921692638205bf6a928282019260209290829003018186803b1580156104a857600080fd5b505afa1580156104bc573d6000803e3d6000fd5b505050506040513d60208110156104d257600080fd5b505190508082116104e357806104e5565b815b9250505090565b6005602052600090815260409020546001600160a01b031681565b6004546001600160a01b031681565b6105208282610616565b6001600160a01b03828116600090815260056020526040902054161580159061056257506001600160a01b038181166000908152600560205260409020541615155b6105ab576040805162461bcd60e51b815260206004820152601560248201527422a9292faaa729aaa82827a92a22a22faa27a5a2a760591b604482015290519081900360640190fd5b5050565b6000826105be57506000610610565b828202828482816105cb57fe5b041461060d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b61061f82610682565b61062881610682565b806001600160a01b0316826001600160a01b031614156105ab576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b6001600160a01b0381166106d3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5056fea2646970667358221220022bb923a68c1656dd285dc381e0a9d05c2218475c0b4d9e4b9d7f999b97b5e164736f6c634300060c0033a2646970667358221220ec89372263b2118b8804565f5f230b2271ae6af6a0fdf26eb2e4ce93e2defda364736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80631b27444e1461003b5780633e8ff43f14610095575b600080fd5b6100796004803603608081101561005157600080fd5b506001600160a01b0381358116916020810135821691604082013581169160600135166100b4565b604080516001600160a01b039092168252519081900360200190f35b61009d610117565b6040805161ffff9092168252519081900360200190f35b6000848484846040516100c69061011c565b6001600160a01b039485168152928416602084015290831660408084019190915292166060820152905190819003608001906000f08015801561010d573d6000803e3d6000fd5b5095945050505050565b600290565b6109dc8061012a8339019056fe608060405234801561001057600080fd5b506040516109dc3803806109dc8339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909183836100568282610157565b83836100628282610157565b600080546001600160a01b03808b166001600160a01b03199283161790925560018054928a169290911691909117905561009b886101c7565b6001600160a01b0389166000908152600260205260409020805460ff191660ff929092169190911790556100ce876101c7565b6001600160a01b039788166000818152600260209081526040808320805460ff9690961660ff1990961695909517909455600380549a8c166001600160a01b03199b8c168117909155600480549a8d169a8c168b1790559b909a168152600590995281892080548916909a179099559787525050509390922080549091169091179055506102c1565b61016082610263565b61016981610263565b806001600160a01b0316826001600160a01b031614156101c3576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156101f65750601261025e565b816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561022f57600080fd5b505afa158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505190505b919050565b6001600160a01b0381166102be576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61070c806102d06000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b1772d7a11610066578063b1772d7a14610147578063b9e1715b14610193578063c8f33c911461019b578063cbd962d1146101b5578063f997fda7146101db57610093565b80630fc63d10146100985780635f64b55b146100bc5780638ee573ac146100c4578063ae81800414610100575b600080fd5b6100a06101e3565b604080516001600160a01b039092168252519081900360200190f35b6100a06101f2565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b0316610201565b6040805160ff9092168252519081900360200190f35b61012e6004803603604081101561011657600080fd5b506001600160a01b0381358116916020013516610216565b6040805192835260208301919091528051918290030190f35b6101756004803603604081101561015d57600080fd5b506001600160a01b03813581169160200135166103a5565b60408051938452602084019290925282820152519081900360600190f35b6100a06103d4565b6101a36103e3565b60408051918252519081900360200190f35b6100a0600480360360208110156101cb57600080fd5b50356001600160a01b03166104ec565b6100a0610507565b6000546001600160a01b031681565b6001546001600160a01b031681565b60026020526000908152604090205460ff1681565b60008083836102258282610516565b6001600160a01b0380871660009081526005602090815260408083205481516350d25bcd60e01b81529151939416926350d25bcd92600480840193919291829003018186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b50516001600160a01b0380881660009081526005602090815260408083205481516350d25bcd60e01b81529151959650929492909316926350d25bcd9260048083019392829003018186803b1580156102f957600080fd5b505afa15801561030d573d6000803e3d6000fd5b505050506040513d602081101561032357600080fd5b50516001600160a01b03808a1660009081526002602052604080822054928b16825290205491925060ff9081169116808211156103735761036c8360ff83850316600a0a6105af565b9250610396565b8060ff168260ff161015610396576103938460ff84840316600a0a6105af565b93505b50919890975095505050505050565b60008060008060006103b78787610216565b9150915081816103c56103e3565b94509450945050509250925092565b6003546001600160a01b031681565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b50516004805460408051634102dfb560e11b815290519394506000936001600160a01b0390921692638205bf6a928282019260209290829003018186803b1580156104a857600080fd5b505afa1580156104bc573d6000803e3d6000fd5b505050506040513d60208110156104d257600080fd5b505190508082116104e357806104e5565b815b9250505090565b6005602052600090815260409020546001600160a01b031681565b6004546001600160a01b031681565b6105208282610616565b6001600160a01b03828116600090815260056020526040902054161580159061056257506001600160a01b038181166000908152600560205260409020541615155b6105ab576040805162461bcd60e51b815260206004820152601560248201527422a9292faaa729aaa82827a92a22a22faa27a5a2a760591b604482015290519081900360640190fd5b5050565b6000826105be57506000610610565b828202828482816105cb57fe5b041461060d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b61061f82610682565b61062881610682565b806001600160a01b0316826001600160a01b031614156105ab576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b6001600160a01b0381166106d3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5056fea2646970667358221220022bb923a68c1656dd285dc381e0a9d05c2218475c0b4d9e4b9d7f999b97b5e164736f6c634300060c0033a2646970667358221220ec89372263b2118b8804565f5f230b2271ae6af6a0fdf26eb2e4ce93e2defda364736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "243:1175:30:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "243:1175:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1001:414;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1001:414:30;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1001:414:30;;;;;;;;;;;;;;459:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1001:414;1261:12;1314:20;1336:22;1360:21;1383:23;1298:109;;;;;:::i;:::-;-1:-1:-1;;;;;1298:109:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1298:109:30;;;;;;;;;;;;;;;-1:-1:-1;1291:116:30;1001:414;-1:-1:-1;;;;;1001:414:30:o;459:92::-;542:1;459:92;:::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../../interfaces/ITypedConverterCustomFactory.sol\";\r\nimport \"../../../utility/PriceOracle.sol\";\r\n\r\n/*\r\n LiquidityPoolV2ConverterCustomFactory Factory\r\n*/\r\ncontract LiquidityPoolV2ConverterCustomFactory is ITypedConverterCustomFactory {\r\n /**\r\n * @dev returns the converter type the factory is associated with\r\n *\r\n * @return converter type\r\n */\r\n function converterType() external pure override returns (uint16) {\r\n return 2;\r\n }\r\n\r\n /**\r\n * @dev creates a new price oracle\r\n * note that the oracles must have the same common denominator (USD, ETH etc.)\r\n *\r\n * @param _primaryReserveToken primary reserve token address\r\n * @param _secondaryReserveToken secondary reserve token address\r\n * @param _primaryReserveOracle primary reserve oracle address\r\n * @param _secondaryReserveOracle secondary reserve oracle address\r\n */\r\n function createPriceOracle(\r\n IERC20Token _primaryReserveToken,\r\n IERC20Token _secondaryReserveToken,\r\n IChainlinkPriceOracle _primaryReserveOracle,\r\n IChainlinkPriceOracle _secondaryReserveOracle)\r\n public\r\n returns (IPriceOracle)\r\n {\r\n return new PriceOracle(_primaryReserveToken, _secondaryReserveToken, _primaryReserveOracle, _secondaryReserveOracle);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterCustomFactory": [ + 18456 + ] + }, + "id": 18457, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18418, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:30" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "../../interfaces/ITypedConverterCustomFactory.sol", + "id": 18419, + "nodeType": "ImportDirective", + "scope": 18457, + "sourceUnit": 13689, + "src": "77:59:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol", + "file": "../../../utility/PriceOracle.sol", + "id": 18420, + "nodeType": "ImportDirective", + "scope": 18457, + "sourceUnit": 22206, + "src": "138:42:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18421, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "293:28:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 18422, + "nodeType": "InheritanceSpecifier", + "src": "293:28:30" + } + ], + "contractDependencies": [ + 13688, + 22205 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18456, + "linearizedBaseContracts": [ + 18456, + 13688 + ], + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13687 + ], + "body": { + "id": 18431, + "nodeType": "Block", + "src": "524:27:30", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "542:1:30", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18428, + "id": 18430, + "nodeType": "Return", + "src": "535:8:30" + } + ] + }, + "documentation": { + "id": 18423, + "nodeType": "StructuredDocumentation", + "src": "329:124:30", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18432, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18425, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "498:8:30" + }, + "parameters": { + "id": 18424, + "nodeType": "ParameterList", + "parameters": [], + "src": "481:2:30" + }, + "returnParameters": { + "id": 18428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18427, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18432, + "src": "516:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18426, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "516:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "515:8:30" + }, + "scope": 18456, + "src": "459:92:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18454, + "nodeType": "Block", + "src": "1280:135:30", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18448, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18435, + "src": "1314:20:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18449, + "name": "_secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18437, + "src": "1336:22:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18450, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18439, + "src": "1360:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 18451, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18441, + "src": "1383:23:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 18447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1298:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$_t_contract$_PriceOracle_$22205_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) returns (contract PriceOracle)" + }, + "typeName": { + "contractScope": null, + "id": 18446, + "name": "PriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22205, + "src": "1302:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PriceOracle_$22205", + "typeString": "contract PriceOracle" + } + } + }, + "id": 18452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1298:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_PriceOracle_$22205", + "typeString": "contract PriceOracle" + } + }, + "functionReturnParameters": 18445, + "id": 18453, + "nodeType": "Return", + "src": "1291:116:30" + } + ] + }, + "documentation": { + "id": 18433, + "nodeType": "StructuredDocumentation", + "src": "559:436:30", + "text": " @dev creates a new price oracle\n note that the oracles must have the same common denominator (USD, ETH etc.)\n @param _primaryReserveToken primary reserve token address\n @param _secondaryReserveToken secondary reserve token address\n @param _primaryReserveOracle primary reserve oracle address\n @param _secondaryReserveOracle secondary reserve oracle address" + }, + "functionSelector": "1b27444e", + "id": 18455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createPriceOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18435, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1038:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18434, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1038:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18437, + "mutability": "mutable", + "name": "_secondaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1081:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18436, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1081:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18439, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1126:43:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18438, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1126:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18441, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1180:45:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18440, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1180:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1027:199:30" + }, + "returnParameters": { + "id": 18445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18444, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1261:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18443, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "1261:12:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1260:14:30" + }, + "scope": 18456, + "src": "1001:414:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 18457, + "src": "243:1175:30" + } + ], + "src": "52:1368:30" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterCustomFactory": [ + 18456 + ] + }, + "id": 18457, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18418, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:30" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol", + "file": "../../interfaces/ITypedConverterCustomFactory.sol", + "id": 18419, + "nodeType": "ImportDirective", + "scope": 18457, + "sourceUnit": 13689, + "src": "77:59:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol", + "file": "../../../utility/PriceOracle.sol", + "id": 18420, + "nodeType": "ImportDirective", + "scope": 18457, + "sourceUnit": 22206, + "src": "138:42:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18421, + "name": "ITypedConverterCustomFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13688, + "src": "293:28:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterCustomFactory_$13688", + "typeString": "contract ITypedConverterCustomFactory" + } + }, + "id": 18422, + "nodeType": "InheritanceSpecifier", + "src": "293:28:30" + } + ], + "contractDependencies": [ + 13688, + 22205 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18456, + "linearizedBaseContracts": [ + 18456, + 13688 + ], + "name": "LiquidityPoolV2ConverterCustomFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13687 + ], + "body": { + "id": 18431, + "nodeType": "Block", + "src": "524:27:30", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "542:1:30", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18428, + "id": 18430, + "nodeType": "Return", + "src": "535:8:30" + } + ] + }, + "documentation": { + "id": 18423, + "nodeType": "StructuredDocumentation", + "src": "329:124:30", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18432, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18425, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "498:8:30" + }, + "parameters": { + "id": 18424, + "nodeType": "ParameterList", + "parameters": [], + "src": "481:2:30" + }, + "returnParameters": { + "id": 18428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18427, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18432, + "src": "516:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18426, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "516:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "515:8:30" + }, + "scope": 18456, + "src": "459:92:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18454, + "nodeType": "Block", + "src": "1280:135:30", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18448, + "name": "_primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18435, + "src": "1314:20:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18449, + "name": "_secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18437, + "src": "1336:22:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 18450, + "name": "_primaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18439, + "src": "1360:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + { + "argumentTypes": null, + "id": 18451, + "name": "_secondaryReserveOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18441, + "src": "1383:23:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 18447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1298:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$_t_contract$_IChainlinkPriceOracle_$22821_$returns$_t_contract$_PriceOracle_$22205_$", + "typeString": "function (contract IERC20Token,contract IERC20Token,contract IChainlinkPriceOracle,contract IChainlinkPriceOracle) returns (contract PriceOracle)" + }, + "typeName": { + "contractScope": null, + "id": 18446, + "name": "PriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22205, + "src": "1302:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PriceOracle_$22205", + "typeString": "contract PriceOracle" + } + } + }, + "id": 18452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1298:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_PriceOracle_$22205", + "typeString": "contract PriceOracle" + } + }, + "functionReturnParameters": 18445, + "id": 18453, + "nodeType": "Return", + "src": "1291:116:30" + } + ] + }, + "documentation": { + "id": 18433, + "nodeType": "StructuredDocumentation", + "src": "559:436:30", + "text": " @dev creates a new price oracle\n note that the oracles must have the same common denominator (USD, ETH etc.)\n @param _primaryReserveToken primary reserve token address\n @param _secondaryReserveToken secondary reserve token address\n @param _primaryReserveOracle primary reserve oracle address\n @param _secondaryReserveOracle secondary reserve oracle address" + }, + "functionSelector": "1b27444e", + "id": 18455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createPriceOracle", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18435, + "mutability": "mutable", + "name": "_primaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1038:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18434, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1038:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18437, + "mutability": "mutable", + "name": "_secondaryReserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1081:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18436, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1081:11:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18439, + "mutability": "mutable", + "name": "_primaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1126:43:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18438, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1126:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18441, + "mutability": "mutable", + "name": "_secondaryReserveOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1180:45:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18440, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1180:21:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1027:199:30" + }, + "returnParameters": { + "id": 18445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18444, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18455, + "src": "1261:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 18443, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "1261:12:30", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1260:14:30" + }, + "scope": 18456, + "src": "1001:414:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 18457, + "src": "243:1175:30" + } + ], + "src": "52:1368:30" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.787Z", + "devdoc": { + "kind": "dev", + "methods": { + "converterType()": { + "details": "returns the converter type the factory is associated with", + "returns": { + "_0": "converter type" + } + }, + "createPriceOracle(address,address,address,address)": { + "details": "creates a new price oracle note that the oracles must have the same common denominator (USD, ETH etc.)", + "params": { + "_primaryReserveOracle": "primary reserve oracle address", + "_primaryReserveToken": "primary reserve token address", + "_secondaryReserveOracle": "secondary reserve oracle address", + "_secondaryReserveToken": "secondary reserve token address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterFactory.json new file mode 100644 index 00000000..f035e4cc --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/LiquidityPoolV2ConverterFactory.json @@ -0,0 +1,1480 @@ +{ + "contractName": "LiquidityPoolV2ConverterFactory", + "abi": [ + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"converterType()\":{\"details\":\"returns the converter type the factory is associated with\",\"returns\":{\"_0\":\"converter type\"}},\"createConverter(address,address,uint32)\":{\"details\":\"creates a new converter with the given arguments and transfers the ownership to the caller\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\"},\"returns\":{\"_0\":\"new converter\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterFactory.sol\":\"LiquidityPoolV2ConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol\":{\"keccak256\":\"0xdd6e82cc0945131084abe0d5103cdf91326706658de33a94fd8fe3ff7b6b59b9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://53573685ad522fd72fea8f7ec09181fef4c48a12ce9366813500c5f1c1aa7155\",\"dweb:/ipfs/Qmdy3PpQy7rnAHpMScnWWaitDtvMDvXCf51wVzMW1R1hLu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol\":{\"keccak256\":\"0x7fc843e5f1b0de5cc1248b4f12396a2dc42fc089f4af0b20ddb222cfca096f92\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2f042d21817d6cabc0296f90ed45730353ff1a057c797104518b3a33dc01261b\",\"dweb:/ipfs/QmNgXdNtY1f2Ggg8PbB1MZVS9am8YAmPdj5fD7LFvApqC4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterFactory.sol\":{\"keccak256\":\"0x1503ec1ea73660c9cdcacc46b227a72e8de8e45887f717248017825175cf7391\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://4769b5a953c454fe9de59a11d4f55dd7764c1c9dd2147b9d24b4fbe2ee519b16\",\"dweb:/ipfs/QmRv2LE4mwqa293ztKC4pNQryL7VMErHUvGDm9pjPt2g7G\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":{\"keccak256\":\"0x79e583ec380c8982f74d4f707ae26ed96e1c90a6b54b4fc058ab2316656e0ddb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3c900b396fefda767db8b99d9ed10c9a22151279b0f8229098d28a08e75046da\",\"dweb:/ipfs/QmZBqgB1CnKpjM8Bv6HMrYtzdwu8wBmS3FzpWuvhyfGLwd\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":{\"keccak256\":\"0x5d03fb3ec2ef50006712ad6fd47d14aed49c4d57971e8d918618093f690e6170\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8dae9bd9a95911008b10d316a1efaa6f05224bf37dec02ace44ef5a303aff3ee\",\"dweb:/ipfs/Qmeuv2c6R2KwFWganFF7US5s5TcYm1toGM2o4XkS1zGx4R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50614f03806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600290565b614d37806101978339019056fe60806040526003805460ff60a81b19169055600880546001600160601b03191690556012805460ff191660011764ffffffff001916622710001790553480156200004857600080fd5b5060405162004d3738038062004d37833981810160405260608110156200006e57600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a4816200013e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000db816200013e565b81620000e7816200019d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001fc945050505050565b6001600160a01b0381166200019a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b614b2b806200020c6000396000f3fe6080604052600436106103e75760003560e01c8063690d832011610208578063d260529c11610118578063dc8de379116100ab578063ec2240f51161007a578063ec2240f514610e3f578063ecbca55d14610e54578063f2fde38b14610e84578063fc0c546a14610eb7578063fd2d6c7c14610ecc57610478565b8063dc8de37914610d57578063ddd9abbf14610d8a578063e38192e314610dba578063e8dc12ff14610df957610478565b8063d66bd524116100e7578063d66bd52414610cc7578063d895951214610cfa578063db2830a414610d2d578063dc75eb9a14610d4257610478565b8063d260529c14610c73578063d3fb73b414610c88578063d4ee1d9014610c9d578063d55ec69714610cb257610478565b80639b99a8e21161019b578063bf7545581161016a578063bf75455814610bd1578063bf7da6ba14610be6578063c45d3d9214610c1f578063cdc91c6914610c34578063d031370b14610c4957610478565b80639b99a8e214610b4f578063ab28b17414610b64578063af94b8d814610b79578063b4a176d314610bbc57610478565b80637b103999116101d75780637b10399914610add5780638da5cb5b14610af257806394c275ad14610b0757806398a71dcb14610b1c57610478565b8063690d832014610a415780636a49d2c414610a7457806371f52bf314610ab357806379ba509714610ac857610478565b80632bf0c985116103035780634af80f0e11610296578063579cd3ca11610265578063579cd3ca146109685780635e35359e1461097d57806361cd756e146109c057806367b6d57c146109d557806369067d9514610a0857610478565b80634af80f0e146108bb57806354fd4d50146108ee57806355776b77146109035780635768adcf1461093557610478565b8063395900d4116102d2578063395900d4146108075780633e8ff43f1461084a578063467494681461087657806349d10b64146108a657610478565b80632bf0c985146107955780632fe8a6ad146107c857806334d084b9146107dd57806338a5e016146107f257610478565b806316912f961161037b57806321e6b53d1161034a57806321e6b53d1461070557806322f3e2d4146107385780632630c12f1461074d5780632bd3c1071461076257610478565b806316912f961461063757806319b640151461064c5780631cfab290146106765780631e1401f8146106a957610478565b80630c7d5cd8116103b75780630c7d5cd8146105485780630e53aae914610576578063119b90cd146105dd57806312c2aca41461062257610478565b80625e319c1461047d578063024c7ec7146104c25780630337e3fb146104ee5780630a55fb3d1461051f57610478565b3661047857600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610476576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561048957600080fd5b506104b0600480360360208110156104a057600080fd5b50356001600160a01b0316610ee1565b60408051918252519081900360200190f35b3480156104ce57600080fd5b50610476600480360360208110156104e557600080fd5b50351515610f0a565b3480156104fa57600080fd5b50610503610f30565b604080516001600160a01b039092168252519081900360200190f35b34801561052b57600080fd5b50610534610f3f565b604080519115158252519081900360200190f35b34801561055457600080fd5b5061055d610f48565b6040805163ffffffff9092168252519081900360200190f35b34801561058257600080fd5b506105a96004803603602081101561059957600080fd5b50356001600160a01b0316610f54565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156105e957600080fd5b506104766004803603606081101561060057600080fd5b506001600160a01b038135811691602081013582169160409091013516610fec565b34801561062e57600080fd5b50610534611595565b34801561064357600080fd5b506104766115db565b34801561065857600080fd5b506105036004803603602081101561066f57600080fd5b50356115ef565b34801561068257600080fd5b5061055d6004803603602081101561069957600080fd5b50356001600160a01b0316611619565b3480156106b557600080fd5b506106ec600480360360608110156106cc57600080fd5b506001600160a01b0381358116916020810135909116906040013561164b565b6040805192835260208301919091528051918290030190f35b34801561071157600080fd5b506104766004803603602081101561072857600080fd5b50356001600160a01b0316611665565b34801561074457600080fd5b50610534611679565b34801561075957600080fd5b506105036116a5565b34801561076e57600080fd5b506104b06004803603602081101561078557600080fd5b50356001600160a01b03166116bb565b3480156107a157600080fd5b506104b0600480360360208110156107b857600080fd5b50356001600160a01b03166116d7565b3480156107d457600080fd5b506105346117a2565b3480156107e957600080fd5b5061055d6117b2565b3480156107fe57600080fd5b506104766117c3565b34801561081357600080fd5b506104766004803603606081101561082a57600080fd5b506001600160a01b038135811691602081013590911690604001356117d5565b34801561085657600080fd5b5061085f61185b565b6040805161ffff9092168252519081900360200190f35b34801561088257600080fd5b506104766004803603604081101561089957600080fd5b5080359060200135611860565b3480156108b257600080fd5b506104766118e2565b3480156108c757600080fd5b50610476600480360360208110156108de57600080fd5b50356001600160a01b0316611aea565b3480156108fa57600080fd5b5061085f611b1f565b6104b06004803603606081101561091957600080fd5b506001600160a01b038135169060208101359060400135611b24565b34801561094157600080fd5b506105036004803603602081101561095857600080fd5b50356001600160a01b0316612016565b34801561097457600080fd5b5061055d612034565b34801561098957600080fd5b50610476600480360360608110156109a057600080fd5b506001600160a01b03813581169160208101359091169060400135612047565b3480156109cc57600080fd5b50610503612178565b3480156109e157600080fd5b50610476600480360360208110156109f857600080fd5b50356001600160a01b0316612187565b348015610a1457600080fd5b506106ec60048036036040811015610a2b57600080fd5b506001600160a01b038135169060200135612233565b348015610a4d57600080fd5b5061047660048036036020811015610a6457600080fd5b50356001600160a01b0316612371565b348015610a8057600080fd5b5061047660048036036040811015610a9757600080fd5b5080356001600160a01b0316906020013563ffffffff16612498565b348015610abf57600080fd5b5061085f61250a565b348015610ad457600080fd5b50610476612514565b348015610ae957600080fd5b506105036125cb565b348015610afe57600080fd5b506105036125da565b348015610b1357600080fd5b5061055d6125e9565b348015610b2857600080fd5b506104b060048036036020811015610b3f57600080fd5b50356001600160a01b03166125fd565b348015610b5b57600080fd5b5061085f61260f565b348015610b7057600080fd5b506106ec612615565b348015610b8557600080fd5b506106ec60048036036060811015610b9c57600080fd5b506001600160a01b0381358116916020810135909116906040013561261e565b348015610bc857600080fd5b50610476612754565b348015610bdd57600080fd5b50610534612780565b348015610bf257600080fd5b5061047660048036036040811015610c0957600080fd5b506001600160a01b038135169060200135612785565b348015610c2b57600080fd5b506105036127d9565b348015610c4057600080fd5b506104766127e8565b348015610c5557600080fd5b5061050360048036036020811015610c6c57600080fd5b503561284c565b348015610c7f57600080fd5b50610534612873565b348015610c9457600080fd5b50610503612878565b348015610ca957600080fd5b50610503612887565b348015610cbe57600080fd5b50610476612896565b348015610cd357600080fd5b506105a960048036036020811015610cea57600080fd5b50356001600160a01b031661297e565b348015610d0657600080fd5b506104b060048036036020811015610d1d57600080fd5b50356001600160a01b03166129c1565b348015610d3957600080fd5b506106ec6129d2565b348015610d4e57600080fd5b506105036129f8565b348015610d6357600080fd5b506104b060048036036020811015610d7a57600080fd5b50356001600160a01b0316612a07565b348015610d9657600080fd5b5061047660048036036020811015610dad57600080fd5b503563ffffffff16612a30565b348015610dc657600080fd5b506104b060048036036060811015610ddd57600080fd5b506001600160a01b038135169060208101359060400135612b02565b6104b0600480360360a0811015610e0f57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612df7565b348015610e4b57600080fd5b506106ec613007565b348015610e6057600080fd5b5061047660048036036020811015610e7757600080fd5b503563ffffffff16613082565b348015610e9057600080fd5b5061047660048036036020811015610ea757600080fd5b50356001600160a01b031661316a565b348015610ec357600080fd5b506105036131e8565b348015610ed857600080fd5b506104b06131f7565b600081610eed816131fd565b50506001600160a01b03166000908152600b602052604090205490565b610f1261326a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000610f64614a8d565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b610ff46132bd565b610ffc61326a565b82611006816131fd565b8261101081613304565b8261101a81613304565b8461102481613358565b8461102e81613358565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561107357600080fd5b505afa158015611087573d6000803e3d6000fd5b505050506040513d602081101561109d57600080fd5b50516001600160a01b0316146110f1576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b600061111c7f436861696e6c696e6b4f7261636c6557686974656c69737400000000000000006133a9565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b505180156112185750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111eb57600080fd5b505afa1580156111ff573d6000803e3d6000fd5b505050506040513d602081101561121557600080fd5b50515b61125e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b611266613427565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061128e57fe5b6000918252602090912001546001600160a01b038a8116911614156112eb5760066001815481106112bb57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b03909216919091179055611325565b60066000815481106112f957fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006113436f436f6e766572746572466163746f727960801b6133a9565b6001600160a01b031663c977aed261135961185b565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561139157600080fd5b505afa1580156113a5573d6000803e3d6000fd5b505050506040513d60208110156113bb57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b505050506040513d602081101561145157600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055611486613689565b8051600e5560200151600f5561149a613741565b6010556009546000906114b5906001600160a01b0316610ee1565b6009549091506000906114d0906001600160a01b0316612a07565b600a549091506000906114eb906001600160a01b0316612a07565b9050818314156115165760008311806115045750600081115b1561151157611511613745565b61153f565b6000831180156115265750600082115b80156115325750600081115b1561153f5761153f613745565b6004546001906001600160a01b031661155661185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6115e361326a565b6012805460ff19169055565b6000600682815481106115fe57fe5b6000918252602090912001546001600160a01b031692915050565b600081611625816131fd565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061165985858561261e565b91509150935093915050565b61166d61326a565b61167681612187565b50565b60006116836137ba565b80156116a05750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b6000816116c7816131fd565b6116d083613839565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061176882612a07565b6001600160a01b0383166000908152600b6020526040902054909150611798816117928487613873565b906138d1565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b6117cb61326a565b6117d36127e8565b565b6117dd61326a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561183e57600080fd5b505af1158015611852573d6000803e3d6000fd5b50505050505050565b600290565b61186861326a565b8160116000600660008154811061187b57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001812091909155600680548392601192909160019081106118b957fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119055750600354600160a01b900460ff16155b61194a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006119686f436f6e7472616374526567697374727960801b6133a9565b6002549091506001600160a01b0380831691161480159061199157506001600160a01b03811615155b6119d9576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d6020811015611a6557600080fd5b50516001600160a01b03161415611aba576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611af261326a565b80611afc81613304565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611b2e613930565b6003805460ff60a81b1916600160a81b179055611b49613980565b83611b53816131fd565b83611b5d816139c8565b83611b67816139c8565b6001600160a01b038716600080516020614ad683398151915214611b8c573415611b90565b8534145b611bdb576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611be3613a0e565b6001600160a01b038716600080516020614ad68339815191521415611c7f57600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611c459034613a4e565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611d3a576001600160a01b0388166000908152601160205260409020541580611ce957506001600160a01b038816600090815260116020526040902054611ce68289613a9b565b11155b611d3a576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d6020811015611db557600080fd5b505190506001600160a01b038a16600080516020614ad683398151915214611de357611de38a33308c613ae4565b6001600160a01b038a16600090815260076020526040902054611e06908a613a9b565b6001600160a01b038b16600090815260076020526040902055611e29838a613a9b565b6001600160a01b038b166000908152600b6020526040812091909155831580611e50575081155b15611e5c575088611e6d565b611e6a846117928c85613873565b90505b88811015611eb7576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611f1657600080fd5b505af1158015611f2a573d6000803e3d6000fd5b50505050611f36613745565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c611f6d8882613a9b565b611f778787613a9b565b60408051938452602084019290925282820152519081900360600190a3611fa883611fa28484613a9b565b8d613c4f565b611ffb6006600081548110611fb957fe5b600091825260209091200154600680546001600160a01b03909216916001908110611fe057fe5b60009182526020822001546001600160a01b03169080613caf565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b61204f613930565b6003805460ff60a81b1916600160a81b17905561206a61326a565b600061208f762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff1615806120c957506120c7611679565b155b806120e157506000546001600160a01b038281169116145b612126576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b612131848484613d82565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156121655761216584613db3565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61218f61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6121b381613e8b565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227157600080fd5b505afa158015612285573d6000803e3d6000fd5b505050506040513d602081101561229b57600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b9052205490915081851015612362576009546001600160a01b03166000908152600b60205260408120546122f6906014613873565b600954909150600090612311906001600160a01b0316613839565b9050600080828410612324578284612327565b83835b9092509050600061233c876117928c89613873565b9050600061234e836117928487613873565b995050889003965061236a95505050505050565b925060009150505b9250929050565b612379613930565b6003805460ff60a81b1916600160a81b17905561239461326a565b600080516020614ad68339815191526123ac816131fd565b60006123d1762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b90506123db611679565b15806123f457506000546001600160a01b038281169116145b612439576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561246e573d6000803e3d6000fd5b50612486600080516020614ad6833981519152613db3565b50506003805460ff60a81b1916905550565b6124a061326a565b60026124aa61260f565b61ffff16106124fc576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6125068282613eed565b5050565b60006116a061260f565b6001546001600160a01b03163314612567576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b600080612629613980565b84612633816131fd565b8461263d816131fd565b856001600160a01b0316876001600160a01b0316141561269d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6000806126a8613741565b60105414156126e15750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f4240819003612730565b6126e9614abb565b6126f1613689565b90506000806126ff8361410f565b60095491935091506001600160a01b038d8116911614156127255781945080935061272c565b8094508193505b5050505b6000806127408b8b86868d614224565b919d919c50909a5050505050505050505050565b61275c61326a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61278d61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6127b181613e8b565b826127bb816131fd565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016127f261260f565b61ffff1611612844576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6117d3614355565b6006818154811061285957fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b61289e61326a565b60006128c3762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6004549091506000906001600160a01b03166128dd61185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a46129168161316a565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561295e57600080fd5b505af1158015612972573d6000803e3d6000fd5b50505050611676612514565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006129cc82612a07565b92915050565b6000806129dd614abb565b6129e5613689565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612a13816131fd565b50506001600160a01b031660009081526007602052604090205490565b612a3861326a565b620f424063ffffffff82161115612a96576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612b0c613930565b6003805460ff60a81b1916600160a81b179055612b27613980565b83612b318161441c565b83612b3b816139c8565b83612b45816139c8565b612b4d613a0e565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b8857600080fd5b505afa158015612b9c573d6000803e3d6000fd5b505050506040513d6020811015612bb257600080fd5b505190506000612bc28989612233565b50905086811015612c0f576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612c7d57600080fd5b505af1158015612c91573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612cb8915083613a4e565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612ce99084613a4e565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614ad68339815191521415612d4f57604051339084156108fc029085906000818181858888f19350505050158015612d49573d6000803e3d6000fd5b50612d5a565b612d5a823385614481565b612d62613745565b6000612d6e858c613a4e565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612dca8c8285613c4f565b612ddb6006600081548110611fb957fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612e01613930565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612e2e81613e8b565b856001600160a01b0316876001600160a01b03161415612e8e576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580612f9b575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612eee57600080fd5b505afa158015612f02573d6000803e3d6000fd5b505050506040513d6020811015612f1857600080fd5b50518015612f9b575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612f6e57600080fd5b505afa158015612f82573d6000803e3d6000fd5b505050506040513d6020811015612f9857600080fd5b50515b612fe2576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b612fef87878787876145da565b6003805460ff60a81b19169055979650505050505050565b600080613012614abb565b61301a613689565b90506000806130288361410f565b91509150600660008154811061303a57fe5b6000918252602090912001546009546001600160a01b03908116911614156130705763ffffffff91821694501691506129f49050565b63ffffffff9081169450169150509091565b61308a61326a565b60085463ffffffff640100000000909104811690821611156130f3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61317261326a565b6000546001600160a01b03828116911614156131c6576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146117d3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6132c5611679565b156117d3576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b038116301415611676576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b038116611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133f557600080fd5b505afa158015613409573d6000803e3d6000fd5b505050506040513d602081101561341f57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561347057600080fd5b505afa158015613484573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156134ad57600080fd5b81019080805160405193929190846401000000008211156134cd57600080fd5b9083019060208201858111156134e257600080fd5b82518660208202830111640100000000821117156134ff57600080fd5b82525081516020918201928201910280838360005b8381101561352c578181015183820152602001613514565b50505050919091016040525050825160065493945015929150600090505b8181101561368257600083156135c857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561359557600080fd5b505af11580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505190506135df565b8482815181106135d457fe5b602002602001015190505b80600c6000600685815481106135f157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b03191692909116919091179055600680548390811061363f57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b0319169290911691909117905560010161354a565b5050505050565b613691614abb565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b1580156136f357600080fd5b505afa158015613707573d6000803e3d6000fd5b505050506040513d604081101561371d57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b4290565b60408051808201909152600e548152600f5460208201526137659061410f565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156137fe57600080fd5b505afa158015613812573d6000803e3d6000fd5b505050506040513d602081101561382857600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b9092528220546129cc919061386d906013613873565b90613a9b565b600082613882575060006129cc565b8282028284828161388f57fe5b04146116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080821161391c576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161392757fe5b04949350505050565b600354600160a81b900460ff16156117d3576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613988611679565b6117d3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008111611676576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561250657613a4660068281548110613a2c57fe5b6000918252602090912001546001600160a01b0316613db3565b600101613a14565b600081831015613a95576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b695780518252601f199092019160209182019101613b4a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150818015613bfe575080511580613bfe5750808060200190516020811015613bfb57600080fd5b50515b61222b576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613cba85613839565b90506000613cc785613839565b905063ffffffff8416613cf9576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613d0d5783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613d4f8463ffffffff808a169061387316565b613d628663ffffffff808a169061387316565b6040805192835260208301919091528051918290030190a3505050505050565b613d8a61326a565b82613d9481613358565b82613d9e81613358565b83613da881613304565b61222b868686614481565b80613dbd816131fd565b6001600160a01b038216600080516020614ad68339815191521415613dfc576001600160a01b0382166000908152600760205260409020479055612506565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613e4257600080fd5b505afa158015613e56573d6000803e3d6000fd5b505050506040513d6020811015613e6c57600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b613e94816133a9565b6001600160a01b0316336001600160a01b031614611676576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613ef561326a565b613efd6132bd565b81613f0781613358565b82613f1181613304565b82613f1b81614989565b6004546001600160a01b03868116911614801590613f5c57506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613fa3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f4240038116908516111561400b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff61401661260f565b61ffff1610614068576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b60205260408120549091829190829061413a90613839565b600a54909150600090614155906001600160a01b0316613839565b90506141706c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b031663a11aa1b4614189856014613873565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b1580156141e457600080fd5b505afa1580156141f8573d6000803e3d6000fd5b505050506040513d604081101561420e57600080fd5b5080516020909101519095509350505050915091565b60008060008061423389613839565b9050600061424089613839565b9050600061425d6c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d60208110156142f657600080fd5b505190506000614305826149f9565b60125490915060009061433790839061386d90620f424090611792908890610100900463ffffffff9081169061387316565b90506143438382613a4e565b9d919c509a5098505050505050505050565b61435d61326a565b600061436761260f565b61ffff16116143b9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156143fc57600080fd5b505af1158015614410573d6000803e3d6000fd5b505050506117d3613a0e565b6001600160a01b038181166000908152600d602052604090205416611676576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106144fe5780518252601f1990920191602091820191016144df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614560576040519150601f19603f3d011682016040523d82523d6000602084013e614565565b606091505b5091509150818015614593575080511580614593575080806020019051602081101561459057600080fd5b50515b613682576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b60006145e4613980565b856145ee816131fd565b856145f8816131fd565b614600613741565b601054101561463057614611613741565b60105561461c613689565b8051600e5560200151600f55614630613745565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f424082900390808061466a8d8d87878f614224565b92509250925082600014156146bf576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614ad68339815191521415614731578a341461472c576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61480f565b341580156147c957508a6147c66147478f612a07565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561479457600080fd5b505afa1580156147a8573d6000803e3d6000fd5b505050506040513d60208110156147be57600080fd5b505190613a4e565b10155b61480f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6148188d613db3565b61482b836148258e612a07565b90613a4e565b6001600160a01b038d16600090815260076020908152604080832093909355600b9052205461485a9083613a9b565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614ad683398151915214156148c7576040516001600160a01b038a169084156108fc029085906000818181858888f193505050501580156148c1573d6000803e3d6000fd5b506148d2565b6148d28c8a85614481565b6148e08d8d8c8e8786614a24565b6148ec8d8d8787613caf565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b8152925193169261497792849283926318160ddd926004808201939291829003018186803b15801561494557600080fd5b505afa158015614959573d6000803e3d6000fd5b505050506040513d602081101561496f57600080fd5b50518f613c4f565b50919c9b505050505050505050505050565b60008163ffffffff161180156149a85750620f424063ffffffff821611155b611676576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6008546000906129cc90620f424090611792908590600160401b900463ffffffff9081169061387316565b600160ff1b8110614a3157fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea2646970667358221220ab264e1fed924691fd0f2a3f9bdc1b0e473332f2a35442af9e107888f6567ebe64736f6c634300060c0033a26469706673582212205e541a287d27e9853bde3cd792cb38be1123275ccbc0641db1b03cc9f9360acb64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063114139581461003b5780633e8ff43f14610094575b600080fd5b6100786004803603606081101561005157600080fd5b5080356001600160a01b03908116916020810135909116906040013563ffffffff166100b3565b604080516001600160a01b039092168252519081900360200190f35b61009c610184565b6040805161ffff9092168252519081900360200190f35b6000808484846040516100c590610189565b80846001600160a01b03168152602001836001600160a01b031681526020018263ffffffff1681526020019350505050604051809103906000f080158015610111573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561016357600080fd5b505af1158015610177573d6000803e3d6000fd5b5092979650505050505050565b600290565b614d37806101978339019056fe60806040526003805460ff60a81b19169055600880546001600160601b03191690556012805460ff191660011764ffffffff001916622710001790553480156200004857600080fd5b5060405162004d3738038062004d37833981810160405260608110156200006e57600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828180620000a4816200013e565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000db816200013e565b81620000e7816200019d565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b1990921691909117905550620001fc945050505050565b6001600160a01b0381166200019a576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff821611156200019a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b614b2b806200020c6000396000f3fe6080604052600436106103e75760003560e01c8063690d832011610208578063d260529c11610118578063dc8de379116100ab578063ec2240f51161007a578063ec2240f514610e3f578063ecbca55d14610e54578063f2fde38b14610e84578063fc0c546a14610eb7578063fd2d6c7c14610ecc57610478565b8063dc8de37914610d57578063ddd9abbf14610d8a578063e38192e314610dba578063e8dc12ff14610df957610478565b8063d66bd524116100e7578063d66bd52414610cc7578063d895951214610cfa578063db2830a414610d2d578063dc75eb9a14610d4257610478565b8063d260529c14610c73578063d3fb73b414610c88578063d4ee1d9014610c9d578063d55ec69714610cb257610478565b80639b99a8e21161019b578063bf7545581161016a578063bf75455814610bd1578063bf7da6ba14610be6578063c45d3d9214610c1f578063cdc91c6914610c34578063d031370b14610c4957610478565b80639b99a8e214610b4f578063ab28b17414610b64578063af94b8d814610b79578063b4a176d314610bbc57610478565b80637b103999116101d75780637b10399914610add5780638da5cb5b14610af257806394c275ad14610b0757806398a71dcb14610b1c57610478565b8063690d832014610a415780636a49d2c414610a7457806371f52bf314610ab357806379ba509714610ac857610478565b80632bf0c985116103035780634af80f0e11610296578063579cd3ca11610265578063579cd3ca146109685780635e35359e1461097d57806361cd756e146109c057806367b6d57c146109d557806369067d9514610a0857610478565b80634af80f0e146108bb57806354fd4d50146108ee57806355776b77146109035780635768adcf1461093557610478565b8063395900d4116102d2578063395900d4146108075780633e8ff43f1461084a578063467494681461087657806349d10b64146108a657610478565b80632bf0c985146107955780632fe8a6ad146107c857806334d084b9146107dd57806338a5e016146107f257610478565b806316912f961161037b57806321e6b53d1161034a57806321e6b53d1461070557806322f3e2d4146107385780632630c12f1461074d5780632bd3c1071461076257610478565b806316912f961461063757806319b640151461064c5780631cfab290146106765780631e1401f8146106a957610478565b80630c7d5cd8116103b75780630c7d5cd8146105485780630e53aae914610576578063119b90cd146105dd57806312c2aca41461062257610478565b80625e319c1461047d578063024c7ec7146104c25780630337e3fb146104ee5780630a55fb3d1461051f57610478565b3661047857600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610476576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561048957600080fd5b506104b0600480360360208110156104a057600080fd5b50356001600160a01b0316610ee1565b60408051918252519081900360200190f35b3480156104ce57600080fd5b50610476600480360360208110156104e557600080fd5b50351515610f0a565b3480156104fa57600080fd5b50610503610f30565b604080516001600160a01b039092168252519081900360200190f35b34801561052b57600080fd5b50610534610f3f565b604080519115158252519081900360200190f35b34801561055457600080fd5b5061055d610f48565b6040805163ffffffff9092168252519081900360200190f35b34801561058257600080fd5b506105a96004803603602081101561059957600080fd5b50356001600160a01b0316610f54565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b3480156105e957600080fd5b506104766004803603606081101561060057600080fd5b506001600160a01b038135811691602081013582169160409091013516610fec565b34801561062e57600080fd5b50610534611595565b34801561064357600080fd5b506104766115db565b34801561065857600080fd5b506105036004803603602081101561066f57600080fd5b50356115ef565b34801561068257600080fd5b5061055d6004803603602081101561069957600080fd5b50356001600160a01b0316611619565b3480156106b557600080fd5b506106ec600480360360608110156106cc57600080fd5b506001600160a01b0381358116916020810135909116906040013561164b565b6040805192835260208301919091528051918290030190f35b34801561071157600080fd5b506104766004803603602081101561072857600080fd5b50356001600160a01b0316611665565b34801561074457600080fd5b50610534611679565b34801561075957600080fd5b506105036116a5565b34801561076e57600080fd5b506104b06004803603602081101561078557600080fd5b50356001600160a01b03166116bb565b3480156107a157600080fd5b506104b0600480360360208110156107b857600080fd5b50356001600160a01b03166116d7565b3480156107d457600080fd5b506105346117a2565b3480156107e957600080fd5b5061055d6117b2565b3480156107fe57600080fd5b506104766117c3565b34801561081357600080fd5b506104766004803603606081101561082a57600080fd5b506001600160a01b038135811691602081013590911690604001356117d5565b34801561085657600080fd5b5061085f61185b565b6040805161ffff9092168252519081900360200190f35b34801561088257600080fd5b506104766004803603604081101561089957600080fd5b5080359060200135611860565b3480156108b257600080fd5b506104766118e2565b3480156108c757600080fd5b50610476600480360360208110156108de57600080fd5b50356001600160a01b0316611aea565b3480156108fa57600080fd5b5061085f611b1f565b6104b06004803603606081101561091957600080fd5b506001600160a01b038135169060208101359060400135611b24565b34801561094157600080fd5b506105036004803603602081101561095857600080fd5b50356001600160a01b0316612016565b34801561097457600080fd5b5061055d612034565b34801561098957600080fd5b50610476600480360360608110156109a057600080fd5b506001600160a01b03813581169160208101359091169060400135612047565b3480156109cc57600080fd5b50610503612178565b3480156109e157600080fd5b50610476600480360360208110156109f857600080fd5b50356001600160a01b0316612187565b348015610a1457600080fd5b506106ec60048036036040811015610a2b57600080fd5b506001600160a01b038135169060200135612233565b348015610a4d57600080fd5b5061047660048036036020811015610a6457600080fd5b50356001600160a01b0316612371565b348015610a8057600080fd5b5061047660048036036040811015610a9757600080fd5b5080356001600160a01b0316906020013563ffffffff16612498565b348015610abf57600080fd5b5061085f61250a565b348015610ad457600080fd5b50610476612514565b348015610ae957600080fd5b506105036125cb565b348015610afe57600080fd5b506105036125da565b348015610b1357600080fd5b5061055d6125e9565b348015610b2857600080fd5b506104b060048036036020811015610b3f57600080fd5b50356001600160a01b03166125fd565b348015610b5b57600080fd5b5061085f61260f565b348015610b7057600080fd5b506106ec612615565b348015610b8557600080fd5b506106ec60048036036060811015610b9c57600080fd5b506001600160a01b0381358116916020810135909116906040013561261e565b348015610bc857600080fd5b50610476612754565b348015610bdd57600080fd5b50610534612780565b348015610bf257600080fd5b5061047660048036036040811015610c0957600080fd5b506001600160a01b038135169060200135612785565b348015610c2b57600080fd5b506105036127d9565b348015610c4057600080fd5b506104766127e8565b348015610c5557600080fd5b5061050360048036036020811015610c6c57600080fd5b503561284c565b348015610c7f57600080fd5b50610534612873565b348015610c9457600080fd5b50610503612878565b348015610ca957600080fd5b50610503612887565b348015610cbe57600080fd5b50610476612896565b348015610cd357600080fd5b506105a960048036036020811015610cea57600080fd5b50356001600160a01b031661297e565b348015610d0657600080fd5b506104b060048036036020811015610d1d57600080fd5b50356001600160a01b03166129c1565b348015610d3957600080fd5b506106ec6129d2565b348015610d4e57600080fd5b506105036129f8565b348015610d6357600080fd5b506104b060048036036020811015610d7a57600080fd5b50356001600160a01b0316612a07565b348015610d9657600080fd5b5061047660048036036020811015610dad57600080fd5b503563ffffffff16612a30565b348015610dc657600080fd5b506104b060048036036060811015610ddd57600080fd5b506001600160a01b038135169060208101359060400135612b02565b6104b0600480360360a0811015610e0f57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612df7565b348015610e4b57600080fd5b506106ec613007565b348015610e6057600080fd5b5061047660048036036020811015610e7757600080fd5b503563ffffffff16613082565b348015610e9057600080fd5b5061047660048036036020811015610ea757600080fd5b50356001600160a01b031661316a565b348015610ec357600080fd5b506105036131e8565b348015610ed857600080fd5b506104b06131f7565b600081610eed816131fd565b50506001600160a01b03166000908152600b602052604090205490565b610f1261326a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000610f64614a8d565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b610ff46132bd565b610ffc61326a565b82611006816131fd565b8261101081613304565b8261101a81613304565b8461102481613358565b8461102e81613358565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561107357600080fd5b505afa158015611087573d6000803e3d6000fd5b505050506040513d602081101561109d57600080fd5b50516001600160a01b0316146110f1576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b600061111c7f436861696e6c696e6b4f7261636c6557686974656c69737400000000000000006133a9565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116b57600080fd5b505afa15801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b505180156112185750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111eb57600080fd5b505afa1580156111ff573d6000803e3d6000fd5b505050506040513d602081101561121557600080fd5b50515b61125e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b611266613427565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061128e57fe5b6000918252602090912001546001600160a01b038a8116911614156112eb5760066001815481106112bb57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b03909216919091179055611325565b60066000815481106112f957fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006113436f436f6e766572746572466163746f727960801b6133a9565b6001600160a01b031663c977aed261135961185b565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561139157600080fd5b505afa1580156113a5573d6000803e3d6000fd5b505050506040513d60208110156113bb57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b505050506040513d602081101561145157600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055611486613689565b8051600e5560200151600f5561149a613741565b6010556009546000906114b5906001600160a01b0316610ee1565b6009549091506000906114d0906001600160a01b0316612a07565b600a549091506000906114eb906001600160a01b0316612a07565b9050818314156115165760008311806115045750600081115b1561151157611511613745565b61153f565b6000831180156115265750600082115b80156115325750600081115b1561153f5761153f613745565b6004546001906001600160a01b031661155661185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6115e361326a565b6012805460ff19169055565b6000600682815481106115fe57fe5b6000918252602090912001546001600160a01b031692915050565b600081611625816131fd565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061165985858561261e565b91509150935093915050565b61166d61326a565b61167681612187565b50565b60006116836137ba565b80156116a05750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b6000816116c7816131fd565b6116d083613839565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d602081101561173d57600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061176882612a07565b6001600160a01b0383166000908152600b6020526040902054909150611798816117928487613873565b906138d1565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b6117cb61326a565b6117d36127e8565b565b6117dd61326a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561183e57600080fd5b505af1158015611852573d6000803e3d6000fd5b50505050505050565b600290565b61186861326a565b8160116000600660008154811061187b57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001812091909155600680548392601192909160019081106118b957fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119055750600354600160a01b900460ff16155b61194a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006119686f436f6e7472616374526567697374727960801b6133a9565b6002549091506001600160a01b0380831691161480159061199157506001600160a01b03811615155b6119d9576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a3b57600080fd5b505afa158015611a4f573d6000803e3d6000fd5b505050506040513d6020811015611a6557600080fd5b50516001600160a01b03161415611aba576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611af261326a565b80611afc81613304565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611b2e613930565b6003805460ff60a81b1916600160a81b179055611b49613980565b83611b53816131fd565b83611b5d816139c8565b83611b67816139c8565b6001600160a01b038716600080516020614ad683398151915214611b8c573415611b90565b8534145b611bdb576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611be3613a0e565b6001600160a01b038716600080516020614ad68339815191521415611c7f57600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611c459034613a4e565b600080516020614ad683398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611d3a576001600160a01b0388166000908152601160205260409020541580611ce957506001600160a01b038816600090815260116020526040902054611ce68289613a9b565b11155b611d3a576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d6020811015611db557600080fd5b505190506001600160a01b038a16600080516020614ad683398151915214611de357611de38a33308c613ae4565b6001600160a01b038a16600090815260076020526040902054611e06908a613a9b565b6001600160a01b038b16600090815260076020526040902055611e29838a613a9b565b6001600160a01b038b166000908152600b6020526040812091909155831580611e50575081155b15611e5c575088611e6d565b611e6a846117928c85613873565b90505b88811015611eb7576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611f1657600080fd5b505af1158015611f2a573d6000803e3d6000fd5b50505050611f36613745565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c611f6d8882613a9b565b611f778787613a9b565b60408051938452602084019290925282820152519081900360600190a3611fa883611fa28484613a9b565b8d613c4f565b611ffb6006600081548110611fb957fe5b600091825260209091200154600680546001600160a01b03909216916001908110611fe057fe5b60009182526020822001546001600160a01b03169080613caf565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b61204f613930565b6003805460ff60a81b1916600160a81b17905561206a61326a565b600061208f762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff1615806120c957506120c7611679565b155b806120e157506000546001600160a01b038281169116145b612126576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b612131848484613d82565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156121655761216584613db3565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61218f61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6121b381613e8b565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561227157600080fd5b505afa158015612285573d6000803e3d6000fd5b505050506040513d602081101561229b57600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b9052205490915081851015612362576009546001600160a01b03166000908152600b60205260408120546122f6906014613873565b600954909150600090612311906001600160a01b0316613839565b9050600080828410612324578284612327565b83835b9092509050600061233c876117928c89613873565b9050600061234e836117928487613873565b995050889003965061236a95505050505050565b925060009150505b9250929050565b612379613930565b6003805460ff60a81b1916600160a81b17905561239461326a565b600080516020614ad68339815191526123ac816131fd565b60006123d1762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b90506123db611679565b15806123f457506000546001600160a01b038281169116145b612439576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f1935050505015801561246e573d6000803e3d6000fd5b50612486600080516020614ad6833981519152613db3565b50506003805460ff60a81b1916905550565b6124a061326a565b60026124aa61260f565b61ffff16106124fc576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6125068282613eed565b5050565b60006116a061260f565b6001546001600160a01b03163314612567576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b600080612629613980565b84612633816131fd565b8461263d816131fd565b856001600160a01b0316876001600160a01b0316141561269d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6000806126a8613741565b60105414156126e15750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f4240819003612730565b6126e9614abb565b6126f1613689565b90506000806126ff8361410f565b60095491935091506001600160a01b038d8116911614156127255781945080935061272c565b8094508193505b5050505b6000806127408b8b86868d614224565b919d919c50909a5050505050505050505050565b61275c61326a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61278d61326a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6127b181613e8b565b826127bb816131fd565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016127f261260f565b61ffff1611612844576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6117d3614355565b6006818154811061285957fe5b6000918252602090912001546001600160a01b0316905081565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b61289e61326a565b60006128c3762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b6133a9565b6004549091506000906001600160a01b03166128dd61185b565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a46129168161316a565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b15801561295e57600080fd5b505af1158015612972573d6000803e3d6000fd5b50505050611676612514565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b60006129cc82612a07565b92915050565b6000806129dd614abb565b6129e5613689565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612a13816131fd565b50506001600160a01b031660009081526007602052604090205490565b612a3861326a565b620f424063ffffffff82161115612a96576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612b0c613930565b6003805460ff60a81b1916600160a81b179055612b27613980565b83612b318161441c565b83612b3b816139c8565b83612b45816139c8565b612b4d613a0e565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b8857600080fd5b505afa158015612b9c573d6000803e3d6000fd5b505050506040513d6020811015612bb257600080fd5b505190506000612bc28989612233565b50905086811015612c0f576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612c7d57600080fd5b505af1158015612c91573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612cb8915083613a4e565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612ce99084613a4e565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614ad68339815191521415612d4f57604051339084156108fc029085906000818181858888f19350505050158015612d49573d6000803e3d6000fd5b50612d5a565b612d5a823385614481565b612d62613745565b6000612d6e858c613a4e565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612dca8c8285613c4f565b612ddb6006600081548110611fb957fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612e01613930565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612e2e81613e8b565b856001600160a01b0316876001600160a01b03161415612e8e576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580612f9b575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612eee57600080fd5b505afa158015612f02573d6000803e3d6000fd5b505050506040513d6020811015612f1857600080fd5b50518015612f9b575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b158015612f6e57600080fd5b505afa158015612f82573d6000803e3d6000fd5b505050506040513d6020811015612f9857600080fd5b50515b612fe2576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b612fef87878787876145da565b6003805460ff60a81b19169055979650505050505050565b600080613012614abb565b61301a613689565b90506000806130288361410f565b91509150600660008154811061303a57fe5b6000918252602090912001546009546001600160a01b03908116911614156130705763ffffffff91821694501691506129f49050565b63ffffffff9081169450169150509091565b61308a61326a565b60085463ffffffff640100000000909104811690821611156130f3576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61317261326a565b6000546001600160a01b03828116911614156131c6576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff16611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146117d3576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6132c5611679565b156117d3576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b038116301415611676576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b038116611676576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156133f557600080fd5b505afa158015613409573d6000803e3d6000fd5b505050506040513d602081101561341f57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561347057600080fd5b505afa158015613484573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156134ad57600080fd5b81019080805160405193929190846401000000008211156134cd57600080fd5b9083019060208201858111156134e257600080fd5b82518660208202830111640100000000821117156134ff57600080fd5b82525081516020918201928201910280838360005b8381101561352c578181015183820152602001613514565b50505050919091016040525050825160065493945015929150600090505b8181101561368257600083156135c857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561359557600080fd5b505af11580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505190506135df565b8482815181106135d457fe5b602002602001015190505b80600c6000600685815481106135f157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b03191692909116919091179055600680548390811061363f57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b0319169290911691909117905560010161354a565b5050505050565b613691614abb565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b1580156136f357600080fd5b505afa158015613707573d6000803e3d6000fd5b505050506040513d604081101561371d57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b4290565b60408051808201909152600e548152600f5460208201526137659061410f565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156137fe57600080fd5b505afa158015613812573d6000803e3d6000fd5b505050506040513d602081101561382857600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b9092528220546129cc919061386d906013613873565b90613a9b565b600082613882575060006129cc565b8282028284828161388f57fe5b04146116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080821161391c576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161392757fe5b04949350505050565b600354600160a81b900460ff16156117d3576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613988611679565b6117d3576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b60008111611676576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561250657613a4660068281548110613a2c57fe5b6000918252602090912001546001600160a01b0316613db3565b600101613a14565b600081831015613a95576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156116d0576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b695780518252601f199092019160209182019101613b4a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bcb576040519150601f19603f3d011682016040523d82523d6000602084013e613bd0565b606091505b5091509150818015613bfe575080511580613bfe5750808060200190516020811015613bfb57600080fd5b50515b61222b576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613cba85613839565b90506000613cc785613839565b905063ffffffff8416613cf9576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613d0d5783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613d4f8463ffffffff808a169061387316565b613d628663ffffffff808a169061387316565b6040805192835260208301919091528051918290030190a3505050505050565b613d8a61326a565b82613d9481613358565b82613d9e81613358565b83613da881613304565b61222b868686614481565b80613dbd816131fd565b6001600160a01b038216600080516020614ad68339815191521415613dfc576001600160a01b0382166000908152600760205260409020479055612506565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613e4257600080fd5b505afa158015613e56573d6000803e3d6000fd5b505050506040513d6020811015613e6c57600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b613e94816133a9565b6001600160a01b0316336001600160a01b031614611676576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613ef561326a565b613efd6132bd565b81613f0781613358565b82613f1181613304565b82613f1b81614989565b6004546001600160a01b03868116911614801590613f5c57506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613fa3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f4240038116908516111561400b576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff61401661260f565b61ffff1610614068576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b60205260408120549091829190829061413a90613839565b600a54909150600090614155906001600160a01b0316613839565b90506141706c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b031663a11aa1b4614189856014613873565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b1580156141e457600080fd5b505afa1580156141f8573d6000803e3d6000fd5b505050506040513d604081101561420e57600080fd5b5080516020909101519095509350505050915091565b60008060008061423389613839565b9050600061424089613839565b9050600061425d6c42616e636f72466f726d756c6160981b6133a9565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b1580156142cc57600080fd5b505afa1580156142e0573d6000803e3d6000fd5b505050506040513d60208110156142f657600080fd5b505190506000614305826149f9565b60125490915060009061433790839061386d90620f424090611792908890610100900463ffffffff9081169061387316565b90506143438382613a4e565b9d919c509a5098505050505050505050565b61435d61326a565b600061436761260f565b61ffff16116143b9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156143fc57600080fd5b505af1158015614410573d6000803e3d6000fd5b505050506117d3613a0e565b6001600160a01b038181166000908152600d602052604090205416611676576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106144fe5780518252601f1990920191602091820191016144df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614560576040519150601f19603f3d011682016040523d82523d6000602084013e614565565b606091505b5091509150818015614593575080511580614593575080806020019051602081101561459057600080fd5b50515b613682576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b60006145e4613980565b856145ee816131fd565b856145f8816131fd565b614600613741565b601054101561463057614611613741565b60105561461c613689565b8051600e5560200151600f55614630613745565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f424082900390808061466a8d8d87878f614224565b92509250925082600014156146bf576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614ad68339815191521415614731578a341461472c576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61480f565b341580156147c957508a6147c66147478f612a07565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561479457600080fd5b505afa1580156147a8573d6000803e3d6000fd5b505050506040513d60208110156147be57600080fd5b505190613a4e565b10155b61480f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6148188d613db3565b61482b836148258e612a07565b90613a4e565b6001600160a01b038d16600090815260076020908152604080832093909355600b9052205461485a9083613a9b565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614ad683398151915214156148c7576040516001600160a01b038a169084156108fc029085906000818181858888f193505050501580156148c1573d6000803e3d6000fd5b506148d2565b6148d28c8a85614481565b6148e08d8d8c8e8786614a24565b6148ec8d8d8787613caf565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b8152925193169261497792849283926318160ddd926004808201939291829003018186803b15801561494557600080fd5b505afa158015614959573d6000803e3d6000fd5b505050506040513d602081101561496f57600080fd5b50518f613c4f565b50919c9b505050505050505050505050565b60008163ffffffff161180156149a85750620f424063ffffffff821611155b611676576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b6008546000906129cc90620f424090611792908590600160401b900463ffffffff9081169061387316565b600160ff1b8110614a3157fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea2646970667358221220ab264e1fed924691fd0f2a3f9bdc1b0e473332f2a35442af9e107888f6567ebe64736f6c634300060c0033a26469706673582212205e541a287d27e9853bde3cd792cb38be1123275ccbc0641db1b03cc9f9360acb64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "271:1073:31:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "271:1073:31:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;976:365;;;;;;;;;;;;;;;;-1:-1:-1;976:365:31;;-1:-1:-1;;;;;976:365:31;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;976:365:31;;;;;;;;;;;;;;475:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;976:365;1109:10;1132:23;1216:7;1227:9;1238:17;1158:98;;;;;:::i;:::-;;;-1:-1:-1;;;;;1158:98:31;;;;;;-1:-1:-1;;;;;1158:98:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1132:124;;1267:9;-1:-1:-1;;;;;1267:27:31;;1295:10;1267:39;;;;;;;;;;;;;-1:-1:-1;;;;;1267:39:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1324:9:31;;976:365;-1:-1:-1;;;;;;;976:365:31:o;475:92::-;558:1;475:92;:::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./LiquidityPoolV2Converter.sol\";\r\nimport \"./interfaces/IPoolTokensContainer.sol\";\r\nimport \"../../interfaces/ITypedConverterFactory.sol\";\r\n\r\n/*\r\n LiquidityPoolV2Converter Factory\r\n*/\r\ncontract LiquidityPoolV2ConverterFactory is ITypedConverterFactory {\r\n /**\r\n * @dev returns the converter type the factory is associated with\r\n *\r\n * @return converter type\r\n */\r\n function converterType() external pure override returns (uint16) {\r\n return 2;\r\n }\r\n\r\n /**\r\n * @dev creates a new converter with the given arguments and transfers\r\n * the ownership to the caller\r\n *\r\n * @param _anchor anchor governed by the converter\r\n * @param _registry address of a contract registry contract\r\n * @param _maxConversionFee maximum conversion fee, represented in ppm\r\n *\r\n * @return new converter\r\n */\r\n function createConverter(IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external override returns (IConverter) {\r\n ConverterBase converter = new LiquidityPoolV2Converter(IPoolTokensContainer(address(_anchor)), _registry, _maxConversionFee);\r\n converter.transferOwnership(msg.sender);\r\n return converter;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterFactory": [ + 18511 + ] + }, + "id": 18512, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18458, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:31" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "file": "./LiquidityPoolV2Converter.sol", + "id": 18459, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 18368, + "src": "77:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "file": "./interfaces/IPoolTokensContainer.sol", + "id": 18460, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 18802, + "src": "119:47:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 18461, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 13711, + "src": "168:53:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18462, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "315:22:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 18463, + "nodeType": "InheritanceSpecifier", + "src": "315:22:31" + } + ], + "contractDependencies": [ + 13710, + 18367 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18511, + "linearizedBaseContracts": [ + 18511, + 13710 + ], + "name": "LiquidityPoolV2ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 18472, + "nodeType": "Block", + "src": "540:27:31", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:1:31", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18469, + "id": 18471, + "nodeType": "Return", + "src": "551:8:31" + } + ] + }, + "documentation": { + "id": 18464, + "nodeType": "StructuredDocumentation", + "src": "345:124:31", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18473, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "514:8:31" + }, + "parameters": { + "id": 18465, + "nodeType": "ParameterList", + "parameters": [], + "src": "497:2:31" + }, + "returnParameters": { + "id": 18469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18468, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18473, + "src": "532:6:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18467, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "532:6:31", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "531:8:31" + }, + "scope": 18511, + "src": "475:92:31", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 18509, + "nodeType": "Block", + "src": "1121:220:31", + "statements": [ + { + "assignments": [ + 18487 + ], + "declarations": [ + { + "constant": false, + "id": 18487, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18509, + "src": "1132:23:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + }, + "typeName": { + "contractScope": null, + "id": 18486, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "1132:13:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18499, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18493, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18476, + "src": "1216:7:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 18492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1208:7:31", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 18491, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1208:7:31", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1208:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18490, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "1187:20:31", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 18495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1187:38:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 18496, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18478, + "src": "1227:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 18497, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18480, + "src": "1238:17:31", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 18489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1158:28:31", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IPoolTokensContainer_$18801_$_t_contract$_IContractRegistry_$23165_$_t_uint32_$returns$_t_contract$_LiquidityPoolV2Converter_$18367_$", + "typeString": "function (contract IPoolTokensContainer,contract IContractRegistry,uint32) returns (contract LiquidityPoolV2Converter)" + }, + "typeName": { + "contractScope": null, + "id": 18488, + "name": "LiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18367, + "src": "1162:24:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + }, + "id": 18498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1158:98:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1132:124:31" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18503, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1295:3:31", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 18504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1295:10:31", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 18500, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18487, + "src": "1267:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 18502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22121, + "src": "1267:27:31", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 18505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1267:39:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18506, + "nodeType": "ExpressionStatement", + "src": "1267:39:31" + }, + { + "expression": { + "argumentTypes": null, + "id": 18507, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18487, + "src": "1324:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "functionReturnParameters": 18485, + "id": 18508, + "nodeType": "Return", + "src": "1317:16:31" + } + ] + }, + "documentation": { + "id": 18474, + "nodeType": "StructuredDocumentation", + "src": "575:395:31", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return new converter" + }, + "functionSelector": "11413958", + "id": 18510, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18482, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1091:8:31" + }, + "parameters": { + "id": 18481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18476, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1001:24:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 18475, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1001:16:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18478, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1027:27:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 18477, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "1027:17:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18480, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1056:24:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18479, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1056:6:31", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1000:81:31" + }, + "returnParameters": { + "id": 18485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1109:10:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 18483, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1109:10:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:12:31" + }, + "scope": 18511, + "src": "976:365:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18512, + "src": "271:1073:31" + } + ], + "src": "52:1294:31" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterFactory.sol", + "exportedSymbols": { + "LiquidityPoolV2ConverterFactory": [ + 18511 + ] + }, + "id": 18512, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18458, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:31" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "file": "./LiquidityPoolV2Converter.sol", + "id": 18459, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 18368, + "src": "77:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "file": "./interfaces/IPoolTokensContainer.sol", + "id": 18460, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 18802, + "src": "119:47:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol", + "file": "../../interfaces/ITypedConverterFactory.sol", + "id": 18461, + "nodeType": "ImportDirective", + "scope": 18512, + "sourceUnit": 13711, + "src": "168:53:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18462, + "name": "ITypedConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13710, + "src": "315:22:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterFactory_$13710", + "typeString": "contract ITypedConverterFactory" + } + }, + "id": 18463, + "nodeType": "InheritanceSpecifier", + "src": "315:22:31" + } + ], + "contractDependencies": [ + 13710, + 18367 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18511, + "linearizedBaseContracts": [ + 18511, + 13710 + ], + "name": "LiquidityPoolV2ConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 13698 + ], + "body": { + "id": 18472, + "nodeType": "Block", + "src": "540:27:31", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "32", + "id": 18470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:1:31", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "functionReturnParameters": 18469, + "id": 18471, + "nodeType": "Return", + "src": "551:8:31" + } + ] + }, + "documentation": { + "id": 18464, + "nodeType": "StructuredDocumentation", + "src": "345:124:31", + "text": " @dev returns the converter type the factory is associated with\n @return converter type" + }, + "functionSelector": "3e8ff43f", + "id": 18473, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "514:8:31" + }, + "parameters": { + "id": 18465, + "nodeType": "ParameterList", + "parameters": [], + "src": "497:2:31" + }, + "returnParameters": { + "id": 18469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18468, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18473, + "src": "532:6:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 18467, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "532:6:31", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "531:8:31" + }, + "scope": 18511, + "src": "475:92:31", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13709 + ], + "body": { + "id": 18509, + "nodeType": "Block", + "src": "1121:220:31", + "statements": [ + { + "assignments": [ + 18487 + ], + "declarations": [ + { + "constant": false, + "id": 18487, + "mutability": "mutable", + "name": "converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18509, + "src": "1132:23:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + }, + "typeName": { + "contractScope": null, + "id": 18486, + "name": "ConverterBase", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10039, + "src": "1132:13:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18499, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18493, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18476, + "src": "1216:7:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + ], + "id": 18492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1208:7:31", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 18491, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1208:7:31", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1208:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 18490, + "name": "IPoolTokensContainer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18801, + "src": "1187:20:31", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IPoolTokensContainer_$18801_$", + "typeString": "type(contract IPoolTokensContainer)" + } + }, + "id": 18495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1187:38:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 18496, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18478, + "src": "1227:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 18497, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18480, + "src": "1238:17:31", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "id": 18489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1158:28:31", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_contract$_IPoolTokensContainer_$18801_$_t_contract$_IContractRegistry_$23165_$_t_uint32_$returns$_t_contract$_LiquidityPoolV2Converter_$18367_$", + "typeString": "function (contract IPoolTokensContainer,contract IContractRegistry,uint32) returns (contract LiquidityPoolV2Converter)" + }, + "typeName": { + "contractScope": null, + "id": 18488, + "name": "LiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18367, + "src": "1162:24:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + } + }, + "id": 18498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1158:98:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1132:124:31" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18503, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1295:3:31", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 18504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1295:10:31", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 18500, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18487, + "src": "1267:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "id": 18502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 22121, + "src": "1267:27:31", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 18505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1267:39:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18506, + "nodeType": "ExpressionStatement", + "src": "1267:39:31" + }, + { + "expression": { + "argumentTypes": null, + "id": 18507, + "name": "converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18487, + "src": "1324:9:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterBase_$10039", + "typeString": "contract ConverterBase" + } + }, + "functionReturnParameters": 18485, + "id": 18508, + "nodeType": "Return", + "src": "1317:16:31" + } + ] + }, + "documentation": { + "id": 18474, + "nodeType": "StructuredDocumentation", + "src": "575:395:31", + "text": " @dev creates a new converter with the given arguments and transfers\n the ownership to the caller\n @param _anchor anchor governed by the converter\n @param _registry address of a contract registry contract\n @param _maxConversionFee maximum conversion fee, represented in ppm\n @return new converter" + }, + "functionSelector": "11413958", + "id": 18510, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18482, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1091:8:31" + }, + "parameters": { + "id": 18481, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18476, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1001:24:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 18475, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "1001:16:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18478, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1027:27:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 18477, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "1027:17:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18480, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1056:24:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18479, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1056:6:31", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1000:81:31" + }, + "returnParameters": { + "id": 18485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18484, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18510, + "src": "1109:10:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 18483, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1109:10:31", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:12:31" + }, + "scope": 18511, + "src": "976:365:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18512, + "src": "271:1073:31" + } + ], + "src": "52:1294:31" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.971Z", + "devdoc": { + "kind": "dev", + "methods": { + "converterType()": { + "details": "returns the converter type the factory is associated with", + "returns": { + "_0": "converter type" + } + }, + "createConverter(address,address,uint32)": { + "details": "creates a new converter with the given arguments and transfers the ownership to the caller", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract" + }, + "returns": { + "_0": "new converter" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/NewConverter.json b/apps/cic-eth/tests/testdata/bancor/NewConverter.json new file mode 100644 index 00000000..f25c011a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/NewConverter.json @@ -0,0 +1,6068 @@ +{ + "contractName": "NewConverter", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"NewConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516101103803806101108339818101604052604081101561003357600080fd5b50805160209091015160009190915560015560bd806100536000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356079565b6040805192835260208301919091528051918290030190f35b60005460015493509391505056fea2646970667358221220fe4ef50b70249f4da4a3db7d08718bc5922920750927fef0c67f0f4fe0c95c3964736f6c634300060c0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356079565b6040805192835260208301919091528051918290030190f35b60005460015493509391505056fea2646970667358221220fe4ef50b70249f4da4a3db7d08718bc5922920750927fef0c67f0f4fe0c95c3964736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "456:420:36:-:0;;;538:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;538:103:36;;;;;;;598:6;:16;;;;624:3;:10;456:420;;;;;;", + "deployedSourceMap": "456:420:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;647:227;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;647:227:36;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;758:7;855:6;863:3;;647:227;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.800Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/NonStandardToken.json b/apps/cic-eth/tests/testdata/bancor/NonStandardToken.json new file mode 100644 index 00000000..15e5abc9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/NonStandardToken.json @@ -0,0 +1,13416 @@ +{ + "contractName": "NonStandardToken", + "abi": [ + { + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"initializes a new NonStandardToken instance\",\"params\":{\"_supply\":\"initial supply\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"ERC20 Non-Standard Token implementation\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":\"NonStandardToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":{\"keccak256\":\"0x2dfc6b208775e73ee5c35e34fa0780f5439490a5114fc251ebf072b922a9a0a4\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://230c0e8d2dbe196eaad09c0f20a73eeee3a5155796ea677671082ed97944ba77\",\"dweb:/ipfs/QmXt9yQ24JkqGnXpo2b1CQ7R8igEnxfeR9bZdacmSgJyKi\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/Utils.sol\";\nimport \"../utility/SafeMath.sol\";\n\n/**\n * ERC20 Non-Standard Token implementation\n*/\ncontract NonStandardToken is Utils {\n using SafeMath for uint256;\n\n uint256 public totalSupply;\n mapping (address => uint256) public balanceOf;\n mapping (address => mapping (address => uint256)) public allowance;\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _supply initial supply\n */\n constructor(uint256 _supply)\n internal\n {\n totalSupply = _supply;\n balanceOf[msg.sender] = _supply;\n }\n\n /**\n * @dev send coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _to target address\n * @param _value transfer amount\n */\n function _transfer(address _to, uint256 _value)\n internal\n validAddress(_to)\n {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n }\n\n /**\n * @dev an account/contract attempts to get the coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function _transferFrom(address _from, address _to, uint256 _value)\n internal\n validAddress(_from)\n validAddress(_to)\n {\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\n balanceOf[_from] = balanceOf[_from].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(_from, _to, _value);\n }\n\n /**\n * @dev allow another account/contract to spend some tokens on your behalf\n * throws on any error rather then return a false flag to minimize user errors\n *\n * also, to minimize the risk of the approve/transferFrom attack vector\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n *\n * @param _spender approved address\n * @param _value allowance amount\n */\n function _approve(address _spender, uint256 _value)\n internal\n validAddress(_spender)\n {\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\n require(_value == 0 || allowance[msg.sender][_spender] == 0);\n\n allowance[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n }\n}\n\ncontract NonStandardTokenDetailed is NonStandardToken {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _name token name\n * @param _symbol token symbol\n * @param _decimals decimal points\n * @param _supply initial supply\n */\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply)\n internal\n NonStandardToken(_supply)\n {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n\ncontract TestNonStandardToken is NonStandardTokenDetailed {\n bool public ok;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true);\n }\n\n function set(bool _ok) public {\n ok = _ok;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n require(ok);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n require(ok);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n require(ok);\n }\n}\n\ncontract TestNonStandardTokenWithoutDecimals is NonStandardToken {\n string public name;\n string public symbol;\n\n constructor(string memory _name, string memory _symbol, uint256 _supply) public\n NonStandardToken(_supply) {\n name = _name;\n symbol = _symbol;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n }\n}\n\ncontract TestStandardToken is NonStandardTokenDetailed {\n bool public ok;\n bool public ret;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true, true);\n }\n\n function set(bool _ok, bool _ret) public {\n ok = _ok;\n ret = _ret;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool) {\n _approve(_spender, _value);\n require(ok);\n return ret;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n _transfer(_to, _value);\n require(ok);\n return ret;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n _transferFrom(_from, _to, _value);\n require(ok);\n return ret;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.813Z", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "details": "initializes a new NonStandardToken instance", + "params": { + "_supply": "initial supply" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "ERC20 Non-Standard Token implementation", + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/NonStandardTokenDetailed.json b/apps/cic-eth/tests/testdata/bancor/NonStandardTokenDetailed.json new file mode 100644 index 00000000..1ce26449 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/NonStandardTokenDetailed.json @@ -0,0 +1,13457 @@ +{ + "contractName": "NonStandardTokenDetailed", + "abi": [ + { + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"initializes a new NonStandardToken instance\",\"params\":{\"_decimals\":\"decimal points\",\"_name\":\"token name\",\"_supply\":\"initial supply\",\"_symbol\":\"token symbol\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":\"NonStandardTokenDetailed\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":{\"keccak256\":\"0x2dfc6b208775e73ee5c35e34fa0780f5439490a5114fc251ebf072b922a9a0a4\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://230c0e8d2dbe196eaad09c0f20a73eeee3a5155796ea677671082ed97944ba77\",\"dweb:/ipfs/QmXt9yQ24JkqGnXpo2b1CQ7R8igEnxfeR9bZdacmSgJyKi\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/Utils.sol\";\nimport \"../utility/SafeMath.sol\";\n\n/**\n * ERC20 Non-Standard Token implementation\n*/\ncontract NonStandardToken is Utils {\n using SafeMath for uint256;\n\n uint256 public totalSupply;\n mapping (address => uint256) public balanceOf;\n mapping (address => mapping (address => uint256)) public allowance;\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _supply initial supply\n */\n constructor(uint256 _supply)\n internal\n {\n totalSupply = _supply;\n balanceOf[msg.sender] = _supply;\n }\n\n /**\n * @dev send coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _to target address\n * @param _value transfer amount\n */\n function _transfer(address _to, uint256 _value)\n internal\n validAddress(_to)\n {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n }\n\n /**\n * @dev an account/contract attempts to get the coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function _transferFrom(address _from, address _to, uint256 _value)\n internal\n validAddress(_from)\n validAddress(_to)\n {\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\n balanceOf[_from] = balanceOf[_from].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(_from, _to, _value);\n }\n\n /**\n * @dev allow another account/contract to spend some tokens on your behalf\n * throws on any error rather then return a false flag to minimize user errors\n *\n * also, to minimize the risk of the approve/transferFrom attack vector\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n *\n * @param _spender approved address\n * @param _value allowance amount\n */\n function _approve(address _spender, uint256 _value)\n internal\n validAddress(_spender)\n {\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\n require(_value == 0 || allowance[msg.sender][_spender] == 0);\n\n allowance[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n }\n}\n\ncontract NonStandardTokenDetailed is NonStandardToken {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _name token name\n * @param _symbol token symbol\n * @param _decimals decimal points\n * @param _supply initial supply\n */\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply)\n internal\n NonStandardToken(_supply)\n {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n\ncontract TestNonStandardToken is NonStandardTokenDetailed {\n bool public ok;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true);\n }\n\n function set(bool _ok) public {\n ok = _ok;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n require(ok);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n require(ok);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n require(ok);\n }\n}\n\ncontract TestNonStandardTokenWithoutDecimals is NonStandardToken {\n string public name;\n string public symbol;\n\n constructor(string memory _name, string memory _symbol, uint256 _supply) public\n NonStandardToken(_supply) {\n name = _name;\n symbol = _symbol;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n }\n}\n\ncontract TestStandardToken is NonStandardTokenDetailed {\n bool public ok;\n bool public ret;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true, true);\n }\n\n function set(bool _ok, bool _ret) public {\n ok = _ok;\n ret = _ret;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool) {\n _approve(_spender, _value);\n require(ok);\n return ret;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n _transfer(_to, _value);\n require(ok);\n return ret;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n _transferFrom(_from, _to, _value);\n require(ok);\n return ret;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.816Z", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "details": "initializes a new NonStandardToken instance", + "params": { + "_decimals": "decimal points", + "_name": "token name", + "_supply": "initial supply", + "_symbol": "token symbol" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/OldConverter.json b/apps/cic-eth/tests/testdata/bancor/OldConverter.json new file mode 100644 index 00000000..06b87e4b --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/OldConverter.json @@ -0,0 +1,6058 @@ +{ + "contractName": "OldConverter", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"OldConverter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516100f83803806100f88339818101604052602081101561003357600080fd5b505160005560b2806100466000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356072565b60408051918252519081900360200190f35b600054939250505056fea26469706673582212207c43635e931afa21ef81297c792f7a4cc5aa436ebccb817a64a2497d123f8ef064736f6c634300060c0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356072565b60408051918252519081900360200190f35b600054939250505056fea26469706673582212207c43635e931afa21ef81297c792f7a4cc5aa436ebccb817a64a2497d123f8ef064736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "107:347:36:-:0;;;164:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;164:69:36;210:6;:16;107:347;;;;;;", + "deployedSourceMap": "107:347:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:213;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;239:213:36;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;350:7;438:6;239:213;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.801Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/Owned.json b/apps/cic-eth/tests/testdata/bancor/Owned.json new file mode 100644 index 00000000..6d71d60a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/Owned.json @@ -0,0 +1,2531 @@ +{ + "contractName": "Owned", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides support and utilities for contract ownership\",\"events\":{\"OwnerUpdate(address,address)\":{\"details\":\"triggered when the owner is updated\",\"params\":{\"_newOwner\":\"new owner\",\"_prevOwner\":\"previous owner\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new Owned instance\"},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":\"Owned\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561028b806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806379ba5097146100515780638da5cb5b1461005b578063d4ee1d901461007f578063f2fde38b14610087575b600080fd5b6100596100ad565b005b610063610164565b604080516001600160a01b039092168252519081900360200190f35b610063610173565b6100596004803603602081101561009d57600080fd5b50356001600160a01b0316610182565b6001546001600160a01b03163314610100576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61018a610200565b6000546001600160a01b03828116911614156101de576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610253576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b56fea2646970667358221220521452bed7ced4c169f956cdad6e781be48d8a9dafb057e42b768da09fda7b5764736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806379ba5097146100515780638da5cb5b1461005b578063d4ee1d901461007f578063f2fde38b14610087575b600080fd5b6100596100ad565b005b610063610164565b604080516001600160a01b039092168252519081900360200190f35b610063610173565b6100596004803603602081101561009d57600080fd5b50356001600160a01b0316610182565b6001546001600160a01b03163314610100576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61018a610200565b6000546001600160a01b03828116911614156101de576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610253576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b56fea2646970667358221220521452bed7ced4c169f956cdad6e781be48d8a9dafb057e42b768da09fda7b5764736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "187:1455:57:-:0;;;587:58;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;187:1455;;;;;;", + "deployedSourceMap": "187:1455:57:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1422:217;;;:::i;:::-;;219:29;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;255:23;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1422:217::-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;255:23::-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IOwned.sol\";\r\n\r\n/**\r\n * @dev Provides support and utilities for contract ownership\r\n*/\r\ncontract Owned is IOwned {\r\n address public override owner;\r\n address public newOwner;\r\n\r\n /**\r\n * @dev triggered when the owner is updated\r\n *\r\n * @param _prevOwner previous owner\r\n * @param _newOwner new owner\r\n */\r\n event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner);\r\n\r\n /**\r\n * @dev initializes a new Owned instance\r\n */\r\n constructor() public {\r\n owner = msg.sender;\r\n }\r\n\r\n // allows execution by the owner only\r\n modifier ownerOnly {\r\n _ownerOnly();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _ownerOnly() internal view {\r\n require(msg.sender == owner, \"ERR_ACCESS_DENIED\");\r\n }\r\n\r\n /**\r\n * @dev allows transferring the contract ownership\r\n * the new owner still needs to accept the transfer\r\n * can only be called by the contract owner\r\n *\r\n * @param _newOwner new contract owner\r\n */\r\n function transferOwnership(address _newOwner) public override ownerOnly {\r\n require(_newOwner != owner, \"ERR_SAME_OWNER\");\r\n newOwner = _newOwner;\r\n }\r\n\r\n /**\r\n * @dev used by a new owner to accept an ownership transfer\r\n */\r\n function acceptOwnership() override public {\r\n require(msg.sender == newOwner, \"ERR_ACCESS_DENIED\");\r\n emit OwnerUpdate(owner, newOwner);\r\n owner = newOwner;\r\n newOwner = address(0);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "exportedSymbols": { + "Owned": [ + 21818 + ] + }, + "id": 21819, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21721, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:57" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "./interfaces/IOwned.sol", + "id": 21722, + "nodeType": "ImportDirective", + "scope": 21819, + "sourceUnit": 22848, + "src": "77:33:57", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21724, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "205:6:57", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 21725, + "nodeType": "InheritanceSpecifier", + "src": "205:6:57" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21723, + "nodeType": "StructuredDocumentation", + "src": "114:71:57", + "text": " @dev Provides support and utilities for contract ownership" + }, + "fullyImplemented": true, + "id": 21818, + "linearizedBaseContracts": [ + 21818, + 22847 + ], + "name": "Owned", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 22838 + ], + "constant": false, + "functionSelector": "8da5cb5b", + "id": 21728, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21727, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "234:8:57" + }, + "scope": 21818, + "src": "219:29:57", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21726, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "219:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d4ee1d90", + "id": 21730, + "mutability": "mutable", + "name": "newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21818, + "src": "255:23:57", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21729, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21731, + "nodeType": "StructuredDocumentation", + "src": "287:149:57", + "text": " @dev triggered when the owner is updated\n @param _prevOwner previous owner\n @param _newOwner new owner" + }, + "id": 21737, + "name": "OwnerUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 21736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21733, + "indexed": true, + "mutability": "mutable", + "name": "_prevOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21737, + "src": "460:26:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21732, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21735, + "indexed": true, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21737, + "src": "488:25:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21734, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "488:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "459:55:57" + }, + "src": "442:73:57" + }, + { + "body": { + "id": 21746, + "nodeType": "Block", + "src": "608:37:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21741, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "619:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21742, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "627:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "627:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "619:18:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21745, + "nodeType": "ExpressionStatement", + "src": "619:18:57" + } + ] + }, + "documentation": { + "id": 21738, + "nodeType": "StructuredDocumentation", + "src": "523:58:57", + "text": " @dev initializes a new Owned instance" + }, + "id": 21747, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21739, + "nodeType": "ParameterList", + "parameters": [], + "src": "598:2:57" + }, + "returnParameters": { + "id": 21740, + "nodeType": "ParameterList", + "parameters": [], + "src": "608:0:57" + }, + "scope": 21818, + "src": "587:58:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21753, + "nodeType": "Block", + "src": "715:43:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21749, + "name": "_ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21766, + "src": "726:10:57", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 21750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:12:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21751, + "nodeType": "ExpressionStatement", + "src": "726:12:57" + }, + { + "id": 21752, + "nodeType": "PlaceholderStatement", + "src": "749:1:57" + } + ] + }, + "documentation": null, + "id": 21754, + "name": "ownerOnly", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21748, + "nodeType": "ParameterList", + "parameters": [], + "src": "715:0:57" + }, + "src": "696:62:57", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21765, + "nodeType": "Block", + "src": "849:68:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21758, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "868:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "868:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21760, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "882:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "868:19:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "889:19:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21757, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "860:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "860:49:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21764, + "nodeType": "ExpressionStatement", + "src": "860:49:57" + } + ] + }, + "documentation": null, + "id": 21766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownerOnly", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21755, + "nodeType": "ParameterList", + "parameters": [], + "src": "832:2:57" + }, + "returnParameters": { + "id": 21756, + "nodeType": "ParameterList", + "parameters": [], + "src": "849:0:57" + }, + "scope": 21818, + "src": "813:104:57", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 22843 + ], + "body": { + "id": 21786, + "nodeType": "Block", + "src": "1236:95:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21776, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21769, + "src": "1255:9:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21777, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1268:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1255:18:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f4f574e4552", + "id": 21779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1275:16:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133", + "typeString": "literal_string \"ERR_SAME_OWNER\"" + }, + "value": "ERR_SAME_OWNER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133", + "typeString": "literal_string \"ERR_SAME_OWNER\"" + } + ], + "id": 21775, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1247:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:45:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21781, + "nodeType": "ExpressionStatement", + "src": "1247:45:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21782, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1303:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21783, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21769, + "src": "1314:9:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1303:20:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21785, + "nodeType": "ExpressionStatement", + "src": "1303:20:57" + } + ] + }, + "documentation": { + "id": 21767, + "nodeType": "StructuredDocumentation", + "src": "925:233:57", + "text": " @dev allows transferring the contract ownership\n the new owner still needs to accept the transfer\n can only be called by the contract owner\n @param _newOwner new contract owner" + }, + "functionSelector": "f2fde38b", + "id": 21787, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21773, + "modifierName": { + "argumentTypes": null, + "id": 21772, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1226:9:57", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1226:9:57" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21771, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1217:8:57" + }, + "parameters": { + "id": 21770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21769, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21787, + "src": "1191:17:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1191:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1190:19:57" + }, + "returnParameters": { + "id": 21774, + "nodeType": "ParameterList", + "parameters": [], + "src": "1236:0:57" + }, + "scope": 21818, + "src": "1164:167:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22846 + ], + "body": { + "id": 21816, + "nodeType": "Block", + "src": "1465:174:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21793, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1484:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1484:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21795, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1498:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1484:22:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1508:19:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21792, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1476:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1476:52:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21799, + "nodeType": "ExpressionStatement", + "src": "1476:52:57" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21801, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1556:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21802, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1563:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21800, + "name": "OwnerUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21737, + "src": "1544:11:57", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 21803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1544:28:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21804, + "nodeType": "EmitStatement", + "src": "1539:33:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21805, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1583:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21806, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1591:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1583:16:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21808, + "nodeType": "ExpressionStatement", + "src": "1583:16:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21809, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1610:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1629:1:57", + "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": 21811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1621:7:57", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1621:7:57", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1621:10:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1610:21:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21815, + "nodeType": "ExpressionStatement", + "src": "1610:21:57" + } + ] + }, + "documentation": { + "id": 21788, + "nodeType": "StructuredDocumentation", + "src": "1339:77:57", + "text": " @dev used by a new owner to accept an ownership transfer" + }, + "functionSelector": "79ba5097", + "id": 21817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21790, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1449:8:57" + }, + "parameters": { + "id": 21789, + "nodeType": "ParameterList", + "parameters": [], + "src": "1446:2:57" + }, + "returnParameters": { + "id": 21791, + "nodeType": "ParameterList", + "parameters": [], + "src": "1465:0:57" + }, + "scope": 21818, + "src": "1422:217:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21819, + "src": "187:1455:57" + } + ], + "src": "52:1592:57" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "exportedSymbols": { + "Owned": [ + 21818 + ] + }, + "id": 21819, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21721, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:57" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol", + "file": "./interfaces/IOwned.sol", + "id": 21722, + "nodeType": "ImportDirective", + "scope": 21819, + "sourceUnit": 22848, + "src": "77:33:57", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21724, + "name": "IOwned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22847, + "src": "205:6:57", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IOwned_$22847", + "typeString": "contract IOwned" + } + }, + "id": 21725, + "nodeType": "InheritanceSpecifier", + "src": "205:6:57" + } + ], + "contractDependencies": [ + 22847 + ], + "contractKind": "contract", + "documentation": { + "id": 21723, + "nodeType": "StructuredDocumentation", + "src": "114:71:57", + "text": " @dev Provides support and utilities for contract ownership" + }, + "fullyImplemented": true, + "id": 21818, + "linearizedBaseContracts": [ + 21818, + 22847 + ], + "name": "Owned", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 22838 + ], + "constant": false, + "functionSelector": "8da5cb5b", + "id": 21728, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21727, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "234:8:57" + }, + "scope": 21818, + "src": "219:29:57", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21726, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "219:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d4ee1d90", + "id": 21730, + "mutability": "mutable", + "name": "newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21818, + "src": "255:23:57", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21729, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "255:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21731, + "nodeType": "StructuredDocumentation", + "src": "287:149:57", + "text": " @dev triggered when the owner is updated\n @param _prevOwner previous owner\n @param _newOwner new owner" + }, + "id": 21737, + "name": "OwnerUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 21736, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21733, + "indexed": true, + "mutability": "mutable", + "name": "_prevOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21737, + "src": "460:26:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21732, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21735, + "indexed": true, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21737, + "src": "488:25:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21734, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "488:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "459:55:57" + }, + "src": "442:73:57" + }, + { + "body": { + "id": 21746, + "nodeType": "Block", + "src": "608:37:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21741, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "619:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21742, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "627:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "627:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "619:18:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21745, + "nodeType": "ExpressionStatement", + "src": "619:18:57" + } + ] + }, + "documentation": { + "id": 21738, + "nodeType": "StructuredDocumentation", + "src": "523:58:57", + "text": " @dev initializes a new Owned instance" + }, + "id": 21747, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21739, + "nodeType": "ParameterList", + "parameters": [], + "src": "598:2:57" + }, + "returnParameters": { + "id": 21740, + "nodeType": "ParameterList", + "parameters": [], + "src": "608:0:57" + }, + "scope": 21818, + "src": "587:58:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21753, + "nodeType": "Block", + "src": "715:43:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21749, + "name": "_ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21766, + "src": "726:10:57", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 21750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:12:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21751, + "nodeType": "ExpressionStatement", + "src": "726:12:57" + }, + { + "id": 21752, + "nodeType": "PlaceholderStatement", + "src": "749:1:57" + } + ] + }, + "documentation": null, + "id": 21754, + "name": "ownerOnly", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21748, + "nodeType": "ParameterList", + "parameters": [], + "src": "715:0:57" + }, + "src": "696:62:57", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21765, + "nodeType": "Block", + "src": "849:68:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21758, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "868:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "868:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21760, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "882:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "868:19:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "889:19:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21757, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "860:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "860:49:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21764, + "nodeType": "ExpressionStatement", + "src": "860:49:57" + } + ] + }, + "documentation": null, + "id": 21766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownerOnly", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21755, + "nodeType": "ParameterList", + "parameters": [], + "src": "832:2:57" + }, + "returnParameters": { + "id": 21756, + "nodeType": "ParameterList", + "parameters": [], + "src": "849:0:57" + }, + "scope": 21818, + "src": "813:104:57", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 22843 + ], + "body": { + "id": 21786, + "nodeType": "Block", + "src": "1236:95:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21776, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21769, + "src": "1255:9:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21777, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1268:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1255:18:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f4f574e4552", + "id": 21779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1275:16:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133", + "typeString": "literal_string \"ERR_SAME_OWNER\"" + }, + "value": "ERR_SAME_OWNER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fd4538e1d572c08b9fe188370db4ccb2fa173c576dfdb888a76c86a53b83133", + "typeString": "literal_string \"ERR_SAME_OWNER\"" + } + ], + "id": 21775, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1247:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1247:45:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21781, + "nodeType": "ExpressionStatement", + "src": "1247:45:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21782, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1303:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21783, + "name": "_newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21769, + "src": "1314:9:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1303:20:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21785, + "nodeType": "ExpressionStatement", + "src": "1303:20:57" + } + ] + }, + "documentation": { + "id": 21767, + "nodeType": "StructuredDocumentation", + "src": "925:233:57", + "text": " @dev allows transferring the contract ownership\n the new owner still needs to accept the transfer\n can only be called by the contract owner\n @param _newOwner new contract owner" + }, + "functionSelector": "f2fde38b", + "id": 21787, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21773, + "modifierName": { + "argumentTypes": null, + "id": 21772, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1226:9:57", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1226:9:57" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21771, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1217:8:57" + }, + "parameters": { + "id": 21770, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21769, + "mutability": "mutable", + "name": "_newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21787, + "src": "1191:17:57", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1191:7:57", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1190:19:57" + }, + "returnParameters": { + "id": 21774, + "nodeType": "ParameterList", + "parameters": [], + "src": "1236:0:57" + }, + "scope": 21818, + "src": "1164:167:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22846 + ], + "body": { + "id": 21816, + "nodeType": "Block", + "src": "1465:174:57", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 21793, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1484:3:57", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1484:10:57", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21795, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1498:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1484:22:57", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4143434553535f44454e494544", + "id": 21797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1508:19:57", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + }, + "value": "ERR_ACCESS_DENIED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f5894269650d3e1726ed81a4f48c5b62c7dd6fa025b89d639952a7012960d666", + "typeString": "literal_string \"ERR_ACCESS_DENIED\"" + } + ], + "id": 21792, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1476:7:57", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1476:52:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21799, + "nodeType": "ExpressionStatement", + "src": "1476:52:57" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21801, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1556:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21802, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1563:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21800, + "name": "OwnerUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21737, + "src": "1544:11:57", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 21803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1544:28:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21804, + "nodeType": "EmitStatement", + "src": "1539:33:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21805, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21728, + "src": "1583:5:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21806, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1591:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1583:16:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21808, + "nodeType": "ExpressionStatement", + "src": "1583:16:57" + }, + { + "expression": { + "argumentTypes": null, + "id": 21814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21809, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21730, + "src": "1610:8:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1629:1:57", + "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": 21811, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1621:7:57", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1621:7:57", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21813, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1621:10:57", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1610:21:57", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 21815, + "nodeType": "ExpressionStatement", + "src": "1610:21:57" + } + ] + }, + "documentation": { + "id": 21788, + "nodeType": "StructuredDocumentation", + "src": "1339:77:57", + "text": " @dev used by a new owner to accept an ownership transfer" + }, + "functionSelector": "79ba5097", + "id": 21817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21790, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1449:8:57" + }, + "parameters": { + "id": 21789, + "nodeType": "ParameterList", + "parameters": [], + "src": "1446:2:57" + }, + "returnParameters": { + "id": 21791, + "nodeType": "ParameterList", + "parameters": [], + "src": "1465:0:57" + }, + "scope": 21818, + "src": "1422:217:57", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21819, + "src": "187:1455:57" + } + ], + "src": "52:1592:57" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.841Z", + "devdoc": { + "details": "Provides support and utilities for contract ownership", + "events": { + "OwnerUpdate(address,address)": { + "details": "triggered when the owner is updated", + "params": { + "_newOwner": "new owner", + "_prevOwner": "previous owner" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new Owned instance" + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/PoolTokensContainer.json b/apps/cic-eth/tests/testdata/bancor/PoolTokensContainer.json new file mode 100644 index 00000000..9817a57b --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/PoolTokensContainer.json @@ -0,0 +1,5939 @@ +{ + "contractName": "PoolTokensContainer", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "poolTokens", + "outputs": [ + { + "internalType": "contract ISmartToken[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "createToken", + "outputs": [ + { + "internalType": "contract ISmartToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createToken\",\"outputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolTokens\",\"outputs\":[{\"internalType\":\"contract ISmartToken[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The PoolTokensContainer contract serves as a container for multiple pool tokens. It is used by specific liquidity pool types that require more than a single pool token, while still maintaining the single converter / anchor relationship. It maintains and provides a list of the underlying pool tokens.\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"burn(address,address,uint256)\":{\"details\":\"removes tokens from the given account and decreases the pool token supply can only be called by the contract owner\",\"params\":{\"_amount\":\"amount to burn\",\"_from\":\"account to remove the tokens from\",\"_token\":\"pool token address\"}},\"constructor\":{\"details\":\"initializes a new PoolTokensContainer instance\",\"params\":{\"_decimals\":\"used for the underlying pool token decimals\",\"_name\":\"pool name, also used as a prefix for the underlying pool token names\",\"_symbol\":\"pool symbol, also used as a prefix for the underlying pool token symbols\"}},\"createToken()\":{\"details\":\"creates a new pool token and adds it to the list\",\"returns\":{\"_0\":\"new pool token address\"}},\"mint(address,address,uint256)\":{\"details\":\"increases the pool token supply and sends the new tokens to the given account can only be called by the contract owner\",\"params\":{\"_amount\":\"amount to mint\",\"_to\":\"account to receive the newly minted tokens\",\"_token\":\"pool token address\"}},\"poolTokens()\":{\"details\":\"returns the list of pool tokens\",\"returns\":{\"_0\":\"list of pool tokens\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":\"PoolTokensContainer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":{\"keccak256\":\"0x79e583ec380c8982f74d4f707ae26ed96e1c90a6b54b4fc058ab2316656e0ddb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3c900b396fefda767db8b99d9ed10c9a22151279b0f8229098d28a08e75046da\",\"dweb:/ipfs/QmZBqgB1CnKpjM8Bv6HMrYtzdwu8wBmS3FzpWuvhyfGLwd\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200224a3803806200224a833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b0319163317905584519092501515905062000200576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008251116200024c576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b82516200026190600290602086019062000295565b5081516200027790600390602085019062000295565b506004805460ff191660ff9290921691909117905550620003319050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002d857805160ff191683800117855562000308565b8280016001018555821562000308579182015b8281111562000308578251825591602001919060010190620002eb565b50620003169291506200031a565b5090565b5b808211156200031657600081556001016200031b565b611f0980620003416000396000f3fe60806040523480156200001157600080fd5b5060043610620000c45760003560e01c806395d89b41116200007b57806395d89b4114620002325780639cbf9e36146200023c578063c6c3bbe61462000246578063d4ee1d90146200027f578063f2fde38b1462000289578063f6b911bc14620002b257620000c4565b806306fdde0314620000c9578063313ce567146200014b5780635e35359e146200016b5780636d3e313e14620001a657806379ba509714620002025780638da5cb5b146200020c575b600080fd5b620000d3620002eb565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200010f578181015183820152602001620000f5565b50505050905090810190601f1680156200013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001556200037a565b6040805160ff9092168252519081900360200190f35b620001a4600480360360608110156200018357600080fd5b506001600160a01b0381358116916020810135909116906040013562000383565b005b620001b0620003c6565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015620001ee578181015183820152602001620001d4565b505050509050019250505060405180910390f35b620001a46200042a565b62000216620004e2565b604080516001600160a01b039092168252519081900360200190f35b620000d3620004f1565b620002166200054f565b620001a4600480360360608110156200025e57600080fd5b506001600160a01b038135811691602081013590911690604001356200082e565b62000216620008ae565b620001a460048036036020811015620002a157600080fd5b50356001600160a01b0316620008bd565b620001a460048036036060811015620002ca57600080fd5b506001600160a01b038135811691602081013590911690604001356200093e565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b820191906000526020600020905b8154815290600101906020018083116200035457829003601f168201915b505050505081565b60045460ff1681565b6200038d620009a0565b826200039981620009f6565b82620003a581620009f6565b83620003b18162000a4b565b620003be86868662000aa0565b505050505050565b606060058054806020026020016040519081016040528092919081815260200182805480156200042057602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000401575b5050505050905090565b6001546001600160a01b031633146200047e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b60006200055b620009a0565b6005805410620005aa576040805162461bcd60e51b815260206004820152601560248201527411549497d3505617d31253525517d4915050d21151605a1b604482015290519081900360640190fd5b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181526060936200064e93919290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b820191906000526020600020905b8154815290600101906020018083116200061d57829003601f168201915b5050600554600101925062000c08915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450606093620006ba93909290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b905060008282600460009054906101000a900460ff16604051620006de9062000c92565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620007245781810151838201526020016200070a565b50505050905090810190601f168015620007525780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620007875781810151838201526020016200076d565b50505050905090810190601f168015620007b55780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f080158015620007da573d6000803e3d6000fd5b50600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038316179055949350505050565b62000838620009a0565b826001600160a01b031663867904b483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b505af1158015620008a5573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031681565b620008c7620009a0565b6000546001600160a01b03828116911614156200091c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b62000948620009a0565b826001600160a01b031663a24835d183836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b6000546001600160a01b03163314620009f4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811662000a48576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b03811630141562000a48576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831062000b1f5780518252601f19909201916020918201910162000afe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462000b83576040519150601f19603f3d011682016040523d82523d6000602084013e62000b88565b606091505b509150915081801562000bb957508051158062000bb9575080806020019051602081101562000bb657600080fd5b50515b62000c01576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b60608282600360fc1b60f81c016040516020018083805190602001908083835b6020831062000c495780518252601f19909201916020918201910162000c28565b6001836020036101000a0380198251168184511680821785525050505050509050018260ff1660f81b815260010192505050604051602081830303815290604052905092915050565b6112338062000ca18339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212204f09fb1778cc831abb7f873219dbed978e552fc8cd81237b1adc3e5d9ff2530f64736f6c634300060c0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000c45760003560e01c806395d89b41116200007b57806395d89b4114620002325780639cbf9e36146200023c578063c6c3bbe61462000246578063d4ee1d90146200027f578063f2fde38b1462000289578063f6b911bc14620002b257620000c4565b806306fdde0314620000c9578063313ce567146200014b5780635e35359e146200016b5780636d3e313e14620001a657806379ba509714620002025780638da5cb5b146200020c575b600080fd5b620000d3620002eb565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200010f578181015183820152602001620000f5565b50505050905090810190601f1680156200013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001556200037a565b6040805160ff9092168252519081900360200190f35b620001a4600480360360608110156200018357600080fd5b506001600160a01b0381358116916020810135909116906040013562000383565b005b620001b0620003c6565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015620001ee578181015183820152602001620001d4565b505050509050019250505060405180910390f35b620001a46200042a565b62000216620004e2565b604080516001600160a01b039092168252519081900360200190f35b620000d3620004f1565b620002166200054f565b620001a4600480360360608110156200025e57600080fd5b506001600160a01b038135811691602081013590911690604001356200082e565b62000216620008ae565b620001a460048036036020811015620002a157600080fd5b50356001600160a01b0316620008bd565b620001a460048036036060811015620002ca57600080fd5b506001600160a01b038135811691602081013590911690604001356200093e565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b820191906000526020600020905b8154815290600101906020018083116200035457829003601f168201915b505050505081565b60045460ff1681565b6200038d620009a0565b826200039981620009f6565b82620003a581620009f6565b83620003b18162000a4b565b620003be86868662000aa0565b505050505050565b606060058054806020026020016040519081016040528092919081815260200182805480156200042057602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000401575b5050505050905090565b6001546001600160a01b031633146200047e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015620003725780601f10620003465761010080835404028352916020019162000372565b60006200055b620009a0565b6005805410620005aa576040805162461bcd60e51b815260206004820152601560248201527411549497d3505617d31253525517d4915050d21151605a1b604482015290519081900360640190fd5b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181526060936200064e93919290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b820191906000526020600020905b8154815290600101906020018083116200061d57829003601f168201915b5050600554600101925062000c08915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450606093620006ba93909290918301828280156200063b5780601f106200060f576101008083540402835291602001916200063b565b905060008282600460009054906101000a900460ff16604051620006de9062000c92565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620007245781810151838201526020016200070a565b50505050905090810190601f168015620007525780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620007875781810151838201526020016200076d565b50505050905090810190601f168015620007b55780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f080158015620007da573d6000803e3d6000fd5b50600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038316179055949350505050565b62000838620009a0565b826001600160a01b031663867904b483836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b505af1158015620008a5573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b031681565b620008c7620009a0565b6000546001600160a01b03828116911614156200091c576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b62000948620009a0565b826001600160a01b031663a24835d183836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156200089057600080fd5b6000546001600160a01b03163314620009f4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811662000a48576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b03811630141562000a48576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831062000b1f5780518252601f19909201916020918201910162000afe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462000b83576040519150601f19603f3d011682016040523d82523d6000602084013e62000b88565b606091505b509150915081801562000bb957508051158062000bb9575080806020019051602081101562000bb657600080fd5b50515b62000c01576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b60608282600360fc1b60f81c016040516020018083805190602001908083835b6020831062000c495780518252601f19909201916020918201910162000c28565b6001836020036101000a0380198251168184511680821785525050505050509050018260ff1660f81b815260010192505050604051602081830303815290604052905092915050565b6112338062000ca18339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212204f09fb1778cc831abb7f873219dbed978e552fc8cd81237b1adc3e5d9ff2530f64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "592:3348:32:-:0;;;1382:329;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1382:329:32;;;;;;;;;;-1:-1:-1;1382:329:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1382:329:32;;;;;;;;;;-1:-1:-1;1382:329:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1382:329:32;;;;;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;1509:19:32;;1382:329;;-1:-1:-1;1509:23:32;;;-1:-1:-1;1501:52:32;;;;;-1:-1:-1;;;1501:52:32;;;;;;;;;;;;-1:-1:-1;;;1501:52:32;;;;;;;;;;;;;;;1596:1;1578:7;1572:21;:25;1564:56;;;;;-1:-1:-1;;;1564:56:32;;;;;;;;;;;;-1:-1:-1;;;1564:56:32;;;;;;;;;;;;;;;1633:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1656:16:32;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1683:8:32;:20;;-1:-1:-1;;1683:20:32;;;;;;;;;;;;-1:-1:-1;592:3348:32;;-1:-1:-1;592:3348:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;592:3348:32;;;-1:-1:-1;592:3348:32;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "592:3348:32:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;767:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;877:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1196:290:63;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:63;;;;;;;;;;;;;;;;;:::i;:::-;;1828:113:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1422:217:58;;;:::i;219:29::-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:58;;;;;;;;;;;;;;821:20:32;;;:::i;2078:530::-;;;:::i;2936:137::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2936:137:32;;;;;;;;;;;;;;;;;:::i;255:23:58:-;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;3388:143:32:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3388:143:32;;;;;;;;;;;;;;;;;:::i;767:18::-;;;;;;;;;;;;;;-1:-1:-1;;767:18:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;877:21::-;;;;;;:::o;1196:290:63:-;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:65::3;::::2;749::58::1;1196:290:63::0;;;:::o;1828:113:32:-;1882:20;1922:11;1915:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1915:18:32;;;-1:-1:-1;1915:18:32;;;;;;;;;;;;;;;;;;;1828:113;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;1591:8:58;;-1:-1:-1;;;;;;1583:16:58;;;;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:58;;:::o;821:20:32:-;;;;;;;;;;;;;;;-1:-1:-1;;821:20:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2078:530;2138:11;726:12:58;:10;:12::i;:::-;714:1:32::1;2223:18:::0;;:36:::1;2215:70;;;::::0;;-1:-1:-1;;;2215:70:32;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2215:70:32;;;;;;;;;;;;;::::1;;2338:4;2323:51:::0;;::::1;::::0;;::::1;;::::0;::::1;;;;-1:-1:-1::0;;2323:51:32;;;::::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;2298:22:::1;::::0;2323:51:::1;::::0;;;2338:4;;2323:51;::::1;2338:4:::0;2323:51;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;2350:11:32::1;:18:::0;2371:1:::1;2350:22;::::0;-1:-1:-1;2323:14:32::1;::::0;-1:-1:-1;;2323:51:32:i:1;:::-;2427:6;2412:53:::0;;::::1;::::0;;::::1;;;::::0;::::1;;;;-1:-1:-1::0;;2412:53:32;;;::::1;::::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;2298:76;;-1:-1:-1;2385:24:32::1;::::0;2412:53:::1;::::0;;;2427:6;;2412:53;;::::1;2427:6:::0;2412:53;;::::1;;;;;;;;;;;;;;;;;;;;;;;2385:80;;2478:16;2512:8;2522:10;2534:8;;;;;;;;;;;2497:46;;;;;:::i;:::-;;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;::::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;2497:46:32;;::::1;::::0;;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;::::1;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;2554:11:32::1;:23:::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;2554:23:32;;;;;::::1;::::0;;-1:-1:-1;;;;;;2554:23:32::1;-1:-1:-1::0;;;;;2554:23:32;::::1;;::::0;;;;-1:-1:-1;;;;2078:530:32:o;2936:137::-;726:12:58;:10;:12::i;:::-;3039:26:32::1;::::0;;-1:-1:-1;;;3039:26:32;;-1:-1:-1;;;;;3039:26:32;;::::1;;::::0;::::1;::::0;;;;;;;;;:12;;::::1;::::0;::::1;::::0;:26;;;;;-1:-1:-1;;3039:26:32;;;;;;;;-1:-1:-1;3039:12:32;:26;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;2936:137:::0;;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;3388:143:32:-;726:12:58;:10;:12::i;:::-;3493:30:32::1;::::0;;-1:-1:-1;;;3493:30:32;;-1:-1:-1;;;;;3493:30:32;;::::1;;::::0;::::1;::::0;;;;;;;;;:14;;::::1;::::0;::::1;::::0;:30;;;;;-1:-1:-1;;3493:30:32;;;;;;;;-1:-1:-1;3493:14:32;:30;::::1;;::::0;::::1;;;;::::0;::::1;813:104:58::0;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;;813:104::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;1130:4;-1:-1:-1;;;;;1110:25:65;;;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;1485:312:62;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;-1:-1:-1;;1589:17:62;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;;1485:312;;;;;:::o;3757:180:32:-;3837:13;3894:4;3921:6;-1:-1:-1;;;3900:18:32;;:27;3877:51;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3877:51:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3863:66;;3757:180;;;;:::o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./interfaces/IPoolTokensContainer.sol\";\r\nimport \"../../../utility/Owned.sol\";\r\nimport \"../../../utility/TokenHolder.sol\";\r\nimport \"../../../token/SmartToken.sol\";\r\n\r\n/**\r\n * @dev The PoolTokensContainer contract serves as a container for multiple pool tokens.\r\n * It is used by specific liquidity pool types that require more than a single pool token,\r\n * while still maintaining the single converter / anchor relationship.\r\n *\r\n * It maintains and provides a list of the underlying pool tokens.\r\n */\r\ncontract PoolTokensContainer is IPoolTokensContainer, Owned, TokenHolder {\r\n uint8 internal constant MAX_POOL_TOKENS = 5; // maximum pool tokens in the container\r\n\r\n string public name; // pool name\r\n string public symbol; // pool symbol\r\n uint8 public decimals; // underlying pool tokens decimals\r\n ISmartToken[] private _poolTokens; // underlying pool tokens\r\n\r\n /**\r\n * @dev initializes a new PoolTokensContainer instance\r\n *\r\n * @param _name pool name, also used as a prefix for the underlying pool token names\r\n * @param _symbol pool symbol, also used as a prefix for the underlying pool token symbols\r\n * @param _decimals used for the underlying pool token decimals\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals) public {\r\n // validate input\r\n require(bytes(_name).length > 0, \"ERR_INVALID_NAME\");\r\n require(bytes(_symbol).length > 0, \"ERR_INVALID_SYMBOL\");\r\n\r\n name = _name;\r\n symbol = _symbol;\r\n decimals = _decimals;\r\n }\r\n\r\n /**\r\n * @dev returns the list of pool tokens\r\n *\r\n * @return list of pool tokens\r\n */\r\n function poolTokens() external view override returns (ISmartToken[] memory) {\r\n return _poolTokens;\r\n }\r\n\r\n /**\r\n * @dev creates a new pool token and adds it to the list\r\n *\r\n * @return new pool token address\r\n */\r\n function createToken() external override ownerOnly returns (ISmartToken) {\r\n // verify that the max limit wasn't reached\r\n require(_poolTokens.length < MAX_POOL_TOKENS, \"ERR_MAX_LIMIT_REACHED\");\r\n\r\n string memory poolName = concatStrDigit(name, uint8(_poolTokens.length + 1));\r\n string memory poolSymbol = concatStrDigit(symbol, uint8(_poolTokens.length + 1));\r\n\r\n SmartToken token = new SmartToken(poolName, poolSymbol, decimals);\r\n _poolTokens.push(token);\r\n return token;\r\n }\r\n\r\n /**\r\n * @dev increases the pool token supply and sends the new tokens to the given account\r\n * can only be called by the contract owner\r\n *\r\n * @param _token pool token address\r\n * @param _to account to receive the newly minted tokens\r\n * @param _amount amount to mint\r\n */\r\n function mint(ISmartToken _token, address _to, uint256 _amount) external override ownerOnly {\r\n _token.issue(_to, _amount);\r\n }\r\n\r\n /**\r\n * @dev removes tokens from the given account and decreases the pool token supply\r\n * can only be called by the contract owner\r\n *\r\n * @param _token pool token address\r\n * @param _from account to remove the tokens from\r\n * @param _amount amount to burn\r\n */\r\n function burn(ISmartToken _token, address _from, uint256 _amount) external override ownerOnly {\r\n _token.destroy(_from, _amount);\r\n }\r\n\r\n /**\r\n * @dev concatenates a string and a digit (single only) and returns the result string\r\n *\r\n * @param _str string\r\n * @param _digit digit\r\n * @return concatenated string\r\n */\r\n function concatStrDigit(string memory _str, uint8 _digit) private pure returns (string memory) {\r\n return string(abi.encodePacked(_str, uint8(bytes1('0')) + _digit));\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "exportedSymbols": { + "PoolTokensContainer": [ + 18724 + ] + }, + "id": 18725, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18513, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:32" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "file": "./interfaces/IPoolTokensContainer.sol", + "id": 18514, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 18802, + "src": "77:47:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../../../utility/Owned.sol", + "id": 18515, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 22154, + "src": "126:36:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../../../utility/TokenHolder.sol", + "id": 18516, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 22911, + "src": "164:42:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../../../token/SmartToken.sol", + "id": 18517, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 21395, + "src": "208:39:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18519, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "624:20:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18520, + "nodeType": "InheritanceSpecifier", + "src": "624:20:32" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18521, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "646:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 18522, + "nodeType": "InheritanceSpecifier", + "src": "646:5:32" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18523, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22910, + "src": "653:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22910", + "typeString": "contract TokenHolder" + } + }, + "id": 18524, + "nodeType": "InheritanceSpecifier", + "src": "653:11:32" + } + ], + "contractDependencies": [ + 13349, + 18801, + 21394, + 22153, + 22861, + 22910, + 22996, + 23182, + 23242 + ], + "contractKind": "contract", + "documentation": { + "id": 18518, + "nodeType": "StructuredDocumentation", + "src": "251:339:32", + "text": " @dev The PoolTokensContainer contract serves as a container for multiple pool tokens.\n It is used by specific liquidity pool types that require more than a single pool token,\n while still maintaining the single converter / anchor relationship.\n It maintains and provides a list of the underlying pool tokens." + }, + "fullyImplemented": true, + "id": 18724, + "linearizedBaseContracts": [ + 18724, + 22910, + 22996, + 22153, + 22861, + 18801, + 13349, + 23242, + 23182 + ], + "name": "PoolTokensContainer", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 18527, + "mutability": "constant", + "name": "MAX_POOL_TOKENS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "672:43:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18525, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "672:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "35", + "id": 18526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "714:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "06fdde03", + "id": 18529, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "767:18:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 18528, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "767:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 18531, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "821:20:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 18530, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "821:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 18533, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "877:21:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18532, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "877:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 18536, + "mutability": "mutable", + "name": "_poolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "953:33:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18534, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "953:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18535, + "length": null, + "nodeType": "ArrayTypeName", + "src": "953:13:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18580, + "nodeType": "Block", + "src": "1462:249:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18549, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18539, + "src": "1515:5:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 18548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1509:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 18547, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1509:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1509:12:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 18551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1509:19:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1531:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1509:23:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 18554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1534:18:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 18546, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1501:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1501:52:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18556, + "nodeType": "ExpressionStatement", + "src": "1501:52:32" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18560, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18541, + "src": "1578:7:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 18559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1572:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 18558, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1572:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1572:14:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 18562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1572:21:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18563, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1596:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1572:25:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 18565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1599:20:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 18557, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1564:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1564:56:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18567, + "nodeType": "ExpressionStatement", + "src": "1564:56:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18568, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18529, + "src": "1633:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18569, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18539, + "src": "1640:5:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1633:12:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 18571, + "nodeType": "ExpressionStatement", + "src": "1633:12:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18572, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18531, + "src": "1656:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18573, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18541, + "src": "1665:7:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1656:16:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 18575, + "nodeType": "ExpressionStatement", + "src": "1656:16:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18576, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18533, + "src": "1683:8:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18577, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18543, + "src": "1694:9:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1683:20:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 18579, + "nodeType": "ExpressionStatement", + "src": "1683:20:32" + } + ] + }, + "documentation": { + "id": 18537, + "nodeType": "StructuredDocumentation", + "src": "1022:354:32", + "text": " @dev initializes a new PoolTokensContainer instance\n @param _name pool name, also used as a prefix for the underlying pool token names\n @param _symbol pool symbol, also used as a prefix for the underlying pool token symbols\n @param _decimals used for the underlying pool token decimals" + }, + "id": 18581, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18539, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1394:19:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18538, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1394:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18541, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1415:21:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18540, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1415:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18543, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1438:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18542, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1438:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1393:61:32" + }, + "returnParameters": { + "id": 18545, + "nodeType": "ParameterList", + "parameters": [], + "src": "1462:0:32" + }, + "scope": 18724, + "src": "1382:329:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 18777 + ], + "body": { + "id": 18591, + "nodeType": "Block", + "src": "1904:37:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18589, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "1922:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "functionReturnParameters": 18588, + "id": 18590, + "nodeType": "Return", + "src": "1915:18:32" + } + ] + }, + "documentation": { + "id": 18582, + "nodeType": "StructuredDocumentation", + "src": "1719:103:32", + "text": " @dev returns the list of pool tokens\n @return list of pool tokens" + }, + "functionSelector": "6d3e313e", + "id": 18592, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "poolTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18584, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1864:8:32" + }, + "parameters": { + "id": 18583, + "nodeType": "ParameterList", + "parameters": [], + "src": "1847:2:32" + }, + "returnParameters": { + "id": 18588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18587, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18592, + "src": "1882:20:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18585, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "1882:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18586, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1882:13:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1881:22:32" + }, + "scope": 18724, + "src": "1828:113:32", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18782 + ], + "body": { + "id": 18652, + "nodeType": "Block", + "src": "2151:457:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18602, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2223:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2223:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 18604, + "name": "MAX_POOL_TOKENS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18527, + "src": "2244:15:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2223:36:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f4c494d49545f52454143484544", + "id": 18606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2261:23:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_65600c00f67ab34f2203e92774a46e26e7dd32d8502d3f07241456a23d1290f8", + "typeString": "literal_string \"ERR_MAX_LIMIT_REACHED\"" + }, + "value": "ERR_MAX_LIMIT_REACHED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_65600c00f67ab34f2203e92774a46e26e7dd32d8502d3f07241456a23d1290f8", + "typeString": "literal_string \"ERR_MAX_LIMIT_REACHED\"" + } + ], + "id": 18601, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2215:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2215:70:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18608, + "nodeType": "ExpressionStatement", + "src": "2215:70:32" + }, + { + "assignments": [ + 18610 + ], + "declarations": [ + { + "constant": false, + "id": 18610, + "mutability": "mutable", + "name": "poolName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2298:22:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18609, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2298:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18621, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18612, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18529, + "src": "2338:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18615, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2350:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2350:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2371:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2350:22:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2344:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18613, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2344:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2344:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18611, + "name": "concatStrDigit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18723, + "src": "2323:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (string memory,uint8) pure returns (string memory)" + } + }, + "id": 18620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2323:51:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2298:76:32" + }, + { + "assignments": [ + 18623 + ], + "declarations": [ + { + "constant": false, + "id": 18623, + "mutability": "mutable", + "name": "poolSymbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2385:24:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18622, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2385:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18634, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18625, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18531, + "src": "2427:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18628, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2441:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2441:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2462:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2441:22:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2435:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18626, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2435:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18624, + "name": "concatStrDigit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18723, + "src": "2412:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (string memory,uint8) pure returns (string memory)" + } + }, + "id": 18633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2412:53:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2385:80:32" + }, + { + "assignments": [ + 18636 + ], + "declarations": [ + { + "constant": false, + "id": 18636, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2478:16:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18635, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "2478:10:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18643, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18639, + "name": "poolName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18610, + "src": "2512:8:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18640, + "name": "poolSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18623, + "src": "2522:10:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18641, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18533, + "src": "2534:8:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2497:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 18637, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "2501:10:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 18642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2497:46:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2478:65:32" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18647, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18636, + "src": "2571:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + ], + "expression": { + "argumentTypes": null, + "id": 18644, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2554:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2554:16:32", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_contract$_ISmartToken_$21517_$returns$__$", + "typeString": "function (contract ISmartToken)" + } + }, + "id": 18648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2554:23:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18649, + "nodeType": "ExpressionStatement", + "src": "2554:23:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18650, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18636, + "src": "2595:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "functionReturnParameters": 18600, + "id": 18651, + "nodeType": "Return", + "src": "2588:12:32" + } + ] + }, + "documentation": { + "id": 18593, + "nodeType": "StructuredDocumentation", + "src": "1949:123:32", + "text": " @dev creates a new pool token and adds it to the list\n @return new pool token address" + }, + "functionSelector": "9cbf9e36", + "id": 18653, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18597, + "modifierName": { + "argumentTypes": null, + "id": 18596, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2119:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2119:9:32" + } + ], + "name": "createToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18595, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2110:8:32" + }, + "parameters": { + "id": 18594, + "nodeType": "ParameterList", + "parameters": [], + "src": "2098:2:32" + }, + "returnParameters": { + "id": 18600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18599, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18653, + "src": "2138:11:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18598, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "2138:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2137:13:32" + }, + "scope": 18724, + "src": "2078:530:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18791 + ], + "body": { + "id": 18673, + "nodeType": "Block", + "src": "3028:45:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18669, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18658, + "src": "3052:3:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 18670, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18660, + "src": "3057:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18666, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18656, + "src": "3039:6:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21509, + "src": "3039:12:32", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 18671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:26:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18672, + "nodeType": "ExpressionStatement", + "src": "3039:26:32" + } + ] + }, + "documentation": { + "id": 18654, + "nodeType": "StructuredDocumentation", + "src": "2616:314:32", + "text": " @dev increases the pool token supply and sends the new tokens to the given account\n can only be called by the contract owner\n @param _token pool token address\n @param _to account to receive the newly minted tokens\n @param _amount amount to mint" + }, + "functionSelector": "c6c3bbe6", + "id": 18674, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18664, + "modifierName": { + "argumentTypes": null, + "id": 18663, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "3018:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3018:9:32" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18662, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3009:8:32" + }, + "parameters": { + "id": 18661, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18656, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2950:18:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18655, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "2950:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18658, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2970:11:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18657, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2970:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18660, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2983:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2983:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2949:50:32" + }, + "returnParameters": { + "id": 18665, + "nodeType": "ParameterList", + "parameters": [], + "src": "3028:0:32" + }, + "scope": 18724, + "src": "2936:137:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18800 + ], + "body": { + "id": 18694, + "nodeType": "Block", + "src": "3482:49:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18690, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18679, + "src": "3508:5:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 18691, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18681, + "src": "3515:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18687, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18677, + "src": "3493:6:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21516, + "src": "3493:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 18692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:30:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18693, + "nodeType": "ExpressionStatement", + "src": "3493:30:32" + } + ] + }, + "documentation": { + "id": 18675, + "nodeType": "StructuredDocumentation", + "src": "3081:301:32", + "text": " @dev removes tokens from the given account and decreases the pool token supply\n can only be called by the contract owner\n @param _token pool token address\n @param _from account to remove the tokens from\n @param _amount amount to burn" + }, + "functionSelector": "f6b911bc", + "id": 18695, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18685, + "modifierName": { + "argumentTypes": null, + "id": 18684, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "3472:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3472:9:32" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3463:8:32" + }, + "parameters": { + "id": 18682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18677, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3402:18:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18676, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "3402:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18679, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3422:13:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18678, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3422:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18681, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3437:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18680, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3437:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3401:52:32" + }, + "returnParameters": { + "id": 18686, + "nodeType": "ParameterList", + "parameters": [], + "src": "3482:0:32" + }, + "scope": 18724, + "src": "3388:143:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18722, + "nodeType": "Block", + "src": "3852:85:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18709, + "name": "_str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18698, + "src": "3894:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 18718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 18714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3913:3:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 18713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3906:6:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 18712, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3906:6:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3906:11:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 18711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3900:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18710, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3900:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3900:18:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 18717, + "name": "_digit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18700, + "src": "3921:6:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3900:27:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18707, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3877:3:32", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 18708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3877:16:32", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 18719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3877:51:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 18706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3870:6:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 18705, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3870:6:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3870:59:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 18704, + "id": 18721, + "nodeType": "Return", + "src": "3863:66:32" + } + ] + }, + "documentation": { + "id": 18696, + "nodeType": "StructuredDocumentation", + "src": "3539:212:32", + "text": " @dev concatenates a string and a digit (single only) and returns the result string\n @param _str string\n @param _digit digit\n @return concatenated string" + }, + "id": 18723, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "concatStrDigit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18698, + "mutability": "mutable", + "name": "_str", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3781:18:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3781:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18700, + "mutability": "mutable", + "name": "_digit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3801:12:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18699, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3801:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3780:34:32" + }, + "returnParameters": { + "id": 18704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18703, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3837:13:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18702, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3837:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3836:15:32" + }, + "scope": 18724, + "src": "3757:180:32", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 18725, + "src": "592:3348:32" + } + ], + "src": "52:3890:32" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol", + "exportedSymbols": { + "PoolTokensContainer": [ + 18724 + ] + }, + "id": 18725, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18513, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:32" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol", + "file": "./interfaces/IPoolTokensContainer.sol", + "id": 18514, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 18802, + "src": "77:47:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../../../utility/Owned.sol", + "id": 18515, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 22154, + "src": "126:36:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../../../utility/TokenHolder.sol", + "id": 18516, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 22911, + "src": "164:42:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../../../token/SmartToken.sol", + "id": 18517, + "nodeType": "ImportDirective", + "scope": 18725, + "sourceUnit": 21395, + "src": "208:39:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18519, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "624:20:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "id": 18520, + "nodeType": "InheritanceSpecifier", + "src": "624:20:32" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18521, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "646:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 18522, + "nodeType": "InheritanceSpecifier", + "src": "646:5:32" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18523, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22910, + "src": "653:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22910", + "typeString": "contract TokenHolder" + } + }, + "id": 18524, + "nodeType": "InheritanceSpecifier", + "src": "653:11:32" + } + ], + "contractDependencies": [ + 13349, + 18801, + 21394, + 22153, + 22861, + 22910, + 22996, + 23182, + 23242 + ], + "contractKind": "contract", + "documentation": { + "id": 18518, + "nodeType": "StructuredDocumentation", + "src": "251:339:32", + "text": " @dev The PoolTokensContainer contract serves as a container for multiple pool tokens.\n It is used by specific liquidity pool types that require more than a single pool token,\n while still maintaining the single converter / anchor relationship.\n It maintains and provides a list of the underlying pool tokens." + }, + "fullyImplemented": true, + "id": 18724, + "linearizedBaseContracts": [ + 18724, + 22910, + 22996, + 22153, + 22861, + 18801, + 13349, + 23242, + 23182 + ], + "name": "PoolTokensContainer", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 18527, + "mutability": "constant", + "name": "MAX_POOL_TOKENS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "672:43:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18525, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "672:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "35", + "id": 18526, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "714:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "06fdde03", + "id": 18529, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "767:18:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 18528, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "767:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 18531, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "821:20:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 18530, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "821:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 18533, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "877:21:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18532, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "877:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 18536, + "mutability": "mutable", + "name": "_poolTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18724, + "src": "953:33:32", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18534, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "953:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18535, + "length": null, + "nodeType": "ArrayTypeName", + "src": "953:13:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18580, + "nodeType": "Block", + "src": "1462:249:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18549, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18539, + "src": "1515:5:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 18548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1509:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 18547, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1509:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1509:12:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 18551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1509:19:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1531:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1509:23:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f4e414d45", + "id": 18554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1534:18:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + }, + "value": "ERR_INVALID_NAME" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8c31b897cf1b4c41d9a3a2c9019700f5d8d0c36c906997985403c8f4610f8246", + "typeString": "literal_string \"ERR_INVALID_NAME\"" + } + ], + "id": 18546, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1501:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18555, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1501:52:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18556, + "nodeType": "ExpressionStatement", + "src": "1501:52:32" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18560, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18541, + "src": "1578:7:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 18559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1572:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 18558, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1572:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1572:14:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 18562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1572:21:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 18563, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1596:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1572:25:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f53594d424f4c", + "id": 18565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1599:20:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + }, + "value": "ERR_INVALID_SYMBOL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8cbe13dffb618f268f4d803a75787a665744c462e7a6ba0f32e015df7f7a2fda", + "typeString": "literal_string \"ERR_INVALID_SYMBOL\"" + } + ], + "id": 18557, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1564:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1564:56:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18567, + "nodeType": "ExpressionStatement", + "src": "1564:56:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18568, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18529, + "src": "1633:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18569, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18539, + "src": "1640:5:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1633:12:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 18571, + "nodeType": "ExpressionStatement", + "src": "1633:12:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18572, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18531, + "src": "1656:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18573, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18541, + "src": "1665:7:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1656:16:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 18575, + "nodeType": "ExpressionStatement", + "src": "1656:16:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18576, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18533, + "src": "1683:8:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18577, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18543, + "src": "1694:9:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1683:20:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 18579, + "nodeType": "ExpressionStatement", + "src": "1683:20:32" + } + ] + }, + "documentation": { + "id": 18537, + "nodeType": "StructuredDocumentation", + "src": "1022:354:32", + "text": " @dev initializes a new PoolTokensContainer instance\n @param _name pool name, also used as a prefix for the underlying pool token names\n @param _symbol pool symbol, also used as a prefix for the underlying pool token symbols\n @param _decimals used for the underlying pool token decimals" + }, + "id": 18581, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18539, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1394:19:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18538, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1394:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18541, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1415:21:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18540, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1415:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18543, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18581, + "src": "1438:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18542, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1438:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1393:61:32" + }, + "returnParameters": { + "id": 18545, + "nodeType": "ParameterList", + "parameters": [], + "src": "1462:0:32" + }, + "scope": 18724, + "src": "1382:329:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 18777 + ], + "body": { + "id": 18591, + "nodeType": "Block", + "src": "1904:37:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18589, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "1922:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "functionReturnParameters": 18588, + "id": 18590, + "nodeType": "Return", + "src": "1915:18:32" + } + ] + }, + "documentation": { + "id": 18582, + "nodeType": "StructuredDocumentation", + "src": "1719:103:32", + "text": " @dev returns the list of pool tokens\n @return list of pool tokens" + }, + "functionSelector": "6d3e313e", + "id": 18592, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "poolTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18584, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1864:8:32" + }, + "parameters": { + "id": 18583, + "nodeType": "ParameterList", + "parameters": [], + "src": "1847:2:32" + }, + "returnParameters": { + "id": 18588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18587, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18592, + "src": "1882:20:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_memory_ptr", + "typeString": "contract ISmartToken[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 18585, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "1882:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18586, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1882:13:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage_ptr", + "typeString": "contract ISmartToken[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1881:22:32" + }, + "scope": 18724, + "src": "1828:113:32", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18782 + ], + "body": { + "id": 18652, + "nodeType": "Block", + "src": "2151:457:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18602, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2223:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2223:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 18604, + "name": "MAX_POOL_TOKENS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18527, + "src": "2244:15:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2223:36:32", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4d41585f4c494d49545f52454143484544", + "id": 18606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2261:23:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_65600c00f67ab34f2203e92774a46e26e7dd32d8502d3f07241456a23d1290f8", + "typeString": "literal_string \"ERR_MAX_LIMIT_REACHED\"" + }, + "value": "ERR_MAX_LIMIT_REACHED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_65600c00f67ab34f2203e92774a46e26e7dd32d8502d3f07241456a23d1290f8", + "typeString": "literal_string \"ERR_MAX_LIMIT_REACHED\"" + } + ], + "id": 18601, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2215:7:32", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 18607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2215:70:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18608, + "nodeType": "ExpressionStatement", + "src": "2215:70:32" + }, + { + "assignments": [ + 18610 + ], + "declarations": [ + { + "constant": false, + "id": 18610, + "mutability": "mutable", + "name": "poolName", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2298:22:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18609, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2298:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18621, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18612, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18529, + "src": "2338:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18615, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2350:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2350:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2371:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2350:22:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2344:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18613, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2344:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2344:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18611, + "name": "concatStrDigit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18723, + "src": "2323:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (string memory,uint8) pure returns (string memory)" + } + }, + "id": 18620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2323:51:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2298:76:32" + }, + { + "assignments": [ + 18623 + ], + "declarations": [ + { + "constant": false, + "id": 18623, + "mutability": "mutable", + "name": "poolSymbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2385:24:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18622, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2385:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18634, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18625, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18531, + "src": "2427:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 18628, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2441:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2441:18:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 18630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2462:1:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2441:22:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 18627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2435:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18626, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2435:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18624, + "name": "concatStrDigit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18723, + "src": "2412:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$_t_uint8_$returns$_t_string_memory_ptr_$", + "typeString": "function (string memory,uint8) pure returns (string memory)" + } + }, + "id": 18633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2412:53:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2385:80:32" + }, + { + "assignments": [ + 18636 + ], + "declarations": [ + { + "constant": false, + "id": 18636, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18652, + "src": "2478:16:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18635, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "2478:10:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 18643, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18639, + "name": "poolName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18610, + "src": "2512:8:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18640, + "name": "poolSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18623, + "src": "2522:10:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 18641, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18533, + "src": "2534:8:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 18638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2497:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 18637, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "2501:10:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 18642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2497:46:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2478:65:32" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18647, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18636, + "src": "2571:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + ], + "expression": { + "argumentTypes": null, + "id": 18644, + "name": "_poolTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18536, + "src": "2554:11:32", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_ISmartToken_$21517_$dyn_storage", + "typeString": "contract ISmartToken[] storage ref" + } + }, + "id": 18646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2554:16:32", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_contract$_ISmartToken_$21517_$returns$__$", + "typeString": "function (contract ISmartToken)" + } + }, + "id": 18648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2554:23:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18649, + "nodeType": "ExpressionStatement", + "src": "2554:23:32" + }, + { + "expression": { + "argumentTypes": null, + "id": 18650, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18636, + "src": "2595:5:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "functionReturnParameters": 18600, + "id": 18651, + "nodeType": "Return", + "src": "2588:12:32" + } + ] + }, + "documentation": { + "id": 18593, + "nodeType": "StructuredDocumentation", + "src": "1949:123:32", + "text": " @dev creates a new pool token and adds it to the list\n @return new pool token address" + }, + "functionSelector": "9cbf9e36", + "id": 18653, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18597, + "modifierName": { + "argumentTypes": null, + "id": 18596, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2119:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2119:9:32" + } + ], + "name": "createToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18595, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2110:8:32" + }, + "parameters": { + "id": 18594, + "nodeType": "ParameterList", + "parameters": [], + "src": "2098:2:32" + }, + "returnParameters": { + "id": 18600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18599, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18653, + "src": "2138:11:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18598, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "2138:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2137:13:32" + }, + "scope": 18724, + "src": "2078:530:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18791 + ], + "body": { + "id": 18673, + "nodeType": "Block", + "src": "3028:45:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18669, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18658, + "src": "3052:3:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 18670, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18660, + "src": "3057:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18666, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18656, + "src": "3039:6:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "issue", + "nodeType": "MemberAccess", + "referencedDeclaration": 21509, + "src": "3039:12:32", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 18671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:26:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18672, + "nodeType": "ExpressionStatement", + "src": "3039:26:32" + } + ] + }, + "documentation": { + "id": 18654, + "nodeType": "StructuredDocumentation", + "src": "2616:314:32", + "text": " @dev increases the pool token supply and sends the new tokens to the given account\n can only be called by the contract owner\n @param _token pool token address\n @param _to account to receive the newly minted tokens\n @param _amount amount to mint" + }, + "functionSelector": "c6c3bbe6", + "id": 18674, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18664, + "modifierName": { + "argumentTypes": null, + "id": 18663, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "3018:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3018:9:32" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18662, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3009:8:32" + }, + "parameters": { + "id": 18661, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18656, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2950:18:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18655, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "2950:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18658, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2970:11:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18657, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2970:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18660, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18674, + "src": "2983:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2983:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2949:50:32" + }, + "returnParameters": { + "id": 18665, + "nodeType": "ParameterList", + "parameters": [], + "src": "3028:0:32" + }, + "scope": 18724, + "src": "2936:137:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 18800 + ], + "body": { + "id": 18694, + "nodeType": "Block", + "src": "3482:49:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18690, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18679, + "src": "3508:5:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 18691, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18681, + "src": "3515:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18687, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18677, + "src": "3493:6:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 18689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "destroy", + "nodeType": "MemberAccess", + "referencedDeclaration": 21516, + "src": "3493:14:32", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 18692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:30:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 18693, + "nodeType": "ExpressionStatement", + "src": "3493:30:32" + } + ] + }, + "documentation": { + "id": 18675, + "nodeType": "StructuredDocumentation", + "src": "3081:301:32", + "text": " @dev removes tokens from the given account and decreases the pool token supply\n can only be called by the contract owner\n @param _token pool token address\n @param _from account to remove the tokens from\n @param _amount amount to burn" + }, + "functionSelector": "f6b911bc", + "id": 18695, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 18685, + "modifierName": { + "argumentTypes": null, + "id": 18684, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "3472:9:32", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3472:9:32" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 18683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3463:8:32" + }, + "parameters": { + "id": 18682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18677, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3402:18:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 18676, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "3402:11:32", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18679, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3422:13:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 18678, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3422:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18681, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18695, + "src": "3437:15:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18680, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3437:7:32", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3401:52:32" + }, + "returnParameters": { + "id": 18686, + "nodeType": "ParameterList", + "parameters": [], + "src": "3482:0:32" + }, + "scope": 18724, + "src": "3388:143:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18722, + "nodeType": "Block", + "src": "3852:85:32", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18709, + "name": "_str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18698, + "src": "3894:4:32", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 18718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 18714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3913:3:32", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + } + ], + "id": 18713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3906:6:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 18712, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "3906:6:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3906:11:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 18711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3900:5:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 18710, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3900:5:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3900:18:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 18717, + "name": "_digit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18700, + "src": "3921:6:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3900:27:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18707, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3877:3:32", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 18708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3877:16:32", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 18719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3877:51:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 18706, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3870:6:32", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 18705, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3870:6:32", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 18720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3870:59:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 18704, + "id": 18721, + "nodeType": "Return", + "src": "3863:66:32" + } + ] + }, + "documentation": { + "id": 18696, + "nodeType": "StructuredDocumentation", + "src": "3539:212:32", + "text": " @dev concatenates a string and a digit (single only) and returns the result string\n @param _str string\n @param _digit digit\n @return concatenated string" + }, + "id": 18723, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "concatStrDigit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18698, + "mutability": "mutable", + "name": "_str", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3781:18:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3781:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18700, + "mutability": "mutable", + "name": "_digit", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3801:12:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18699, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3801:5:32", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3780:34:32" + }, + "returnParameters": { + "id": 18704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18703, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18723, + "src": "3837:13:32", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 18702, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3837:6:32", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3836:15:32" + }, + "scope": 18724, + "src": "3757:180:32", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 18725, + "src": "592:3348:32" + } + ], + "src": "52:3890:32" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-09T23:40:29.187Z", + "devdoc": { + "details": "The PoolTokensContainer contract serves as a container for multiple pool tokens. It is used by specific liquidity pool types that require more than a single pool token, while still maintaining the single converter / anchor relationship. It maintains and provides a list of the underlying pool tokens.", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "burn(address,address,uint256)": { + "details": "removes tokens from the given account and decreases the pool token supply can only be called by the contract owner", + "params": { + "_amount": "amount to burn", + "_from": "account to remove the tokens from", + "_token": "pool token address" + } + }, + "constructor": { + "details": "initializes a new PoolTokensContainer instance", + "params": { + "_decimals": "used for the underlying pool token decimals", + "_name": "pool name, also used as a prefix for the underlying pool token names", + "_symbol": "pool symbol, also used as a prefix for the underlying pool token symbols" + } + }, + "createToken()": { + "details": "creates a new pool token and adds it to the list", + "returns": { + "_0": "new pool token address" + } + }, + "mint(address,address,uint256)": { + "details": "increases the pool token supply and sends the new tokens to the given account can only be called by the contract owner", + "params": { + "_amount": "amount to mint", + "_to": "account to receive the newly minted tokens", + "_token": "pool token address" + } + }, + "poolTokens()": { + "details": "returns the list of pool tokens", + "returns": { + "_0": "list of pool tokens" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/PriceOracle.json b/apps/cic-eth/tests/testdata/bancor/PriceOracle.json new file mode 100644 index 00000000..74ee2609 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/PriceOracle.json @@ -0,0 +1,10562 @@ +{ + "contractName": "PriceOracle", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_tokenB", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_tokenAOracle", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_tokenBOracle", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "tokenA", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenAOracle", + "outputs": [ + { + "internalType": "contract IChainlinkPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenB", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenBOracle", + "outputs": [ + { + "internalType": "contract IChainlinkPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "tokenDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "tokensToOracles", + "outputs": [ + { + "internalType": "contract IChainlinkPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_tokenB", + "type": "address" + } + ], + "name": "latestRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_tokenA", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_tokenB", + "type": "address" + } + ], + "name": "latestRateAndUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenA\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenB\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_tokenAOracle\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_tokenBOracle\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenA\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenB\",\"type\":\"address\"}],\"name\":\"latestRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenA\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_tokenB\",\"type\":\"address\"}],\"name\":\"latestRateAndUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenA\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenAOracle\",\"outputs\":[{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenB\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenBOracle\",\"outputs\":[{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokensToOracles\",\"outputs\":[{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides the off-chain rate between two tokens The price oracle uses chainlink oracles internally to get the rates of the two tokens with respect to a common denominator, and then returns the rate between them, which is equivalent to the rate of TokenA / TokenB\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"initializes a new PriceOracle instance note that the oracles must have the same common denominator (USD, ETH etc.)\",\"params\":{\"_tokenA\":\"first token to support\",\"_tokenAOracle\":\"first token price oracle\",\"_tokenB\":\"second token to support\",\"_tokenBOracle\":\"second token price oracle\"}},\"lastUpdateTime()\":{\"details\":\"returns the timestamp of the last price update\",\"returns\":{\"_0\":\"timestamp\"}},\"latestRate(address,address)\":{\"details\":\"returns the latest known rate between the two given tokens for a given pair of tokens A and B, returns the rate of A / B (the number of B units equivalent to a single A unit) the rate is returned as a fraction (numerator / denominator) for accuracy\",\"params\":{\"_tokenA\":\"token to get the rate of 1 unit of\",\"_tokenB\":\"token to get the rate of 1 `_tokenA` against\"},\"returns\":{\"_0\":\"numerator\",\"_1\":\"denominator\"}},\"latestRateAndUpdateTime(address,address)\":{\"details\":\"returns both the rate and the timestamp of the last update in a single call (gas optimization)\",\"params\":{\"_tokenA\":\"token to get the rate of 1 unit of\",\"_tokenB\":\"token to get the rate of 1 `_tokenA` against\"},\"returns\":{\"_0\":\"numerator\",\"_1\":\"denominator\",\"_2\":\"timestamp of the last update\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":\"PriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":{\"keccak256\":\"0x5d03fb3ec2ef50006712ad6fd47d14aed49c4d57971e8d918618093f690e6170\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8dae9bd9a95911008b10d316a1efaa6f05224bf37dec02ace44ef5a303aff3ee\",\"dweb:/ipfs/Qmeuv2c6R2KwFWganFF7US5s5TcYm1toGM2o4XkS1zGx4R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516109dc3803806109dc8339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909183836100568282610157565b83836100628282610157565b600080546001600160a01b03808b166001600160a01b03199283161790925560018054928a169290911691909117905561009b886101c7565b6001600160a01b0389166000908152600260205260409020805460ff191660ff929092169190911790556100ce876101c7565b6001600160a01b039788166000818152600260209081526040808320805460ff9690961660ff1990961695909517909455600380549a8c166001600160a01b03199b8c168117909155600480549a8d169a8c168b1790559b909a168152600590995281892080548916909a179099559787525050509390922080549091169091179055506102c1565b61016082610263565b61016981610263565b806001600160a01b0316826001600160a01b031614156101c3576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b5050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156101f65750601261025e565b816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561022f57600080fd5b505afa158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b505190505b919050565b6001600160a01b0381166102be576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61070c806102d06000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b1772d7a11610066578063b1772d7a14610147578063b9e1715b14610193578063c8f33c911461019b578063cbd962d1146101b5578063f997fda7146101db57610093565b80630fc63d10146100985780635f64b55b146100bc5780638ee573ac146100c4578063ae81800414610100575b600080fd5b6100a06101e3565b604080516001600160a01b039092168252519081900360200190f35b6100a06101f2565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b0316610201565b6040805160ff9092168252519081900360200190f35b61012e6004803603604081101561011657600080fd5b506001600160a01b0381358116916020013516610216565b6040805192835260208301919091528051918290030190f35b6101756004803603604081101561015d57600080fd5b506001600160a01b03813581169160200135166103a5565b60408051938452602084019290925282820152519081900360600190f35b6100a06103d4565b6101a36103e3565b60408051918252519081900360200190f35b6100a0600480360360208110156101cb57600080fd5b50356001600160a01b03166104ec565b6100a0610507565b6000546001600160a01b031681565b6001546001600160a01b031681565b60026020526000908152604090205460ff1681565b60008083836102258282610516565b6001600160a01b0380871660009081526005602090815260408083205481516350d25bcd60e01b81529151939416926350d25bcd92600480840193919291829003018186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b50516001600160a01b0380881660009081526005602090815260408083205481516350d25bcd60e01b81529151959650929492909316926350d25bcd9260048083019392829003018186803b1580156102f957600080fd5b505afa15801561030d573d6000803e3d6000fd5b505050506040513d602081101561032357600080fd5b50516001600160a01b03808a1660009081526002602052604080822054928b16825290205491925060ff9081169116808211156103735761036c8360ff83850316600a0a6105af565b9250610396565b8060ff168260ff161015610396576103938460ff84840316600a0a6105af565b93505b50919890975095505050505050565b60008060008060006103b78787610216565b9150915081816103c56103e3565b94509450945050509250925092565b6003546001600160a01b031681565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b50516004805460408051634102dfb560e11b815290519394506000936001600160a01b0390921692638205bf6a928282019260209290829003018186803b1580156104a857600080fd5b505afa1580156104bc573d6000803e3d6000fd5b505050506040513d60208110156104d257600080fd5b505190508082116104e357806104e5565b815b9250505090565b6005602052600090815260409020546001600160a01b031681565b6004546001600160a01b031681565b6105208282610616565b6001600160a01b03828116600090815260056020526040902054161580159061056257506001600160a01b038181166000908152600560205260409020541615155b6105ab576040805162461bcd60e51b815260206004820152601560248201527422a9292faaa729aaa82827a92a22a22faa27a5a2a760591b604482015290519081900360640190fd5b5050565b6000826105be57506000610610565b828202828482816105cb57fe5b041461060d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b61061f82610682565b61062881610682565b806001600160a01b0316826001600160a01b031614156105ab576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b6001600160a01b0381166106d3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5056fea2646970667358221220022bb923a68c1656dd285dc381e0a9d05c2218475c0b4d9e4b9d7f999b97b5e164736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063b1772d7a11610066578063b1772d7a14610147578063b9e1715b14610193578063c8f33c911461019b578063cbd962d1146101b5578063f997fda7146101db57610093565b80630fc63d10146100985780635f64b55b146100bc5780638ee573ac146100c4578063ae81800414610100575b600080fd5b6100a06101e3565b604080516001600160a01b039092168252519081900360200190f35b6100a06101f2565b6100ea600480360360208110156100da57600080fd5b50356001600160a01b0316610201565b6040805160ff9092168252519081900360200190f35b61012e6004803603604081101561011657600080fd5b506001600160a01b0381358116916020013516610216565b6040805192835260208301919091528051918290030190f35b6101756004803603604081101561015d57600080fd5b506001600160a01b03813581169160200135166103a5565b60408051938452602084019290925282820152519081900360600190f35b6100a06103d4565b6101a36103e3565b60408051918252519081900360200190f35b6100a0600480360360208110156101cb57600080fd5b50356001600160a01b03166104ec565b6100a0610507565b6000546001600160a01b031681565b6001546001600160a01b031681565b60026020526000908152604090205460ff1681565b60008083836102258282610516565b6001600160a01b0380871660009081526005602090815260408083205481516350d25bcd60e01b81529151939416926350d25bcd92600480840193919291829003018186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b50516001600160a01b0380881660009081526005602090815260408083205481516350d25bcd60e01b81529151959650929492909316926350d25bcd9260048083019392829003018186803b1580156102f957600080fd5b505afa15801561030d573d6000803e3d6000fd5b505050506040513d602081101561032357600080fd5b50516001600160a01b03808a1660009081526002602052604080822054928b16825290205491925060ff9081169116808211156103735761036c8360ff83850316600a0a6105af565b9250610396565b8060ff168260ff161015610396576103938460ff84840316600a0a6105af565b93505b50919890975095505050505050565b60008060008060006103b78787610216565b9150915081816103c56103e3565b94509450945050509250925092565b6003546001600160a01b031681565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043457600080fd5b505afa158015610448573d6000803e3d6000fd5b505050506040513d602081101561045e57600080fd5b50516004805460408051634102dfb560e11b815290519394506000936001600160a01b0390921692638205bf6a928282019260209290829003018186803b1580156104a857600080fd5b505afa1580156104bc573d6000803e3d6000fd5b505050506040513d60208110156104d257600080fd5b505190508082116104e357806104e5565b815b9250505090565b6005602052600090815260409020546001600160a01b031681565b6004546001600160a01b031681565b6105208282610616565b6001600160a01b03828116600090815260056020526040902054161580159061056257506001600160a01b038181166000908152600560205260409020541615155b6105ab576040805162461bcd60e51b815260206004820152601560248201527422a9292faaa729aaa82827a92a22a22faa27a5a2a760591b604482015290519081900360640190fd5b5050565b6000826105be57506000610610565b828202828482816105cb57fe5b041461060d576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b90505b92915050565b61061f82610682565b61062881610682565b806001600160a01b0316826001600160a01b031614156105ab576040805162461bcd60e51b815260206004820152601060248201526f4552525f53414d455f4144445245535360801b604482015290519081900360640190fd5b6001600160a01b0381166106d3576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b5056fea2646970667358221220022bb923a68c1656dd285dc381e0a9d05c2218475c0b4d9e4b9d7f999b97b5e164736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "520:6445:58:-:0;;;1678:643;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1678:643:58;;;;;;;;;;;;;;;;;;;;;2469:43;1678:643;;2469:21;:43::i;:::-;1926:13;1950;2469:43:::1;1926:13:::0;1950;2469:21:::1;:43::i;:::-;1982:6:::2;:16:::0;;-1:-1:-1;;;;;1982:16:58;;::::2;-1:-1:-1::0;;;;;;1982:16:58;;::::2;;::::0;;;-1:-1:-1;2009:16:58;;;;::::2;::::0;;;::::2;::::0;;;::::2;::::0;;2061:17:::2;1982:16:::0;2061:8:::2;:17::i;:::-;-1:-1:-1::0;;;;;2036:22:58;::::2;;::::0;;;:13:::2;:22;::::0;;;;:42;;-1:-1:-1;;2036:42:58::2;-1:-1:-1::0;2036:42:58;;;::::2;::::0;;;::::2;::::0;;2114:17:::2;2123:7:::0;2114:8:::2;:17::i;:::-;-1:-1:-1::0;;;;;2089:22:58;;::::2;;::::0;;;:13:::2;:22;::::0;;;;;;;:42;;-1:-1:-1;;2089:42:58::2;;::::0;;;::::2;::::0;;;::::2;::::0;;;2144:12:::2;:28:::0;;-1:-1:-1;;;;;;2144:28:58;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;2183:12:::2;:28:::0;;;::::2;::::0;;::::2;::::0;;::::2;::::0;;2222:24;;;::::2;::::0;;:15:::2;:24:::0;;;;;;:40;;;::::2;::::0;;::::2;::::0;;;2273:24;;;-1:-1:-1;;;2273:24:58;;;;:40;;;;::::2;::::0;;::::2;::::0;;;-1:-1:-1;520:6445:58;;2587:223;2681:24;2695:9;2681:13;:24::i;:::-;2716;2730:9;2716:13;:24::i;:::-;-1:-1:-1;;;;;2759:22:58;;;;;;;;2751:51;;;;;-1:-1:-1;;;2751:51:58;;;;;;;;;;;;-1:-1:-1;;;2751:51:58;;;;;;;;;;;;;;;2587:223;;:::o;6767:195::-;6827:5;661:42;-1:-1:-1;;;;;6849:21:58;;;6845:73;;;-1:-1:-1;749:2:58;6887:19;;6845:73;6937:6;-1:-1:-1;;;;;6937:15:58;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6937:17:58;;-1:-1:-1;6767:195:58;;;;:::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;520:6445:58:-;;;;;;;", + "deployedSourceMap": "520:6445:58:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;760:25;;;:::i;:::-;;;;-1:-1:-1;;;;;760:25:58;;;;;;;;;;;;;;824;;;:::i;888:51::-;;;;;;;;;;;;;;;;-1:-1:-1;888:51:58;-1:-1:-1;;;;;888:51:58;;:::i;:::-;;;;;;;;;;;;;;;;;;;3894:1619;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3894:1619:58;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;6379:325;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6379:325:58;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;978:50;;;:::i;5635:360::-;;;:::i;:::-;;;;;;;;;;;;;;;;1162:69;;;;;;;;;;;;;;;;-1:-1:-1;1162:69:58;-1:-1:-1;;;;;1162:69:58;;:::i;1070:50::-;;;:::i;760:25::-;;;-1:-1:-1;;;;;760:25:58;;:::o;824:::-;;;-1:-1:-1;;;;;824:25:58;;:::o;888:51::-;;;;;;;;;;;;;;;:::o;3894:1619::-;4065:7;4074;4029;4038;2965:34;2982:7;2991;2965:16;:34::i;:::-;-1:-1:-1;;;;;4128:24:58;;::::1;4099:18;4128:24:::0;;;:15:::1;:24;::::0;;;;;;;;:39;;-1:-1:-1;;;4128:39:58;;;;4099:18;;4128:24:::1;::::0;-1:-1:-1;;4128:39:58::1;::::0;;::::1;::::0;:24;;:39;;;;;;:24;:39;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;4128:39:58;-1:-1:-1;;;;;4208:24:58;;::::1;4179:18;4208:24:::0;;;:15:::1;4128:39;4208:24:::0;;;;;;;;:39;;-1:-1:-1;;;4208:39:58;;;;4128;;-1:-1:-1;4179:18:58;;4208:24;;;::::1;::::0;-1:-1:-1;;4208:39:58::1;::::0;;::::1;::::0;4128;4208;;;;;:24;:39;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;4208:39:58;-1:-1:-1;;;;;4282:22:58;;::::1;4259:20;4282:22:::0;;;:13:::1;4208:39;4282:22:::0;;;;;;4338;;::::1;::::0;;;;;4208:39;;-1:-1:-1;4282:22:58::1;::::0;;::::1;::::0;4338::::1;5169:31:::0;;::::1;5165:297;;;5230:64;:10:::0;5245:48:::1;5261:31:::0;;::::1;5245:48;5253:2;5245:48;5230:14;:64::i;:::-;5217:77;;5165:297;;;5342:14;5325:31;;:14;:31;;;5321:141;;;5386:64;:10:::0;5401:48:::1;5417:31:::0;;::::1;5401:48;5409:2;5401:48;5386:14;:64::i;:::-;5373:77;;5321:141;-1:-1:-1::0;5482:10:58;;5494;;-1:-1:-1;3894:1619:58;-1:-1:-1;;;;;;3894:1619:58:o;6379:325::-;6520:7;6529;6538;6564:17;6583:19;6606:28;6617:7;6626;6606:10;:28::i;:::-;6563:71;;;;6655:9;6666:11;6679:16;:14;:16::i;:::-;6647:49;;;;;;;;6379:325;;;;;:::o;978:50::-;;;-1:-1:-1;;;;;978:50:58;;:::o;5635:360::-;5825:12;;:30;;;-1:-1:-1;;;5825:30:58;;;;5727:7;;;;-1:-1:-1;;;;;5825:12:58;;;;:28;;:30;;;;;;;;;;;;;;;:12;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5825:30:58;5887:12;;;:30;;;-1:-1:-1;;;5887:30:58;;;;5825;;-1:-1:-1;5866:18:58;;-1:-1:-1;;;;;5887:12:58;;;;:28;;:30;;;;5825;;5887;;;;;;:12;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5887:30:58;;-1:-1:-1;5938:23:58;;;:49;;5977:10;5938:49;;;5964:10;5938:49;5930:57;;;;5635:360;:::o;1162:69::-;;;;;;;;;;;;-1:-1:-1;;;;;1162:69:58;;:::o;1070:50::-;;;-1:-1:-1;;;;;1070:50:58;;:::o;3074:301::-;3167:57;3197:7;3215;3167:21;:57::i;:::-;-1:-1:-1;;;;;3251:24:58;;;3288:1;3251:24;;;:15;:24;;;;;;;3243:47;;;;:98;;-1:-1:-1;;;;;;3302:24:58;;;3339:1;3302:24;;;:15;:24;;;;;;;3294:47;;3243:98;3235:132;;;;;-1:-1:-1;;;3235:132:58;;;;;;;;;;;;-1:-1:-1;;;3235:132:58;;;;;;;;;;;;;;;3074:301;;:::o;1149:250:60:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;;1390:1;-1:-1:-1;1149:250:60;;;;;:::o;2587:223:58:-;2681:24;2695:9;2681:13;:24::i;:::-;2716;2730:9;2716:13;:24::i;:::-;-1:-1:-1;;;;;2759:22:58;;;;;;;;2751:51;;;;;-1:-1:-1;;;2751:51:58;;;;;;;;;;;;-1:-1:-1;;;2751:51:58;;;;;;;;;;;;;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Utils.sol\";\r\nimport \"./SafeMath.sol\";\r\nimport \"./interfaces/IPriceOracle.sol\";\r\nimport \"./interfaces/IChainlinkPriceOracle.sol\";\r\n\r\n/**\r\n * @dev Provides the off-chain rate between two tokens\r\n *\r\n * The price oracle uses chainlink oracles internally to get the rates of the two tokens\r\n * with respect to a common denominator, and then returns the rate between them, which\r\n * is equivalent to the rate of TokenA / TokenB\r\n*/\r\ncontract PriceOracle is IPriceOracle, Utils {\r\n using SafeMath for uint256;\r\n\r\n IERC20Token private constant ETH_ADDRESS = IERC20Token(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);\r\n uint8 private constant ETH_DECIMALS = 18;\r\n\r\n IERC20Token public tokenA; // token A the oracle supports\r\n IERC20Token public tokenB; // token B the oracle supports\r\n mapping (IERC20Token => uint8) public tokenDecimals; // token -> token decimals\r\n\r\n IChainlinkPriceOracle public override tokenAOracle; // token A chainlink price oracle\r\n IChainlinkPriceOracle public override tokenBOracle; // token B chainlink price oracle\r\n mapping (IERC20Token => IChainlinkPriceOracle) public tokensToOracles; // token -> price oracle for easier access\r\n\r\n /**\r\n * @dev initializes a new PriceOracle instance\r\n * note that the oracles must have the same common denominator (USD, ETH etc.)\r\n *\r\n * @param _tokenA first token to support\r\n * @param _tokenB second token to support\r\n * @param _tokenAOracle first token price oracle\r\n * @param _tokenBOracle second token price oracle\r\n */\r\n constructor(IERC20Token _tokenA, IERC20Token _tokenB, IChainlinkPriceOracle _tokenAOracle, IChainlinkPriceOracle _tokenBOracle)\r\n public\r\n validUniqueAddresses(address(_tokenA), address(_tokenB))\r\n validUniqueAddresses(address(_tokenAOracle), address(_tokenBOracle))\r\n {\r\n tokenA = _tokenA;\r\n tokenB = _tokenB;\r\n tokenDecimals[_tokenA] = decimals(_tokenA);\r\n tokenDecimals[_tokenB] = decimals(_tokenB);\r\n\r\n tokenAOracle = _tokenAOracle;\r\n tokenBOracle = _tokenBOracle;\r\n tokensToOracles[_tokenA] = _tokenAOracle;\r\n tokensToOracles[_tokenB] = _tokenBOracle;\r\n }\r\n\r\n // ensures that the provided addresses are unique valid\r\n modifier validUniqueAddresses(address _address1, address _address2) {\r\n _validUniqueAddresses(_address1, _address2);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validUniqueAddresses(address _address1, address _address2) internal pure {\r\n _validAddress(_address1);\r\n _validAddress(_address2);\r\n require(_address1 != _address2, \"ERR_SAME_ADDRESS\");\r\n }\r\n\r\n // ensures that the provides tokens are supported by the oracle\r\n modifier supportedTokens(IERC20Token _tokenA, IERC20Token _tokenB) {\r\n _supportedTokens(_tokenA, _tokenB);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _supportedTokens(IERC20Token _tokenA, IERC20Token _tokenB) internal view {\r\n _validUniqueAddresses(address(_tokenA), address(_tokenB));\r\n require(address(tokensToOracles[_tokenA]) != address(0) && address(tokensToOracles[_tokenB]) != address(0), \"ERR_UNSUPPORTED_TOKEN\");\r\n }\r\n\r\n /**\r\n * @dev returns the latest known rate between the two given tokens\r\n * for a given pair of tokens A and B, returns the rate of A / B\r\n * (the number of B units equivalent to a single A unit)\r\n * the rate is returned as a fraction (numerator / denominator) for accuracy\r\n *\r\n * @param _tokenA token to get the rate of 1 unit of\r\n * @param _tokenB token to get the rate of 1 `_tokenA` against\r\n *\r\n * @return numerator\r\n * @return denominator\r\n */\r\n function latestRate(IERC20Token _tokenA, IERC20Token _tokenB)\r\n public\r\n view\r\n override\r\n supportedTokens(_tokenA, _tokenB)\r\n returns (uint256, uint256)\r\n {\r\n uint256 rateTokenA = uint256(tokensToOracles[_tokenA].latestAnswer());\r\n uint256 rateTokenB = uint256(tokensToOracles[_tokenB].latestAnswer());\r\n uint8 decimalsTokenA = tokenDecimals[_tokenA];\r\n uint8 decimalsTokenB = tokenDecimals[_tokenB];\r\n\r\n // the normalization works as follows:\r\n // - token A with decimals of dA and price of rateA per one token (e.g., for 10^dA weiA)\r\n // - token B with decimals of dB < dA and price of rateB per one token (e.g., for 10^dB weiB)\r\n // then the normalized rate, representing the rate between 1 weiA and 1 weiB is rateA / (rateB * 10^(dA - dB)).\r\n //\r\n // for example:\r\n // - token A with decimals of 5 and price of $10 per one token (e.g., for 100,000 weiA)\r\n // - token B with decimals of 2 and price of $2 per one token (e.g., for 100 weiB)\r\n // then the normalized rate would be: 5 / (2 * 10^3) = 0.0025, which is the correct rate since\r\n // 1 weiA costs $0.00005, 1 weiB costs $0.02, and weiA / weiB is 0.0025.\r\n\r\n if (decimalsTokenA > decimalsTokenB) {\r\n rateTokenB = rateTokenB.mul(uint256(10) ** (decimalsTokenA - decimalsTokenB));\r\n }\r\n else if (decimalsTokenA < decimalsTokenB) {\r\n rateTokenA = rateTokenA.mul(uint256(10) ** (decimalsTokenB - decimalsTokenA));\r\n }\r\n\r\n return (rateTokenA, rateTokenB);\r\n }\r\n\r\n /**\r\n * @dev returns the timestamp of the last price update\r\n *\r\n * @return timestamp\r\n */\r\n function lastUpdateTime()\r\n public\r\n view\r\n override\r\n returns (uint256) {\r\n // returns the oldest timestamp between the two\r\n uint256 timestampA = tokenAOracle.latestTimestamp();\r\n uint256 timestampB = tokenBOracle.latestTimestamp();\r\n\r\n return timestampA > timestampB ? timestampA : timestampB;\r\n }\r\n\r\n /**\r\n * @dev returns both the rate and the timestamp of the last update in a single call (gas optimization)\r\n *\r\n * @param _tokenA token to get the rate of 1 unit of\r\n * @param _tokenB token to get the rate of 1 `_tokenA` against\r\n *\r\n * @return numerator\r\n * @return denominator\r\n * @return timestamp of the last update\r\n */\r\n function latestRateAndUpdateTime(IERC20Token _tokenA, IERC20Token _tokenB)\r\n public\r\n view\r\n override\r\n returns (uint256, uint256, uint256)\r\n {\r\n (uint256 numerator, uint256 denominator) = latestRate(_tokenA, _tokenB);\r\n\r\n return (numerator, denominator, lastUpdateTime());\r\n }\r\n\r\n /** @dev returns the decimals of a given token */\r\n function decimals(IERC20Token _token) private view returns (uint8) {\r\n if (_token == ETH_ADDRESS) {\r\n return ETH_DECIMALS;\r\n }\r\n\r\n return _token.decimals();\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol", + "exportedSymbols": { + "PriceOracle": [ + 22205 + ] + }, + "id": 22206, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21820, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:58" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21821, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22662, + "src": "77:21:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 21822, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22355, + "src": "100:24:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "./interfaces/IPriceOracle.sol", + "id": 21823, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22892, + "src": "126:39:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./interfaces/IChainlinkPriceOracle.sol", + "id": 21824, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22822, + "src": "167:48:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21826, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "544:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 21827, + "nodeType": "InheritanceSpecifier", + "src": "544:12:58" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21828, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "558:5:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21829, + "nodeType": "InheritanceSpecifier", + "src": "558:5:58" + } + ], + "contractDependencies": [ + 22661, + 22891 + ], + "contractKind": "contract", + "documentation": { + "id": 21825, + "nodeType": "StructuredDocumentation", + "src": "219:299:58", + "text": " @dev Provides the off-chain rate between two tokens\n The price oracle uses chainlink oracles internally to get the rates of the two tokens\n with respect to a common denominator, and then returns the rate between them, which\n is equivalent to the rate of TokenA / TokenB" + }, + "fullyImplemented": true, + "id": 22205, + "linearizedBaseContracts": [ + 22205, + 22661, + 22891 + ], + "name": "PriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 21832, + "libraryName": { + "contractScope": null, + "id": 21830, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "577:8:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "571:27:58", + "typeName": { + "id": 21831, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 21837, + "mutability": "constant", + "name": "ETH_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "606:98:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21833, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "606:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 21835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "661:42:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 21834, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "649:11:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 21836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "649:55:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 21840, + "mutability": "constant", + "name": "ETH_DECIMALS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "711:40:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21838, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "711:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 21839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "749:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "0fc63d10", + "id": 21842, + "mutability": "mutable", + "name": "tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "760:25:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21841, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "760:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5f64b55b", + "id": 21844, + "mutability": "mutable", + "name": "tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "824:25:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21843, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "824:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8ee573ac", + "id": 21848, + "mutability": "mutable", + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "888:51:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + }, + "typeName": { + "id": 21847, + "keyType": { + "contractScope": null, + "id": 21845, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "897:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "888:30:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + }, + "valueType": { + "id": 21846, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "912:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 22856 + ], + "constant": false, + "functionSelector": "b9e1715b", + "id": 21851, + "mutability": "mutable", + "name": "tokenAOracle", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21850, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1007:8:58" + }, + "scope": 22205, + "src": "978:50:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21849, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "978:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 22861 + ], + "constant": false, + "functionSelector": "f997fda7", + "id": 21854, + "mutability": "mutable", + "name": "tokenBOracle", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21853, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1099:8:58" + }, + "scope": 22205, + "src": "1070:50:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21852, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1070:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cbd962d1", + "id": 21858, + "mutability": "mutable", + "name": "tokensToOracles", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "1162:69:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + }, + "typeName": { + "id": 21857, + "keyType": { + "contractScope": null, + "id": 21855, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1171:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1162:46:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + }, + "valueType": { + "contractScope": null, + "id": 21856, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1186:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 21934, + "nodeType": "Block", + "src": "1971:350:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21890, + "name": "tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21842, + "src": "1982:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21891, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "1991:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "1982:16:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21893, + "nodeType": "ExpressionStatement", + "src": "1982:16:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21894, + "name": "tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21844, + "src": "2009:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21895, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2018:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "2009:16:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21897, + "nodeType": "ExpressionStatement", + "src": "2009:16:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21898, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "2036:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 21900, + "indexExpression": { + "argumentTypes": null, + "id": 21899, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2050:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2036:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21902, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2070:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21901, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22204, + "src": "2061:8:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint8_$", + "typeString": "function (contract IERC20Token) view returns (uint8)" + } + }, + "id": 21903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2036:42:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 21905, + "nodeType": "ExpressionStatement", + "src": "2036:42:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21906, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "2089:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 21908, + "indexExpression": { + "argumentTypes": null, + "id": 21907, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2103:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2089:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21910, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2123:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21909, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22204, + "src": "2114:8:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint8_$", + "typeString": "function (contract IERC20Token) view returns (uint8)" + } + }, + "id": 21911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2114:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2089:42:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 21913, + "nodeType": "ExpressionStatement", + "src": "2089:42:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21914, + "name": "tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21851, + "src": "2144:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21915, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "2159:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2144:28:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21917, + "nodeType": "ExpressionStatement", + "src": "2144:28:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21918, + "name": "tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21854, + "src": "2183:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21919, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "2198:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2183:28:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21921, + "nodeType": "ExpressionStatement", + "src": "2183:28:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21922, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "2222:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 21924, + "indexExpression": { + "argumentTypes": null, + "id": 21923, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2238:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2222:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21925, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "2249:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2222:40:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21927, + "nodeType": "ExpressionStatement", + "src": "2222:40:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21928, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "2273:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 21930, + "indexExpression": { + "argumentTypes": null, + "id": 21929, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2289:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2273:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21931, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "2300:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2273:40:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21933, + "nodeType": "ExpressionStatement", + "src": "2273:40:58" + } + ] + }, + "documentation": { + "id": 21859, + "nodeType": "StructuredDocumentation", + "src": "1284:388:58", + "text": " @dev initializes a new PriceOracle instance\n note that the oracles must have the same common denominator (USD, ETH etc.)\n @param _tokenA first token to support\n @param _tokenB second token to support\n @param _tokenAOracle first token price oracle\n @param _tokenBOracle second token price oracle" + }, + "id": 21935, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21872, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "1860:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1852:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1852:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1852:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21876, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "1878:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1870:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21874, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1870:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1870:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21878, + "modifierName": { + "argumentTypes": null, + "id": 21869, + "name": "validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21948, + "src": "1831:20:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$_t_address_$", + "typeString": "modifier (address,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1831:56:58" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21882, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "1926:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 21881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1918:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1918:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1918:22:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21886, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "1950:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 21885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1942:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1942:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:22:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21888, + "modifierName": { + "argumentTypes": null, + "id": 21879, + "name": "validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21948, + "src": "1897:20:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$_t_address_$", + "typeString": "modifier (address,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1897:68:58" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21861, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1690:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21860, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1690:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21863, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1711:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21862, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1711:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21865, + "mutability": "mutable", + "name": "_tokenAOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1732:35:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21864, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1732:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21867, + "mutability": "mutable", + "name": "_tokenBOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1769:35:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21866, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1769:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1689:116:58" + }, + "returnParameters": { + "id": 21889, + "nodeType": "ParameterList", + "parameters": [], + "src": "1971:0:58" + }, + "scope": 22205, + "src": "1678:643:58", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21947, + "nodeType": "Block", + "src": "2458:74:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21942, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21937, + "src": "2491:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21943, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21939, + "src": "2502:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21941, + "name": "_validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21971, + "src": "2469:21:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address) pure" + } + }, + "id": 21944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:43:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21945, + "nodeType": "ExpressionStatement", + "src": "2469:43:58" + }, + { + "id": 21946, + "nodeType": "PlaceholderStatement", + "src": "2523:1:58" + } + ] + }, + "documentation": null, + "id": 21948, + "name": "validUniqueAddresses", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21937, + "mutability": "mutable", + "name": "_address1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21948, + "src": "2420:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21936, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2420:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21939, + "mutability": "mutable", + "name": "_address2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21948, + "src": "2439:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2439:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2419:38:58" + }, + "src": "2390:142:58", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21970, + "nodeType": "Block", + "src": "2670:140:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21956, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21950, + "src": "2695:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21955, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "2681:13:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 21957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2681:24:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21958, + "nodeType": "ExpressionStatement", + "src": "2681:24:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21960, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21952, + "src": "2730:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21959, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "2716:13:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 21961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2716:24:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21962, + "nodeType": "ExpressionStatement", + "src": "2716:24:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21964, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21950, + "src": "2759:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21965, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21952, + "src": "2772:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2759:22:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f41444452455353", + "id": 21967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2783:18:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8a367a12797014b9e2f1d71cd920760e1c54a6511a9a16d5ab22fb4d28800b6", + "typeString": "literal_string \"ERR_SAME_ADDRESS\"" + }, + "value": "ERR_SAME_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8a367a12797014b9e2f1d71cd920760e1c54a6511a9a16d5ab22fb4d28800b6", + "typeString": "literal_string \"ERR_SAME_ADDRESS\"" + } + ], + "id": 21963, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2751:7:58", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2751:51:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21969, + "nodeType": "ExpressionStatement", + "src": "2751:51:58" + } + ] + }, + "documentation": null, + "id": 21971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validUniqueAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21953, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21950, + "mutability": "mutable", + "name": "_address1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21971, + "src": "2618:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21949, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2618:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21952, + "mutability": "mutable", + "name": "_address2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21971, + "src": "2637:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21951, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2637:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2617:38:58" + }, + "returnParameters": { + "id": 21954, + "nodeType": "ParameterList", + "parameters": [], + "src": "2670:0:58" + }, + "scope": 22205, + "src": "2587:223:58", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21983, + "nodeType": "Block", + "src": "2954:65:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21978, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21973, + "src": "2982:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 21979, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21975, + "src": "2991:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21977, + "name": "_supportedTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22030, + "src": "2965:16:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view" + } + }, + "id": 21980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2965:34:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21981, + "nodeType": "ExpressionStatement", + "src": "2965:34:58" + }, + { + "id": 21982, + "nodeType": "PlaceholderStatement", + "src": "3010:1:58" + } + ] + }, + "documentation": null, + "id": 21984, + "name": "supportedTokens", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21973, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21984, + "src": "2912:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21972, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2912:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21975, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21984, + "src": "2933:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21974, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2933:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2911:42:58" + }, + "src": "2887:132:58", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22029, + "nodeType": "Block", + "src": "3156:219:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21994, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21986, + "src": "3197:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3189:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3189:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3189:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21998, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21988, + "src": "3215:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3207:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21996, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3207:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3207:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21991, + "name": "_validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21971, + "src": "3167:21:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address) pure" + } + }, + "id": 22000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3167:57:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22001, + "nodeType": "ExpressionStatement", + "src": "3167:57:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22005, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "3251:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22007, + "indexExpression": { + "argumentTypes": null, + "id": 22006, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21986, + "src": "3267:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 22004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3243:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3243:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3243:33:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3288:1:58", + "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": 22010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3280:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22009, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3280:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3280:10:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3243:47:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22016, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "3302:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22018, + "indexExpression": { + "argumentTypes": null, + "id": 22017, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21988, + "src": "3318:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3302:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 22015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3294:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22014, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:33:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3339:1:58", + "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": 22021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3331:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22020, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3331:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3331:10:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3294:47:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3243:98:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f554e535550504f525445445f544f4b454e", + "id": 22026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:23:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fe5e253e0ad9d51f460b73c35652983a29904d3e214ecea083c7dec391c7b884", + "typeString": "literal_string \"ERR_UNSUPPORTED_TOKEN\"" + }, + "value": "ERR_UNSUPPORTED_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fe5e253e0ad9d51f460b73c35652983a29904d3e214ecea083c7dec391c7b884", + "typeString": "literal_string \"ERR_UNSUPPORTED_TOKEN\"" + } + ], + "id": 22002, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3235:7:58", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:132:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22028, + "nodeType": "ExpressionStatement", + "src": "3235:132:58" + } + ] + }, + "documentation": null, + "id": 22030, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_supportedTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21986, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22030, + "src": "3100:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21985, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3100:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21988, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22030, + "src": "3121:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21987, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3121:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3099:42:58" + }, + "returnParameters": { + "id": 21990, + "nodeType": "ParameterList", + "parameters": [], + "src": "3156:0:58" + }, + "scope": 22205, + "src": "3074:301:58", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 22872 + ], + "body": { + "id": 22125, + "nodeType": "Block", + "src": "4088:1425:58", + "statements": [ + { + "assignments": [ + 22048 + ], + "declarations": [ + { + "constant": false, + "id": 22048, + "mutability": "mutable", + "name": "rateTokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4099:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22047, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4099:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22057, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22051, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "4128:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22053, + "indexExpression": { + "argumentTypes": null, + "id": 22052, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4144:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4128:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestAnswer", + "nodeType": "MemberAccess", + "referencedDeclaration": 22815, + "src": "4128:37:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int256_$", + "typeString": "function () view external returns (int256)" + } + }, + "id": 22055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4128:39:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 22050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4120:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4120:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4120:48:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4099:69:58" + }, + { + "assignments": [ + 22059 + ], + "declarations": [ + { + "constant": false, + "id": 22059, + "mutability": "mutable", + "name": "rateTokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4179:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4179:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22062, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "4208:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22064, + "indexExpression": { + "argumentTypes": null, + "id": 22063, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4224:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4208:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestAnswer", + "nodeType": "MemberAccess", + "referencedDeclaration": 22815, + "src": "4208:37:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int256_$", + "typeString": "function () view external returns (int256)" + } + }, + "id": 22066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4208:39:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 22061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4200:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4200:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4200:48:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4179:69:58" + }, + { + "assignments": [ + 22070 + ], + "declarations": [ + { + "constant": false, + "id": 22070, + "mutability": "mutable", + "name": "decimalsTokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4259:20:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22069, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4259:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22074, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22071, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "4282:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 22073, + "indexExpression": { + "argumentTypes": null, + "id": 22072, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4296:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4282:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4259:45:58" + }, + { + "assignments": [ + 22076 + ], + "declarations": [ + { + "constant": false, + "id": 22076, + "mutability": "mutable", + "name": "decimalsTokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4315:20:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4315:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22080, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22077, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "4338:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 22079, + "indexExpression": { + "argumentTypes": null, + "id": 22078, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4352:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4338:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4315:45:58" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22081, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5169:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 22082, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5186:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5169:31:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22100, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5325:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 22101, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5342:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5325:31:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22119, + "nodeType": "IfStatement", + "src": "5321:141:58", + "trueBody": { + "id": 22118, + "nodeType": "Block", + "src": "5358:104:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22103, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5373:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 22108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5409:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 22107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5401:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5401:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5401:11:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22110, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5417:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22111, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5434:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5417:31:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 22113, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5416:33:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5401:48:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 22104, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5386:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5386:14:58", + "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": 22115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5386:64:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5373:77:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22117, + "nodeType": "ExpressionStatement", + "src": "5373:77:58" + } + ] + } + }, + "id": 22120, + "nodeType": "IfStatement", + "src": "5165:297:58", + "trueBody": { + "id": 22099, + "nodeType": "Block", + "src": "5202:104:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22084, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5217:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 22089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5253:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 22088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5245:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5245:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5245:11:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22091, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5261:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22092, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5278:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5261:31:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 22094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:33:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5245:48:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 22085, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5230:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5230:14:58", + "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": 22096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5230:64:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5217:77:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22098, + "nodeType": "ExpressionStatement", + "src": "5217:77:58" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22121, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5482:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 22122, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5494:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 22123, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5481:24:58", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 22046, + "id": 22124, + "nodeType": "Return", + "src": "5474:31:58" + } + ] + }, + "documentation": { + "id": 22031, + "nodeType": "StructuredDocumentation", + "src": "3383:505:58", + "text": " @dev returns the latest known rate between the two given tokens\n for a given pair of tokens A and B, returns the rate of A / B\n (the number of B units equivalent to a single A unit)\n the rate is returned as a fraction (numerator / denominator) for accuracy\n @param _tokenA token to get the rate of 1 unit of\n @param _tokenB token to get the rate of 1 `_tokenA` against\n @return numerator\n @return denominator" + }, + "functionSelector": "ae818004", + "id": 22126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 22039, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4029:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22040, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4038:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 22041, + "modifierName": { + "argumentTypes": null, + "id": 22038, + "name": "supportedTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21984, + "src": "4013:15:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token,contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4013:33:58" + } + ], + "name": "latestRate", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3995:8:58" + }, + "parameters": { + "id": 22036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22033, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "3914:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22032, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3914:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22035, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "3935:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22034, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3935:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3913:42:58" + }, + "returnParameters": { + "id": 22046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22043, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "4065:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22042, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4065:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22045, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "4074:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4074:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4064:18:58" + }, + "scope": 22205, + "src": "3894:1619:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22877 + ], + "body": { + "id": 22152, + "nodeType": "Block", + "src": "5736:259:58", + "statements": [ + { + "assignments": [ + 22134 + ], + "declarations": [ + { + "constant": false, + "id": 22134, + "mutability": "mutable", + "name": "timestampA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22152, + "src": "5804:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5804:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22138, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22135, + "name": "tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21851, + "src": "5825:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 22820, + "src": "5825:28:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 22137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5825:30:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5804:51:58" + }, + { + "assignments": [ + 22140 + ], + "declarations": [ + { + "constant": false, + "id": 22140, + "mutability": "mutable", + "name": "timestampB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22152, + "src": "5866:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22139, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5866:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22144, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22141, + "name": "tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21854, + "src": "5887:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 22820, + "src": "5887:28:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 22143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5887:30:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5866:51:58" + }, + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22145, + "name": "timestampA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22134, + "src": "5938:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 22146, + "name": "timestampB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22140, + "src": "5951:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5938:23:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 22149, + "name": "timestampB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22140, + "src": "5977:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "5938:49:58", + "trueExpression": { + "argumentTypes": null, + "id": 22148, + "name": "timestampA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22134, + "src": "5964:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22132, + "id": 22151, + "nodeType": "Return", + "src": "5930:57:58" + } + ] + }, + "documentation": { + "id": 22127, + "nodeType": "StructuredDocumentation", + "src": "5521:108:58", + "text": " @dev returns the timestamp of the last price update\n @return timestamp" + }, + "functionSelector": "c8f33c91", + "id": 22153, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22129, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5700:8:58" + }, + "parameters": { + "id": 22128, + "nodeType": "ParameterList", + "parameters": [], + "src": "5658:2:58" + }, + "returnParameters": { + "id": 22132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22131, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22153, + "src": "5727:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5727:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5726:9:58" + }, + "scope": 22205, + "src": "5635:360:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22890 + ], + "body": { + "id": 22183, + "nodeType": "Block", + "src": "6552:152:58", + "statements": [ + { + "assignments": [ + 22169, + 22171 + ], + "declarations": [ + { + "constant": false, + "id": 22169, + "mutability": "mutable", + "name": "numerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22183, + "src": "6564:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22168, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6564:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22171, + "mutability": "mutable", + "name": "denominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22183, + "src": "6583:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6583:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22176, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22173, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22156, + "src": "6617:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22174, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22158, + "src": "6626:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22172, + "name": "latestRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22126, + "src": "6606:10:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view returns (uint256,uint256)" + } + }, + "id": 22175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:28:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6563:71:58" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22177, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22169, + "src": "6655:9:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 22178, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22171, + "src": "6666:11:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 22179, + "name": "lastUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22153, + "src": "6679:14:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 22180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6679:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 22181, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6654:42:58", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 22167, + "id": 22182, + "nodeType": "Return", + "src": "6647:49:58" + } + ] + }, + "documentation": { + "id": 22154, + "nodeType": "StructuredDocumentation", + "src": "6003:370:58", + "text": " @dev returns both the rate and the timestamp of the last update in a single call (gas optimization)\n @param _tokenA token to get the rate of 1 unit of\n @param _tokenB token to get the rate of 1 `_tokenA` against\n @return numerator\n @return denominator\n @return timestamp of the last update" + }, + "functionSelector": "b1772d7a", + "id": 22184, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestRateAndUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22160, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6493:8:58" + }, + "parameters": { + "id": 22159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22156, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6412:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22155, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6412:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22158, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6433:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22157, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6433:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6411:42:58" + }, + "returnParameters": { + "id": 22167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6520:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6520:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22164, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6529:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22163, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6529:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22166, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6538:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22165, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6538:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6519:27:58" + }, + "scope": 22205, + "src": "6379:325:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22203, + "nodeType": "Block", + "src": "6834:128:58", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 22194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22192, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22187, + "src": "6849:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 22193, + "name": "ETH_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21837, + "src": "6859:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6849:21:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22198, + "nodeType": "IfStatement", + "src": "6845:73:58", + "trueBody": { + "id": 22197, + "nodeType": "Block", + "src": "6872:46:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22195, + "name": "ETH_DECIMALS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21840, + "src": "6894:12:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 22191, + "id": 22196, + "nodeType": "Return", + "src": "6887:19:58" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22199, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22187, + "src": "6937:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 22200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 21076, + "src": "6937:15:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 22201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6937:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 22191, + "id": 22202, + "nodeType": "Return", + "src": "6930:24:58" + } + ] + }, + "documentation": { + "id": 22185, + "nodeType": "StructuredDocumentation", + "src": "6712:49:58", + "text": "@dev returns the decimals of a given token " + }, + "id": 22204, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22187, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22204, + "src": "6785:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22186, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6785:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:20:58" + }, + "returnParameters": { + "id": 22191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22190, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22204, + "src": "6827:5:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22189, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6827:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6826:7:58" + }, + "scope": 22205, + "src": "6767:195:58", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 22206, + "src": "520:6445:58" + } + ], + "src": "52:6915:58" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol", + "exportedSymbols": { + "PriceOracle": [ + 22205 + ] + }, + "id": 22206, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21820, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:58" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 21821, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22662, + "src": "77:21:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "./SafeMath.sol", + "id": 21822, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22355, + "src": "100:24:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol", + "file": "./interfaces/IPriceOracle.sol", + "id": 21823, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22892, + "src": "126:39:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "./interfaces/IChainlinkPriceOracle.sol", + "id": 21824, + "nodeType": "ImportDirective", + "scope": 22206, + "sourceUnit": 22822, + "src": "167:48:58", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21826, + "name": "IPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22891, + "src": "544:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPriceOracle_$22891", + "typeString": "contract IPriceOracle" + } + }, + "id": 21827, + "nodeType": "InheritanceSpecifier", + "src": "544:12:58" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21828, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "558:5:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 21829, + "nodeType": "InheritanceSpecifier", + "src": "558:5:58" + } + ], + "contractDependencies": [ + 22661, + 22891 + ], + "contractKind": "contract", + "documentation": { + "id": 21825, + "nodeType": "StructuredDocumentation", + "src": "219:299:58", + "text": " @dev Provides the off-chain rate between two tokens\n The price oracle uses chainlink oracles internally to get the rates of the two tokens\n with respect to a common denominator, and then returns the rate between them, which\n is equivalent to the rate of TokenA / TokenB" + }, + "fullyImplemented": true, + "id": 22205, + "linearizedBaseContracts": [ + 22205, + 22661, + 22891 + ], + "name": "PriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 21832, + "libraryName": { + "contractScope": null, + "id": 21830, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "577:8:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "571:27:58", + "typeName": { + "id": 21831, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 21837, + "mutability": "constant", + "name": "ETH_ADDRESS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "606:98:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21833, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "606:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545", + "id": 21835, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "661:42:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 21834, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "649:11:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 21836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "649:55:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 21840, + "mutability": "constant", + "name": "ETH_DECIMALS", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "711:40:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21838, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "711:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 21839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "749:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "0fc63d10", + "id": 21842, + "mutability": "mutable", + "name": "tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "760:25:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21841, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "760:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5f64b55b", + "id": 21844, + "mutability": "mutable", + "name": "tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "824:25:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21843, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "824:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "8ee573ac", + "id": 21848, + "mutability": "mutable", + "name": "tokenDecimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "888:51:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + }, + "typeName": { + "id": 21847, + "keyType": { + "contractScope": null, + "id": 21845, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "897:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "888:30:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + }, + "valueType": { + "id": 21846, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "912:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 22856 + ], + "constant": false, + "functionSelector": "b9e1715b", + "id": 21851, + "mutability": "mutable", + "name": "tokenAOracle", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21850, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1007:8:58" + }, + "scope": 22205, + "src": "978:50:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21849, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "978:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 22861 + ], + "constant": false, + "functionSelector": "f997fda7", + "id": 21854, + "mutability": "mutable", + "name": "tokenBOracle", + "nodeType": "VariableDeclaration", + "overrides": { + "id": 21853, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1099:8:58" + }, + "scope": 22205, + "src": "1070:50:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21852, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1070:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cbd962d1", + "id": 21858, + "mutability": "mutable", + "name": "tokensToOracles", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22205, + "src": "1162:69:58", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + }, + "typeName": { + "id": 21857, + "keyType": { + "contractScope": null, + "id": 21855, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1171:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Mapping", + "src": "1162:46:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + }, + "valueType": { + "contractScope": null, + "id": 21856, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1186:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 21934, + "nodeType": "Block", + "src": "1971:350:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21890, + "name": "tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21842, + "src": "1982:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21891, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "1991:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "1982:16:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21893, + "nodeType": "ExpressionStatement", + "src": "1982:16:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21894, + "name": "tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21844, + "src": "2009:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21895, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2018:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "2009:16:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 21897, + "nodeType": "ExpressionStatement", + "src": "2009:16:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21898, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "2036:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 21900, + "indexExpression": { + "argumentTypes": null, + "id": 21899, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2050:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2036:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21902, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2070:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21901, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22204, + "src": "2061:8:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint8_$", + "typeString": "function (contract IERC20Token) view returns (uint8)" + } + }, + "id": 21903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2036:42:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 21905, + "nodeType": "ExpressionStatement", + "src": "2036:42:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21906, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "2089:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 21908, + "indexExpression": { + "argumentTypes": null, + "id": 21907, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2103:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2089:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21910, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2123:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21909, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22204, + "src": "2114:8:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$returns$_t_uint8_$", + "typeString": "function (contract IERC20Token) view returns (uint8)" + } + }, + "id": 21911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2114:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2089:42:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 21913, + "nodeType": "ExpressionStatement", + "src": "2089:42:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21914, + "name": "tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21851, + "src": "2144:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21915, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "2159:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2144:28:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21917, + "nodeType": "ExpressionStatement", + "src": "2144:28:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21918, + "name": "tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21854, + "src": "2183:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21919, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "2198:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2183:28:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21921, + "nodeType": "ExpressionStatement", + "src": "2183:28:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21922, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "2222:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 21924, + "indexExpression": { + "argumentTypes": null, + "id": 21923, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "2238:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2222:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21925, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "2249:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2222:40:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21927, + "nodeType": "ExpressionStatement", + "src": "2222:40:58" + }, + { + "expression": { + "argumentTypes": null, + "id": 21932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21928, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "2273:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 21930, + "indexExpression": { + "argumentTypes": null, + "id": 21929, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "2289:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2273:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21931, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "2300:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "src": "2273:40:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 21933, + "nodeType": "ExpressionStatement", + "src": "2273:40:58" + } + ] + }, + "documentation": { + "id": 21859, + "nodeType": "StructuredDocumentation", + "src": "1284:388:58", + "text": " @dev initializes a new PriceOracle instance\n note that the oracles must have the same common denominator (USD, ETH etc.)\n @param _tokenA first token to support\n @param _tokenB second token to support\n @param _tokenAOracle first token price oracle\n @param _tokenBOracle second token price oracle" + }, + "id": 21935, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21872, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21861, + "src": "1860:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1852:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1852:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1852:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21876, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21863, + "src": "1878:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1870:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21874, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1870:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1870:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21878, + "modifierName": { + "argumentTypes": null, + "id": 21869, + "name": "validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21948, + "src": "1831:20:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$_t_address_$", + "typeString": "modifier (address,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1831:56:58" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21882, + "name": "_tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21865, + "src": "1926:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 21881, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1918:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21880, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1918:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1918:22:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21886, + "name": "_tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21867, + "src": "1950:13:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 21885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1942:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21884, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1942:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1942:22:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21888, + "modifierName": { + "argumentTypes": null, + "id": 21879, + "name": "validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21948, + "src": "1897:20:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$_t_address_$", + "typeString": "modifier (address,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1897:68:58" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21861, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1690:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21860, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1690:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21863, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1711:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21862, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1711:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21865, + "mutability": "mutable", + "name": "_tokenAOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1732:35:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21864, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1732:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21867, + "mutability": "mutable", + "name": "_tokenBOracle", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21935, + "src": "1769:35:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + }, + "typeName": { + "contractScope": null, + "id": 21866, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "1769:21:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1689:116:58" + }, + "returnParameters": { + "id": 21889, + "nodeType": "ParameterList", + "parameters": [], + "src": "1971:0:58" + }, + "scope": 22205, + "src": "1678:643:58", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21947, + "nodeType": "Block", + "src": "2458:74:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21942, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21937, + "src": "2491:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21943, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21939, + "src": "2502:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21941, + "name": "_validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21971, + "src": "2469:21:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address) pure" + } + }, + "id": 21944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2469:43:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21945, + "nodeType": "ExpressionStatement", + "src": "2469:43:58" + }, + { + "id": 21946, + "nodeType": "PlaceholderStatement", + "src": "2523:1:58" + } + ] + }, + "documentation": null, + "id": 21948, + "name": "validUniqueAddresses", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21940, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21937, + "mutability": "mutable", + "name": "_address1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21948, + "src": "2420:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21936, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2420:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21939, + "mutability": "mutable", + "name": "_address2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21948, + "src": "2439:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2439:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2419:38:58" + }, + "src": "2390:142:58", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21970, + "nodeType": "Block", + "src": "2670:140:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21956, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21950, + "src": "2695:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21955, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "2681:13:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 21957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2681:24:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21958, + "nodeType": "ExpressionStatement", + "src": "2681:24:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21960, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21952, + "src": "2730:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21959, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "2716:13:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 21961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2716:24:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21962, + "nodeType": "ExpressionStatement", + "src": "2716:24:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 21966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 21964, + "name": "_address1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21950, + "src": "2759:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 21965, + "name": "_address2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21952, + "src": "2772:9:58", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2759:22:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f53414d455f41444452455353", + "id": 21967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2783:18:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8a367a12797014b9e2f1d71cd920760e1c54a6511a9a16d5ab22fb4d28800b6", + "typeString": "literal_string \"ERR_SAME_ADDRESS\"" + }, + "value": "ERR_SAME_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f8a367a12797014b9e2f1d71cd920760e1c54a6511a9a16d5ab22fb4d28800b6", + "typeString": "literal_string \"ERR_SAME_ADDRESS\"" + } + ], + "id": 21963, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2751:7:58", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2751:51:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21969, + "nodeType": "ExpressionStatement", + "src": "2751:51:58" + } + ] + }, + "documentation": null, + "id": 21971, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validUniqueAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21953, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21950, + "mutability": "mutable", + "name": "_address1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21971, + "src": "2618:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21949, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2618:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21952, + "mutability": "mutable", + "name": "_address2", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21971, + "src": "2637:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21951, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2637:7:58", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2617:38:58" + }, + "returnParameters": { + "id": 21954, + "nodeType": "ParameterList", + "parameters": [], + "src": "2670:0:58" + }, + "scope": 22205, + "src": "2587:223:58", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21983, + "nodeType": "Block", + "src": "2954:65:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21978, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21973, + "src": "2982:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 21979, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21975, + "src": "2991:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21977, + "name": "_supportedTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22030, + "src": "2965:16:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$__$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view" + } + }, + "id": 21980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2965:34:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21981, + "nodeType": "ExpressionStatement", + "src": "2965:34:58" + }, + { + "id": 21982, + "nodeType": "PlaceholderStatement", + "src": "3010:1:58" + } + ] + }, + "documentation": null, + "id": 21984, + "name": "supportedTokens", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21973, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21984, + "src": "2912:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21972, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2912:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21975, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21984, + "src": "2933:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21974, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2933:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2911:42:58" + }, + "src": "2887:132:58", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22029, + "nodeType": "Block", + "src": "3156:219:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21994, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21986, + "src": "3197:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21993, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3189:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3189:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3189:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21998, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21988, + "src": "3215:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 21997, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3207:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21996, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3207:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3207:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 21991, + "name": "_validUniqueAddresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21971, + "src": "3167:21:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address) pure" + } + }, + "id": 22000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3167:57:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22001, + "nodeType": "ExpressionStatement", + "src": "3167:57:58" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22005, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "3251:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22007, + "indexExpression": { + "argumentTypes": null, + "id": 22006, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21986, + "src": "3267:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3251:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 22004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3243:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3243:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3243:33:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22011, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3288:1:58", + "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": 22010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3280:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22009, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3280:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22012, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3280:10:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3243:47:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22016, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "3302:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22018, + "indexExpression": { + "argumentTypes": null, + "id": 22017, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21988, + "src": "3318:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3302:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + ], + "id": 22015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3294:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22014, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:33:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3339:1:58", + "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": 22021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3331:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22020, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3331:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3331:10:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3294:47:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3243:98:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f554e535550504f525445445f544f4b454e", + "id": 22026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3343:23:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fe5e253e0ad9d51f460b73c35652983a29904d3e214ecea083c7dec391c7b884", + "typeString": "literal_string \"ERR_UNSUPPORTED_TOKEN\"" + }, + "value": "ERR_UNSUPPORTED_TOKEN" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fe5e253e0ad9d51f460b73c35652983a29904d3e214ecea083c7dec391c7b884", + "typeString": "literal_string \"ERR_UNSUPPORTED_TOKEN\"" + } + ], + "id": 22002, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3235:7:58", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:132:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22028, + "nodeType": "ExpressionStatement", + "src": "3235:132:58" + } + ] + }, + "documentation": null, + "id": 22030, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_supportedTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21986, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22030, + "src": "3100:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21985, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3100:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21988, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22030, + "src": "3121:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 21987, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3121:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3099:42:58" + }, + "returnParameters": { + "id": 21990, + "nodeType": "ParameterList", + "parameters": [], + "src": "3156:0:58" + }, + "scope": 22205, + "src": "3074:301:58", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 22872 + ], + "body": { + "id": 22125, + "nodeType": "Block", + "src": "4088:1425:58", + "statements": [ + { + "assignments": [ + 22048 + ], + "declarations": [ + { + "constant": false, + "id": 22048, + "mutability": "mutable", + "name": "rateTokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4099:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22047, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4099:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22057, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22051, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "4128:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22053, + "indexExpression": { + "argumentTypes": null, + "id": 22052, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4144:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4128:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestAnswer", + "nodeType": "MemberAccess", + "referencedDeclaration": 22815, + "src": "4128:37:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int256_$", + "typeString": "function () view external returns (int256)" + } + }, + "id": 22055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4128:39:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 22050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4120:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4120:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4120:48:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4099:69:58" + }, + { + "assignments": [ + 22059 + ], + "declarations": [ + { + "constant": false, + "id": 22059, + "mutability": "mutable", + "name": "rateTokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4179:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4179:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22062, + "name": "tokensToOracles", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21858, + "src": "4208:15:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_contract$_IChainlinkPriceOracle_$22821_$", + "typeString": "mapping(contract IERC20Token => contract IChainlinkPriceOracle)" + } + }, + "id": 22064, + "indexExpression": { + "argumentTypes": null, + "id": 22063, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4224:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4208:24:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestAnswer", + "nodeType": "MemberAccess", + "referencedDeclaration": 22815, + "src": "4208:37:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_int256_$", + "typeString": "function () view external returns (int256)" + } + }, + "id": 22066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4208:39:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + ], + "id": 22061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4200:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4200:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4200:48:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4179:69:58" + }, + { + "assignments": [ + 22070 + ], + "declarations": [ + { + "constant": false, + "id": 22070, + "mutability": "mutable", + "name": "decimalsTokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4259:20:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22069, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4259:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22074, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22071, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "4282:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 22073, + "indexExpression": { + "argumentTypes": null, + "id": 22072, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4296:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4282:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4259:45:58" + }, + { + "assignments": [ + 22076 + ], + "declarations": [ + { + "constant": false, + "id": 22076, + "mutability": "mutable", + "name": "decimalsTokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22125, + "src": "4315:20:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4315:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22080, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22077, + "name": "tokenDecimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21848, + "src": "4338:13:58", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21127_$_t_uint8_$", + "typeString": "mapping(contract IERC20Token => uint8)" + } + }, + "id": 22079, + "indexExpression": { + "argumentTypes": null, + "id": 22078, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4352:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4338:22:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4315:45:58" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22081, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5169:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 22082, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5186:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5169:31:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22100, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5325:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 22101, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5342:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5325:31:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22119, + "nodeType": "IfStatement", + "src": "5321:141:58", + "trueBody": { + "id": 22118, + "nodeType": "Block", + "src": "5358:104:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22103, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5373:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 22108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5409:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 22107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5401:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5401:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5401:11:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22110, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5417:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22111, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5434:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5417:31:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 22113, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5416:33:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5401:48:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 22104, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5386:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5386:14:58", + "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": 22115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5386:64:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5373:77:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22117, + "nodeType": "ExpressionStatement", + "src": "5373:77:58" + } + ] + } + }, + "id": 22120, + "nodeType": "IfStatement", + "src": "5165:297:58", + "trueBody": { + "id": 22099, + "nodeType": "Block", + "src": "5202:104:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22084, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5217:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3130", + "id": 22089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5253:2:58", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "id": 22088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5245:7:58", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 22087, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5245:7:58", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5245:11:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 22093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22091, + "name": "decimalsTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22070, + "src": "5261:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22092, + "name": "decimalsTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22076, + "src": "5278:14:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5261:31:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 22094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:33:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "5245:48:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 22085, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5230:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "5230:14:58", + "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": 22096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5230:64:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5217:77:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22098, + "nodeType": "ExpressionStatement", + "src": "5217:77:58" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22121, + "name": "rateTokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22048, + "src": "5482:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 22122, + "name": "rateTokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22059, + "src": "5494:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 22123, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5481:24:58", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 22046, + "id": 22124, + "nodeType": "Return", + "src": "5474:31:58" + } + ] + }, + "documentation": { + "id": 22031, + "nodeType": "StructuredDocumentation", + "src": "3383:505:58", + "text": " @dev returns the latest known rate between the two given tokens\n for a given pair of tokens A and B, returns the rate of A / B\n (the number of B units equivalent to a single A unit)\n the rate is returned as a fraction (numerator / denominator) for accuracy\n @param _tokenA token to get the rate of 1 unit of\n @param _tokenB token to get the rate of 1 `_tokenA` against\n @return numerator\n @return denominator" + }, + "functionSelector": "ae818004", + "id": 22126, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 22039, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22033, + "src": "4029:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22040, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22035, + "src": "4038:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "id": 22041, + "modifierName": { + "argumentTypes": null, + "id": 22038, + "name": "supportedTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21984, + "src": "4013:15:58", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$", + "typeString": "modifier (contract IERC20Token,contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4013:33:58" + } + ], + "name": "latestRate", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3995:8:58" + }, + "parameters": { + "id": 22036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22033, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "3914:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22032, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3914:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22035, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "3935:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22034, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "3935:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3913:42:58" + }, + "returnParameters": { + "id": 22046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22043, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "4065:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22042, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4065:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22045, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22126, + "src": "4074:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4074:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4064:18:58" + }, + "scope": 22205, + "src": "3894:1619:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22877 + ], + "body": { + "id": 22152, + "nodeType": "Block", + "src": "5736:259:58", + "statements": [ + { + "assignments": [ + 22134 + ], + "declarations": [ + { + "constant": false, + "id": 22134, + "mutability": "mutable", + "name": "timestampA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22152, + "src": "5804:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5804:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22138, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22135, + "name": "tokenAOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21851, + "src": "5825:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 22820, + "src": "5825:28:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 22137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5825:30:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5804:51:58" + }, + { + "assignments": [ + 22140 + ], + "declarations": [ + { + "constant": false, + "id": 22140, + "mutability": "mutable", + "name": "timestampB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22152, + "src": "5866:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22139, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5866:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22144, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22141, + "name": "tokenBOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21854, + "src": "5887:12:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 22142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "latestTimestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": 22820, + "src": "5887:28:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 22143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5887:30:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5866:51:58" + }, + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22145, + "name": "timestampA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22134, + "src": "5938:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 22146, + "name": "timestampB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22140, + "src": "5951:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5938:23:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 22149, + "name": "timestampB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22140, + "src": "5977:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "5938:49:58", + "trueExpression": { + "argumentTypes": null, + "id": 22148, + "name": "timestampA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22134, + "src": "5964:10:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22132, + "id": 22151, + "nodeType": "Return", + "src": "5930:57:58" + } + ] + }, + "documentation": { + "id": 22127, + "nodeType": "StructuredDocumentation", + "src": "5521:108:58", + "text": " @dev returns the timestamp of the last price update\n @return timestamp" + }, + "functionSelector": "c8f33c91", + "id": 22153, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lastUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22129, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5700:8:58" + }, + "parameters": { + "id": 22128, + "nodeType": "ParameterList", + "parameters": [], + "src": "5658:2:58" + }, + "returnParameters": { + "id": 22132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22131, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22153, + "src": "5727:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5727:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5726:9:58" + }, + "scope": 22205, + "src": "5635:360:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22890 + ], + "body": { + "id": 22183, + "nodeType": "Block", + "src": "6552:152:58", + "statements": [ + { + "assignments": [ + 22169, + 22171 + ], + "declarations": [ + { + "constant": false, + "id": 22169, + "mutability": "mutable", + "name": "numerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22183, + "src": "6564:17:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22168, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6564:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22171, + "mutability": "mutable", + "name": "denominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22183, + "src": "6583:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6583:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22176, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22173, + "name": "_tokenA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22156, + "src": "6617:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22174, + "name": "_tokenB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22158, + "src": "6626:7:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22172, + "name": "latestRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22126, + "src": "6606:10:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IERC20Token,contract IERC20Token) view returns (uint256,uint256)" + } + }, + "id": 22175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:28:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6563:71:58" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22177, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22169, + "src": "6655:9:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 22178, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22171, + "src": "6666:11:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 22179, + "name": "lastUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22153, + "src": "6679:14:58", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 22180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6679:16:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 22181, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6654:42:58", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 22167, + "id": 22182, + "nodeType": "Return", + "src": "6647:49:58" + } + ] + }, + "documentation": { + "id": 22154, + "nodeType": "StructuredDocumentation", + "src": "6003:370:58", + "text": " @dev returns both the rate and the timestamp of the last update in a single call (gas optimization)\n @param _tokenA token to get the rate of 1 unit of\n @param _tokenB token to get the rate of 1 `_tokenA` against\n @return numerator\n @return denominator\n @return timestamp of the last update" + }, + "functionSelector": "b1772d7a", + "id": 22184, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestRateAndUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22160, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6493:8:58" + }, + "parameters": { + "id": 22159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22156, + "mutability": "mutable", + "name": "_tokenA", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6412:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22155, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6412:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22158, + "mutability": "mutable", + "name": "_tokenB", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6433:19:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22157, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6433:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6411:42:58" + }, + "returnParameters": { + "id": 22167, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6520:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6520:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22164, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6529:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22163, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6529:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22166, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22184, + "src": "6538:7:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22165, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6538:7:58", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6519:27:58" + }, + "scope": 22205, + "src": "6379:325:58", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22203, + "nodeType": "Block", + "src": "6834:128:58", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "id": 22194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22192, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22187, + "src": "6849:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 22193, + "name": "ETH_ADDRESS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21837, + "src": "6859:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "src": "6849:21:58", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22198, + "nodeType": "IfStatement", + "src": "6845:73:58", + "trueBody": { + "id": 22197, + "nodeType": "Block", + "src": "6872:46:58", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 22195, + "name": "ETH_DECIMALS", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21840, + "src": "6894:12:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 22191, + "id": 22196, + "nodeType": "Return", + "src": "6887:19:58" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 22199, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22187, + "src": "6937:6:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 22200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 21076, + "src": "6937:15:58", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 22201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6937:17:58", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 22191, + "id": 22202, + "nodeType": "Return", + "src": "6930:24:58" + } + ] + }, + "documentation": { + "id": 22185, + "nodeType": "StructuredDocumentation", + "src": "6712:49:58", + "text": "@dev returns the decimals of a given token " + }, + "id": 22204, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22187, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22204, + "src": "6785:18:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22186, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "6785:11:58", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6784:20:58" + }, + "returnParameters": { + "id": 22191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22190, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22204, + "src": "6827:5:58", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 22189, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6827:5:58", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6826:7:58" + }, + "scope": 22205, + "src": "6767:195:58", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 22206, + "src": "520:6445:58" + } + ], + "src": "52:6915:58" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.841Z", + "devdoc": { + "details": "Provides the off-chain rate between two tokens The price oracle uses chainlink oracles internally to get the rates of the two tokens with respect to a common denominator, and then returns the rate between them, which is equivalent to the rate of TokenA / TokenB", + "kind": "dev", + "methods": { + "constructor": { + "details": "initializes a new PriceOracle instance note that the oracles must have the same common denominator (USD, ETH etc.)", + "params": { + "_tokenA": "first token to support", + "_tokenAOracle": "first token price oracle", + "_tokenB": "second token to support", + "_tokenBOracle": "second token price oracle" + } + }, + "lastUpdateTime()": { + "details": "returns the timestamp of the last price update", + "returns": { + "_0": "timestamp" + } + }, + "latestRate(address,address)": { + "details": "returns the latest known rate between the two given tokens for a given pair of tokens A and B, returns the rate of A / B (the number of B units equivalent to a single A unit) the rate is returned as a fraction (numerator / denominator) for accuracy", + "params": { + "_tokenA": "token to get the rate of 1 unit of", + "_tokenB": "token to get the rate of 1 `_tokenA` against" + }, + "returns": { + "_0": "numerator", + "_1": "denominator" + } + }, + "latestRateAndUpdateTime(address,address)": { + "details": "returns both the rate and the timestamp of the last update in a single call (gas optimization)", + "params": { + "_tokenA": "token to get the rate of 1 unit of", + "_tokenB": "token to get the rate of 1 `_tokenA` against" + }, + "returns": { + "_0": "numerator", + "_1": "denominator", + "_2": "timestamp of the last update" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/ReentrancyGuard.json b/apps/cic-eth/tests/testdata/bancor/ReentrancyGuard.json new file mode 100644 index 00000000..93a9bc2d --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/ReentrancyGuard.json @@ -0,0 +1,886 @@ +{ + "contractName": "ReentrancyGuard", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"ReentrancyGuard The contract provides protection against re-entrancy - calling a function (directly or indirectly) from within itself.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"ensures instantiation only by sub-contracts\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @dev ReentrancyGuard\r\n *\r\n * The contract provides protection against re-entrancy - calling a function (directly or\r\n * indirectly) from within itself.\r\n*/\r\ncontract ReentrancyGuard {\r\n // true while protected code is being executed, false otherwise\r\n bool private locked = false;\r\n\r\n /**\r\n * @dev ensures instantiation only by sub-contracts\r\n */\r\n constructor() internal {}\r\n\r\n // protects a function against reentrancy attacks\r\n modifier protected() {\r\n _protected();\r\n locked = true;\r\n _;\r\n locked = false;\r\n }\r\n\r\n // error message binary size optimization\r\n function _protected() internal view {\r\n require(!locked, \"ERR_REENTRANCY\");\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "exportedSymbols": { + "ReentrancyGuard": [ + 22242 + ] + }, + "id": 22243, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22207, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:59" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 22208, + "nodeType": "StructuredDocumentation", + "src": "79:167:59", + "text": " @dev ReentrancyGuard\n The contract provides protection against re-entrancy - calling a function (directly or\n indirectly) from within itself." + }, + "fullyImplemented": true, + "id": 22242, + "linearizedBaseContracts": [ + 22242 + ], + "name": "ReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 22211, + "mutability": "mutable", + "name": "locked", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22242, + "src": "349:27:59", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "349:4:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "371:5:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 22215, + "nodeType": "Block", + "src": "483:2:59", + "statements": [] + }, + "documentation": { + "id": 22212, + "nodeType": "StructuredDocumentation", + "src": "385:69:59", + "text": " @dev ensures instantiation only by sub-contracts" + }, + "id": 22216, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22213, + "nodeType": "ParameterList", + "parameters": [], + "src": "471:2:59" + }, + "returnParameters": { + "id": 22214, + "nodeType": "ParameterList", + "parameters": [], + "src": "483:0:59" + }, + "scope": 22242, + "src": "460:25:59", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22230, + "nodeType": "Block", + "src": "569:92:59", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 22218, + "name": "_protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22241, + "src": "580:10:59", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 22219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:12:59", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22220, + "nodeType": "ExpressionStatement", + "src": "580:12:59" + }, + { + "expression": { + "argumentTypes": null, + "id": 22223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22221, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "603:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 22222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:4:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "603:13:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22224, + "nodeType": "ExpressionStatement", + "src": "603:13:59" + }, + { + "id": 22225, + "nodeType": "PlaceholderStatement", + "src": "627:1:59" + }, + { + "expression": { + "argumentTypes": null, + "id": 22228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22226, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "639:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "648:5:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "639:14:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22229, + "nodeType": "ExpressionStatement", + "src": "639:14:59" + } + ] + }, + "documentation": null, + "id": 22231, + "name": "protected", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22217, + "nodeType": "ParameterList", + "parameters": [], + "src": "566:2:59" + }, + "src": "548:113:59", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22240, + "nodeType": "Block", + "src": "752:53:59", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "771:7:59", + "subExpression": { + "argumentTypes": null, + "id": 22235, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "772:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5245454e5452414e4359", + "id": 22237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:16:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c", + "typeString": "literal_string \"ERR_REENTRANCY\"" + }, + "value": "ERR_REENTRANCY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c", + "typeString": "literal_string \"ERR_REENTRANCY\"" + } + ], + "id": 22234, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "763:7:59", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "763:34:59", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22239, + "nodeType": "ExpressionStatement", + "src": "763:34:59" + } + ] + }, + "documentation": null, + "id": 22241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_protected", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22232, + "nodeType": "ParameterList", + "parameters": [], + "src": "735:2:59" + }, + "returnParameters": { + "id": 22233, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:0:59" + }, + "scope": 22242, + "src": "716:89:59", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22243, + "src": "248:560:59" + } + ], + "src": "52:758:59" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "exportedSymbols": { + "ReentrancyGuard": [ + 22242 + ] + }, + "id": 22243, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22207, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:59" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 22208, + "nodeType": "StructuredDocumentation", + "src": "79:167:59", + "text": " @dev ReentrancyGuard\n The contract provides protection against re-entrancy - calling a function (directly or\n indirectly) from within itself." + }, + "fullyImplemented": true, + "id": 22242, + "linearizedBaseContracts": [ + 22242 + ], + "name": "ReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 22211, + "mutability": "mutable", + "name": "locked", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22242, + "src": "349:27:59", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "349:4:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "371:5:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "visibility": "private" + }, + { + "body": { + "id": 22215, + "nodeType": "Block", + "src": "483:2:59", + "statements": [] + }, + "documentation": { + "id": 22212, + "nodeType": "StructuredDocumentation", + "src": "385:69:59", + "text": " @dev ensures instantiation only by sub-contracts" + }, + "id": 22216, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22213, + "nodeType": "ParameterList", + "parameters": [], + "src": "471:2:59" + }, + "returnParameters": { + "id": 22214, + "nodeType": "ParameterList", + "parameters": [], + "src": "483:0:59" + }, + "scope": 22242, + "src": "460:25:59", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22230, + "nodeType": "Block", + "src": "569:92:59", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 22218, + "name": "_protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22241, + "src": "580:10:59", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 22219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:12:59", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22220, + "nodeType": "ExpressionStatement", + "src": "580:12:59" + }, + { + "expression": { + "argumentTypes": null, + "id": 22223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22221, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "603:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 22222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:4:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "603:13:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22224, + "nodeType": "ExpressionStatement", + "src": "603:13:59" + }, + { + "id": 22225, + "nodeType": "PlaceholderStatement", + "src": "627:1:59" + }, + { + "expression": { + "argumentTypes": null, + "id": 22228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 22226, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "639:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22227, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "648:5:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "639:14:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22229, + "nodeType": "ExpressionStatement", + "src": "639:14:59" + } + ] + }, + "documentation": null, + "id": 22231, + "name": "protected", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22217, + "nodeType": "ParameterList", + "parameters": [], + "src": "566:2:59" + }, + "src": "548:113:59", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22240, + "nodeType": "Block", + "src": "752:53:59", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "771:7:59", + "subExpression": { + "argumentTypes": null, + "id": 22235, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22211, + "src": "772:6:59", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5245454e5452414e4359", + "id": 22237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:16:59", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c", + "typeString": "literal_string \"ERR_REENTRANCY\"" + }, + "value": "ERR_REENTRANCY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c", + "typeString": "literal_string \"ERR_REENTRANCY\"" + } + ], + "id": 22234, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "763:7:59", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "763:34:59", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22239, + "nodeType": "ExpressionStatement", + "src": "763:34:59" + } + ] + }, + "documentation": null, + "id": 22241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_protected", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22232, + "nodeType": "ParameterList", + "parameters": [], + "src": "735:2:59" + }, + "returnParameters": { + "id": 22233, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:0:59" + }, + "scope": 22242, + "src": "716:89:59", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22243, + "src": "248:560:59" + } + ], + "src": "52:758:59" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.844Z", + "devdoc": { + "details": "ReentrancyGuard The contract provides protection against re-entrancy - calling a function (directly or indirectly) from within itself.", + "kind": "dev", + "methods": { + "constructor": { + "details": "ensures instantiation only by sub-contracts" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/SafeMath.json b/apps/cic-eth/tests/testdata/bancor/SafeMath.json new file mode 100644 index 00000000..9d3ca945 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/SafeMath.json @@ -0,0 +1,2968 @@ +{ + "contractName": "SafeMath", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for basic math operations with overflow/underflow protection\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]}},\"version\":1}", + "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d1ce59e1c702fa5b7a4ebdbbe471db9a887eed169308b9570dd7668c3d42c7064736f6c634300060c0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d1ce59e1c702fa5b7a4ebdbbe471db9a887eed169308b9570dd7668c3d42c7064736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "167:1637:60:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "167:1637:60:-:0;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @dev Library for basic math operations with overflow/underflow protection\r\n*/\r\nlibrary SafeMath {\r\n /**\r\n * @dev returns the sum of _x and _y, reverts if the calculation overflows\r\n *\r\n * @param _x value 1\r\n * @param _y value 2\r\n *\r\n * @return sum\r\n */\r\n function add(uint256 _x, uint256 _y) internal pure returns (uint256) {\r\n uint256 z = _x + _y;\r\n require(z >= _x, \"ERR_OVERFLOW\");\r\n return z;\r\n }\r\n\r\n /**\r\n * @dev returns the difference of _x minus _y, reverts if the calculation underflows\r\n *\r\n * @param _x minuend\r\n * @param _y subtrahend\r\n *\r\n * @return difference\r\n */\r\n function sub(uint256 _x, uint256 _y) internal pure returns (uint256) {\r\n require(_x >= _y, \"ERR_UNDERFLOW\");\r\n return _x - _y;\r\n }\r\n\r\n /**\r\n * @dev returns the product of multiplying _x by _y, reverts if the calculation overflows\r\n *\r\n * @param _x factor 1\r\n * @param _y factor 2\r\n *\r\n * @return product\r\n */\r\n function mul(uint256 _x, uint256 _y) internal pure returns (uint256) {\r\n // gas optimization\r\n if (_x == 0)\r\n return 0;\r\n\r\n uint256 z = _x * _y;\r\n require(z / _x == _y, \"ERR_OVERFLOW\");\r\n return z;\r\n }\r\n\r\n /**\r\n * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.\r\n *\r\n * @param _x dividend\r\n * @param _y divisor\r\n *\r\n * @return quotient\r\n */\r\n function div(uint256 _x, uint256 _y) internal pure returns (uint256) {\r\n require(_y > 0, \"ERR_DIVIDE_BY_ZERO\");\r\n uint256 c = _x / _y;\r\n return c;\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 22354 + ] + }, + "id": 22355, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22244, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:60" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 22245, + "nodeType": "StructuredDocumentation", + "src": "79:86:60", + "text": " @dev Library for basic math operations with overflow/underflow protection" + }, + "fullyImplemented": true, + "id": 22354, + "linearizedBaseContracts": [ + 22354 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 22270, + "nodeType": "Block", + "src": "455:100:60", + "statements": [ + { + "assignments": [ + 22256 + ], + "declarations": [ + { + "constant": false, + "id": 22256, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22270, + "src": "466:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22255, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "466:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22260, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22257, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22248, + "src": "478:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 22258, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22250, + "src": "483:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "478:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "466:19:60" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22262, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22256, + "src": "504:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 22263, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22248, + "src": "509:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "504:7:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4f564552464c4f57", + "id": 22265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "513:14:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + }, + "value": "ERR_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + } + ], + "id": 22261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "496:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:32:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22267, + "nodeType": "ExpressionStatement", + "src": "496:32:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22268, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22256, + "src": "546:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22254, + "id": 22269, + "nodeType": "Return", + "src": "539:8:60" + } + ] + }, + "documentation": { + "id": 22246, + "nodeType": "StructuredDocumentation", + "src": "191:189:60", + "text": " @dev returns the sum of _x and _y, reverts if the calculation overflows\n @param _x value 1\n @param _y value 2\n @return sum" + }, + "id": 22271, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22248, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "399:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22250, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "411:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "411:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:24:60" + }, + "returnParameters": { + "id": 22254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22253, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "446:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "446:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "445:9:60" + }, + "scope": 22354, + "src": "386:169:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22292, + "nodeType": "Block", + "src": "847:78:60", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22282, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22274, + "src": "866:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 22283, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22276, + "src": "872:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "866:8:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f554e444552464c4f57", + "id": 22285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "876:15:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ddfa1b728b94871fcaf7b3731a21cfe44f7a2b4b84261190a1aa6f6b13e2a1f4", + "typeString": "literal_string \"ERR_UNDERFLOW\"" + }, + "value": "ERR_UNDERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ddfa1b728b94871fcaf7b3731a21cfe44f7a2b4b84261190a1aa6f6b13e2a1f4", + "typeString": "literal_string \"ERR_UNDERFLOW\"" + } + ], + "id": 22281, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "858:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "858:34:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22287, + "nodeType": "ExpressionStatement", + "src": "858:34:60" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22288, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22274, + "src": "910:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22289, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22276, + "src": "915:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "910:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22280, + "id": 22291, + "nodeType": "Return", + "src": "903:14:60" + } + ] + }, + "documentation": { + "id": 22272, + "nodeType": "StructuredDocumentation", + "src": "563:209:60", + "text": " @dev returns the difference of _x minus _y, reverts if the calculation underflows\n @param _x minuend\n @param _y subtrahend\n @return difference" + }, + "id": 22293, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22274, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "791:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22273, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22276, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "803:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22275, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "803:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:24:60" + }, + "returnParameters": { + "id": 22280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22279, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "838:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22278, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "838:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "837:9:60" + }, + "scope": 22354, + "src": "778:147:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22326, + "nodeType": "Block", + "src": "1218:181:60", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22303, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1262:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1268:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1262:7:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22308, + "nodeType": "IfStatement", + "src": "1258:34:60", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1291:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 22302, + "id": 22307, + "nodeType": "Return", + "src": "1284:8:60" + } + }, + { + "assignments": [ + 22310 + ], + "declarations": [ + { + "constant": false, + "id": 22310, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22326, + "src": "1305:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1305:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22314, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22311, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1317:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 22312, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22298, + "src": "1322:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1317:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:19:60" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22316, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22310, + "src": "1343:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 22317, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1347:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1343:6:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 22319, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22298, + "src": "1353:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1343:12:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4f564552464c4f57", + "id": 22321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1357:14:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + }, + "value": "ERR_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + } + ], + "id": 22315, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1335:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:37:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22323, + "nodeType": "ExpressionStatement", + "src": "1335:37:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22324, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22310, + "src": "1390:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22302, + "id": 22325, + "nodeType": "Return", + "src": "1383:8:60" + } + ] + }, + "documentation": { + "id": 22294, + "nodeType": "StructuredDocumentation", + "src": "933:210:60", + "text": " @dev returns the product of multiplying _x by _y, reverts if the calculation overflows\n @param _x factor 1\n @param _y factor 2\n @return product" + }, + "id": 22327, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22296, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1162:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1162:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22298, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1174:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1174:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1161:24:60" + }, + "returnParameters": { + "id": 22302, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22301, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1209:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1209:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1208:9:60" + }, + "scope": 22354, + "src": "1149:250:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22352, + "nodeType": "Block", + "src": "1696:105:60", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22338, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22332, + "src": "1715:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1720:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1715:6:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4449564944455f42595f5a45524f", + "id": 22341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1723:20:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_80c66eaebdd007de3c36bb5849ffa95e14b2130dc26a35fe1154627fc9dd838e", + "typeString": "literal_string \"ERR_DIVIDE_BY_ZERO\"" + }, + "value": "ERR_DIVIDE_BY_ZERO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_80c66eaebdd007de3c36bb5849ffa95e14b2130dc26a35fe1154627fc9dd838e", + "typeString": "literal_string \"ERR_DIVIDE_BY_ZERO\"" + } + ], + "id": 22337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1707:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1707:37:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22343, + "nodeType": "ExpressionStatement", + "src": "1707:37:60" + }, + { + "assignments": [ + 22345 + ], + "declarations": [ + { + "constant": false, + "id": 22345, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22352, + "src": "1755:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1755:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22349, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22346, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22330, + "src": "1767:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 22347, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22332, + "src": "1772:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1767:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:19:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22345, + "src": "1792:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22336, + "id": 22351, + "nodeType": "Return", + "src": "1785:8:60" + } + ] + }, + "documentation": { + "id": 22328, + "nodeType": "StructuredDocumentation", + "src": "1407:214:60", + "text": " @dev Integer division of two numbers truncating the quotient, reverts on division by zero.\n @param _x dividend\n @param _y divisor\n @return quotient" + }, + "id": 22353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22330, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1640:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22329, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1640:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22332, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1652:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1652:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:24:60" + }, + "returnParameters": { + "id": 22336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22335, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1687:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22334, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1687:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1686:9:60" + }, + "scope": 22354, + "src": "1627:174:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22355, + "src": "167:1637:60" + } + ], + "src": "52:1754:60" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 22354 + ] + }, + "id": 22355, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22244, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:60" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 22245, + "nodeType": "StructuredDocumentation", + "src": "79:86:60", + "text": " @dev Library for basic math operations with overflow/underflow protection" + }, + "fullyImplemented": true, + "id": 22354, + "linearizedBaseContracts": [ + 22354 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 22270, + "nodeType": "Block", + "src": "455:100:60", + "statements": [ + { + "assignments": [ + 22256 + ], + "declarations": [ + { + "constant": false, + "id": 22256, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22270, + "src": "466:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22255, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "466:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22260, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22257, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22248, + "src": "478:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 22258, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22250, + "src": "483:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "478:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "466:19:60" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22262, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22256, + "src": "504:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 22263, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22248, + "src": "509:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "504:7:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4f564552464c4f57", + "id": 22265, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "513:14:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + }, + "value": "ERR_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + } + ], + "id": 22261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "496:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:32:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22267, + "nodeType": "ExpressionStatement", + "src": "496:32:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22268, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22256, + "src": "546:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22254, + "id": 22269, + "nodeType": "Return", + "src": "539:8:60" + } + ] + }, + "documentation": { + "id": 22246, + "nodeType": "StructuredDocumentation", + "src": "191:189:60", + "text": " @dev returns the sum of _x and _y, reverts if the calculation overflows\n @param _x value 1\n @param _y value 2\n @return sum" + }, + "id": 22271, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22248, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "399:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22250, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "411:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "411:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:24:60" + }, + "returnParameters": { + "id": 22254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22253, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22271, + "src": "446:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "446:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "445:9:60" + }, + "scope": 22354, + "src": "386:169:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22292, + "nodeType": "Block", + "src": "847:78:60", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22282, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22274, + "src": "866:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 22283, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22276, + "src": "872:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "866:8:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f554e444552464c4f57", + "id": 22285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "876:15:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ddfa1b728b94871fcaf7b3731a21cfe44f7a2b4b84261190a1aa6f6b13e2a1f4", + "typeString": "literal_string \"ERR_UNDERFLOW\"" + }, + "value": "ERR_UNDERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ddfa1b728b94871fcaf7b3731a21cfe44f7a2b4b84261190a1aa6f6b13e2a1f4", + "typeString": "literal_string \"ERR_UNDERFLOW\"" + } + ], + "id": 22281, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "858:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "858:34:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22287, + "nodeType": "ExpressionStatement", + "src": "858:34:60" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22288, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22274, + "src": "910:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 22289, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22276, + "src": "915:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "910:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22280, + "id": 22291, + "nodeType": "Return", + "src": "903:14:60" + } + ] + }, + "documentation": { + "id": 22272, + "nodeType": "StructuredDocumentation", + "src": "563:209:60", + "text": " @dev returns the difference of _x minus _y, reverts if the calculation underflows\n @param _x minuend\n @param _y subtrahend\n @return difference" + }, + "id": 22293, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22274, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "791:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22273, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22276, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "803:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22275, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "803:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:24:60" + }, + "returnParameters": { + "id": 22280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22279, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22293, + "src": "838:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22278, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "838:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "837:9:60" + }, + "scope": 22354, + "src": "778:147:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22326, + "nodeType": "Block", + "src": "1218:181:60", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22303, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1262:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1268:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1262:7:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22308, + "nodeType": "IfStatement", + "src": "1258:34:60", + "trueBody": { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1291:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 22302, + "id": 22307, + "nodeType": "Return", + "src": "1284:8:60" + } + }, + { + "assignments": [ + 22310 + ], + "declarations": [ + { + "constant": false, + "id": 22310, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22326, + "src": "1305:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1305:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22314, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22311, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1317:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 22312, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22298, + "src": "1322:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1317:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:19:60" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22316, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22310, + "src": "1343:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 22317, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22296, + "src": "1347:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1343:6:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 22319, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22298, + "src": "1353:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1343:12:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4f564552464c4f57", + "id": 22321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1357:14:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + }, + "value": "ERR_OVERFLOW" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5857855e77a7ad10ccf8b5bcb17297771c10c957a1c88a434eb5a16fc4dad486", + "typeString": "literal_string \"ERR_OVERFLOW\"" + } + ], + "id": 22315, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1335:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:37:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22323, + "nodeType": "ExpressionStatement", + "src": "1335:37:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22324, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22310, + "src": "1390:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22302, + "id": 22325, + "nodeType": "Return", + "src": "1383:8:60" + } + ] + }, + "documentation": { + "id": 22294, + "nodeType": "StructuredDocumentation", + "src": "933:210:60", + "text": " @dev returns the product of multiplying _x by _y, reverts if the calculation overflows\n @param _x factor 1\n @param _y factor 2\n @return product" + }, + "id": 22327, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22296, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1162:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22295, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1162:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22298, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1174:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1174:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1161:24:60" + }, + "returnParameters": { + "id": 22302, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22301, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22327, + "src": "1209:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1209:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1208:9:60" + }, + "scope": 22354, + "src": "1149:250:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22352, + "nodeType": "Block", + "src": "1696:105:60", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22338, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22332, + "src": "1715:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1720:1:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1715:6:60", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f4449564944455f42595f5a45524f", + "id": 22341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1723:20:60", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_80c66eaebdd007de3c36bb5849ffa95e14b2130dc26a35fe1154627fc9dd838e", + "typeString": "literal_string \"ERR_DIVIDE_BY_ZERO\"" + }, + "value": "ERR_DIVIDE_BY_ZERO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_80c66eaebdd007de3c36bb5849ffa95e14b2130dc26a35fe1154627fc9dd838e", + "typeString": "literal_string \"ERR_DIVIDE_BY_ZERO\"" + } + ], + "id": 22337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1707:7:60", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1707:37:60", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22343, + "nodeType": "ExpressionStatement", + "src": "1707:37:60" + }, + { + "assignments": [ + 22345 + ], + "declarations": [ + { + "constant": false, + "id": 22345, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22352, + "src": "1755:9:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1755:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22349, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22346, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22330, + "src": "1767:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 22347, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22332, + "src": "1772:2:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1767:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:19:60" + }, + { + "expression": { + "argumentTypes": null, + "id": 22350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22345, + "src": "1792:1:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 22336, + "id": 22351, + "nodeType": "Return", + "src": "1785:8:60" + } + ] + }, + "documentation": { + "id": 22328, + "nodeType": "StructuredDocumentation", + "src": "1407:214:60", + "text": " @dev Integer division of two numbers truncating the quotient, reverts on division by zero.\n @param _x dividend\n @param _y divisor\n @return quotient" + }, + "id": 22353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22330, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1640:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22329, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1640:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22332, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1652:10:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1652:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:24:60" + }, + "returnParameters": { + "id": 22336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22335, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22353, + "src": "1687:7:60", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22334, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1687:7:60", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1686:9:60" + }, + "scope": 22354, + "src": "1627:174:60", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22355, + "src": "167:1637:60" + } + ], + "src": "52:1754:60" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.844Z", + "devdoc": { + "details": "Library for basic math operations with overflow/underflow protection", + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/SmartToken.json b/apps/cic-eth/tests/testdata/bancor/SmartToken.json new file mode 100644 index 00000000..eac002f9 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/SmartToken.json @@ -0,0 +1,6049 @@ +{ + "contractName": "SmartToken", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "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": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Destruction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Issuance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "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" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "transfersEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_disable", + "type": "bool" + } + ], + "name": "disableTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"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\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Destruction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Issuance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"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\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"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\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_disable\",\"type\":\"bool\"}],\"name\":\"disableTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"issue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"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\":[],\"name\":\"transfersEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Smart Token 'Owned' is specified here for readability reasons\",\"events\":{\"Destruction(uint256)\":{\"details\":\"triggered when the total supply is decreased\",\"params\":{\"_amount\":\"amount that gets removed from the supply\"}},\"Issuance(uint256)\":{\"details\":\"triggered when the total supply is increased\",\"params\":{\"_amount\":\"amount that gets added to the supply\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"approve(address,uint256)\":{\"details\":\"allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\",\"params\":{\"_spender\":\"approved address\",\"_value\":\"allowance amount\"},\"returns\":{\"_0\":\"true if the approval was successful, false if it wasn't\"}},\"constructor\":{\"details\":\"initializes a new SmartToken instance\",\"params\":{\"_decimals\":\"for display purposes only\",\"_name\":\"token name\",\"_symbol\":\"token short symbol, minimum 1 character\"}},\"destroy(address,uint256)\":{\"details\":\"removes tokens from the given account and decreases the token supply can only be called by the contract owner\",\"params\":{\"_amount\":\"amount to decrease the supply by\",\"_from\":\"account to remove the amount from\"}},\"disableTransfers(bool)\":{\"details\":\"disables/enables transfers can only be called by the contract owner\",\"params\":{\"_disable\":\"true to disable transfers, false to enable them\"}},\"issue(address,uint256)\":{\"details\":\"increases the token supply and sends the new tokens to the given account can only be called by the contract owner\",\"params\":{\"_amount\":\"amount to increase the supply by\",\"_to\":\"account to receive the new amount\"}},\"transfer(address,uint256)\":{\"details\":\"send coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled\",\"params\":{\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled\",\"params\":{\"_from\":\"source address\",\"_to\":\"target address\",\"_value\":\"transfer amount\"},\"returns\":{\"_0\":\"true if the transfer was successful, false if it wasn't\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":\"SmartToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "308:4264:51:-:0;;;460:35;;;-1:-1:-1;;460:35:51;491:4;460:35;;;1189:152;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1189:152:51;;;;;;;;;;-1:-1:-1;1189:152:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1189:152:51;;;;;;;;;;-1:-1:-1;1189:152:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1189:152:51;;;;;1325:1;619:18:58;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;1725:19:48;;1189:152:51;;-1:-1:-1;1725:19:48;;-1:-1:-1;1305:7:51;;1189:152;;1325:1;1717:52:48;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;-1:-1:-1;;;1717:52:48;;;;;;;;;;;;;;;1812:1;1794:7;1788:21;:25;1780:56;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;-1:-1:-1;;;1780:56:48;;;;;;;;;;;;;;;1849:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1872:16:48;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1899:8:48;:20;;-1:-1:-1;;1899:20:48;;;;;;;;;;;;;1930:11;:26;;;1977:10;-1:-1:-1;1967:21:48;;;:9;:21;;;;;:36;-1:-1:-1;308:4264:51;;-1:-1:-1;;;;308:4264:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;308:4264:51;;;-1:-1:-1;308:4264:51;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "308:4264:51:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;327:27:48;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4284:519;;;;;;;;;;;;;;;;-1:-1:-1;4284:519:48;;-1:-1:-1;;;;;4284:519:48;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1851:114:51;;;;;;;;;;;;;;;;-1:-1:-1;1851:114:51;;;;:::i;:::-;;434:35:48;;;:::i;:::-;;;;;;;;;;;;;;;;4324:245:51;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4324:245:51;;;;;;;;;;;;;;;;;:::i;397:30:48:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;417:34:51;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1196:290:63;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:63;;;;;;;;;;;;;;;;;:::i;476:54:48:-;;;;;;;;;;;;;;;;-1:-1:-1;476:54:48;-1:-1:-1;;;;;476:54:48;;:::i;1422:217:58:-;;;:::i;2253:349:51:-;;;;;;;;;;;;;;;;-1:-1:-1;2253:349:51;;-1:-1:-1;;;;;2253:349:51;;;;;;:::i;219:29:58:-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:58;;;;;;;;;;;;;;361::48;;;:::i;2886:281:51:-;;;;;;;;;;;;;;;;-1:-1:-1;2886:281:51;;-1:-1:-1;;;;;2886:281:51;;;;;;:::i;3637:214::-;;;;;;;;;;;;;;;;-1:-1:-1;3637:214:51;;-1:-1:-1;;;;;3637:214:51;;;;;;:::i;460:35::-;;;:::i;255:23:58:-;;;:::i;537:75:48:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;537:75:48;;;;;;;;;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;327:27:48:-;;;;;;;;;;;;;;-1:-1:-1;;327:27:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4284:519::-;4436:4;4408:8;594:23:65;608:8;594:13;:23::i;:::-;4592:11:48;;;:51:::1;;-1:-1:-1::0;4617:10:48::1;4607:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4607:31:48;::::1;::::0;;;;;;;;:36;4592:51:::1;4584:82;;;::::0;;-1:-1:-1;;;4584:82:48;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4584:82:48;;;;;;;;;;;;;::::1;;4689:10;4679:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;4679:31:48;::::1;::::0;;;;;;;;;;:40;;;4735:38;;;;;;;4679:31;;4689:10;4735:38:::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;4791:4:48::1;::::0;4284:519;-1:-1:-1;;;4284:519:48:o;1851:114:51:-;726:12:58;:10;:12::i;:::-;1929:16:51::1;:28:::0;;-1:-1:-1;;1929:28:51::1;1948:9:::0;::::1;1929:28:::0;;;::::1;::::0;;1851:114::o;434:35:48:-;;;;:::o;4324:245:51:-;4493:4;1443:19;:17;:19::i;:::-;4523:38:::1;4542:5;4549:3;4554:6;4523:18;:38::i;:::-;4516:45:::0;4324:245;-1:-1:-1;;;;4324:245:51:o;397:30:48:-;;;;;;:::o;417:34:51:-;450:1;417:34;:::o;1196:290:63:-;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:65::3;::::2;749::58::1;1196:290:63::0;;;:::o;476:54:48:-;;;;;;;;;;;;;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;1591:8:58;;-1:-1:-1;;;;;;1583:16:58;;;;;;;1610:21;;;1422:217::o;2253:349:51:-;726:12:58;:10;:12::i;:::-;2373:3:51::1;594:23:65;608:8;594:13;:23::i;:::-;2395:3:51::2;948:18:65;957:8;948;:18::i;:::-;2430:11:51::3;::::0;:24:::3;::::0;2446:7;2430:15:::3;:24::i;:::-;2416:11;:38:::0;-1:-1:-1;;;;;2482:14:51;::::3;;::::0;;;:9:::3;:14;::::0;;;;;:27:::3;::::0;2501:7;2482:18:::3;:27::i;:::-;-1:-1:-1::0;;;;;2465:14:51;::::3;;::::0;;;:9:::3;:14;::::0;;;;;;;;:44;;;;2527:17;;;;;;;::::3;::::0;;;;;;;;;::::3;2560:34;::::0;;;;;;;2577:1:::3;-1:-1:-1::0;;;;;;;2560:34:51;::::3;::::0;2577:1;;2560:34;2577:1;;-1:-1:-1;;2577:1:51;-1:-1:-1;;;;;2560:34:51;;;;::::3;::::0;;::::3;628:1:65::2;749::58::1;2253:349:51::0;;:::o;219:29:58:-;;;-1:-1:-1;;;;;219:29:58;;:::o;361::48:-;;;;;;;;;;;;;;;-1:-1:-1;;361:29:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2886:281:51;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;;;2991:16:51;::::1;;::::0;;;:9:::1;:16;::::0;;;;;:29:::1;::::0;3012:7;2991:20:::1;:29::i;:::-;-1:-1:-1::0;;;;;2972:16:51;::::1;;::::0;;;:9:::1;:16;::::0;;;;:48;3045:11:::1;::::0;:24:::1;::::0;3061:7;3045:15:::1;:24::i;:::-;3031:11;:38:::0;3087:36:::1;::::0;;;;;;;3111:1:::1;::::0;-1:-1:-1;;;;;3087:36:51;::::1;::::0;-1:-1:-1;;;;;;;;;;;3087:36:51;;;;::::1;::::0;;::::1;3139:20;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;2886:281:::0;;:::o;3637:214::-;3787:4;1443:19;:17;:19::i;:::-;3816:27:::1;3831:3;3836:6;3816:14;:27::i;:::-;3809:34:::0;3637:214;-1:-1:-1;;;3637:214:51:o;460:35::-;;;;;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;537:75:48:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;1164:167:58:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;692:128;:::o;813:104:58:-;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;;813:104::o;1537:113:51:-;1599:16;;;;1591:51;;;;;-1:-1:-1;;;1591:51:51;;;;;;;;;;;;-1:-1:-1;;;1591:51:51;;;;;;;;;;;;;;3099:470:48;3290:4;3238:5;594:23:65;608:8;594:13;:23::i;:::-;3267:3:48::1;594:23:65;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;3343:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3360:10:::2;3343:28:::0;;;;;;;;:40:::2;::::0;3376:6;3343:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;3312:16:48;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;3329:10:::2;3312:28:::0;;;;;;;:71;;;;3413:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;3434:6;3413:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;3394:16:48;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;3469:14;;::::2;::::0;;;;:26:::2;::::0;3488:6;3469:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;3452:14:48;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;:43;;;;3511:28;;;;;;;-1:-1:-1;;3452:14:48;;3511:28;;::::2;::::0;;;;;3452:14;;-1:-1:-1;3452:14:48;-1:-1:-1;;;;;3511:28:48;;;;;;;::::2;-1:-1:-1::0;3557:4:48::2;::::0;3099:470;-1:-1:-1;;;;;3099:470:48:o;1041:126:65:-;1130:4;-1:-1:-1;;;;;1110:25:65;;;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;1485:312:62;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;-1:-1:-1;;1589:17:62;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;;1485:312;;;;;:::o;386:169:61:-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;778:147;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;2343:355:48:-;2486:4;2463:3;594:23:65;608:8;594:13;:23::i;:::-;2542:10:48::1;2532:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;2558:6;2532:25:::1;:33::i;:::-;2518:10;2508:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;2593:14:48;::::1;::::0;;;;:26:::1;::::0;2612:6;2593:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;2576:14:48;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;:43;;;;2635:33;;;;;;;-1:-1:-1;;2576:14:48;;2644:10:::1;::::0;2635:33;;2576:14;;-1:-1:-1;2576:14:48;-1:-1:-1;;;;;2635:33:48;;;;;;;;::::1;-1:-1:-1::0;2686:4:48::1;::::0;2343:355;-1:-1:-1;;;2343:355:48:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./ERC20Token.sol\";\r\nimport \"./interfaces/ISmartToken.sol\";\r\nimport \"../utility/Owned.sol\";\r\nimport \"../utility/TokenHolder.sol\";\r\n\r\n/**\r\n * @dev Smart Token\r\n *\r\n * 'Owned' is specified here for readability reasons\r\n*/\r\ncontract SmartToken is ISmartToken, Owned, ERC20Token, TokenHolder {\r\n using SafeMath for uint256;\r\n\r\n uint16 public constant version = 4;\r\n\r\n bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false otherwise\r\n\r\n /**\r\n * @dev triggered when the total supply is increased\r\n *\r\n * @param _amount amount that gets added to the supply\r\n */\r\n event Issuance(uint256 _amount);\r\n\r\n /**\r\n * @dev triggered when the total supply is decreased\r\n *\r\n * @param _amount amount that gets removed from the supply\r\n */\r\n event Destruction(uint256 _amount);\r\n\r\n /**\r\n * @dev initializes a new SmartToken instance\r\n *\r\n * @param _name token name\r\n * @param _symbol token short symbol, minimum 1 character\r\n * @param _decimals for display purposes only\r\n */\r\n constructor(string memory _name, string memory _symbol, uint8 _decimals)\r\n public\r\n ERC20Token(_name, _symbol, _decimals, 0)\r\n {\r\n }\r\n\r\n // allows execution only when transfers are enabled\r\n modifier transfersAllowed {\r\n _transfersAllowed();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _transfersAllowed() internal view {\r\n require(transfersEnabled, \"ERR_TRANSFERS_DISABLED\");\r\n }\r\n\r\n /**\r\n * @dev disables/enables transfers\r\n * can only be called by the contract owner\r\n *\r\n * @param _disable true to disable transfers, false to enable them\r\n */\r\n function disableTransfers(bool _disable) public override ownerOnly {\r\n transfersEnabled = !_disable;\r\n }\r\n\r\n /**\r\n * @dev increases the token supply and sends the new tokens to the given account\r\n * can only be called by the contract owner\r\n *\r\n * @param _to account to receive the new amount\r\n * @param _amount amount to increase the supply by\r\n */\r\n function issue(address _to, uint256 _amount)\r\n public\r\n override\r\n ownerOnly\r\n validAddress(_to)\r\n notThis(_to)\r\n {\r\n totalSupply = totalSupply.add(_amount);\r\n balanceOf[_to] = balanceOf[_to].add(_amount);\r\n\r\n emit Issuance(_amount);\r\n emit Transfer(address(0), _to, _amount);\r\n }\r\n\r\n /**\r\n * @dev removes tokens from the given account and decreases the token supply\r\n * can only be called by the contract owner\r\n *\r\n * @param _from account to remove the amount from\r\n * @param _amount amount to decrease the supply by\r\n */\r\n function destroy(address _from, uint256 _amount) public override ownerOnly {\r\n balanceOf[_from] = balanceOf[_from].sub(_amount);\r\n totalSupply = totalSupply.sub(_amount);\r\n\r\n emit Transfer(_from, address(0), _amount);\r\n emit Destruction(_amount);\r\n }\r\n\r\n // ERC20 standard method overrides with some extra functionality\r\n\r\n /**\r\n * @dev send coins\r\n * throws on any error rather then return a false flag to minimize user errors\r\n * in addition to the standard checks, the function throws if transfers are disabled\r\n *\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transfer(address _to, uint256 _value)\r\n public\r\n override(IERC20Token, ERC20Token)\r\n transfersAllowed\r\n returns (bool)\r\n {\r\n return super.transfer(_to, _value);\r\n }\r\n\r\n /**\r\n * @dev an account/contract attempts to get the coins\r\n * throws on any error rather then return a false flag to minimize user errors\r\n * in addition to the standard checks, the function throws if transfers are disabled\r\n *\r\n * @param _from source address\r\n * @param _to target address\r\n * @param _value transfer amount\r\n *\r\n * @return true if the transfer was successful, false if it wasn't\r\n */\r\n function transferFrom(address _from, address _to, uint256 _value)\r\n public\r\n override(IERC20Token, ERC20Token)\r\n transfersAllowed\r\n returns (bool) \r\n {\r\n return super.transferFrom(_from, _to, _value);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "exportedSymbols": { + "SmartToken": [ + 21394 + ] + }, + "id": 21395, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21174, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:51" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "file": "./ERC20Token.sol", + "id": 21175, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 20618, + "src": "77:26:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./interfaces/ISmartToken.sol", + "id": 21176, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 21518, + "src": "105:38:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 21177, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 22154, + "src": "145:30:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 21178, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 22911, + "src": "177:36:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21180, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "331:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 21181, + "nodeType": "InheritanceSpecifier", + "src": "331:11:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21182, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "344:5:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 21183, + "nodeType": "InheritanceSpecifier", + "src": "344:5:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21184, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "351:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + }, + "id": 21185, + "nodeType": "InheritanceSpecifier", + "src": "351:10:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21186, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22910, + "src": "363:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22910", + "typeString": "contract TokenHolder" + } + }, + "id": 21187, + "nodeType": "InheritanceSpecifier", + "src": "363:11:51" + } + ], + "contractDependencies": [ + 13349, + 20617, + 21462, + 21517, + 22153, + 22861, + 22910, + 22996, + 23182, + 23242 + ], + "contractKind": "contract", + "documentation": { + "id": 21179, + "nodeType": "StructuredDocumentation", + "src": "217:89:51", + "text": " @dev Smart Token\n 'Owned' is specified here for readability reasons" + }, + "fullyImplemented": true, + "id": 21394, + "linearizedBaseContracts": [ + 21394, + 22910, + 20617, + 22996, + 22153, + 22861, + 21517, + 21462, + 13349, + 23242, + 23182 + ], + "name": "SmartToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 21190, + "libraryName": { + "contractScope": null, + "id": 21188, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "388:8:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "382:27:51", + "typeName": { + "id": 21189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "401:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "functionSelector": "54fd4d50", + "id": 21193, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21394, + "src": "417:34:51", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 21191, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "417:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "34", + "id": 21192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "450:1:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "bef97c87", + "id": 21196, + "mutability": "mutable", + "name": "transfersEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21394, + "src": "460:35:51", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21194, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "460:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "491:4:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21197, + "nodeType": "StructuredDocumentation", + "src": "569:141:51", + "text": " @dev triggered when the total supply is increased\n @param _amount amount that gets added to the supply" + }, + "id": 21201, + "name": "Issuance", + "nodeType": "EventDefinition", + "parameters": { + "id": 21200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21199, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21201, + "src": "731:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21198, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "731:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "730:17:51" + }, + "src": "716:32:51" + }, + { + "anonymous": false, + "documentation": { + "id": 21202, + "nodeType": "StructuredDocumentation", + "src": "756:145:51", + "text": " @dev triggered when the total supply is decreased\n @param _amount amount that gets removed from the supply" + }, + "id": 21206, + "name": "Destruction", + "nodeType": "EventDefinition", + "parameters": { + "id": 21205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21204, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21206, + "src": "925:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "925:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "924:17:51" + }, + "src": "907:35:51" + }, + { + "body": { + "id": 21222, + "nodeType": "Block", + "src": "1333:8:51", + "statements": [] + }, + "documentation": { + "id": 21207, + "nodeType": "StructuredDocumentation", + "src": "950:233:51", + "text": " @dev initializes a new SmartToken instance\n @param _name token name\n @param _symbol token short symbol, minimum 1 character\n @param _decimals for display purposes only" + }, + "id": 21223, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21216, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21209, + "src": "1298:5:51", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 21217, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21211, + "src": "1305:7:51", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 21218, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21213, + "src": "1314:9:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 21219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1325:1:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 21220, + "modifierName": { + "argumentTypes": null, + "id": 21215, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20617, + "src": "1287:10:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$20617_$", + "typeString": "type(contract ERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1287:40:51" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21209, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1201:19:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21208, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1201:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21211, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1222:21:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21210, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1222:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21213, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1245:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21212, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1245:5:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:61:51" + }, + "returnParameters": { + "id": 21221, + "nodeType": "ParameterList", + "parameters": [], + "src": "1333:0:51" + }, + "scope": 21394, + "src": "1189:152:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21229, + "nodeType": "Block", + "src": "1432:50:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21225, + "name": "_transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21239, + "src": "1443:17:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 21226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1443:19:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21227, + "nodeType": "ExpressionStatement", + "src": "1443:19:51" + }, + { + "id": 21228, + "nodeType": "PlaceholderStatement", + "src": "1473:1:51" + } + ] + }, + "documentation": null, + "id": 21230, + "name": "transfersAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21224, + "nodeType": "ParameterList", + "parameters": [], + "src": "1432:0:51" + }, + "src": "1406:76:51", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21238, + "nodeType": "Block", + "src": "1580:70:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21234, + "name": "transfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21196, + "src": "1599:16:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e53464552535f44495341424c4544", + "id": 21235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1617:24:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da0eea8408576dc7745752d8573d65c520f2ae4c7522ecd9096dbc953230a52a", + "typeString": "literal_string \"ERR_TRANSFERS_DISABLED\"" + }, + "value": "ERR_TRANSFERS_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da0eea8408576dc7745752d8573d65c520f2ae4c7522ecd9096dbc953230a52a", + "typeString": "literal_string \"ERR_TRANSFERS_DISABLED\"" + } + ], + "id": 21233, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1591:7:51", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1591:51:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21237, + "nodeType": "ExpressionStatement", + "src": "1591:51:51" + } + ] + }, + "documentation": null, + "id": 21239, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfersAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21231, + "nodeType": "ParameterList", + "parameters": [], + "src": "1563:2:51" + }, + "returnParameters": { + "id": 21232, + "nodeType": "ParameterList", + "parameters": [], + "src": "1580:0:51" + }, + "scope": 21394, + "src": "1537:113:51", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 21502 + ], + "body": { + "id": 21253, + "nodeType": "Block", + "src": "1918:47:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21248, + "name": "transfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21196, + "src": "1929:16:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1948:9:51", + "subExpression": { + "argumentTypes": null, + "id": 21249, + "name": "_disable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21242, + "src": "1949:8:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1929:28:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21252, + "nodeType": "ExpressionStatement", + "src": "1929:28:51" + } + ] + }, + "documentation": { + "id": 21240, + "nodeType": "StructuredDocumentation", + "src": "1658:187:51", + "text": " @dev disables/enables transfers\n can only be called by the contract owner\n @param _disable true to disable transfers, false to enable them" + }, + "functionSelector": "1608f18f", + "id": 21254, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21246, + "modifierName": { + "argumentTypes": null, + "id": 21245, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1908:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1908:9:51" + } + ], + "name": "disableTransfers", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21244, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1899:8:51" + }, + "parameters": { + "id": 21243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21242, + "mutability": "mutable", + "name": "_disable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21254, + "src": "1877:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21241, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1877:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1876:15:51" + }, + "returnParameters": { + "id": 21247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1918:0:51" + }, + "scope": 21394, + "src": "1851:114:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21509 + ], + "body": { + "id": 21302, + "nodeType": "Block", + "src": "2405:197:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21271, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2416:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21274, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2446:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21272, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2430:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2430:15:51", + "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": 21275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2430:24:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2416:38:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21277, + "nodeType": "ExpressionStatement", + "src": "2416:38:51" + }, + { + "expression": { + "argumentTypes": null, + "id": 21287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21278, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2465:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21280, + "indexExpression": { + "argumentTypes": null, + "id": 21279, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2475:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2465:14:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2501:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21281, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2482:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21283, + "indexExpression": { + "argumentTypes": null, + "id": 21282, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2492:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2482:14:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2482:18:51", + "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": 21286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2482:27:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2465:44:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21288, + "nodeType": "ExpressionStatement", + "src": "2465:44:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21290, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2536:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21289, + "name": "Issuance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21201, + "src": "2527:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 21291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2527:17:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21292, + "nodeType": "EmitStatement", + "src": "2522:22:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2577:1:51", + "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": 21295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2569:7:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21294, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2569:7:51", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:10:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21298, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2581:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21299, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2586:7:51", + "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": 21293, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2560:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2560:34:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21301, + "nodeType": "EmitStatement", + "src": "2555:39:51" + } + ] + }, + "documentation": { + "id": 21255, + "nodeType": "StructuredDocumentation", + "src": "1973:274:51", + "text": " @dev increases the token supply and sends the new tokens to the given account\n can only be called by the contract owner\n @param _to account to receive the new amount\n @param _amount amount to increase the supply by" + }, + "functionSelector": "867904b4", + "id": 21303, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21263, + "modifierName": { + "argumentTypes": null, + "id": 21262, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2341:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2341:9:51" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21265, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2373:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21266, + "modifierName": { + "argumentTypes": null, + "id": 21264, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "2360:12:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2360:17:51" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21268, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2395:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21269, + "modifierName": { + "argumentTypes": null, + "id": 21267, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "2387:7:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2387:12:51" + } + ], + "name": "issue", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21261, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2323:8:51" + }, + "parameters": { + "id": 21260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21257, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21303, + "src": "2268:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21259, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21303, + "src": "2281:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21258, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2281:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2267:30:51" + }, + "returnParameters": { + "id": 21270, + "nodeType": "ParameterList", + "parameters": [], + "src": "2405:0:51" + }, + "scope": 21394, + "src": "2253:349:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21516 + ], + "body": { + "id": 21345, + "nodeType": "Block", + "src": "2961:206:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21314, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2972:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21316, + "indexExpression": { + "argumentTypes": null, + "id": 21315, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "2982:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2972:16:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21321, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3012:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21317, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2991:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21319, + "indexExpression": { + "argumentTypes": null, + "id": 21318, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "3001:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2991:16:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2991:20:51", + "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": 21322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2991:29:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2972:48:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21324, + "nodeType": "ExpressionStatement", + "src": "2972:48:51" + }, + { + "expression": { + "argumentTypes": null, + "id": 21330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21325, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "3031:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21328, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3061:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21326, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "3045:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3045:15:51", + "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": 21329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3045:24:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3031:38:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21331, + "nodeType": "ExpressionStatement", + "src": "3031:38:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21333, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "3096:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3111:1:51", + "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": 21335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3103:7:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3103:7:51", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3103:10:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21338, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3115:7:51", + "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": 21332, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "3087:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3087:36:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21340, + "nodeType": "EmitStatement", + "src": "3082:41:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21342, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3151:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21341, + "name": "Destruction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21206, + "src": "3139:11:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 21343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3139:20:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21344, + "nodeType": "EmitStatement", + "src": "3134:25:51" + } + ] + }, + "documentation": { + "id": 21304, + "nodeType": "StructuredDocumentation", + "src": "2610:270:51", + "text": " @dev removes tokens from the given account and decreases the token supply\n can only be called by the contract owner\n @param _from account to remove the amount from\n @param _amount amount to decrease the supply by" + }, + "functionSelector": "a24835d1", + "id": 21346, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21312, + "modifierName": { + "argumentTypes": null, + "id": 21311, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2951:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2951:9:51" + } + ], + "name": "destroy", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2942:8:51" + }, + "parameters": { + "id": 21309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21306, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21346, + "src": "2903:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2903:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21308, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21346, + "src": "2918:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2918:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2902:32:51" + }, + "returnParameters": { + "id": 21313, + "nodeType": "ParameterList", + "parameters": [], + "src": "2961:0:51" + }, + "scope": 21394, + "src": "2886:281:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20500, + 21441 + ], + "body": { + "id": 21367, + "nodeType": "Block", + "src": "3798:53:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21363, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21349, + "src": "3831:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21364, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21351, + "src": "3836:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21361, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3816:5:51", + "typeDescriptions": { + "typeIdentifier": "t_super$_SmartToken_$21394", + "typeString": "contract super SmartToken" + } + }, + "id": 21362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 20500, + "src": "3816:14:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 21365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:27:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 21360, + "id": 21366, + "nodeType": "Return", + "src": "3809:34:51" + } + ] + }, + "documentation": { + "id": 21347, + "nodeType": "StructuredDocumentation", + "src": "3247:384:51", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n in addition to the standard checks, the function throws if transfers are disabled\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 21368, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21357, + "modifierName": { + "argumentTypes": null, + "id": 21356, + "name": "transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21230, + "src": "3752:16:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3752:16:51" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21355, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 21353, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3718:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 21354, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3731:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3709:33:51" + }, + "parameters": { + "id": 21352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21349, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3655:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3655:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21351, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3668:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21350, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3668:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3654:29:51" + }, + "returnParameters": { + "id": 21360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21359, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3787:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21358, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3787:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3786:6:51" + }, + "scope": 21394, + "src": "3637:214:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20567, + 21452 + ], + "body": { + "id": 21392, + "nodeType": "Block", + "src": "4505:64:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21387, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21371, + "src": "4542:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21388, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21373, + "src": "4549:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21389, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21375, + "src": "4554:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21385, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "4523:5:51", + "typeDescriptions": { + "typeIdentifier": "t_super$_SmartToken_$21394", + "typeString": "contract super SmartToken" + } + }, + "id": 21386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 20567, + "src": "4523:18:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 21390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4523:38:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 21384, + "id": 21391, + "nodeType": "Return", + "src": "4516:45:51" + } + ] + }, + "documentation": { + "id": 21369, + "nodeType": "StructuredDocumentation", + "src": "3859:459:51", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n in addition to the standard checks, the function throws if transfers are disabled\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 21393, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21381, + "modifierName": { + "argumentTypes": null, + "id": 21380, + "name": "transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21230, + "src": "4458:16:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4458:16:51" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21379, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 21377, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "4424:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 21378, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "4437:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "4415:33:51" + }, + "parameters": { + "id": 21376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21371, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4346:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4346:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21373, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4361:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21372, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4361:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21375, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4374:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4374:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4345:44:51" + }, + "returnParameters": { + "id": 21384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21383, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4493:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21382, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4493:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4492:6:51" + }, + "scope": 21394, + "src": "4324:245:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21395, + "src": "308:4264:51" + } + ], + "src": "52:4522:51" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "exportedSymbols": { + "SmartToken": [ + 21394 + ] + }, + "id": 21395, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 21174, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:51" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol", + "file": "./ERC20Token.sol", + "id": 21175, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 20618, + "src": "77:26:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol", + "file": "./interfaces/ISmartToken.sol", + "id": 21176, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 21518, + "src": "105:38:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 21177, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 22154, + "src": "145:30:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "file": "../utility/TokenHolder.sol", + "id": 21178, + "nodeType": "ImportDirective", + "scope": 21395, + "sourceUnit": 22911, + "src": "177:36:51", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21180, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21517, + "src": "331:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21517", + "typeString": "contract ISmartToken" + } + }, + "id": 21181, + "nodeType": "InheritanceSpecifier", + "src": "331:11:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21182, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22153, + "src": "344:5:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$22153", + "typeString": "contract Owned" + } + }, + "id": 21183, + "nodeType": "InheritanceSpecifier", + "src": "344:5:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21184, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "351:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + }, + "id": 21185, + "nodeType": "InheritanceSpecifier", + "src": "351:10:51" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 21186, + "name": "TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22910, + "src": "363:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHolder_$22910", + "typeString": "contract TokenHolder" + } + }, + "id": 21187, + "nodeType": "InheritanceSpecifier", + "src": "363:11:51" + } + ], + "contractDependencies": [ + 13349, + 20617, + 21462, + 21517, + 22153, + 22861, + 22910, + 22996, + 23182, + 23242 + ], + "contractKind": "contract", + "documentation": { + "id": 21179, + "nodeType": "StructuredDocumentation", + "src": "217:89:51", + "text": " @dev Smart Token\n 'Owned' is specified here for readability reasons" + }, + "fullyImplemented": true, + "id": 21394, + "linearizedBaseContracts": [ + 21394, + 22910, + 20617, + 22996, + 22153, + 22861, + 21517, + 21462, + 13349, + 23242, + 23182 + ], + "name": "SmartToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 21190, + "libraryName": { + "contractScope": null, + "id": 21188, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22689, + "src": "388:8:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22689", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "382:27:51", + "typeName": { + "id": 21189, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "401:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "functionSelector": "54fd4d50", + "id": 21193, + "mutability": "constant", + "name": "version", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21394, + "src": "417:34:51", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 21191, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "417:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "34", + "id": 21192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "450:1:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "bef97c87", + "id": 21196, + "mutability": "mutable", + "name": "transfersEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21394, + "src": "460:35:51", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21194, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "460:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 21195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "491:4:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": { + "id": 21197, + "nodeType": "StructuredDocumentation", + "src": "569:141:51", + "text": " @dev triggered when the total supply is increased\n @param _amount amount that gets added to the supply" + }, + "id": 21201, + "name": "Issuance", + "nodeType": "EventDefinition", + "parameters": { + "id": 21200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21199, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21201, + "src": "731:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21198, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "731:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "730:17:51" + }, + "src": "716:32:51" + }, + { + "anonymous": false, + "documentation": { + "id": 21202, + "nodeType": "StructuredDocumentation", + "src": "756:145:51", + "text": " @dev triggered when the total supply is decreased\n @param _amount amount that gets removed from the supply" + }, + "id": 21206, + "name": "Destruction", + "nodeType": "EventDefinition", + "parameters": { + "id": 21205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21204, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21206, + "src": "925:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "925:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "924:17:51" + }, + "src": "907:35:51" + }, + { + "body": { + "id": 21222, + "nodeType": "Block", + "src": "1333:8:51", + "statements": [] + }, + "documentation": { + "id": 21207, + "nodeType": "StructuredDocumentation", + "src": "950:233:51", + "text": " @dev initializes a new SmartToken instance\n @param _name token name\n @param _symbol token short symbol, minimum 1 character\n @param _decimals for display purposes only" + }, + "id": 21223, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 21216, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21209, + "src": "1298:5:51", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 21217, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21211, + "src": "1305:7:51", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 21218, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21213, + "src": "1314:9:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 21219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1325:1:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "id": 21220, + "modifierName": { + "argumentTypes": null, + "id": 21215, + "name": "ERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20617, + "src": "1287:10:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Token_$20617_$", + "typeString": "type(contract ERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1287:40:51" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21209, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1201:19:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21208, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1201:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21211, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1222:21:51", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 21210, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1222:6:51", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21213, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21223, + "src": "1245:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 21212, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1245:5:51", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1200:61:51" + }, + "returnParameters": { + "id": 21221, + "nodeType": "ParameterList", + "parameters": [], + "src": "1333:0:51" + }, + "scope": 21394, + "src": "1189:152:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 21229, + "nodeType": "Block", + "src": "1432:50:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 21225, + "name": "_transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21239, + "src": "1443:17:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 21226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1443:19:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21227, + "nodeType": "ExpressionStatement", + "src": "1443:19:51" + }, + { + "id": 21228, + "nodeType": "PlaceholderStatement", + "src": "1473:1:51" + } + ] + }, + "documentation": null, + "id": 21230, + "name": "transfersAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 21224, + "nodeType": "ParameterList", + "parameters": [], + "src": "1432:0:51" + }, + "src": "1406:76:51", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 21238, + "nodeType": "Block", + "src": "1580:70:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21234, + "name": "transfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21196, + "src": "1599:16:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e53464552535f44495341424c4544", + "id": 21235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1617:24:51", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_da0eea8408576dc7745752d8573d65c520f2ae4c7522ecd9096dbc953230a52a", + "typeString": "literal_string \"ERR_TRANSFERS_DISABLED\"" + }, + "value": "ERR_TRANSFERS_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_da0eea8408576dc7745752d8573d65c520f2ae4c7522ecd9096dbc953230a52a", + "typeString": "literal_string \"ERR_TRANSFERS_DISABLED\"" + } + ], + "id": 21233, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1591:7:51", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 21236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1591:51:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21237, + "nodeType": "ExpressionStatement", + "src": "1591:51:51" + } + ] + }, + "documentation": null, + "id": 21239, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfersAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 21231, + "nodeType": "ParameterList", + "parameters": [], + "src": "1563:2:51" + }, + "returnParameters": { + "id": 21232, + "nodeType": "ParameterList", + "parameters": [], + "src": "1580:0:51" + }, + "scope": 21394, + "src": "1537:113:51", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 21502 + ], + "body": { + "id": 21253, + "nodeType": "Block", + "src": "1918:47:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21248, + "name": "transfersEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21196, + "src": "1929:16:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 21250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1948:9:51", + "subExpression": { + "argumentTypes": null, + "id": 21249, + "name": "_disable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21242, + "src": "1949:8:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1929:28:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 21252, + "nodeType": "ExpressionStatement", + "src": "1929:28:51" + } + ] + }, + "documentation": { + "id": 21240, + "nodeType": "StructuredDocumentation", + "src": "1658:187:51", + "text": " @dev disables/enables transfers\n can only be called by the contract owner\n @param _disable true to disable transfers, false to enable them" + }, + "functionSelector": "1608f18f", + "id": 21254, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21246, + "modifierName": { + "argumentTypes": null, + "id": 21245, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "1908:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1908:9:51" + } + ], + "name": "disableTransfers", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21244, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1899:8:51" + }, + "parameters": { + "id": 21243, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21242, + "mutability": "mutable", + "name": "_disable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21254, + "src": "1877:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21241, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1877:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1876:15:51" + }, + "returnParameters": { + "id": 21247, + "nodeType": "ParameterList", + "parameters": [], + "src": "1918:0:51" + }, + "scope": 21394, + "src": "1851:114:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21509 + ], + "body": { + "id": 21302, + "nodeType": "Block", + "src": "2405:197:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21271, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2416:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21274, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2446:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21272, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "2430:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2430:15:51", + "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": 21275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2430:24:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2416:38:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21277, + "nodeType": "ExpressionStatement", + "src": "2416:38:51" + }, + { + "expression": { + "argumentTypes": null, + "id": 21287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21278, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2465:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21280, + "indexExpression": { + "argumentTypes": null, + "id": 21279, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2475:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2465:14:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21285, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2501:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21281, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2482:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21283, + "indexExpression": { + "argumentTypes": null, + "id": 21282, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2492:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2482:14:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22606, + "src": "2482:18:51", + "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": 21286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2482:27:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2465:44:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21288, + "nodeType": "ExpressionStatement", + "src": "2465:44:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21290, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2536:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21289, + "name": "Issuance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21201, + "src": "2527:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 21291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2527:17:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21292, + "nodeType": "EmitStatement", + "src": "2522:22:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2577:1:51", + "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": 21295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2569:7:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21294, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2569:7:51", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2569:10:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21298, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2581:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21299, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21259, + "src": "2586:7:51", + "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": 21293, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "2560:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2560:34:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21301, + "nodeType": "EmitStatement", + "src": "2555:39:51" + } + ] + }, + "documentation": { + "id": 21255, + "nodeType": "StructuredDocumentation", + "src": "1973:274:51", + "text": " @dev increases the token supply and sends the new tokens to the given account\n can only be called by the contract owner\n @param _to account to receive the new amount\n @param _amount amount to increase the supply by" + }, + "functionSelector": "867904b4", + "id": 21303, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21263, + "modifierName": { + "argumentTypes": null, + "id": 21262, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2341:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2341:9:51" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21265, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2373:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21266, + "modifierName": { + "argumentTypes": null, + "id": 21264, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22953, + "src": "2360:12:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2360:17:51" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 21268, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21257, + "src": "2395:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 21269, + "modifierName": { + "argumentTypes": null, + "id": 21267, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22979, + "src": "2387:7:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2387:12:51" + } + ], + "name": "issue", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21261, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2323:8:51" + }, + "parameters": { + "id": 21260, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21257, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21303, + "src": "2268:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21256, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21259, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21303, + "src": "2281:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21258, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2281:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2267:30:51" + }, + "returnParameters": { + "id": 21270, + "nodeType": "ParameterList", + "parameters": [], + "src": "2405:0:51" + }, + "scope": 21394, + "src": "2253:349:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 21516 + ], + "body": { + "id": 21345, + "nodeType": "Block", + "src": "2961:206:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 21323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21314, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2972:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21316, + "indexExpression": { + "argumentTypes": null, + "id": 21315, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "2982:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2972:16:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21321, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3012:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 21317, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20369, + "src": "2991:9:51", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 21319, + "indexExpression": { + "argumentTypes": null, + "id": 21318, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "3001:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2991:16:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "2991:20:51", + "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": 21322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2991:29:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2972:48:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21324, + "nodeType": "ExpressionStatement", + "src": "2972:48:51" + }, + { + "expression": { + "argumentTypes": null, + "id": 21330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 21325, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "3031:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21328, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3061:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21326, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20364, + "src": "3045:11:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22628, + "src": "3045:15:51", + "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": 21329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3045:24:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3031:38:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 21331, + "nodeType": "ExpressionStatement", + "src": "3031:38:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21333, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21306, + "src": "3096:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 21336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3111:1:51", + "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": 21335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3103:7:51", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 21334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3103:7:51", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 21337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3103:10:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 21338, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3115:7:51", + "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": 21332, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20385, + "src": "3087:8:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 21339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3087:36:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21340, + "nodeType": "EmitStatement", + "src": "3082:41:51" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21342, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21308, + "src": "3151:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 21341, + "name": "Destruction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21206, + "src": "3139:11:51", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 21343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3139:20:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 21344, + "nodeType": "EmitStatement", + "src": "3134:25:51" + } + ] + }, + "documentation": { + "id": 21304, + "nodeType": "StructuredDocumentation", + "src": "2610:270:51", + "text": " @dev removes tokens from the given account and decreases the token supply\n can only be called by the contract owner\n @param _from account to remove the amount from\n @param _amount amount to decrease the supply by" + }, + "functionSelector": "a24835d1", + "id": 21346, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21312, + "modifierName": { + "argumentTypes": null, + "id": 21311, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22089, + "src": "2951:9:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2951:9:51" + } + ], + "name": "destroy", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2942:8:51" + }, + "parameters": { + "id": 21309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21306, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21346, + "src": "2903:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2903:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21308, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21346, + "src": "2918:15:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2918:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2902:32:51" + }, + "returnParameters": { + "id": 21313, + "nodeType": "ParameterList", + "parameters": [], + "src": "2961:0:51" + }, + "scope": 21394, + "src": "2886:281:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20500, + 21441 + ], + "body": { + "id": 21367, + "nodeType": "Block", + "src": "3798:53:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21363, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21349, + "src": "3831:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21364, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21351, + "src": "3836:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21361, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "3816:5:51", + "typeDescriptions": { + "typeIdentifier": "t_super$_SmartToken_$21394", + "typeString": "contract super SmartToken" + } + }, + "id": 21362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 20500, + "src": "3816:14:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 21365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3816:27:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 21360, + "id": 21366, + "nodeType": "Return", + "src": "3809:34:51" + } + ] + }, + "documentation": { + "id": 21347, + "nodeType": "StructuredDocumentation", + "src": "3247:384:51", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n in addition to the standard checks, the function throws if transfers are disabled\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "a9059cbb", + "id": 21368, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21357, + "modifierName": { + "argumentTypes": null, + "id": 21356, + "name": "transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21230, + "src": "3752:16:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3752:16:51" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21355, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 21353, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "3718:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 21354, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "3731:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "3709:33:51" + }, + "parameters": { + "id": 21352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21349, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3655:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21348, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3655:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21351, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3668:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21350, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3668:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3654:29:51" + }, + "returnParameters": { + "id": 21360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21359, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21368, + "src": "3787:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21358, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3787:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3786:6:51" + }, + "scope": 21394, + "src": "3637:214:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 20567, + 21452 + ], + "body": { + "id": 21392, + "nodeType": "Block", + "src": "4505:64:51", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 21387, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21371, + "src": "4542:5:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21388, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21373, + "src": "4549:3:51", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 21389, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21375, + "src": "4554:6:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 21385, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "4523:5:51", + "typeDescriptions": { + "typeIdentifier": "t_super$_SmartToken_$21394", + "typeString": "contract super SmartToken" + } + }, + "id": 21386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 20567, + "src": "4523:18:51", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 21390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4523:38:51", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 21384, + "id": 21391, + "nodeType": "Return", + "src": "4516:45:51" + } + ] + }, + "documentation": { + "id": 21369, + "nodeType": "StructuredDocumentation", + "src": "3859:459:51", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n in addition to the standard checks, the function throws if transfers are disabled\n @param _from source address\n @param _to target address\n @param _value transfer amount\n @return true if the transfer was successful, false if it wasn't" + }, + "functionSelector": "23b872dd", + "id": 21393, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 21381, + "modifierName": { + "argumentTypes": null, + "id": 21380, + "name": "transfersAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21230, + "src": "4458:16:51", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4458:16:51" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 21379, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "contractScope": null, + "id": 21377, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21462, + "src": "4424:11:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21462", + "typeString": "contract IERC20Token" + } + }, + { + "contractScope": null, + "id": 21378, + "name": "ERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20617, + "src": "4437:10:51", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Token_$20617", + "typeString": "contract ERC20Token" + } + } + ], + "src": "4415:33:51" + }, + "parameters": { + "id": 21376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21371, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4346:13:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4346:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21373, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4361:11:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21372, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4361:7:51", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21375, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4374:14:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4374:7:51", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4345:44:51" + }, + "returnParameters": { + "id": 21384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 21383, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 21393, + "src": "4493:4:51", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 21382, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4493:4:51", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4492:6:51" + }, + "scope": 21394, + "src": "4324:245:51", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 21395, + "src": "308:4264:51" + } + ], + "src": "52:4522:51" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:44.730Z", + "networkType": "ethereum", + "devdoc": { + "details": "Smart Token 'Owned' is specified here for readability reasons", + "events": { + "Destruction(uint256)": { + "details": "triggered when the total supply is decreased", + "params": { + "_amount": "amount that gets removed from the supply" + } + }, + "Issuance(uint256)": { + "details": "triggered when the total supply is increased", + "params": { + "_amount": "amount that gets added to the supply" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "approve(address,uint256)": { + "details": "allows another account/contract to transfers tokens on behalf of the caller throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value", + "params": { + "_spender": "approved address", + "_value": "allowance amount" + }, + "returns": { + "_0": "true if the approval was successful, false if it wasn't" + } + }, + "constructor": { + "details": "initializes a new SmartToken instance", + "params": { + "_decimals": "for display purposes only", + "_name": "token name", + "_symbol": "token short symbol, minimum 1 character" + } + }, + "destroy(address,uint256)": { + "details": "removes tokens from the given account and decreases the token supply can only be called by the contract owner", + "params": { + "_amount": "amount to decrease the supply by", + "_from": "account to remove the amount from" + } + }, + "disableTransfers(bool)": { + "details": "disables/enables transfers can only be called by the contract owner", + "params": { + "_disable": "true to disable transfers, false to enable them" + } + }, + "issue(address,uint256)": { + "details": "increases the token supply and sends the new tokens to the given account can only be called by the contract owner", + "params": { + "_amount": "amount to increase the supply by", + "_to": "account to receive the new amount" + } + }, + "transfer(address,uint256)": { + "details": "send coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled", + "params": { + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "transferFrom(address,address,uint256)": { + "details": "an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled", + "params": { + "_from": "source address", + "_to": "target address", + "_value": "transfer amount" + }, + "returns": { + "_0": "true if the transfer was successful, false if it wasn't" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestBancorFormula.json b/apps/cic-eth/tests/testdata/bancor/TestBancorFormula.json new file mode 100644 index 00000000..88111494 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestBancorFormula.json @@ -0,0 +1,5257 @@ +{ + "contractName": "TestBancorFormula", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_primaryReserveStakedBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_primaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_secondaryReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveRateDenominator", + "type": "uint256" + } + ], + "name": "balancedWeights", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateCrossConnectorReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateCrossReserveReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateFundCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateLiquidateReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculatePurchaseReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "calculateSaleReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "crossReserveRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sourceReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_sourceReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_targetReserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_targetReserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "crossReserveTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fundSupplyAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidateRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidateReserveAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "purchaseRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "purchaseTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "saleRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveBalance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_reserveWeight", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "saleTargetAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_baseN", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_baseD", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_expN", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_expD", + "type": "uint32" + } + ], + "name": "powerTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "x", + "type": "uint256" + } + ], + "name": "generalLogTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_n", + "type": "uint256" + } + ], + "name": "floorLog2Test", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + } + ], + "name": "findPositionInMaxExpArrayTest", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_precision", + "type": "uint8" + } + ], + "name": "generalExpTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "x", + "type": "uint256" + } + ], + "name": "optimalLogTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "x", + "type": "uint256" + } + ], + "name": "optimalExpTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_b", + "type": "uint256" + } + ], + "name": "normalizedWeightsTest", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_b", + "type": "uint256" + } + ], + "name": "accurateWeightsTest", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_d", + "type": "uint256" + } + ], + "name": "roundDivTest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_b\",\"type\":\"uint256\"}],\"name\":\"accurateWeightsTest\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_primaryReserveStakedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_primaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_secondaryReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveRateDenominator\",\"type\":\"uint256\"}],\"name\":\"balancedWeights\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateCrossConnectorReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateCrossReserveReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateFundCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateLiquidateReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculatePurchaseReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateSaleReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"crossReserveRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sourceReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_sourceReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_targetReserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_targetReserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"crossReserveTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"}],\"name\":\"findPositionInMaxExpArrayTest\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_n\",\"type\":\"uint256\"}],\"name\":\"floorLog2Test\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fundSupplyAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_precision\",\"type\":\"uint8\"}],\"name\":\"generalExpTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"generalLogTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidateRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveRatio\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidateReserveAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_b\",\"type\":\"uint256\"}],\"name\":\"normalizedWeightsTest\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"optimalExpTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"optimalLogTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_baseN\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseD\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_expN\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_expD\",\"type\":\"uint32\"}],\"name\":\"powerTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"purchaseRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"purchaseTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_d\",\"type\":\"uint256\"}],\"name\":\"roundDivTest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"saleRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_reserveWeight\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"saleTargetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balancedWeights(uint256,uint256,uint256,uint256,uint256)\":{\"details\":\"The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price. We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance. In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance. Formula input: - let t denote the primary reserve token staked balance - let s denote the primary reserve token balance - let r denote the secondary reserve token balance - let q denote the numerator of the rate between the tokens - let p denote the denominator of the rate between the tokens Where p primary tokens are equal to q secondary tokens Formula output: - compute x = W(t / r * q / p * log(s / t)) / log(s / t) - return x / (1 + x) as the weight of the primary reserve token - return 1 / (1 + x) as the weight of the secondary reserve token Where W is the Lambert W Function If the rate-provider provides the rates for a common unit, for example: - P = 2 ==> 2 primary reserve tokens = 1 ether - Q = 3 ==> 3 secondary reserve tokens = 1 ether Then you can simply use p = P and q = Q If the rate-provider provides the rates for a single unit, for example: - P = 2 ==> 1 primary reserve token = 2 ethers - Q = 3 ==> 1 secondary reserve token = 3 ethers Then you can simply use p = Q and q = P\",\"params\":{\"_primaryReserveBalance\":\"the primary reserve token balance\",\"_primaryReserveStakedBalance\":\"the primary reserve token staked balance\",\"_reserveRateDenominator\":\"the denominator of the rate between the tokens Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token\",\"_reserveRateNumerator\":\"the numerator of the rate between the tokens\",\"_secondaryReserveBalance\":\"the secondary reserve token balance\"},\"returns\":{\"_0\":\"the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)\"}},\"calculateCrossConnectorReturn(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateCrossReserveReturn(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateFundCost(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateLiquidateReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculatePurchaseReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"calculateSaleReturn(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"crossReserveRate(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"crossReserveTargetAmount(uint256,uint32,uint256,uint32,uint256)\":{\"details\":\"given two reserve balances/weights and a sell amount (in the first reserve token), calculates the target amount for a conversion from the source reserve token to the target reserve token Formula: return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))\",\"params\":{\"_amount\":\"source reserve amount\",\"_sourceReserveBalance\":\"source reserve balance\",\"_sourceReserveWeight\":\"source reserve weight, represented in ppm (1-1000000)\",\"_targetReserveBalance\":\"target reserve balance\",\"_targetReserveWeight\":\"target reserve weight, represented in ppm (1-1000000)\"},\"returns\":{\"_0\":\"target reserve amount\"}},\"fundCost(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens, calculates the amount of reserve tokens required for purchasing the given amount of smart tokens Formula: return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)\",\"params\":{\"_amount\":\"requested amount of smart tokens\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}},\"fundSupplyAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with, calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens Formula: return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)\",\"params\":{\"_amount\":\"amount of reserve tokens to fund with\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"smart token amount\"}},\"init()\":{\"details\":\"should be executed after construction (too large for the constructor)\"},\"liquidateRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"liquidateReserveAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate, calculates the amount of reserve tokens received for selling the given amount of smart tokens Formula: return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))\",\"params\":{\"_amount\":\"amount of smart tokens to liquidate\",\"_reserveBalance\":\"reserve balance\",\"_reserveRatio\":\"reserve ratio, represented in ppm (2-2000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}},\"purchaseRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"purchaseTargetAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a token supply, reserve balance, weight and a deposit amount (in the reserve token), calculates the target amount for a given conversion (in the main token) Formula: return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)\",\"params\":{\"_amount\":\"amount of reserve tokens to get the target amount for\",\"_reserveBalance\":\"reserve balance\",\"_reserveWeight\":\"reserve weight, represented in ppm (1-1000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"smart token amount\"}},\"saleRate(uint256,uint256,uint32,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"saleTargetAmount(uint256,uint256,uint32,uint256)\":{\"details\":\"given a token supply, reserve balance, weight and a sell amount (in the main token), calculates the target amount for a given conversion (in the reserve token) Formula: return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))\",\"params\":{\"_amount\":\"amount of smart tokens to get the target amount for\",\"_reserveBalance\":\"reserve balance\",\"_reserveWeight\":\"reserve weight, represented in ppm (1-1000000)\",\"_supply\":\"smart token supply\"},\"returns\":{\"_0\":\"reserve token amount\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorFormula.sol\":\"TestBancorFormula\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol\":{\"keccak256\":\"0x24ae54f35c6099ecb1cb077e96ba2a956d4ca344ed65473e04cf8bf52d65b81e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://59f6e37cc90b585f381faebb13ff42fd18025b3f650bfa59f1c46bc226515d9a\",\"dweb:/ipfs/QmVCFUq8gqtvB1AyjRwuN331e6vR3WZeE75mBdC7p5dZgZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorFormula.sol\":{\"keccak256\":\"0xc9d0fbd79b6a6aea70a8dfd4da36cf36ee0b31376e4858bb52b84e79d82ec8cc\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5c09f8b497aa3c85aeb602a01f9da3a6e996aa1c0a7e4ed690cb638212b69f37\",\"dweb:/ipfs/QmTYg7G676Eu44vLNGcLgVc4C82miRVfwNrmPb2cB8R5LV\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50613eb5806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638074590a116100f9578063acdee8cb11610097578063e488312111610071578063e488312114610595578063ebbb2158146105b8578063f3250fe2146105ed578063f732f1c914610358576101c4565b8063acdee8cb14610551578063ce782e081461056e578063e1c7392a1461058b576101c4565b80639d114108116100d35780639d1141081461038d578063a11aa1b4146104e9578063a25a34b11461051e578063abfd231d1461027a576101c4565b80638074590a146104255780638c5ce82a1461045a57806394491fab146104ac576101c4565b806348d73fed1161016657806365098bb31161014057806365098bb31461038d5780636cab5055146103ca57806376cf0b56146103f057806379c1b4501461038d576101c4565b806348d73fed146102105780634982d52d1461033b57806349f9b0f714610358576101c4565b806335b49af4116101a257806335b49af41461027a5780633e75c6ca146102af5780633e8a38ab146102fb57806347d0b68614610318576101c4565b80631da6bbfb146101c957806329a00e7c146102105780632f55bdb514610245575b600080fd5b6101fe600480360360808110156101df57600080fd5b5080359060208101359063ffffffff6040820135169060600135610622565b60408051918252519081900360200190f35b6101fe6004803603608081101561022657600080fd5b5080359060208101359063ffffffff604082013516906060013561063b565b6101fe6004803603608081101561025b57600080fd5b5080359060208101359063ffffffff6040820135169060600135610649565b6101fe6004803603608081101561029057600080fd5b5080359060208101359063ffffffff60408201351690606001356107c1565b6102d2600480360360408110156102c557600080fd5b50803590602001356107cf565b604051808363ffffffff1681526020018263ffffffff1681526020019250505060405180910390f35b6101fe6004803603602081101561031157600080fd5b50356107e8565b6101fe6004803603604081101561032e57600080fd5b50803590602001356107fb565b6101fe6004803603602081101561035157600080fd5b5035610810565b6101fe6004803603608081101561036e57600080fd5b5080359060208101359063ffffffff604082013516906060013561081b565b6101fe600480360360a08110156103a357600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610829565b6101fe600480360360408110156103e057600080fd5b508035906020013560ff16610844565b6101fe6004803603608081101561040657600080fd5b5080359060208101359063ffffffff6040820135169060600135610850565b6101fe6004803603608081101561043b57600080fd5b5080359060208101359063ffffffff6040820135169060600135610a16565b6104916004803603608081101561047057600080fd5b5080359060208101359063ffffffff60408201358116916060013516610b92565b6040805192835260ff90911660208301528051918290030190f35b6101fe600480360360a08110156104c257600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610baf565b6102d2600480360360a08110156104ff57600080fd5b5080359060208101359060408101359060608101359060800135610d1b565b61053b6004803603602081101561053457600080fd5b5035610ea3565b6040805160ff9092168252519081900360200190f35b6101fe6004803603602081101561056757600080fd5b5035610eae565b61053b6004803603602081101561058457600080fd5b5035610eb9565b610593610ec4565b005b6102d2600480360360408110156105ab57600080fd5b5080359060200135610ed6565b6101fe600480360360808110156105ce57600080fd5b5080359060208101359063ffffffff6040820135169060600135610ee3565b6101fe6004803603608081101561060357600080fd5b5080359060208101359063ffffffff6040820135169060600135611068565b600061063085858585610ee3565b90505b949350505050565b600061063085858585611068565b6000808511610694576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116106d7576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff161180156106f65750621e848063ffffffff841611155b610743576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b8161075057506000610633565b63ffffffff8316620f4240141561077b578361076c838761119a565b8161077357fe5b049050610633565b6000808061078987866111f8565b905061079a818888620f4240611241565b9093509150600060ff83166107af8a8661119a565b901c9890980398975050505050505050565b600061063085858585610a16565b6000806107dc848461130a565b915091505b9250929050565b60006107f382611340565b90505b919050565b60006108078383611722565b90505b92915050565b60006107f38261174e565b600061063085858585610850565b60006108388686868686610baf565b90505b95945050505050565b600061080783836117f9565b600080851161089b576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116108de576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008363ffffffff161180156108fd5750620f424063ffffffff841611155b61094b576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b84821115610995576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b816109a257506000610633565b848214156109b1575082610633565b63ffffffff8316620f424014156109cd578461076c858461119a565b6000808387036109e28882620f424089611241565b909350915060006109f3888561119a565b905060ff831688901b8481830381610a0757fe5b049a9950505050505050505050565b6000808511610a61576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610aa4576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610ac35750621e848063ffffffff841611155b610b10576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b84821115610b5a576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b81610b6757506000610633565b84821415610b76575082610633565b63ffffffff8316620f424014156109cd578461076c838661119a565b600080610ba186868686611241565b915091505b94509492505050565b60008086118015610bc05750600084115b610bff576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008563ffffffff16118015610c1e5750620f424063ffffffff861611155b8015610c30575060008363ffffffff16115b8015610c455750620f424063ffffffff841611155b610c93576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8263ffffffff168563ffffffff161415610cca57610cb186836111f8565b610cbb858461119a565b81610cc257fe5b04905061083b565b60008080610cd889866111f8565b9050610ce6818a8a89611241565b90935091506000610cf7888561119a565b905060ff831688901b8481830381610d0b57fe5b049b9a5050505050505050505050565b60008085871415610d79576000871180610d355750600085115b610d74576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b610dd4565b600087118015610d895750600086115b8015610d955750600085115b610dd4576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b600084118015610de45750600083115b610e35576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f524553455256455f524154450000000000000000604482015290519081900360640190fd5b6000610e41888661119a565b90506000610e4f878661119a565b905087891015610e7257610e67888a84846001611b93565b935093505050610e99565b87891115610e8857610e67898984846000611b93565b610e92828261130a565b9350935050505b9550959350505050565b60006107f382611c5c565b60006107f382611cec565b60006107f382612090565b610ecc6120f1565b610ed46128c7565b565b6000806107dc84846132ce565b6000808511610f2e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610f71576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610f905750621e848063ffffffff841611155b610fdd576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b81610fea57506000610633565b63ffffffff8316620f4240141561101b57846001611008848761119a565b038161101057fe5b046001019050610633565b6000808061102988866111f8565b905061103a8189620f424089611241565b9093509150600060ff831660016110518a8761119a565b03901c889003600101945050505050949350505050565b60008085116110b3576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116110f6576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008363ffffffff161180156111155750620f424063ffffffff841611155b611163576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8161117057506000610633565b63ffffffff8316620f4240141561118c578361076c868461119a565b6000808061078985886111f8565b6000826111a95750600061080a565b828202828482816111b657fe5b0414610807576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600082820183811015610807576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080600160811b861061125457600080fd5b600080866001607f1b89028161126657fe5b04905070015bf0a8b1457695355fb8ac404e7a79e38110156112925761128b81611340565b915061129e565b61129b8161174e565b91505b60008563ffffffff168763ffffffff168402816112b757fe5b049050600160831b8110156112dd576112cf81611cec565b607f94509450505050610ba6565b60006112e882611c5c565b90506112fd81607f0360ff1683901c826117f9565b95509350610ba692505050565b6000808284116113275761131e84846132ce565b915091506107e1565b60008061133485876132ce565b97909650945050505050565b6000808080806fd3094c70f034de4b96ff7d5b6f99fcd88610611389576001607e1b840193506fd3094c70f034de4b96ff7d5b6f99fcd86001607f1b87028161138557fe5b0495505b6fa45af1e1f40c333b3de1db4dd55f29a786106113cc576001607d1b840193506fa45af1e1f40c333b3de1db4dd55f29a76001607f1b8702816113c857fe5b0495505b6f910b022db7ae67ce76b441c27035c6a1861061140f576001607c1b840193506f910b022db7ae67ce76b441c27035c6a16001607f1b87028161140b57fe5b0495505b6f88415abbe9a76bead8d00cf112e4d4a88610611452576001607b1b840193506f88415abbe9a76bead8d00cf112e4d4a86001607f1b87028161144e57fe5b0495505b6f84102b00893f64c705e841d5d4064bd38610611495576001607a1b840193506f84102b00893f64c705e841d5d4064bd36001607f1b87028161149157fe5b0495505b6f8204055aaef1c8bd5c3259f4822735a286106114d857600160791b840193506f8204055aaef1c8bd5c3259f4822735a26001607f1b8702816114d457fe5b0495505b6f810100ab00222d861931c15e39b44e99861061151b57600160781b840193506f810100ab00222d861931c15e39b44e996001607f1b87028161151757fe5b0495505b6f808040155aabbbe9451521693554f733861061155e57600160771b840193506f808040155aabbbe9451521693554f7336001607f1b87028161155a57fe5b0495505b6f7fffffffffffffffffffffffffffffff19860192508291506001607f1b828002049050600160801b838103830204840193506001607f1b818302816115a057fe5b049150600160811b836faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa038302816115c457fe5b04840193506001607f1b818302816115d857fe5b049150600360801b836f99999999999999999999999999999999038302816115fc57fe5b04840193506001607f1b8183028161161057fe5b049150600160821b836f924924924924924924924924924924920383028161163457fe5b04840193506001607f1b8183028161164857fe5b049150600560801b836f8e38e38e38e38e38e38e38e38e38e38e0383028161166c57fe5b04840193506001607f1b8183028161168057fe5b049150600360811b836f8ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b038302816116a457fe5b04840193506001607f1b818302816116b857fe5b049150600760801b836f89d89d89d89d89d89d89d89d89d89d89038302816116dc57fe5b04840193506001607f1b818302816116f057fe5b049150600160831b836f888888888888888888888888888888880383028161171457fe5b049390930195945050505050565b600060028204820382848161173357fe5b068161173b57fe5b0482848161174557fe5b04019392505050565b600080600160801b831061177f57600061176e6001607f1b855b04612090565b60ff1693841c936001607f1b029150505b6001607f1b8311156117cd57607f5b60ff8116156117cb576001607f1b848002049350600160801b84106117c257600193841c9360ff6000198301161b91909101905b6000190161178e565b505b6f05b9de1d10bf4103d647b0955897ba806f03f80fe03f80fe03f80fe03f80fe03f88202049392505050565b60008083905060008360ff16858302901c9150816f03442c4e6074a82f1797f72ac000000002810190508360ff16858302901c9150816f0116b96f757c380fb287fd0e4000000002810190508360ff16858302901c9150816e45ae5bdd5f0e03eca1ff439000000002810190508360ff16858302901c9150816e0defabf91302cd95b9ffda5000000002810190508360ff16858302901c9150816e02529ca9832b22439efff9b800000002810190508360ff16858302901c9150816d54f1cf12bd04e516b6da8800000002810190508360ff16858302901c9150816d0a9e39e257a09ca2d6db5100000002810190508360ff16858302901c9150816d012e066e7b839fa050c30900000002810190508360ff16858302901c9150816c1e33d7d926c329a1ad1a80000002810190508360ff16858302901c9150816c02bee513bdb4a6b19b5f80000002810190508360ff16858302901c9150816b3a9316fa79b88eccf2a0000002810190508360ff16858302901c9150816b048177ebe1fa81237520000002810190508360ff16858302901c9150816a5263fe90242dcbacf0000002810190508360ff16858302901c9150816a057e22099c030d9410000002810190508360ff16858302901c9150816957e22099c030d941000002810190508360ff16858302901c91508169052b6b5456997631000002810190508360ff16858302901c915081684985f67696bf74800002810190508360ff16858302901c9150816803dea12ea99e49800002810190508360ff16858302901c9150816731880f2214b6e00002810190508360ff16858302901c91508167025bcff56eb3600002810190508360ff16858302901c915081661b722e10ab100002810190508360ff16858302901c9150816601317c7007700002810190508360ff16858302901c915081650cba84aafa0002810190508360ff16858302901c9150816482573a0a0002810190508360ff16858302901c9150816405035ad90002810190508360ff16858302901c915081632f881b0002810190508360ff16858302901c9150816301b2934002810190508360ff16858302901c915081620efc4002810190508360ff16858302901c915081617fe002810190508360ff16858302901c91508161042002810190508360ff16858302901c915081602102810190508360ff16858302901c915081600102810190508360ff166001901b856f0688589cc0e9505e2f2fee55800000008381611b8757fe5b04010195945050505050565b600080611ba08585613360565b9095509350600086611bb6896001607f1b61119a565b81611bbd57fe5b049050600070015bf0a8b1457695355fb8ac404e7a79e38210611be857611be38261174e565b611bf1565b611bf182611340565b9050600086611c00838a61119a565b81611c0757fe5b049050600086611c1f57611c1a82613413565b611c28565b611c2882613450565b9050611c4a611c37828b61119a565b611c458a6001607f1b61119a565b61130a565b95509550505050509550959350505050565b60006020607f5b8060ff168260010160ff161015611cab576000600260ff848401160490508460008260ff1660808110611c9257fe5b015410611ca157809250611ca5565b8091505b50611c63565b8360008260ff1660808110611cbc57fe5b015410611ccc5791506107f69050565b8360008360ff1660808110611cdd57fe5b0154106101c4575090506107f6565b6000670168244fdac780006001607f1b6f0fffffffffffffffffffffffffffffff84168080028290048082028390048083028490049485026710e1b3be415a00009092026705a0913f6b1e000091909102010192909181830204905080664807432bc1800002830192506001607f1b82820281611d6557fe5b04905080660c0135dca0400002830192506001607f1b82820281611d8557fe5b049050806601b707b1cdc00002830192506001607f1b82820281611da557fe5b049050806536e0f639b80002830192506001607f1b82820281611dc457fe5b04905080650618fee9f80002830192506001607f1b82820281611de357fe5b04905080649c197dcc0002830192506001607f1b82820281611e0157fe5b04905080640e30dce40002830192506001607f1b82820281611e1f57fe5b0490508064012ebd130002830192506001607f1b82820281611e3d57fe5b049050806317499f0002830192506001607f1b82820281611e5a57fe5b049050806301a9d48002830192506001607f1b82820281611e7757fe5b04905080621c638002830192506001607f1b82820281611e9357fe5b049050806201c63802830192506001607f1b82820281611eaf57fe5b04905080611ab802830192506001607f1b82820281611eca57fe5b0490508061017c02830192506001607f1b82820281611ee557fe5b04905080601402830192506001607f1b82820281611eff57fe5b6721c3677c82b400009190049384010482016001607f1b019290506001607c1b851615611f505770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f984020492505b6001607d1b851615611f86577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77884020492505b6001607e1b851615611fbb576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed584020492505b6001607f1b851615611fef576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e84020492505b600160801b851615612023576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c584020492505b600160811b851615612056576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d784020492505b600160821b851615612087576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30784020492505b50909392505050565b6000806101008310156120b8575b60018311156120b357600192831c920161209e565b6107f3565b60805b60ff8116156120ea57600160ff82161b84106120df5760ff81169390931c92908117905b60011c607f166120bb565b5092915050565b701c35fedd14ffffffffffffffffffffffff602055701b0ce43b323fffffffffffffffffffffff6021557019f0028ec1ffffffffffffffffffffffff6022557018ded91f0e7fffffffffffffffffffffff6023557017d8ec7f0417ffffffffffffffffffffff6024557016ddc6556cdbffffffffffffffffffffff6025557015ecf52776a1ffffffffffffffffffffff6026557015060c256cb2ffffffffffffffffffffff602755701428a2f98d72ffffffffffffffffffffff6028557013545598e5c23fffffffffffffffffffff602955701288c4161ce1dfffffffffffffffffffff602a557011c592761c666fffffffffffffffffffff602b5570110a688680a757ffffffffffffffffffff602c55701056f1b5bedf77ffffffffffffffffffff602d55700faadceceeff8bffffffffffffffffffff602e55700f05dc6b27edadffffffffffffffffffff602f55700e67a5a25da4107fffffffffffffffffff603055700dcff115b14eedffffffffffffffffffff603155700d3e7a392431239fffffffffffffffffff603255700cb2ff529eb71e4fffffffffffffffffff603355700c2d415c3db974afffffffffffffffffff603455700bad03e7d883f69bffffffffffffffffff603555700b320d03b2c343d5ffffffffffffffffff603655700abc25204e02828dffffffffffffffffff603755700a4b16f74ee4bb207fffffffffffffffff6038557009deaf736ac1f569ffffffffffffffffff603955700976bd9952c7aa957fffffffffffffffff603a557009131271922eaa606fffffffffffffffff603b557008b380f3558668c46fffffffffffffffff603c55700857ddf0117efa215bffffffffffffffff603d557007ffffffffffffffffffffffffffffffff603e557007abbf6f6abb9d087fffffffffffffffff603f5570075af62cbac95f7dfa7fffffffffffffff60405570070d7fb7452e187ac13fffffffffffffff6041557006c3390ecc8af379295fffffffffffffff60425570067c00a3b07ffc01fd6fffffffffffffff604355700637b647c39cbb9d3d27ffffffffffffff6044557005f63b1fc104dbd39587ffffffffffffff6045557005b771955b36e12f7235ffffffffffffff60465570057b3d49dda84556d6f6ffffffffffffff60475570054183095b2c8ececf30ffffffffffffff60485570050a28be635ca2b888f77fffffffffffff6049557004d5156639708c9db33c3fffffffffffff604a557004a23105873875bd52dfdfffffffffffff604b55700471649d87199aa990756fffffffffffff604c557004429a21a029d4c1457cfbffffffffffff604d55700415bc6d6fb7dd71af2cb3ffffffffffff604e557003eab73b3bbfe282243ce1ffffffffffff604f557003c1771ac9fb6b4c18e229ffffffffffff605055700399e96897690418f785257fffffffffff605155700373fc456c53bb779bf0ea9fffffffffff60525570034f9e8e490c48e67e6ab8bfffffffffff60535570032cbfd4a7adc790560b3337ffffffffff60545570030b50570f6e5d2acca94613ffffffffff6055557002eb40f9f620fda6b56c2861ffffffffff6056557002cc8340ecb0d0f520a6af58ffffffffff6057557002af09481380a0a35cf1ba02ffffffffff605855700292c5bdd3b92ec810287b1b3fffffffff605955700277abdcdab07d5a77ac6d6b9fffffffff605a5570025daf6654b1eaa55fd64df5efffffffff605b55700244c49c648baa98192dce88b7ffffffff605c5570022ce03cd5619a311b2471268bffffffff605d55700215f77c045fbe885654a44a0fffffffff605e557001ffffffffffffffffffffffffffffffff605f557001eaefdbdaaee7421fc4d3ede5ffffffff6060557001d6bd8b2eb257df7e8ca57b09bfffffff6061557001c35fedd14b861eb0443f7f133fffffff6062557001b0ce43b322bcde4a56e8ada5afffffff60635570019f0028ec1fff007f5a195a39dfffffff60645570018ded91f0e72ee74f49b15ba527ffffff60655570017d8ec7f04136f4e5615fd41a63ffffff60665570016ddc6556cdb84bdc8d12d22e6fffffff60675570015ecf52776a1155b5bd8395814f7fffff60685570015060c256cb23b3b3cc3754cf40ffffff6069557001428a2f98d728ae223ddab715be3fffff606a5570013545598e5c23276ccf0ede68034fffff606b557001288c4161ce1d6f54b7f61081194fffff606c5570011c592761c666aa641d5a01a40f17ffff606d55700110a688680a7530515f3e6e6cfdcdffff606e557001056f1b5bedf75c6bcb2ce8aed428ffff606f556ffaadceceeff8a0890f3875f008277fff6070556ff05dc6b27edad306388a600f6ba0bfff6071556fe67a5a25da41063de1495d5b18cdbfff6072556fdcff115b14eedde6fc3aa5353f2e4fff6073556fd3e7a3924312399f9aae2e0f868f8fff6074556fcb2ff529eb71e41582cccd5a1ee26fff6075556fc2d415c3db974ab32a51840c0b67edff6076556fbad03e7d883f69ad5b0a186184e06bff6077556fb320d03b2c343d4829abd6075f0cc5ff6078556fabc25204e02828d73c6e80bcdb1a95bf6079556fa4b16f74ee4bb2040a1ec6c15fbbf2df607a556f9deaf736ac1f569deb1b5ae3f36c130f607b556f976bd9952c7aa957f5937d790ef65037607c556f9131271922eaa6064b73a22d0bd4f2bf607d556f8b380f3558668c46c91c49a2f8e967b9607e556f857ddf0117efa215952912839f6473e66000607f5b0155565b6f60e393c68d20b1bd09deaabc0373b9c560809081556f5f8f46e4854120989ed94719fb4c20116081556f5e479ebb9129fb1b7e72a648f992b6066082556f5d0bd23fe42dfedde2e9586be12b85fe6083556f5bdb29ddee979308ddfca81aeeb8095a6084556f5ab4fd8a260d2c7e2c0d2afcf0009dad6085556f5998b31359a55d48724c65cf090012216086556f5885bcad2b322dfc43e8860f9c018cf56087556f577b97aa1fe222bb452fdf111b1f0be26088556f5679cb5e3575632e5baa27e2b949f7046089556f557fe8241b3a31c83c732f1cdff4a1c5608a556f548d868026504875d6e59bbe95fc2a6b608b556f53a2465ce347cf34d05a867c17dd3088608c556f52bdce5dcd4faed59c7f5511cf8f8acc608d556f51dfcb453c07f8da817606e7885f7c3e608e556f5107ef6b0a5a2be8f8ff15590daa3cce608f556f5035f241d6eae0cd7bacba119993de7b6090556f4f698fe90d5b53d532171e1210164c666091556f4ea288ca297a0e6a09a0eee240e16c856092556f4de0a13fdcf5d4213fc398ba6e3becde6093556f4d23a145eef91fec06b06140804c48086094556f4c6b5430d4c1ee5526473db4ae0f11de6095556f4bb7886c240562eba11f4963a53b42406096556f4b080f3f1cb491d2d521e0ea4583521e6097556f4a5cbc96a05589cb4d86be1db31683646098556f49b566d40243517658d78c33162d6ece6099556f4911e6a02e5507a30f947383fd9a3276609a556f487216c2b31be4adc41db8a8d5cc0c88609b556f47d5d3fc4a7a1b188cd3d788b5c5e9fc609c556f473cfce4871a2c40bc4f9e1c32b955d0609d556f46a771ca578ab878485810e285e31c67609e556f4615149718aed4c258c373dc676aa72d609f556f4585c8b3f8fe489c6e1833ca4787138460a0556f44f972f174e41e5efb7e9d63c29ce73560a1556f446ff970ba86d8b00beb05ecebf3c4dc60a2556f43e9438ec88971812d6f198b5ccaad9660a3556f436539d11ff7bea657aeddb394e809ef60a4556f42e3c5d3e5a913401d86f66db5d81c2c60a5556f4264d2395303070ea726cbe98df6217460a6556f41e84a9a593bb7194c3a6349ecae4eea60a7556f416e1b785d13eba07a08f3f18876a5ab60a8556f40f6322ff389d423ba9dd7e7e7b7e80960a9556f40807cec8a466880ecf4184545d240a460aa556f400cea9ce88a8d3ae668e8ea0d9bf07f60ab556f3f9b6ae8772d4c55091e0ed7dfea0ac160ac556f3f2bee253fd84594f54bcaafac383a1360ad556f3ebe654e95208bb9210c575c081c595860ae556f3e52c1fc5665635b78ce1f05ad53c08660af556f3de8f65ac388101ddf718a6f5c1eff6560b0556f3d80f522d59bd0b328ca012df4cd2d4960b1556f3d1ab193129ea72b23648a161163a85a60b2556f3cb61f68d32576c135b95cfb53f76d7560b3556f3c5332d9f1aae851a3619e77e4cc847360b4556f3bf1e08edbe2aa109e1525f65759ef7360b5556f3b921d9cff13fa2c197746a3dfc4918f60b6556f3b33df818910bfc1a5aefb8f63ae2ac460b7556f3ad71c1c77e34fa32a9f184967eccbf660b8556f3a7bc9abf2c5bb53e2f7384a8a16521a60b9556f3a21dec7e76369783a68a0c6385a1c5760ba556f39c9525de6c9cdf7c1c157ca4a7a6ee360bb556f39721bad3dc85d1240ff0190e0adaac360bc556f391c324344d3248f0469eb28dd3d77e060bd556f38c78df7e3c796279fb4ff84394ab3da60be556f387426ea4638ae9aae08049d3554c20a60bf556f3821f57dbd2763256c1a99bbd205137860c0556f37d0f256cb46a8c92ff62fbbef28969860c1556f37811658591ffc7abdd1feaf3cef9b7360c2556f37325aa10e9e82f7df0f380f7997154b60c3556f36e4b888cfb408d873b9a80d439311c660c4556f3698299e59f4bb9de645fc9b08c64cca60c5556f364ca7a5012cb603023b57dd3ebfd50d60c6556f36022c928915b778ab1b06aaee7e61d460c7556f35b8b28d1a73dc27500ffe35559cc02860c8556f357033e951fe250ec5eb4e60955132d760c9556f3528ab2867934e3a21b5412e4c4f888160ca556f34e212f66c55057f9676c80094a61d5960cb556f349c66289e5b3c4b540c24f42fa4b9bb60cc556f34579fbbd0c733a9c8d6af6b0f7d00f760cd556f3413bad2e712288b924b5882b5b369bf60ce556f33d0b2b56286510ef730e213f71f12e960cf556f338e82ce00e2496262c64457535ba1a160d0556f334d26a96b373bb7c2f8ea1827f27a9260d1556f330c99f4f4211469e00b3e18c31475ea60d2556f32ccd87d6486094999c7d5e6f33237d860d3556f328dde2dd617b6665a2e8556f250c1af60d4556f324fa70e9adc270f8262755af5a99af960d5556f32122f443110611ca51040f41fa6e1e360d6556f31d5730e42c0831482f0f1485c4263d860d7556f31996ec6b07b4a83421b5ebc4ab4e1f160d8556f315e1ee0a68ff46bb43ec2b85032e87660d9556f31237fe7bc4deacf6775b9efa1a145f860da556f30e98e7f1cc5a356e44627a6972ea2ff60db556f30b04760b8917ec74205a3002650ec0560dc556f3077a75c803468e9132ce0cf3224241d60dd556f303fab57a6a275c36f19cda9bace667a60de556f3008504beb8dcbd2cf3bc1f6d5a064f060df556f2fd19346ed17dac61219ce0c2c5ac4b060e0556f2f9b7169808c324b5852fd3d54ba971460e1556f2f65e7e711cf4b064eea9c08cbdad57460e2556f2f30f405093042ddff8a251b6bf6d10360e3556f2efc931a3750f2e8bfe323edfe03757460e4556f2ec8c28e46dbe56d98685278339400cb60e5556f2e957fd933c3926d8a599b602379b85160e6556f2e62c882c7c9ed4473412702f08ba0e560e7556f2e309a221c12ba361e3ed695167feee260e8556f2dfef25d1f865ae18dd07cfea4bcea1060e9556f2dcdcee821cdc80decc02c44344aeb3160ea556f2d9d2d8562b34944d0b201bb87260c8360eb556f2d6d0c04a5b62a2c42636308669b729a60ec556f2d3d6842c9a235517fc5a0332691528f60ed556f2d0e402963fe1ea2834abc408c437c1060ee556f2cdf91ae602647908aff975e4d6a2a8c60ef556f2cb15ad3a1eb65f6d74a75da09a1b6c560f0556f2c8399a6ab8e9774d6fcff373d21072760f1556f2c564c4046f64edba6883ca06bbc453560f2556f2c2970c431f952641e05cb493e23eed360f3556f2bfd0560cd9eb14563bc7c0732856c1860f4556f2bd1084ed0332f7ff4150f9d0ef41a2c60f5556f2ba577d0fa1628b76d040b12a82492fb60f6556f2b7a5233cd21581e855e89dc2f1e8a9260f7556f2b4f95cd46904d05d72bdcde337d9cc760f8556f2b2540fc9b4d9abba3faca669191467560f9556f2afb5229f68d0830d8be8adb0a0db70f60fa556f2ad1c7c63a9b294c5bc73a3ba3ab7a2b60fb556f2aa8a04ac3cbe1ee1c9c86361465dbb860fc556f2a7fda392d725a44a2c8aeb9ab35430d60fd556f2a57741b18cde618717792b4faa216db60fe556f2a2f6c81f5d84dd950a35626d6d5503a90607f6128c3565b6000807d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea98411156133355760017d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9eaa85040180858161332457fe5b04945080848161333057fe5b049350505b600061334f620f4240860261334a87876111f8565b611722565b95620f424087900395509350505050565b600080600160801b841115801561337b5750600160801b8311155b1561338a5750829050816107e1565b600160801b8410156133b45782600160801b8502816133a557fe5b04600160801b915091506107e1565b600160801b8310156133de57600160801b84600160801b8502816133d457fe5b04915091506107e1565b60008385116133ed57836133ef565b845b905060006134016001607f1b83611768565b60ff1695861c969490951c9450505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161343c57613435826134b4565b90506107f6565b81600160fe1b8161344957fe5b0492915050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161347257613435826138f6565b7001af16ac6c59de6f8d5d6f63c1482a7c8082116134935761343582613d56565b706b22d43e72c326539cceeef8bb48f255ff82116101c45761343582613dd6565b600081816001607f1b82800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be48000000008202016001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a000000008202016001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b41124184000000000008202016001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf2000000008202016001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f87000000000008202016001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba9564000000008202016001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b8202016001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f82000000008202016001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b00000000000008202016001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c000000008202016001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b8202016001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d4000000008202016001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b8202016001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a08000000008202016001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b8202016001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e2422000000008202016001607f1b846fde1bc4d19efcac82445da75b0000000083040101949350505050565b6000816001607f1b8181036fde1bc4d19efcac82445da75b00000000029082800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be4800000000820290036001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a00000000820290036001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b4112418400000000000820290036001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf200000000820290036001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f8700000000000820290036001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba956400000000820290036001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b820290036001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f8200000000820290036001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b0000000000000820290036001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c00000000820290036001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b820290036001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d400000000820290036001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b820290036001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a0800000000820290036001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b820290036001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e242200000000820290036fde1bc4d19efcac82445da75b00000000815b04949350505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c861982016f03060c183060c183060c183060c183068082049081810290600183010284608084818110613d9757fe5b01549050600060808560010160808110613dad57fe5b01546f03060c183060c183060c183060c183069487030295909203029390930104949350505050565b60008070015bf0a8b1457695355fb8ac404e7a79e38310613dff57613dfa8361174e565b613e08565b613e0883611340565b9050600070015bf0a8b1457695355fb8ac404e7a79e38210613e3257613e2d8261174e565b613e3b565b613e3b82611340565b9050836001607f1b836001607f1b840281613e5257fe5b04838503010281613d4d57fefe4552525f494e56414c49445f524553455256455f42414c414e43450000000000a2646970667358221220db7d459d21e3a91ab3e25055ee182564ce14b10124e3e6a99630a3cf4da9cd7c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638074590a116100f9578063acdee8cb11610097578063e488312111610071578063e488312114610595578063ebbb2158146105b8578063f3250fe2146105ed578063f732f1c914610358576101c4565b8063acdee8cb14610551578063ce782e081461056e578063e1c7392a1461058b576101c4565b80639d114108116100d35780639d1141081461038d578063a11aa1b4146104e9578063a25a34b11461051e578063abfd231d1461027a576101c4565b80638074590a146104255780638c5ce82a1461045a57806394491fab146104ac576101c4565b806348d73fed1161016657806365098bb31161014057806365098bb31461038d5780636cab5055146103ca57806376cf0b56146103f057806379c1b4501461038d576101c4565b806348d73fed146102105780634982d52d1461033b57806349f9b0f714610358576101c4565b806335b49af4116101a257806335b49af41461027a5780633e75c6ca146102af5780633e8a38ab146102fb57806347d0b68614610318576101c4565b80631da6bbfb146101c957806329a00e7c146102105780632f55bdb514610245575b600080fd5b6101fe600480360360808110156101df57600080fd5b5080359060208101359063ffffffff6040820135169060600135610622565b60408051918252519081900360200190f35b6101fe6004803603608081101561022657600080fd5b5080359060208101359063ffffffff604082013516906060013561063b565b6101fe6004803603608081101561025b57600080fd5b5080359060208101359063ffffffff6040820135169060600135610649565b6101fe6004803603608081101561029057600080fd5b5080359060208101359063ffffffff60408201351690606001356107c1565b6102d2600480360360408110156102c557600080fd5b50803590602001356107cf565b604051808363ffffffff1681526020018263ffffffff1681526020019250505060405180910390f35b6101fe6004803603602081101561031157600080fd5b50356107e8565b6101fe6004803603604081101561032e57600080fd5b50803590602001356107fb565b6101fe6004803603602081101561035157600080fd5b5035610810565b6101fe6004803603608081101561036e57600080fd5b5080359060208101359063ffffffff604082013516906060013561081b565b6101fe600480360360a08110156103a357600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610829565b6101fe600480360360408110156103e057600080fd5b508035906020013560ff16610844565b6101fe6004803603608081101561040657600080fd5b5080359060208101359063ffffffff6040820135169060600135610850565b6101fe6004803603608081101561043b57600080fd5b5080359060208101359063ffffffff6040820135169060600135610a16565b6104916004803603608081101561047057600080fd5b5080359060208101359063ffffffff60408201358116916060013516610b92565b6040805192835260ff90911660208301528051918290030190f35b6101fe600480360360a08110156104c257600080fd5b5080359063ffffffff60208201358116916040810135916060820135169060800135610baf565b6102d2600480360360a08110156104ff57600080fd5b5080359060208101359060408101359060608101359060800135610d1b565b61053b6004803603602081101561053457600080fd5b5035610ea3565b6040805160ff9092168252519081900360200190f35b6101fe6004803603602081101561056757600080fd5b5035610eae565b61053b6004803603602081101561058457600080fd5b5035610eb9565b610593610ec4565b005b6102d2600480360360408110156105ab57600080fd5b5080359060200135610ed6565b6101fe600480360360808110156105ce57600080fd5b5080359060208101359063ffffffff6040820135169060600135610ee3565b6101fe6004803603608081101561060357600080fd5b5080359060208101359063ffffffff6040820135169060600135611068565b600061063085858585610ee3565b90505b949350505050565b600061063085858585611068565b6000808511610694576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116106d7576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff161180156106f65750621e848063ffffffff841611155b610743576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b8161075057506000610633565b63ffffffff8316620f4240141561077b578361076c838761119a565b8161077357fe5b049050610633565b6000808061078987866111f8565b905061079a818888620f4240611241565b9093509150600060ff83166107af8a8661119a565b901c9890980398975050505050505050565b600061063085858585610a16565b6000806107dc848461130a565b915091505b9250929050565b60006107f382611340565b90505b919050565b60006108078383611722565b90505b92915050565b60006107f38261174e565b600061063085858585610850565b60006108388686868686610baf565b90505b95945050505050565b600061080783836117f9565b600080851161089b576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116108de576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008363ffffffff161180156108fd5750620f424063ffffffff841611155b61094b576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b84821115610995576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b816109a257506000610633565b848214156109b1575082610633565b63ffffffff8316620f424014156109cd578461076c858461119a565b6000808387036109e28882620f424089611241565b909350915060006109f3888561119a565b905060ff831688901b8481830381610a0757fe5b049a9950505050505050505050565b6000808511610a61576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610aa4576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610ac35750621e848063ffffffff841611155b610b10576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b84821115610b5a576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b81610b6757506000610633565b84821415610b76575082610633565b63ffffffff8316620f424014156109cd578461076c838661119a565b600080610ba186868686611241565b915091505b94509492505050565b60008086118015610bc05750600084115b610bff576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008563ffffffff16118015610c1e5750620f424063ffffffff861611155b8015610c30575060008363ffffffff16115b8015610c455750620f424063ffffffff841611155b610c93576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8263ffffffff168563ffffffff161415610cca57610cb186836111f8565b610cbb858461119a565b81610cc257fe5b04905061083b565b60008080610cd889866111f8565b9050610ce6818a8a89611241565b90935091506000610cf7888561119a565b905060ff831688901b8481830381610d0b57fe5b049b9a5050505050505050505050565b60008085871415610d79576000871180610d355750600085115b610d74576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b610dd4565b600087118015610d895750600086115b8015610d955750600085115b610dd4576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b600084118015610de45750600083115b610e35576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f524553455256455f524154450000000000000000604482015290519081900360640190fd5b6000610e41888661119a565b90506000610e4f878661119a565b905087891015610e7257610e67888a84846001611b93565b935093505050610e99565b87891115610e8857610e67898984846000611b93565b610e92828261130a565b9350935050505b9550959350505050565b60006107f382611c5c565b60006107f382611cec565b60006107f382612090565b610ecc6120f1565b610ed46128c7565b565b6000806107dc84846132ce565b6000808511610f2e576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b60008411610f71576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60018363ffffffff16118015610f905750621e848063ffffffff841611155b610fdd576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f524553455256455f524154494f60381b604482015290519081900360640190fd5b81610fea57506000610633565b63ffffffff8316620f4240141561101b57846001611008848761119a565b038161101057fe5b046001019050610633565b6000808061102988866111f8565b905061103a8189620f424089611241565b9093509150600060ff831660016110518a8761119a565b03901c889003600101945050505050949350505050565b60008085116110b3576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f535550504c5960701b604482015290519081900360640190fd5b600084116110f6576040805162461bcd60e51b815260206004820152601b6024820152600080516020613e60833981519152604482015290519081900360640190fd5b60008363ffffffff161180156111155750620f424063ffffffff841611155b611163576040805162461bcd60e51b815260206004820152601a60248201527911549497d253959053125117d49154d154959157d5d15251d21560321b604482015290519081900360640190fd5b8161117057506000610633565b63ffffffff8316620f4240141561118c578361076c868461119a565b6000808061078985886111f8565b6000826111a95750600061080a565b828202828482816111b657fe5b0414610807576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600082820183811015610807576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080600160811b861061125457600080fd5b600080866001607f1b89028161126657fe5b04905070015bf0a8b1457695355fb8ac404e7a79e38110156112925761128b81611340565b915061129e565b61129b8161174e565b91505b60008563ffffffff168763ffffffff168402816112b757fe5b049050600160831b8110156112dd576112cf81611cec565b607f94509450505050610ba6565b60006112e882611c5c565b90506112fd81607f0360ff1683901c826117f9565b95509350610ba692505050565b6000808284116113275761131e84846132ce565b915091506107e1565b60008061133485876132ce565b97909650945050505050565b6000808080806fd3094c70f034de4b96ff7d5b6f99fcd88610611389576001607e1b840193506fd3094c70f034de4b96ff7d5b6f99fcd86001607f1b87028161138557fe5b0495505b6fa45af1e1f40c333b3de1db4dd55f29a786106113cc576001607d1b840193506fa45af1e1f40c333b3de1db4dd55f29a76001607f1b8702816113c857fe5b0495505b6f910b022db7ae67ce76b441c27035c6a1861061140f576001607c1b840193506f910b022db7ae67ce76b441c27035c6a16001607f1b87028161140b57fe5b0495505b6f88415abbe9a76bead8d00cf112e4d4a88610611452576001607b1b840193506f88415abbe9a76bead8d00cf112e4d4a86001607f1b87028161144e57fe5b0495505b6f84102b00893f64c705e841d5d4064bd38610611495576001607a1b840193506f84102b00893f64c705e841d5d4064bd36001607f1b87028161149157fe5b0495505b6f8204055aaef1c8bd5c3259f4822735a286106114d857600160791b840193506f8204055aaef1c8bd5c3259f4822735a26001607f1b8702816114d457fe5b0495505b6f810100ab00222d861931c15e39b44e99861061151b57600160781b840193506f810100ab00222d861931c15e39b44e996001607f1b87028161151757fe5b0495505b6f808040155aabbbe9451521693554f733861061155e57600160771b840193506f808040155aabbbe9451521693554f7336001607f1b87028161155a57fe5b0495505b6f7fffffffffffffffffffffffffffffff19860192508291506001607f1b828002049050600160801b838103830204840193506001607f1b818302816115a057fe5b049150600160811b836faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa038302816115c457fe5b04840193506001607f1b818302816115d857fe5b049150600360801b836f99999999999999999999999999999999038302816115fc57fe5b04840193506001607f1b8183028161161057fe5b049150600160821b836f924924924924924924924924924924920383028161163457fe5b04840193506001607f1b8183028161164857fe5b049150600560801b836f8e38e38e38e38e38e38e38e38e38e38e0383028161166c57fe5b04840193506001607f1b8183028161168057fe5b049150600360811b836f8ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b038302816116a457fe5b04840193506001607f1b818302816116b857fe5b049150600760801b836f89d89d89d89d89d89d89d89d89d89d89038302816116dc57fe5b04840193506001607f1b818302816116f057fe5b049150600160831b836f888888888888888888888888888888880383028161171457fe5b049390930195945050505050565b600060028204820382848161173357fe5b068161173b57fe5b0482848161174557fe5b04019392505050565b600080600160801b831061177f57600061176e6001607f1b855b04612090565b60ff1693841c936001607f1b029150505b6001607f1b8311156117cd57607f5b60ff8116156117cb576001607f1b848002049350600160801b84106117c257600193841c9360ff6000198301161b91909101905b6000190161178e565b505b6f05b9de1d10bf4103d647b0955897ba806f03f80fe03f80fe03f80fe03f80fe03f88202049392505050565b60008083905060008360ff16858302901c9150816f03442c4e6074a82f1797f72ac000000002810190508360ff16858302901c9150816f0116b96f757c380fb287fd0e4000000002810190508360ff16858302901c9150816e45ae5bdd5f0e03eca1ff439000000002810190508360ff16858302901c9150816e0defabf91302cd95b9ffda5000000002810190508360ff16858302901c9150816e02529ca9832b22439efff9b800000002810190508360ff16858302901c9150816d54f1cf12bd04e516b6da8800000002810190508360ff16858302901c9150816d0a9e39e257a09ca2d6db5100000002810190508360ff16858302901c9150816d012e066e7b839fa050c30900000002810190508360ff16858302901c9150816c1e33d7d926c329a1ad1a80000002810190508360ff16858302901c9150816c02bee513bdb4a6b19b5f80000002810190508360ff16858302901c9150816b3a9316fa79b88eccf2a0000002810190508360ff16858302901c9150816b048177ebe1fa81237520000002810190508360ff16858302901c9150816a5263fe90242dcbacf0000002810190508360ff16858302901c9150816a057e22099c030d9410000002810190508360ff16858302901c9150816957e22099c030d941000002810190508360ff16858302901c91508169052b6b5456997631000002810190508360ff16858302901c915081684985f67696bf74800002810190508360ff16858302901c9150816803dea12ea99e49800002810190508360ff16858302901c9150816731880f2214b6e00002810190508360ff16858302901c91508167025bcff56eb3600002810190508360ff16858302901c915081661b722e10ab100002810190508360ff16858302901c9150816601317c7007700002810190508360ff16858302901c915081650cba84aafa0002810190508360ff16858302901c9150816482573a0a0002810190508360ff16858302901c9150816405035ad90002810190508360ff16858302901c915081632f881b0002810190508360ff16858302901c9150816301b2934002810190508360ff16858302901c915081620efc4002810190508360ff16858302901c915081617fe002810190508360ff16858302901c91508161042002810190508360ff16858302901c915081602102810190508360ff16858302901c915081600102810190508360ff166001901b856f0688589cc0e9505e2f2fee55800000008381611b8757fe5b04010195945050505050565b600080611ba08585613360565b9095509350600086611bb6896001607f1b61119a565b81611bbd57fe5b049050600070015bf0a8b1457695355fb8ac404e7a79e38210611be857611be38261174e565b611bf1565b611bf182611340565b9050600086611c00838a61119a565b81611c0757fe5b049050600086611c1f57611c1a82613413565b611c28565b611c2882613450565b9050611c4a611c37828b61119a565b611c458a6001607f1b61119a565b61130a565b95509550505050509550959350505050565b60006020607f5b8060ff168260010160ff161015611cab576000600260ff848401160490508460008260ff1660808110611c9257fe5b015410611ca157809250611ca5565b8091505b50611c63565b8360008260ff1660808110611cbc57fe5b015410611ccc5791506107f69050565b8360008360ff1660808110611cdd57fe5b0154106101c4575090506107f6565b6000670168244fdac780006001607f1b6f0fffffffffffffffffffffffffffffff84168080028290048082028390048083028490049485026710e1b3be415a00009092026705a0913f6b1e000091909102010192909181830204905080664807432bc1800002830192506001607f1b82820281611d6557fe5b04905080660c0135dca0400002830192506001607f1b82820281611d8557fe5b049050806601b707b1cdc00002830192506001607f1b82820281611da557fe5b049050806536e0f639b80002830192506001607f1b82820281611dc457fe5b04905080650618fee9f80002830192506001607f1b82820281611de357fe5b04905080649c197dcc0002830192506001607f1b82820281611e0157fe5b04905080640e30dce40002830192506001607f1b82820281611e1f57fe5b0490508064012ebd130002830192506001607f1b82820281611e3d57fe5b049050806317499f0002830192506001607f1b82820281611e5a57fe5b049050806301a9d48002830192506001607f1b82820281611e7757fe5b04905080621c638002830192506001607f1b82820281611e9357fe5b049050806201c63802830192506001607f1b82820281611eaf57fe5b04905080611ab802830192506001607f1b82820281611eca57fe5b0490508061017c02830192506001607f1b82820281611ee557fe5b04905080601402830192506001607f1b82820281611eff57fe5b6721c3677c82b400009190049384010482016001607f1b019290506001607c1b851615611f505770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f984020492505b6001607d1b851615611f86577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77884020492505b6001607e1b851615611fbb576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed584020492505b6001607f1b851615611fef576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e84020492505b600160801b851615612023576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c584020492505b600160811b851615612056576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d784020492505b600160821b851615612087576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30784020492505b50909392505050565b6000806101008310156120b8575b60018311156120b357600192831c920161209e565b6107f3565b60805b60ff8116156120ea57600160ff82161b84106120df5760ff81169390931c92908117905b60011c607f166120bb565b5092915050565b701c35fedd14ffffffffffffffffffffffff602055701b0ce43b323fffffffffffffffffffffff6021557019f0028ec1ffffffffffffffffffffffff6022557018ded91f0e7fffffffffffffffffffffff6023557017d8ec7f0417ffffffffffffffffffffff6024557016ddc6556cdbffffffffffffffffffffff6025557015ecf52776a1ffffffffffffffffffffff6026557015060c256cb2ffffffffffffffffffffff602755701428a2f98d72ffffffffffffffffffffff6028557013545598e5c23fffffffffffffffffffff602955701288c4161ce1dfffffffffffffffffffff602a557011c592761c666fffffffffffffffffffff602b5570110a688680a757ffffffffffffffffffff602c55701056f1b5bedf77ffffffffffffffffffff602d55700faadceceeff8bffffffffffffffffffff602e55700f05dc6b27edadffffffffffffffffffff602f55700e67a5a25da4107fffffffffffffffffff603055700dcff115b14eedffffffffffffffffffff603155700d3e7a392431239fffffffffffffffffff603255700cb2ff529eb71e4fffffffffffffffffff603355700c2d415c3db974afffffffffffffffffff603455700bad03e7d883f69bffffffffffffffffff603555700b320d03b2c343d5ffffffffffffffffff603655700abc25204e02828dffffffffffffffffff603755700a4b16f74ee4bb207fffffffffffffffff6038557009deaf736ac1f569ffffffffffffffffff603955700976bd9952c7aa957fffffffffffffffff603a557009131271922eaa606fffffffffffffffff603b557008b380f3558668c46fffffffffffffffff603c55700857ddf0117efa215bffffffffffffffff603d557007ffffffffffffffffffffffffffffffff603e557007abbf6f6abb9d087fffffffffffffffff603f5570075af62cbac95f7dfa7fffffffffffffff60405570070d7fb7452e187ac13fffffffffffffff6041557006c3390ecc8af379295fffffffffffffff60425570067c00a3b07ffc01fd6fffffffffffffff604355700637b647c39cbb9d3d27ffffffffffffff6044557005f63b1fc104dbd39587ffffffffffffff6045557005b771955b36e12f7235ffffffffffffff60465570057b3d49dda84556d6f6ffffffffffffff60475570054183095b2c8ececf30ffffffffffffff60485570050a28be635ca2b888f77fffffffffffff6049557004d5156639708c9db33c3fffffffffffff604a557004a23105873875bd52dfdfffffffffffff604b55700471649d87199aa990756fffffffffffff604c557004429a21a029d4c1457cfbffffffffffff604d55700415bc6d6fb7dd71af2cb3ffffffffffff604e557003eab73b3bbfe282243ce1ffffffffffff604f557003c1771ac9fb6b4c18e229ffffffffffff605055700399e96897690418f785257fffffffffff605155700373fc456c53bb779bf0ea9fffffffffff60525570034f9e8e490c48e67e6ab8bfffffffffff60535570032cbfd4a7adc790560b3337ffffffffff60545570030b50570f6e5d2acca94613ffffffffff6055557002eb40f9f620fda6b56c2861ffffffffff6056557002cc8340ecb0d0f520a6af58ffffffffff6057557002af09481380a0a35cf1ba02ffffffffff605855700292c5bdd3b92ec810287b1b3fffffffff605955700277abdcdab07d5a77ac6d6b9fffffffff605a5570025daf6654b1eaa55fd64df5efffffffff605b55700244c49c648baa98192dce88b7ffffffff605c5570022ce03cd5619a311b2471268bffffffff605d55700215f77c045fbe885654a44a0fffffffff605e557001ffffffffffffffffffffffffffffffff605f557001eaefdbdaaee7421fc4d3ede5ffffffff6060557001d6bd8b2eb257df7e8ca57b09bfffffff6061557001c35fedd14b861eb0443f7f133fffffff6062557001b0ce43b322bcde4a56e8ada5afffffff60635570019f0028ec1fff007f5a195a39dfffffff60645570018ded91f0e72ee74f49b15ba527ffffff60655570017d8ec7f04136f4e5615fd41a63ffffff60665570016ddc6556cdb84bdc8d12d22e6fffffff60675570015ecf52776a1155b5bd8395814f7fffff60685570015060c256cb23b3b3cc3754cf40ffffff6069557001428a2f98d728ae223ddab715be3fffff606a5570013545598e5c23276ccf0ede68034fffff606b557001288c4161ce1d6f54b7f61081194fffff606c5570011c592761c666aa641d5a01a40f17ffff606d55700110a688680a7530515f3e6e6cfdcdffff606e557001056f1b5bedf75c6bcb2ce8aed428ffff606f556ffaadceceeff8a0890f3875f008277fff6070556ff05dc6b27edad306388a600f6ba0bfff6071556fe67a5a25da41063de1495d5b18cdbfff6072556fdcff115b14eedde6fc3aa5353f2e4fff6073556fd3e7a3924312399f9aae2e0f868f8fff6074556fcb2ff529eb71e41582cccd5a1ee26fff6075556fc2d415c3db974ab32a51840c0b67edff6076556fbad03e7d883f69ad5b0a186184e06bff6077556fb320d03b2c343d4829abd6075f0cc5ff6078556fabc25204e02828d73c6e80bcdb1a95bf6079556fa4b16f74ee4bb2040a1ec6c15fbbf2df607a556f9deaf736ac1f569deb1b5ae3f36c130f607b556f976bd9952c7aa957f5937d790ef65037607c556f9131271922eaa6064b73a22d0bd4f2bf607d556f8b380f3558668c46c91c49a2f8e967b9607e556f857ddf0117efa215952912839f6473e66000607f5b0155565b6f60e393c68d20b1bd09deaabc0373b9c560809081556f5f8f46e4854120989ed94719fb4c20116081556f5e479ebb9129fb1b7e72a648f992b6066082556f5d0bd23fe42dfedde2e9586be12b85fe6083556f5bdb29ddee979308ddfca81aeeb8095a6084556f5ab4fd8a260d2c7e2c0d2afcf0009dad6085556f5998b31359a55d48724c65cf090012216086556f5885bcad2b322dfc43e8860f9c018cf56087556f577b97aa1fe222bb452fdf111b1f0be26088556f5679cb5e3575632e5baa27e2b949f7046089556f557fe8241b3a31c83c732f1cdff4a1c5608a556f548d868026504875d6e59bbe95fc2a6b608b556f53a2465ce347cf34d05a867c17dd3088608c556f52bdce5dcd4faed59c7f5511cf8f8acc608d556f51dfcb453c07f8da817606e7885f7c3e608e556f5107ef6b0a5a2be8f8ff15590daa3cce608f556f5035f241d6eae0cd7bacba119993de7b6090556f4f698fe90d5b53d532171e1210164c666091556f4ea288ca297a0e6a09a0eee240e16c856092556f4de0a13fdcf5d4213fc398ba6e3becde6093556f4d23a145eef91fec06b06140804c48086094556f4c6b5430d4c1ee5526473db4ae0f11de6095556f4bb7886c240562eba11f4963a53b42406096556f4b080f3f1cb491d2d521e0ea4583521e6097556f4a5cbc96a05589cb4d86be1db31683646098556f49b566d40243517658d78c33162d6ece6099556f4911e6a02e5507a30f947383fd9a3276609a556f487216c2b31be4adc41db8a8d5cc0c88609b556f47d5d3fc4a7a1b188cd3d788b5c5e9fc609c556f473cfce4871a2c40bc4f9e1c32b955d0609d556f46a771ca578ab878485810e285e31c67609e556f4615149718aed4c258c373dc676aa72d609f556f4585c8b3f8fe489c6e1833ca4787138460a0556f44f972f174e41e5efb7e9d63c29ce73560a1556f446ff970ba86d8b00beb05ecebf3c4dc60a2556f43e9438ec88971812d6f198b5ccaad9660a3556f436539d11ff7bea657aeddb394e809ef60a4556f42e3c5d3e5a913401d86f66db5d81c2c60a5556f4264d2395303070ea726cbe98df6217460a6556f41e84a9a593bb7194c3a6349ecae4eea60a7556f416e1b785d13eba07a08f3f18876a5ab60a8556f40f6322ff389d423ba9dd7e7e7b7e80960a9556f40807cec8a466880ecf4184545d240a460aa556f400cea9ce88a8d3ae668e8ea0d9bf07f60ab556f3f9b6ae8772d4c55091e0ed7dfea0ac160ac556f3f2bee253fd84594f54bcaafac383a1360ad556f3ebe654e95208bb9210c575c081c595860ae556f3e52c1fc5665635b78ce1f05ad53c08660af556f3de8f65ac388101ddf718a6f5c1eff6560b0556f3d80f522d59bd0b328ca012df4cd2d4960b1556f3d1ab193129ea72b23648a161163a85a60b2556f3cb61f68d32576c135b95cfb53f76d7560b3556f3c5332d9f1aae851a3619e77e4cc847360b4556f3bf1e08edbe2aa109e1525f65759ef7360b5556f3b921d9cff13fa2c197746a3dfc4918f60b6556f3b33df818910bfc1a5aefb8f63ae2ac460b7556f3ad71c1c77e34fa32a9f184967eccbf660b8556f3a7bc9abf2c5bb53e2f7384a8a16521a60b9556f3a21dec7e76369783a68a0c6385a1c5760ba556f39c9525de6c9cdf7c1c157ca4a7a6ee360bb556f39721bad3dc85d1240ff0190e0adaac360bc556f391c324344d3248f0469eb28dd3d77e060bd556f38c78df7e3c796279fb4ff84394ab3da60be556f387426ea4638ae9aae08049d3554c20a60bf556f3821f57dbd2763256c1a99bbd205137860c0556f37d0f256cb46a8c92ff62fbbef28969860c1556f37811658591ffc7abdd1feaf3cef9b7360c2556f37325aa10e9e82f7df0f380f7997154b60c3556f36e4b888cfb408d873b9a80d439311c660c4556f3698299e59f4bb9de645fc9b08c64cca60c5556f364ca7a5012cb603023b57dd3ebfd50d60c6556f36022c928915b778ab1b06aaee7e61d460c7556f35b8b28d1a73dc27500ffe35559cc02860c8556f357033e951fe250ec5eb4e60955132d760c9556f3528ab2867934e3a21b5412e4c4f888160ca556f34e212f66c55057f9676c80094a61d5960cb556f349c66289e5b3c4b540c24f42fa4b9bb60cc556f34579fbbd0c733a9c8d6af6b0f7d00f760cd556f3413bad2e712288b924b5882b5b369bf60ce556f33d0b2b56286510ef730e213f71f12e960cf556f338e82ce00e2496262c64457535ba1a160d0556f334d26a96b373bb7c2f8ea1827f27a9260d1556f330c99f4f4211469e00b3e18c31475ea60d2556f32ccd87d6486094999c7d5e6f33237d860d3556f328dde2dd617b6665a2e8556f250c1af60d4556f324fa70e9adc270f8262755af5a99af960d5556f32122f443110611ca51040f41fa6e1e360d6556f31d5730e42c0831482f0f1485c4263d860d7556f31996ec6b07b4a83421b5ebc4ab4e1f160d8556f315e1ee0a68ff46bb43ec2b85032e87660d9556f31237fe7bc4deacf6775b9efa1a145f860da556f30e98e7f1cc5a356e44627a6972ea2ff60db556f30b04760b8917ec74205a3002650ec0560dc556f3077a75c803468e9132ce0cf3224241d60dd556f303fab57a6a275c36f19cda9bace667a60de556f3008504beb8dcbd2cf3bc1f6d5a064f060df556f2fd19346ed17dac61219ce0c2c5ac4b060e0556f2f9b7169808c324b5852fd3d54ba971460e1556f2f65e7e711cf4b064eea9c08cbdad57460e2556f2f30f405093042ddff8a251b6bf6d10360e3556f2efc931a3750f2e8bfe323edfe03757460e4556f2ec8c28e46dbe56d98685278339400cb60e5556f2e957fd933c3926d8a599b602379b85160e6556f2e62c882c7c9ed4473412702f08ba0e560e7556f2e309a221c12ba361e3ed695167feee260e8556f2dfef25d1f865ae18dd07cfea4bcea1060e9556f2dcdcee821cdc80decc02c44344aeb3160ea556f2d9d2d8562b34944d0b201bb87260c8360eb556f2d6d0c04a5b62a2c42636308669b729a60ec556f2d3d6842c9a235517fc5a0332691528f60ed556f2d0e402963fe1ea2834abc408c437c1060ee556f2cdf91ae602647908aff975e4d6a2a8c60ef556f2cb15ad3a1eb65f6d74a75da09a1b6c560f0556f2c8399a6ab8e9774d6fcff373d21072760f1556f2c564c4046f64edba6883ca06bbc453560f2556f2c2970c431f952641e05cb493e23eed360f3556f2bfd0560cd9eb14563bc7c0732856c1860f4556f2bd1084ed0332f7ff4150f9d0ef41a2c60f5556f2ba577d0fa1628b76d040b12a82492fb60f6556f2b7a5233cd21581e855e89dc2f1e8a9260f7556f2b4f95cd46904d05d72bdcde337d9cc760f8556f2b2540fc9b4d9abba3faca669191467560f9556f2afb5229f68d0830d8be8adb0a0db70f60fa556f2ad1c7c63a9b294c5bc73a3ba3ab7a2b60fb556f2aa8a04ac3cbe1ee1c9c86361465dbb860fc556f2a7fda392d725a44a2c8aeb9ab35430d60fd556f2a57741b18cde618717792b4faa216db60fe556f2a2f6c81f5d84dd950a35626d6d5503a90607f6128c3565b6000807d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9ea98411156133355760017d10c6f7a0b5ed8d36b4c7f34938583621fafc8b0079a2834d26fa3fcc9eaa85040180858161332457fe5b04945080848161333057fe5b049350505b600061334f620f4240860261334a87876111f8565b611722565b95620f424087900395509350505050565b600080600160801b841115801561337b5750600160801b8311155b1561338a5750829050816107e1565b600160801b8410156133b45782600160801b8502816133a557fe5b04600160801b915091506107e1565b600160801b8310156133de57600160801b84600160801b8502816133d457fe5b04915091506107e1565b60008385116133ed57836133ef565b845b905060006134016001607f1b83611768565b60ff1695861c969490951c9450505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161343c57613435826134b4565b90506107f6565b81600160fe1b8161344957fe5b0492915050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c86821161347257613435826138f6565b7001af16ac6c59de6f8d5d6f63c1482a7c8082116134935761343582613d56565b706b22d43e72c326539cceeef8bb48f255ff82116101c45761343582613dd6565b600081816001607f1b82800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be48000000008202016001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a000000008202016001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b41124184000000000008202016001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf2000000008202016001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f87000000000008202016001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba9564000000008202016001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b8202016001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f82000000008202016001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b00000000000008202016001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c000000008202016001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b8202016001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d4000000008202016001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b8202016001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a08000000008202016001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b8202016001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e2422000000008202016001607f1b846fde1bc4d19efcac82445da75b0000000083040101949350505050565b6000816001607f1b8181036fde1bc4d19efcac82445da75b00000000029082800204915070014d29a73a6e7b02c3668c7b08800000008202016001607f1b8483020491507002504a0cd9a7f7215b60f9be4800000000820290036001607f1b848302049150700484d0a1191c0ead267967c7a4a00000008202016001607f1b84830204915070095ec580d7e8427a4baf26a90a00000000820290036001607f1b848302049150701440b0be1615a47dba6e5b3b1f100000008202016001607f1b848302049150702d207601f46a99b4112418400000000000820290036001607f1b8483020491507066ebaac4c37c622dd8288a7eb1b20000008202016001607f1b84830204915070ef17240135f7dbd43a1ba10cf200000000820290036001607f1b848302049150710233c33c676a5eb2416094a87b36570000008202016001607f1b848302049150710541cde48bc0254bed49a9f8700000000000820290036001607f1b848302049150710cae1fad2cdd4d4cb8d73abca0d19a4000008202016001607f1b848302049150711edb2aa2f760d15c41ceedba956400000000820290036001607f1b848302049150714ba8d20d2dabd386c9529659841a2e2000008202016001607f1b8483020491506805d6042a35c33e6d51604d1b820290036001607f1b8483020491507201cfa8e70c03625b9db76c8ebf5bbf248200008202016001607f1b8483020491507204851d99f82060df265f3309b26f8200000000820290036001607f1b848302049150720b550d19b129d270c44f6f55f027723cbb00008202016001607f1b848302049150721c877dadc761dc272deb65d4b0000000000000820290036001607f1b8483020491507248178ece97479f33a77f2ad22a81b64406c0008202016001607f1b84830204915072b6ca8268b9d810fedf6695ef2f8a6c00000000820290036001607f1b8483020491507301d0e76631a5b05d007b8cb72a7c7f11ec36e0008202016001607f1b84830204915069094386f7b3f0bfb38d8f604f1b820290036001607f1b848302049150730bd8369f1b702bf491e2ebfcee08250313b654008202016001607f1b848302049150731e5c7c32a9f6c70ab2cb59d9225764d400000000820290036001607f1b848302049150734dff5820e165e910f95120a708e742496221e6008202016001607f1b8483020491506c064647b36d8fe769bc7728729b603d1b820290036001607f1b848302049150740205db8dffff45bfa2938f128f599dbf16eb11d8808202016001607f1b84830204915074053a044ebd984351493e1786af38d39a0800000000820290036001607f1b848302049150740d86dae2a4cc0f47633a544479735869b487b59c408202016001607f1b848302049150610231609c1b820290036001607f1b848302049150745b0485a76f6646c2039db1507cdd51b086496808228202016001607f1b84830204915074ec983c46c49545bc17efa6b5b0055e242200000000820290036fde1bc4d19efcac82445da75b00000000815b04949350505050565b60006f2f16ac6c59de6f8d5d6f63c1482a7c861982016f03060c183060c183060c183060c183068082049081810290600183010284608084818110613d9757fe5b01549050600060808560010160808110613dad57fe5b01546f03060c183060c183060c183060c183069487030295909203029390930104949350505050565b60008070015bf0a8b1457695355fb8ac404e7a79e38310613dff57613dfa8361174e565b613e08565b613e0883611340565b9050600070015bf0a8b1457695355fb8ac404e7a79e38210613e3257613e2d8261174e565b613e3b565b613e3b82611340565b9050836001607f1b836001607f1b840281613e5257fe5b04838503010281613d4d57fefe4552525f494e56414c49445f524553455256455f42414c414e43450000000000a2646970667358221220db7d459d21e3a91ab3e25055ee182564ce14b10124e3e6a99630a3cf4da9cd7c64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "195:1427:35:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "195:1427:35:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66935:355:7;;;;;;;;;;;;;;;;-1:-1:-1;66935:355:7;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;64717:399;;;;;;;;;;;;;;;;-1:-1:-1;64717:399:7;;;;;;;;;;;;;;;;;;;:::i;27312:1068::-;;;;;;;;;;;;;;;;-1:-1:-1;27312:1068:7;;;;;;;;;;;;;;;;;;;:::i;69230:349::-;;;;;;;;;;;;;;;;-1:-1:-1;69230:349:7;;;;;;;;;;;;;;;;;;;:::i;1190:149:35:-;;;;;;;;;;;;;;;;-1:-1:-1;1190:149:35;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;958:110;;;;;;;;;;;;;;;;-1:-1:-1;958:110:35;;:::i;1496:124::-;;;;;;;;;;;;;;;;-1:-1:-1;1496:124:35;;;;;;;:::i;434:110::-;;;;;;;;;;;;;;;;-1:-1:-1;434:110:35;;:::i;65190:375:7:-;;;;;;;;;;;;;;;;-1:-1:-1;65190:375:7;;;;;;;;;;;;;;;;;;;:::i;66281:580::-;;;;;;;;;;;;;;;;-1:-1:-1;66281:580:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;810:142:35:-;;;;;;;;;;;;;;;;-1:-1:-1;810:142:35;;;;;;;;;:::i;21415:1297:7:-;;;;;;;;;;;;;;;;-1:-1:-1;21415:1297:7;;;;;;;;;;;;;;;;;;;:::i;29062:1331::-;;;;;;;;;;;;;;;;-1:-1:-1;29062:1331:7;;;;;;;;;;;;;;;;;;;:::i;245:183:35:-;;;;;;;;;;;;;;;;-1:-1:-1;245:183:35;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;23568:1331:7;;;;;;;;;;;;;;;;-1:-1:-1;23568:1331:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;32724:1425::-;;;;;;;;;;;;;;;;-1:-1:-1;32724:1425:7;;;;;;;;;;;;;;;;;;;;;;:::i;664:140:35:-;;;;;;;;;;;;;;;;-1:-1:-1;664:140:35;;:::i;:::-;;;;;;;;;;;;;;;;;;;1074:110;;;;;;;;;;;;;;;;-1:-1:-1;1074:110:35;;:::i;550:108::-;;;;;;;;;;;;;;;;-1:-1:-1;550:108:35;;:::i;18929:88:7:-;;;:::i;:::-;;1345:145:35;;;;;;;;;;;;;;;;-1:-1:-1;1345:145:35;;;;;;;:::i;25578:1050:7:-;;;;;;;;;;;;;;;;-1:-1:-1;25578:1050:7;;;;;;;;;;;;;;;;;;;:::i;19672:1091::-;;;;;;;;;;;;;;;;-1:-1:-1;19672:1091:7;;;;;;;;;;;;;;;;;;;:::i;66935:355::-;67192:7;67224:58;67233:7;67242:15;67259:13;67274:7;67224:8;:58::i;:::-;67217:65;;66935:355;;;;;;;:::o;64717:399::-;65005:7;65037:71;65058:7;65067:15;65084:14;65100:7;65037:20;:71::i;27312:1068::-;27573:7;27643:1;27633:7;:11;27625:42;;;;;-1:-1:-1;;;27625:42:7;;;;;;;;;;;;-1:-1:-1;;;27625:42:7;;;;;;;;;;;;;;;27704:1;27686:15;:19;27678:59;;;;;-1:-1:-1;;;27678:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;27678:59:7;;;;;;;;;;;;;;;27772:1;27756:13;:17;;;:52;;;;-1:-1:-1;27794:14:7;27777:31;;;;;27756:52;27748:90;;;;;-1:-1:-1;;;27748:90:7;;;;;;;;;;;;-1:-1:-1;;;27748:90:7;;;;;;;;;;;;;;;27893:12;27889:39;;-1:-1:-1;27927:1:7;27920:8;;27889:39;27998:27;;;316:7;27998:27;27994:91;;;28070:15;28047:20;:7;28059;28047:11;:20::i;:::-;:38;;;;;;28040:45;;;;27994:91;28098:14;;;28165:28;:15;28185:7;28165:19;:28::i;:::-;28149:44;;28226:56;28232:5;28239:15;28256:13;316:7;28226:5;:56::i;:::-;28204:78;;-1:-1:-1;28204:78:7;-1:-1:-1;28293:12:7;28308:32;;;:19;:7;28204:78;28308:11;:19::i;:::-;:32;;28358:14;;;;;27312:1068;-1:-1:-1;;;;;;;;27312:1068:7:o;69230:349::-;69467:7;69499:72;69522:7;69531:15;69548:13;69563:7;69499:22;:72::i;1190:149:35:-;1268:6;1276;1301:31;1325:2;1329;1301:23;:31::i;:::-;1294:38;;;;1190:149;;;;;;:::o;958:110::-;1016:7;1042:19;1059:1;1042:16;:19::i;:::-;1035:26;;958:110;;;;:::o;1496:124::-;1565:7;1591:22;1606:2;1610;1591:14;:22::i;:::-;1584:29;;1496:124;;;;;:::o;434:110::-;492:7;518:19;535:1;518:16;:19::i;65190:375:7:-;65458:7;65490:67;65507:7;65516:15;65533:14;65549:7;65490:16;:67::i;66281:580::-;66698:7;66730:123;66755:21;66778:20;66800:21;66823:20;66845:7;66730:24;:123::i;:::-;66723:130;;66281:580;;;;;;;;:::o;810:142:35:-;887:7;913:32;930:2;934:10;913:16;:32::i;21415:1297:7:-;21677:7;21747:1;21737:7;:11;21729:42;;;;;-1:-1:-1;;;21729:42:7;;;;;;;;;;;;-1:-1:-1;;;21729:42:7;;;;;;;;;;;;;;;21808:1;21790:15;:19;21782:59;;;;;-1:-1:-1;;;21782:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21782:59:7;;;;;;;;;;;;;;;21877:1;21860:14;:18;;;:50;;;;-1:-1:-1;316:7:7;21882:28;;;;;21860:50;21852:89;;;;;-1:-1:-1;;;21852:89:7;;;;;;;;;;;;-1:-1:-1;;;21852:89:7;;;;;;;;;;;;;;;21971:7;21960;:18;;21952:49;;;;;-1:-1:-1;;;21952:49:7;;;;;;;;;;;;-1:-1:-1;;;21952:49:7;;;;;;;;;;;;;;;22061:12;22057:39;;-1:-1:-1;22095:1:7;22088:8;;22057:39;22179:7;22168;:18;22164:59;;;-1:-1:-1;22208:15:7;22201:22;;22164:59;22286:28;;;316:7;22286:28;22282:92;;;22367:7;22336:28;:15;22356:7;22336:19;:28::i;22282:92::-;22387:14;;22454:17;;;22504:49;22454:7;:17;316:7;22538:14;22504:5;:49::i;:::-;22482:71;;-1:-1:-1;22482:71:7;-1:-1:-1;22564:13:7;22580:27;:15;22482:71;22580:19;:27::i;:::-;22564:43;-1:-1:-1;22634:28:7;;;;;;22698:6;22681:13;;;22698:6;22680:24;;;;;;21415:1297;-1:-1:-1;;;;;;;;;;21415:1297:7:o;29062:1331::-;29353:7;29423:1;29413:7;:11;29405:42;;;;;-1:-1:-1;;;29405:42:7;;;;;;;;;;;;-1:-1:-1;;;29405:42:7;;;;;;;;;;;;;;;29484:1;29466:15;:19;29458:59;;;;;-1:-1:-1;;;29458:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;29458:59:7;;;;;;;;;;;;;;;29552:1;29536:13;:17;;;:52;;;;-1:-1:-1;29574:14:7;29557:31;;;;;29536:52;29528:90;;;;;-1:-1:-1;;;29528:90:7;;;;;;;;;;;;-1:-1:-1;;;29528:90:7;;;;;;;;;;;;;;;29648:7;29637;:18;;29629:49;;;;;-1:-1:-1;;;29629:49:7;;;;;;;;;;;;-1:-1:-1;;;29629:49:7;;;;;;;;;;;;;;;29733:12;29729:39;;-1:-1:-1;29767:1:7;29760:8;;29729:39;29855:7;29844;:18;29840:59;;;-1:-1:-1;29884:15:7;29877:22;;29840:59;29969:27;;;316:7;29969:27;29965:91;;;30049:7;30018:28;:7;30030:15;30018:11;:28::i;245:183:35:-;347:7;356:5;380:41;392:6;400;408:5;415;380:11;:41::i;:::-;373:48;;;;245:183;;;;;;;;:::o;23568:1331:7:-;23964:7;24048:1;24024:21;:25;:54;;;;;24077:1;24053:21;:25;24024:54;24016:94;;;;;-1:-1:-1;;;24016:94:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24016:94:7;;;;;;;;;;;;;;;24152:1;24129:20;:24;;;:62;;;;-1:-1:-1;316:7:7;24157:34;;;;;24129:62;:107;;;;;24235:1;24212:20;:24;;;24129:107;:145;;;;-1:-1:-1;316:7:7;24240:34;;;;;24129:145;24121:184;;;;;-1:-1:-1;;;24121:184:7;;;;;;;;;;;;-1:-1:-1;;;24121:184:7;;;;;;;;;;;;;;;24389:20;24365:44;;:20;:44;;;24361:141;;;24468:34;:21;24494:7;24468:25;:34::i;:::-;24431;:21;24457:7;24431:25;:34::i;:::-;:71;;;;;;24424:78;;;;24361:141;24515:14;;;24582:34;:21;24608:7;24582:25;:34::i;:::-;24566:50;;24649:79;24655:5;24662:21;24685:20;24707;24649:5;:79::i;:::-;24627:101;;-1:-1:-1;24627:101:7;-1:-1:-1;24739:13:7;24755:33;:21;24627:101;24755:25;:33::i;:::-;24739:49;-1:-1:-1;24815:34:7;;;;;;24885:6;24868:13;;;24885:6;24867:24;;;;;;23568:1331;-1:-1:-1;;;;;;;;;;;23568:1331:7:o;32724:1425::-;33097:6;33105;33165:22;33133:28;:54;33129:340;;;33241:1;33210:28;:32;:64;;;;33273:1;33246:24;:28;33210:64;33202:104;;;;;-1:-1:-1;;;33202:104:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;33202:104:7;;;;;;;;;;;;;;;33129:340;;;33374:1;33343:28;:32;:62;;;;;33404:1;33379:22;:26;33343:62;:94;;;;;33436:1;33409:24;:28;33343:94;33335:134;;;;;-1:-1:-1;;;33335:134:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;33335:134:7;;;;;;;;;;;;;;;33512:1;33488:21;:25;:56;;;;;33543:1;33517:23;:27;33488:56;33480:93;;;;;-1:-1:-1;;;33480:93:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;33586:10;33599:55;:28;33632:21;33599:32;:55::i;:::-;33586:68;-1:-1:-1;33665:10:7;33678:53;:24;33707:23;33678:28;:53::i;:::-;33665:66;;33779:22;33748:28;:53;33744:169;;;33823:90;33846:22;33870:28;33900:2;33904;33908:4;33823:22;:90::i;:::-;33816:97;;;;;;;;33744:169;33961:22;33930:28;:53;33926:170;;;34005:91;34028:28;34058:22;34082:2;34086;34090:5;34005:22;:91::i;33926:170::-;34116:25;34134:2;34138;34116:17;:25::i;:::-;34109:32;;;;;;32724:1425;;;;;;;;;:::o;664:140:35:-;738:5;762:35;794:2;762:31;:35::i;1074:110::-;1132:7;1158:19;1175:1;1158:16;:19::i;550:108::-;608:5;632:19;648:2;632:15;:19::i;18929:88:7:-;18963:17;:15;:17::i;:::-;18991:18;:16;:18::i;:::-;18929:88::o;1345:145:35:-;1421:6;1429;1454:29;1476:2;1480;1454:21;:29::i;25578:1050:7:-;25799:7;25869:1;25859:7;:11;25851:42;;;;;-1:-1:-1;;;25851:42:7;;;;;;;;;;;;-1:-1:-1;;;25851:42:7;;;;;;;;;;;;;;;25930:1;25912:15;:19;25904:59;;;;;-1:-1:-1;;;25904:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25904:59:7;;;;;;;;;;;;;;;25998:1;25982:13;:17;;;:52;;;;-1:-1:-1;26020:14:7;26003:31;;;;;25982:52;25974:90;;;;;-1:-1:-1;;;25974:90:7;;;;;;;;;;;;-1:-1:-1;;;25974:90:7;;;;;;;;;;;;;;;26119:12;26115:39;;-1:-1:-1;26153:1:7;26146:8;;26115:39;26224:27;;;316:7;26224:27;26220:101;;;26310:7;26305:1;26274:28;:7;26286:15;26274:11;:28::i;:::-;:32;26273:44;;;;;;26320:1;26273:48;26266:55;;;;26220:101;26334:14;;;26401:20;:7;26413;26401:11;:20::i;:::-;26385:36;;26454:48;26460:5;26467:7;316;26488:13;26454:5;:48::i;:::-;26432:70;;-1:-1:-1;26432:70:7;-1:-1:-1;26513:12:7;26529:46;;;26560:1;26530:27;:15;26432:70;26530:19;:27::i;:::-;:31;26529:46;;26598:22;;;26579:1;26598:22;;-1:-1:-1;;;;;25578:1050:7;;;;;;:::o;19672:1091::-;19954:7;20024:1;20014:7;:11;20006:42;;;;;-1:-1:-1;;;20006:42:7;;;;;;;;;;;;-1:-1:-1;;;20006:42:7;;;;;;;;;;;;;;;20085:1;20067:15;:19;20059:59;;;;;-1:-1:-1;;;20059:59:7;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20059:59:7;;;;;;;;;;;;;;;20154:1;20137:14;:18;;;:50;;;;-1:-1:-1;316:7:7;20159:28;;;;;20137:50;20129:89;;;;;-1:-1:-1;;;20129:89:7;;;;;;;;;;;;-1:-1:-1;;;20129:89:7;;;;;;;;;;;;;;;20281:12;20277:39;;-1:-1:-1;20315:1:7;20308:8;;20277:39;20379:28;;;316:7;20379:28;20375:92;;;20452:15;20429:20;:7;20441;20429:11;:20::i;20375:92::-;20480:14;;;20547:28;:7;20559:15;20547:11;:28::i;1149:250:60:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;386:169;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;35739:791:7;35837:7;35846:5;-1:-1:-1;;;35872:6:7;:16;35864:25;;;;;;35902:15;35928:12;35962:6;-1:-1:-1;;;35943:6:7;:16;:25;;;;;;35928:40;;1072:35;35983:4;:22;35979:149;;;36032:16;36043:4;36032:10;:16::i;:::-;36022:26;;35979:149;;;36100:16;36111:4;36100:10;:16::i;:::-;36090:26;;35979:149;36140:23;36184:5;36166:23;;36176:5;36166:15;;:7;:15;:23;;;;;;36140:49;;-1:-1:-1;;;36204:15:7;:33;36200:323;;;36262:27;36273:15;36262:10;:27::i;:::-;417:3;36254:51;;;;;;;;;36200:323;36347:15;36365:42;36391:15;36365:25;:42::i;:::-;36347:60;;36430:69;36477:9;417:3;36461:25;36441:46;;:15;:46;;36489:9;36430:10;:69::i;:::-;36422:89;-1:-1:-1;36501:9:7;-1:-1:-1;36422:89:7;;-1:-1:-1;;;36422:89:7;63627:247;63701:6;63709;63738:2;63732;:8;63728:57;;63762:23;63778:2;63782;63762:15;:23::i;:::-;63755:30;;;;;;63728:57;63797:8;63807;63819:23;63835:2;63839;63819:15;:23::i;:::-;63796:46;;;-1:-1:-1;63627:247:7;-1:-1:-1;;;;;63627:247:7:o;44252:2798::-;44306:7;;;;;44425:34;44420:39;;44416:143;;-1:-1:-1;;;44462:41:7;;;;44523:34;-1:-1:-1;;;44509:1:7;:11;:48;;;;;;44505:52;;44416:143;44593:34;44588:1;:39;44584:143;;-1:-1:-1;;;44630:41:7;;;;44691:34;-1:-1:-1;;;44677:1:7;:11;:48;;;;;;44673:52;;44584:143;44761:34;44756:1;:39;44752:143;;-1:-1:-1;;;44798:41:7;;;;44859:34;-1:-1:-1;;;44845:1:7;:11;:48;;;;;;44841:52;;44752:143;44929:34;44924:1;:39;44920:143;;-1:-1:-1;;;44966:41:7;;;;45027:34;-1:-1:-1;;;45013:1:7;:11;:48;;;;;;45009:52;;44920:143;45097:34;45092:1;:39;45088:143;;-1:-1:-1;;;45134:41:7;;;;45195:34;-1:-1:-1;;;45181:1:7;:11;:48;;;;;;45177:52;;45088:143;45265:34;45260:1;:39;45256:143;;-1:-1:-1;;;45302:41:7;;;;45363:34;-1:-1:-1;;;45349:1:7;:11;:48;;;;;;45345:52;;45256:143;45433:34;45428:1;:39;45424:143;;-1:-1:-1;;;45470:41:7;;;;45531:34;-1:-1:-1;;;45517:1:7;:11;:48;;;;;;45513:52;;45424:143;45601:34;45596:1;:39;45592:143;;-1:-1:-1;;;45638:41:7;;;;45699:34;-1:-1:-1;;;45685:1:7;:11;:48;;;;;;45681:52;;45592:143;-1:-1:-1;;45770:11:7;;;-1:-1:-1;45770:11:7;;-1:-1:-1;;;;45796:5:7;;;:15;;-1:-1:-1;;;;45834:39:7;;;45829:45;;:83;45822:90;;;;-1:-1:-1;;;45922:1:7;45918;:5;:15;;;;;;45914:19;;-1:-1:-1;;;46023:1:7;45985:35;:39;45980:1;:45;:83;;;;;;45973:90;;;;-1:-1:-1;;;46073:1:7;46069;:5;:15;;;;;;46065:19;;-1:-1:-1;;;46174:1:7;46136:35;:39;46131:1;:45;:83;;;;;;46124:90;;;;-1:-1:-1;;;46224:1:7;46220;:5;:15;;;;;;46216:19;;-1:-1:-1;;;46325:1:7;46287:35;:39;46282:1;:45;:83;;;;;;46275:90;;;;-1:-1:-1;;;46375:1:7;46371;:5;:15;;;;;;46367:19;;-1:-1:-1;;;46476:1:7;46438:35;:39;46433:1;:45;:83;;;;;;46426:90;;;;-1:-1:-1;;;46526:1:7;46522;:5;:15;;;;;;46518:19;;-1:-1:-1;;;46627:1:7;46589:35;:39;46584:1;:45;:83;;;;;;46577:90;;;;-1:-1:-1;;;46677:1:7;46673;:5;:15;;;;;;46669:19;;-1:-1:-1;;;46778:1:7;46740:35;:39;46735:1;:45;:83;;;;;;46728:90;;;;-1:-1:-1;;;46828:1:7;46824;:5;:15;;;;;;46820:19;;-1:-1:-1;;;46929:1:7;46891:35;:39;46886:1;:45;:83;;;;;;46879:90;;;;;44252:2798;-1:-1:-1;;;;;44252:2798:7:o;64510:133::-;64575:7;64633:1;64628:2;:6;64623:2;:11;64617:2;64612;:7;;;;;;:23;;;;;;64607:2;64602;:7;;;;;;:33;;64510:133;-1:-1:-1;;;64510:133:7:o;36707:823::-;36761:7;;-1:-1:-1;;;36905:12:7;;36901:156;;36934:11;36948:22;-1:-1:-1;;;36958:1:7;:11;;36948:9;:22::i;:::-;36985:11;;;;;;-1:-1:-1;;;37030:15:7;;-1:-1:-1;;36901:156:7;-1:-1:-1;;;37165:1:7;:11;37161:305;;;417:3;37193:262;37223:5;;;;37193:262;;-1:-1:-1;;;37259:5:7;;;37258:17;37254:21;;-1:-1:-1;;;37315:1:7;:12;37311:129;;37358:1;37352:7;;;;37406:14;-1:-1:-1;;37414:5:7;;37406:14;;37399:21;;;;;37311:129;-1:-1:-1;;37230:3:7;37193:262;;;;37161:305;898:33;815;37485:19;;:37;;36707:823;-1:-1:-1;;;36707:823:7:o;39646:3864::-;39719:7;39739:10;39752:2;39739:15;;39765:11;39811:10;39798:23;;39804:2;39799;:7;39798:23;;39793:28;;39830:2;39835:33;39830:38;39823:45;;;;39923:10;39910:23;;39916:2;39911;:7;39910:23;;39905:28;;39942:2;39947:33;39942:38;39935:45;;;;40035:10;40022:23;;40028:2;40023;:7;40022:23;;40017:28;;40054:2;40059:33;40054:38;40047:45;;;;40147:10;40134:23;;40140:2;40135;:7;40134:23;;40129:28;;40166:2;40171:33;40166:38;40159:45;;;;40259:10;40246:23;;40252:2;40247;:7;40246:23;;40241:28;;40278:2;40283:33;40278:38;40271:45;;;;40371:10;40358:23;;40364:2;40359;:7;40358:23;;40353:28;;40390:2;40395:33;40390:38;40383:45;;;;40483:10;40470:23;;40476:2;40471;:7;40470:23;;40465:28;;40502:2;40507:33;40502:38;40495:45;;;;40595:10;40582:23;;40588:2;40583;:7;40582:23;;40577:28;;40614:2;40619:33;40614:38;40607:45;;;;40707:10;40694:23;;40700:2;40695;:7;40694:23;;40689:28;;40726:2;40731:33;40726:38;40719:45;;;;40819:10;40806:23;;40812:2;40807;:7;40806:23;;40801:28;;40838:2;40843:33;40838:38;40831:45;;;;40931:10;40918:23;;40924:2;40919;:7;40918:23;;40913:28;;40950:2;40955:33;40950:38;40943:45;;;;41043:10;41030:23;;41036:2;41031;:7;41030:23;;41025:28;;41062:2;41067:33;41062:38;41055:45;;;;41155:10;41142:23;;41148:2;41143;:7;41142:23;;41137:28;;41174:2;41179:33;41174:38;41167:45;;;;41267:10;41254:23;;41260:2;41255;:7;41254:23;;41249:28;;41286:2;41291:33;41286:38;41279:45;;;;41379:10;41366:23;;41372:2;41367;:7;41366:23;;41361:28;;41398:2;41403:33;41398:38;41391:45;;;;41491:10;41478:23;;41484:2;41479;:7;41478:23;;41473:28;;41510:2;41515:33;41510:38;41503:45;;;;41603:10;41590:23;;41596:2;41591;:7;41590:23;;41585:28;;41622:2;41627:33;41622:38;41615:45;;;;41715:10;41702:23;;41708:2;41703;:7;41702:23;;41697:28;;41734:2;41739:33;41734:38;41727:45;;;;41827:10;41814:23;;41820:2;41815;:7;41814:23;;41809:28;;41846:2;41851:33;41846:38;41839:45;;;;41939:10;41926:23;;41932:2;41927;:7;41926:23;;41921:28;;41958:2;41963:33;41958:38;41951:45;;;;42051:10;42038:23;;42044:2;42039;:7;42038:23;;42033:28;;42070:2;42075:33;42070:38;42063:45;;;;42163:10;42150:23;;42156:2;42151;:7;42150:23;;42145:28;;42182:2;42187:33;42182:38;42175:45;;;;42275:10;42262:23;;42268:2;42263;:7;42262:23;;42257:28;;42294:2;42299:33;42294:38;42287:45;;;;42387:10;42374:23;;42380:2;42375;:7;42374:23;;42369:28;;42406:2;42411:33;42406:38;42399:45;;;;42499:10;42486:23;;42492:2;42487;:7;42486:23;;42481:28;;42518:2;42523:33;42518:38;42511:45;;;;42611:10;42598:23;;42604:2;42599;:7;42598:23;;42593:28;;42630:2;42635:33;42630:38;42623:45;;;;42723:10;42710:23;;42716:2;42711;:7;42710:23;;42705:28;;42742:2;42747:33;42742:38;42735:45;;;;42835:10;42822:23;;42828:2;42823;:7;42822:23;;42817:28;;42854:2;42859:33;42854:38;42847:45;;;;42947:10;42934:23;;42940:2;42935;:7;42934:23;;42929:28;;42966:2;42971:33;42966:38;42959:45;;;;43059:10;43046:23;;43052:2;43047;:7;43046:23;;43041:28;;43078:2;43083:33;43078:38;43071:45;;;;43171:10;43158:23;;43164:2;43159;:7;43158:23;;43153:28;;43190:2;43195:33;43190:38;43183:45;;;;43283:10;43270:23;;43276:2;43271;:7;43270:23;;43265:28;;43302:2;43307:33;43302:38;43295:45;;;;43441:10;43434:17;;271:1;43434:17;;43428:2;43392:33;43386:3;:39;;;;;;:44;:66;;39646:3864;-1:-1:-1;;;;;39646:3864:7:o;62502:484::-;62627:6;62635;62667:21;62679:3;62684;62667:11;:21::i;:::-;62654:34;;-1:-1:-1;62654:34:7;-1:-1:-1;62699:9:7;62730:3;62711:16;:3;-1:-1:-1;;;62711:7:7;:16::i;:::-;:22;;;;;;62699:34;;62744:9;1072:35;62756:1;:19;:51;;62794:13;62805:1;62794:10;:13::i;:::-;62756:51;;;62778:13;62789:1;62778:10;:13::i;:::-;62744:63;-1:-1:-1;62818:9:7;62843:3;62830:10;62744:63;62836:3;62830:5;:10::i;:::-;:16;;;;;;62818:28;;62857:9;62869:11;:44;;62899:14;62911:1;62899:11;:14::i;:::-;62869:44;;;62883:13;62894:1;62883:10;:13::i;:::-;62857:56;-1:-1:-1;62931:47:7;62949:10;62857:56;62955:3;62949:5;:10::i;:::-;62961:16;:3;-1:-1:-1;;;62961:7:7;:16::i;:::-;62931:17;:47::i;:::-;62924:54;;;;;;;;62502:484;;;;;;;;:::o;38573:501::-;38643:5;369:2;417:3;38733:185;38749:2;38740:11;;:2;38745:1;38740:6;:11;;;38733:185;;;38768:9;38792:1;38780:13;38781:7;;;38780:13;;38768:25;;38832:2;38812:11;38824:3;38812:16;;;;;;;;;;;:22;38808:98;;38858:3;38853:8;;38808:98;;;38903:3;38898:8;;38808:98;38733:185;;;;38953:2;38934:11;38946:2;38934:15;;;;;;;;;;;:21;38930:49;;38977:2;-1:-1:-1;38970:9:7;;-1:-1:-1;38970:9:7;38930:49;39013:2;38994:11;39006:2;38994:15;;;;;;;;;;;:21;38990:49;;-1:-1:-1;39037:2:7;-1:-1:-1;39030:9:7;;47747:3216;47801:7;48185:18;-1:-1:-1;;;47899:38:7;;;47983:5;;;:15;;;48070:5;;;:15;;;48157:5;;;:15;;;48181:22;;;48011:18;48007:22;;;48098:18;48094:22;;;;48087:29;48174;;47899:38;;48244:5;;;:15;48240:19;;48268:1;48272:18;48268:22;48261:29;;;;-1:-1:-1;;;48335:1:7;48331;:5;:15;;;;;;48327:19;;48355:1;48359:18;48355:22;48348:29;;;;-1:-1:-1;;;48422:1:7;48418;:5;:15;;;;;;48414:19;;48442:1;48446:18;48442:22;48435:29;;;;-1:-1:-1;;;48509:1:7;48505;:5;:15;;;;;;48501:19;;48529:1;48533:18;48529:22;48522:29;;;;-1:-1:-1;;;48596:1:7;48592;:5;:15;;;;;;48588:19;;48616:1;48620:18;48616:22;48609:29;;;;-1:-1:-1;;;48683:1:7;48679;:5;:15;;;;;;48675:19;;48703:1;48707:18;48703:22;48696:29;;;;-1:-1:-1;;;48770:1:7;48766;:5;:15;;;;;;48762:19;;48790:1;48794:18;48790:22;48783:29;;;;-1:-1:-1;;;48857:1:7;48853;:5;:15;;;;;;48849:19;;48877:1;48881:18;48877:22;48870:29;;;;-1:-1:-1;;;48944:1:7;48940;:5;:15;;;;;;48936:19;;48964:1;48968:18;48964:22;48957:29;;;;-1:-1:-1;;;49031:1:7;49027;:5;:15;;;;;;49023:19;;49051:1;49055:18;49051:22;49044:29;;;;-1:-1:-1;;;49118:1:7;49114;:5;:15;;;;;;49110:19;;49138:1;49142:18;49138:22;49131:29;;;;-1:-1:-1;;;49205:1:7;49201;:5;:15;;;;;;49197:19;;49225:1;49229:18;49225:22;49218:29;;;;-1:-1:-1;;;49292:1:7;49288;:5;:15;;;;;;49284:19;;49312:1;49316:18;49312:22;49305:29;;;;-1:-1:-1;;;49379:1:7;49375;:5;:15;;;;;;49371:19;;49399:1;49403:18;49399:22;49392:29;;;;-1:-1:-1;;;49466:1:7;49462;:5;:15;;;;;;49458:19;;49486:1;49490:18;49486:22;49479:29;;;;-1:-1:-1;;;49553:1:7;49549;:5;:15;;;;;49644:18;49549:15;;;49566:29;;;49638:24;:28;;-1:-1:-1;;;49638:38:7;;49549:15;-1:-1:-1;;;;49744:39:7;;49743:46;49739:137;;49841:35;49803;49797:41;;:79;49791:85;;49739:137;-1:-1:-1;;;49916:39:7;;49915:46;49911:137;;50013:35;49975;49969:41;;:79;49963:85;;49911:137;-1:-1:-1;;;50088:39:7;;50087:46;50083:137;;50185:35;50147;50141:41;;:79;50135:85;;50083:137;-1:-1:-1;;;50260:39:7;;50259:46;50255:137;;50357:35;50319;50313:41;;:79;50307:85;;50255:137;-1:-1:-1;;;50432:39:7;;50431:46;50427:137;;50529:35;50491;50485:41;;:79;50479:85;;50427:137;-1:-1:-1;;;50604:39:7;;50603:46;50599:137;;50701:35;50663;50657:41;;:79;50651:85;;50599:137;-1:-1:-1;;;50776:39:7;;50775:46;50771:137;;50873:35;50835;50829:41;;:79;50823:85;;50771:137;-1:-1:-1;50952:3:7;;47747:3216;-1:-1:-1;;;47747:3216:7:o;37658:542::-;37712:5;;37765:3;37760:8;;37756:414;;;37822:85;37834:1;37829:2;:6;37822:85;;;37863:1;37856:8;;;;37883;37822:85;;;37756:414;;;38000:3;37985:174;38005:5;;;;37985:174;;271:1;38051:8;;;;38044:16;;38040:104;;38085:8;;;;;;;;38116;;;;38040:104;38018:1;38012:7;;;37985:174;;;;38189:3;37658:542;-1:-1:-1;;37658:542:7:o;1867:8491::-;4044:36;4038:2;4025:55;4110:36;4104:2;4091:55;4176:36;4170:2;4157:55;4242:36;4236:2;4223:55;4308:36;4302:2;4289:55;4374:36;4368:2;4355:55;4440:36;4434:2;4421:55;4506:36;4500:2;4487:55;4572:36;4566:2;4553:55;4638:36;4632:2;4619:55;4704:36;4698:2;4685:55;4770:36;4764:2;4751:55;4836:36;4830:2;4817:55;4902:36;4896:2;4883:55;4968:36;4962:2;4949:55;5034:36;5028:2;5015:55;5100:36;5094:2;5081:55;5166:36;5160:2;5147:55;5232:36;5226:2;5213:55;5298:36;5292:2;5279:55;5364:36;5358:2;5345:55;5430:36;5424:2;5411:55;5496:36;5490:2;5477:55;5562:36;5556:2;5543:55;5628:36;5622:2;5609:55;5694:36;5688:2;5675:55;5760:36;5754:2;5741:55;5826:36;5820:2;5807:55;5892:36;5886:2;5873:55;5958:36;5952:2;5939:55;6024:36;6018:2;6005:55;6090:36;6084:2;6071:55;6156:36;6150:2;6137:55;6222:36;6216:2;6203:55;6288:36;6282:2;6269:55;6354:36;6348:2;6335:55;6420:36;6414:2;6401:55;6486:36;6480:2;6467:55;6552:36;6546:2;6533:55;6618:36;6612:2;6599:55;6684:36;6678:2;6665:55;6750:36;6744:2;6731:55;6816:36;6810:2;6797:55;6882:36;6876:2;6863:55;6948:36;6942:2;6929:55;7014:36;7008:2;6995:55;7080:36;7074:2;7061:55;7146:36;7140:2;7127:55;7212:36;7206:2;7193:55;7278:36;7272:2;7259:55;7344:36;7338:2;7325:55;7410:36;7404:2;7391:55;7476:36;7470:2;7457:55;7542:36;7536:2;7523:55;7608:36;7602:2;7589:55;7674:36;7668:2;7655:55;7740:36;7734:2;7721:55;7806:36;7800:2;7787:55;7872:36;7866:2;7853:55;7938:36;7932:2;7919:55;8004:36;7998:2;7985:55;8070:36;8064:2;8051:55;8136:36;8130:2;8117:55;8202:36;8196:2;8183:55;8268:36;8262:2;8249:55;8334:36;8328:2;8315:55;8400:36;8394:2;8381:55;8466:36;8460:2;8447:55;8532:36;8525:3;8513:55;8598:36;8591:3;8579:55;8664:36;8657:3;8645:55;8730:36;8723:3;8711:55;8796:36;8789:3;8777:55;8862:36;8855:3;8843:55;8928:36;8921:3;8909:55;8994:36;8987:3;8975:55;9060:36;9053:3;9041:55;9126:36;9119:3;9107:55;9192:36;9185:3;9173:55;9258:36;9251:3;9239:55;9324:36;9317:3;9305:55;9390:36;9383:3;9371:55;9456:36;9449:3;9437:55;9522:36;9515:3;9503:55;9588:36;9581:3;9569:55;9654:36;9647:3;9635:55;9720:36;9713:3;9701:55;9786:36;9779:3;9767:55;9852:36;9845:3;9833:55;9918:36;9911:3;9899:55;9984:36;9977:3;9965:55;10050:36;10043:3;10031:55;10116:36;10109:3;10097:55;10182:36;10175:3;10163:55;10248:36;10241:3;10229:55;10314:36;4025:11;10307:3;10295:16;;:55;1867:8491::o;10456:8364::-;10523:34;10503:12;:54;;;10588:34;10568:17;:54;10653:34;10633:17;:54;10718:34;10698:17;:54;10783:34;10763:17;:54;10848:34;10828:17;:54;10913:34;10893:17;:54;10978:34;10958:17;:54;11043:34;11023:17;:54;11108:34;11088:17;:54;11173:34;11153:17;:54;11238:34;11218:17;:54;11303:34;11283:17;:54;11368:34;11348:17;:54;11433:34;11413:17;:54;11498:34;11478:17;:54;11563:34;11543:17;:54;11628:34;11608:17;:54;11693:34;11673:17;:54;11758:34;11738:17;:54;11823:34;11803:17;:54;11888:34;11868:17;:54;11953:34;11933:17;:54;12018:34;11998:17;:54;12083:34;12063:17;:54;12148:34;12128:17;:54;12213:34;12193:17;:54;12278:34;12258:17;:54;12343:34;12323:17;:54;12408:34;12388:17;:54;12473:34;12453:17;:54;12538:34;12518:17;:54;12603:34;12583:17;:54;12668:34;12648:17;:54;12733:34;12713:17;:54;12798:34;12778:17;:54;12863:34;12843:17;:54;12928:34;12908:17;:54;12993:34;12973:17;:54;13058:34;13038:17;:54;13123:34;13103:17;:54;13188:34;13168:17;:54;13253:34;13233:17;:54;13318:34;13298:17;:54;13383:34;13363:17;:54;13448:34;13428:17;:54;13513:34;13493:17;:54;13578:34;13558:17;:54;13643:34;13623:17;:54;13708:34;13688:17;:54;13773:34;13753:17;:54;13838:34;13818:17;:54;13903:34;13883:17;:54;13968:34;13948:17;:54;14033:34;14013:17;:54;14098:34;14078:17;:54;14163:34;14143:17;:54;14228:34;14208:17;:54;14293:34;14273:17;:54;14358:34;14338:17;:54;14423:34;14403:17;:54;14488:34;14468:17;:54;14553:34;14533:17;:54;14618:34;14598:17;:54;14683:34;14663:17;:54;14748:34;14728:17;:54;14813:34;14793:17;:54;14878:34;14858:17;:54;14943:34;14923:17;:54;15008:34;14988:17;:54;15073:34;15053:17;:54;15138:34;15118:17;:54;15203:34;15183:17;:54;15268:34;15248:17;:54;15333:34;15313:17;:54;15398:34;15378:17;:54;15463:34;15443:17;:54;15528:34;15508:17;:54;15593:34;15573:17;:54;15658:34;15638:17;:54;15723:34;15703:17;:54;15788:34;15768:17;:54;15853:34;15833:17;:54;15918:34;15898:17;:54;15983:34;15963:17;:54;16048:34;16028:17;:54;16113:34;16093:17;:54;16178:34;16158:17;:54;16243:34;16223:17;:54;16308:34;16288:17;:54;16373:34;16353:17;:54;16438:34;16418:17;:54;16503:34;16483:17;:54;16568:34;16548:17;:54;16633:34;16613:17;:54;16698:34;16678:17;:54;16763:34;16743:17;:54;16828:34;16808:17;:54;16893:34;16873:17;:54;16958:34;16938:17;:54;17023:34;17003:17;:54;17088:34;17068:17;:54;17153:34;17133:17;:54;17218:34;17198:17;:54;17283:34;17263:17;:54;17348:34;17328:17;:54;17413:34;17393:17;:54;17478:34;17458:17;:54;17543:34;17523:17;:54;17608:34;17588:17;:54;17673:34;17653:17;:54;17738:34;17718:17;:54;17803:34;17783:17;:54;17868:34;17848:17;:54;17933:34;17913:17;:54;17998:34;17978:17;:54;18063:34;18043:17;:54;18128:34;18108:17;:54;18193:34;18173:17;:54;18258:34;18238:17;:54;18323:34;18303:17;:54;18388:34;18368:17;:54;18453:34;18433:17;:54;18518:34;18498:17;:54;18583:34;18563:17;:54;18648:34;18628:17;:54;18713:34;18693:17;:54;18778:34;;18771:3;18758:17;;64005:380;64077:6;64085;1708:62;64108:2;:19;64104:137;;;64184:1;64162:18;64156:25;;:29;;:2;:29;64200:7;;;;;;;64228:1;64222:7;;;;;;;;;64104:137;;64251:9;64263:37;316:7;64272:15;;64289:10;64272:2;64296;64289:6;:10::i;:::-;64263:8;:37::i;:::-;64251:49;316:7;64323:14;;;;-1:-1:-1;64005:380:7;-1:-1:-1;;;;64005:380:7:o;63076:444::-;63144:7;63153;-1:-1:-1;;;63177:2:7;:13;;:30;;;;;-1:-1:-1;;;63194:2:7;:13;;63177:30;63173:64;;;-1:-1:-1;63230:2:7;;-1:-1:-1;63234:2:7;63222:15;;63173:64;-1:-1:-1;;;63252:2:7;:12;63248:66;;;63302:2;-1:-1:-1;;;63287:2:7;:12;:17;;;;;;-1:-1:-1;;;63279:35:7;;;;;;63248:66;-1:-1:-1;;;63329:2:7;:12;63325:66;;;-1:-1:-1;;;63388:2:7;-1:-1:-1;;;63373:2:7;:12;:17;;;;;;63356:35;;;;;;63325:66;63402:9;63419:2;63414;:7;:17;;63429:2;63414:17;;;63424:2;63414:17;63402:29;-1:-1:-1;63442:9:7;63454:22;-1:-1:-1;;;63402:29:7;63464:11;;63454:22;63442:34;;63495:7;;;;63504;;;;;-1:-1:-1;;;;63076:444:7:o;51471:190::-;51527:7;1300:36;51551:2;:25;51547:66;;51598:15;51610:2;51598:11;:15::i;:::-;51591:22;;;;51547:66;51651:2;-1:-1:-1;;;51651:2:7;51631:22;;;;;;51471:190;-1:-1:-1;;51471:190:7:o;51052:328::-;51107:7;1300:36;51131:2;:25;51127:66;;51178:15;51190:2;51178:11;:15::i;51127:66::-;1480:36;51208:2;:25;51204:66;;51255:15;51267:2;51255:11;:15::i;51204:66::-;1570:36;51285:2;:25;51281:66;;51332:15;51344:2;51332:11;:15::i;57726:4616::-;57782:7;57815:2;57782:7;-1:-1:-1;;;57862:7:7;;;57861:19;;-1:-1:-1;57894:44:7;57889:49;;57882:56;-1:-1:-1;;;57997:7:7;;;57996:19;;-1:-1:-1;58029:44:7;58024:49;;58017:56;-1:-1:-1;;;58132:7:7;;;58131:19;;-1:-1:-1;58164:44:7;58159:49;;58152:56;-1:-1:-1;;;58267:7:7;;;58266:19;;-1:-1:-1;58299:44:7;58294:49;;58287:56;-1:-1:-1;;;58402:7:7;;;58401:19;;-1:-1:-1;58434:44:7;58429:49;;58422:56;-1:-1:-1;;;58537:7:7;;;58536:19;;-1:-1:-1;58569:44:7;58564:49;;58557:56;-1:-1:-1;;;58672:7:7;;;58671:19;;-1:-1:-1;58704:44:7;58699:49;;58692:56;-1:-1:-1;;;58807:7:7;;;58806:19;;-1:-1:-1;58839:44:7;58834:49;;58827:56;-1:-1:-1;;;58942:7:7;;;58941:19;;-1:-1:-1;58974:44:7;58969:49;;58962:56;-1:-1:-1;;;59077:7:7;;;59076:19;;-1:-1:-1;59109:44:7;59104:49;;59097:56;-1:-1:-1;;;59212:7:7;;;59211:19;;-1:-1:-1;59244:44:7;59239:49;;59232:56;-1:-1:-1;;;59347:7:7;;;59346:19;;-1:-1:-1;59379:44:7;59374:49;;59367:56;-1:-1:-1;;;59482:7:7;;;59481:19;;-1:-1:-1;59514:44:7;59509:49;;59502:56;-1:-1:-1;;;59617:7:7;;;59616:19;;-1:-1:-1;;;;59644:49:7;;59637:56;-1:-1:-1;;;59752:7:7;;;59751:19;;-1:-1:-1;59784:44:7;59779:49;;59772:56;-1:-1:-1;;;59887:7:7;;;59886:19;;-1:-1:-1;59919:44:7;59914:49;;59907:56;-1:-1:-1;;;60022:7:7;;;60021:19;;-1:-1:-1;60054:44:7;60049:49;;60042:56;-1:-1:-1;;;60157:7:7;;;60156:19;;-1:-1:-1;60189:44:7;60184:49;;60177:56;-1:-1:-1;;;60292:7:7;;;60291:19;;-1:-1:-1;60324:44:7;60319:49;;60312:56;-1:-1:-1;;;60427:7:7;;;60426:19;;-1:-1:-1;60459:44:7;60454:49;;60447:56;-1:-1:-1;;;60562:7:7;;;60561:19;;-1:-1:-1;60594:44:7;60589:49;;60582:56;-1:-1:-1;;;60697:7:7;;;60696:19;;-1:-1:-1;;;;60724:49:7;;60717:56;-1:-1:-1;;;60832:7:7;;;60831:19;;-1:-1:-1;60864:44:7;60859:49;;60852:56;-1:-1:-1;;;60967:7:7;;;60966:19;;-1:-1:-1;60999:44:7;60994:49;;60987:56;-1:-1:-1;;;61102:7:7;;;61101:19;;-1:-1:-1;61134:44:7;61129:49;;61122:56;-1:-1:-1;;;61237:7:7;;;61236:19;;-1:-1:-1;;;;61264:49:7;;61257:56;-1:-1:-1;;;61372:7:7;;;61371:19;;-1:-1:-1;61404:44:7;61399:49;;61392:56;-1:-1:-1;;;61507:7:7;;;61506:19;;-1:-1:-1;61539:44:7;61534:49;;61527:56;-1:-1:-1;;;61642:7:7;;;61641:19;;-1:-1:-1;61674:44:7;61669:49;;61662:56;-1:-1:-1;;;61777:7:7;;;61776:19;;-1:-1:-1;;;;61804:49:7;;61797:56;-1:-1:-1;;;61912:7:7;;;61911:19;;-1:-1:-1;61944:44:7;61939:49;;61932:56;-1:-1:-1;;;62047:7:7;;;62046:19;;-1:-1:-1;62079:44:7;62074:49;;62067:56;-1:-1:-1;;;62228:2:7;62191:34;62067:56;62185:40;:45;:55;;57726:4616;-1:-1:-1;;;;57726:4616:7:o;51856:4641::-;51912:7;51945:2;-1:-1:-1;;;51973:12:7;;;51989:34;51972:51;;52109:7;;;52108:19;;-1:-1:-1;52141:44:7;52136:49;;52129:56;-1:-1:-1;;;52244:7:7;;;52243:19;;-1:-1:-1;52276:44:7;52271:49;;52264:56;;-1:-1:-1;;;52379:7:7;;;52378:19;;-1:-1:-1;52411:44:7;52406:49;;52399:56;-1:-1:-1;;;52514:7:7;;;52513:19;;-1:-1:-1;52546:44:7;52541:49;;52534:56;;-1:-1:-1;;;52649:7:7;;;52648:19;;-1:-1:-1;52681:44:7;52676:49;;52669:56;-1:-1:-1;;;52784:7:7;;;52783:19;;-1:-1:-1;52816:44:7;52811:49;;52804:56;;-1:-1:-1;;;52919:7:7;;;52918:19;;-1:-1:-1;52951:44:7;52946:49;;52939:56;-1:-1:-1;;;53054:7:7;;;53053:19;;-1:-1:-1;53086:44:7;53081:49;;53074:56;;-1:-1:-1;;;53189:7:7;;;53188:19;;-1:-1:-1;53221:44:7;53216:49;;53209:56;-1:-1:-1;;;53324:7:7;;;53323:19;;-1:-1:-1;53356:44:7;53351:49;;53344:56;;-1:-1:-1;;;53459:7:7;;;53458:19;;-1:-1:-1;53491:44:7;53486:49;;53479:56;-1:-1:-1;;;53594:7:7;;;53593:19;;-1:-1:-1;53626:44:7;53621:49;;53614:56;;-1:-1:-1;;;53729:7:7;;;53728:19;;-1:-1:-1;53761:44:7;53756:49;;53749:56;-1:-1:-1;;;53864:7:7;;;53863:19;;-1:-1:-1;;;;53891:49:7;;53884:56;;-1:-1:-1;;;53999:7:7;;;53998:19;;-1:-1:-1;54031:44:7;54026:49;;54019:56;-1:-1:-1;;;54134:7:7;;;54133:19;;-1:-1:-1;54166:44:7;54161:49;;54154:56;;-1:-1:-1;;;54269:7:7;;;54268:19;;-1:-1:-1;54301:44:7;54296:49;;54289:56;-1:-1:-1;;;54404:7:7;;;54403:19;;-1:-1:-1;54436:44:7;54431:49;;54424:56;;-1:-1:-1;;;54539:7:7;;;54538:19;;-1:-1:-1;54571:44:7;54566:49;;54559:56;-1:-1:-1;;;54674:7:7;;;54673:19;;-1:-1:-1;54706:44:7;54701:49;;54694:56;;-1:-1:-1;;;54809:7:7;;;54808:19;;-1:-1:-1;54841:44:7;54836:49;;54829:56;-1:-1:-1;;;54944:7:7;;;54943:19;;-1:-1:-1;;;;54971:49:7;;54964:56;;-1:-1:-1;;;55079:7:7;;;55078:19;;-1:-1:-1;55111:44:7;55106:49;;55099:56;-1:-1:-1;;;55214:7:7;;;55213:19;;-1:-1:-1;55246:44:7;55241:49;;55234:56;;-1:-1:-1;;;55349:7:7;;;55348:19;;-1:-1:-1;55381:44:7;55376:49;;55369:56;-1:-1:-1;;;55484:7:7;;;55483:19;;-1:-1:-1;;;;55511:49:7;;55504:56;;-1:-1:-1;;;55619:7:7;;;55618:19;;-1:-1:-1;55651:44:7;55646:49;;55639:56;-1:-1:-1;;;55754:7:7;;;55753:19;;-1:-1:-1;55786:44:7;55781:49;;55774:56;;-1:-1:-1;;;55889:7:7;;;55888:19;;-1:-1:-1;55921:44:7;55916:49;;55909:56;-1:-1:-1;;;56024:7:7;;;56023:19;;-1:-1:-1;;;;56051:49:7;;56044:56;;-1:-1:-1;;;56159:7:7;;;56158:19;;-1:-1:-1;56191:44:7;56186:49;;56179:56;-1:-1:-1;;;56294:7:7;;;56293:19;;-1:-1:-1;56326:44:7;56321:49;;56314:56;;56438:34;56314:56;56432:40;;;51856:4641;-1:-1:-1;;;;51856:4641:7:o;56660:415::-;56716:7;-1:-1:-1;;56748:28:7;;1390:36;56799:23;;;;56845;;;;56918:1;56914:5;;56891:29;56716:7;56943:12;56799:23;56943:15;;;;;;;;;56931:27;;56969:9;56981:12;56994:1;56998;56994:5;56981:19;;;;;;;;;1390:36;57038:5;;;57033:11;57024:5;;;;57019:11;:25;;;;57018:49;;;-1:-1:-1;;;;56660:415:7:o;57238:291::-;57294:7;57314:10;1072:35;57327:2;:20;:54;;57367:14;57378:2;57367:10;:14::i;:::-;57327:54;;;57350:14;57361:2;57350:10;:14::i;:::-;57314:67;;57392:10;1072:35;57405:2;:20;:54;;57445:14;57456:2;57445:10;:14::i;:::-;57405:54;;;57428:14;57439:2;57428:10;:14::i;:::-;57392:67;;57519:2;-1:-1:-1;;;57503:2:7;-1:-1:-1;;;57488:2:7;:12;:17;;;;;;57483:2;57478;:7;:27;57477:39;:44;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/BancorFormula.sol\";\n\n/*\n BancorFormula test helper that exposes some BancorFormula functions\n*/\ncontract TestBancorFormula is BancorFormula {\n function powerTest(uint256 _baseN, uint256 _baseD, uint32 _expN, uint32 _expD) external view returns (uint256, uint8) {\n return super.power(_baseN, _baseD, _expN, _expD);\n }\n\n function generalLogTest(uint256 x) external pure returns (uint256) {\n return super.generalLog(x);\n }\n\n function floorLog2Test(uint256 _n) external pure returns (uint8) {\n return super.floorLog2(_n);\n }\n\n function findPositionInMaxExpArrayTest(uint256 _x) external view returns (uint8) {\n return super.findPositionInMaxExpArray(_x);\n }\n\n function generalExpTest(uint256 _x, uint8 _precision) external pure returns (uint256) {\n return super.generalExp(_x, _precision);\n }\n\n function optimalLogTest(uint256 x) external pure returns (uint256) {\n return super.optimalLog(x);\n }\n\n function optimalExpTest(uint256 x) external pure returns (uint256) {\n return super.optimalExp(x);\n }\n\n function normalizedWeightsTest(uint256 _a, uint256 _b) external pure returns (uint32, uint32) {\n return super.normalizedWeights(_a, _b);\n }\n\n function accurateWeightsTest(uint256 _a, uint256 _b) external pure returns (uint32, uint32) {\n return super.accurateWeights(_a, _b);\n }\n\n function roundDivTest(uint256 _n, uint256 _d) external pure returns (uint256) {\n return super.roundDiv(_n, _d);\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorFormula.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorFormula.sol", + "exportedSymbols": { + "TestBancorFormula": [ + 18964 + ] + }, + "id": 18965, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18803, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:35" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol", + "file": "../converter/BancorFormula.sol", + "id": 18804, + "nodeType": "ImportDirective", + "scope": 18965, + "sourceUnit": 8978, + "src": "75:40:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18805, + "name": "BancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8977, + "src": "225:13:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorFormula_$8977", + "typeString": "contract BancorFormula" + } + }, + "id": 18806, + "nodeType": "InheritanceSpecifier", + "src": "225:13:35" + } + ], + "contractDependencies": [ + 8977, + 13177 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18964, + "linearizedBaseContracts": [ + 18964, + 8977, + 13177 + ], + "name": "TestBancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 18829, + "nodeType": "Block", + "src": "363:65:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18823, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18808, + "src": "392:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18824, + "name": "_baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18810, + "src": "400:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18825, + "name": "_expN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18812, + "src": "408:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18826, + "name": "_expD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18814, + "src": "415:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18821, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "380:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "power", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "380:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 18827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "380:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 18820, + "id": 18828, + "nodeType": "Return", + "src": "373:48:35" + } + ] + }, + "documentation": null, + "functionSelector": "8c5ce82a", + "id": 18830, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "powerTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18815, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18808, + "mutability": "mutable", + "name": "_baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "264:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18807, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18810, + "mutability": "mutable", + "name": "_baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "280:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18809, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "280:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18812, + "mutability": "mutable", + "name": "_expN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "296:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18811, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "296:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18814, + "mutability": "mutable", + "name": "_expD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "310:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18813, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "310:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "263:60:35" + }, + "returnParameters": { + "id": 18820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18817, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "347:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18816, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "347:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18819, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "356:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18818, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "356:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "346:16:35" + }, + "scope": 18964, + "src": "245:183:35", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18842, + "nodeType": "Block", + "src": "501:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18839, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18832, + "src": "535:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18837, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "518:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "generalLog", + "nodeType": "MemberAccess", + "referencedDeclaration": 5906, + "src": "518:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "518:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18836, + "id": 18841, + "nodeType": "Return", + "src": "511:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "4982d52d", + "id": 18843, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalLogTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18832, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18843, + "src": "458:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18831, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "458:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "457:11:35" + }, + "returnParameters": { + "id": 18836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18835, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18843, + "src": "492:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "492:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "491:9:35" + }, + "scope": 18964, + "src": "434:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18855, + "nodeType": "Block", + "src": "615:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18852, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18845, + "src": "648:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18850, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "632:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "floorLog2", + "nodeType": "MemberAccess", + "referencedDeclaration": 5969, + "src": "632:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 18853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 18849, + "id": 18854, + "nodeType": "Return", + "src": "625:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "ce782e08", + "id": 18856, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2Test", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18846, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18845, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18856, + "src": "573:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18844, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "573:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "572:12:35" + }, + "returnParameters": { + "id": 18849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18848, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18856, + "src": "608:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18847, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "608:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:7:35" + }, + "scope": 18964, + "src": "550:108:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18868, + "nodeType": "Block", + "src": "745:59:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18865, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18858, + "src": "794:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18863, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "762:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPositionInMaxExpArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 6036, + "src": "762:31:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 18866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "762:35:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 18862, + "id": 18867, + "nodeType": "Return", + "src": "755:42:35" + } + ] + }, + "documentation": null, + "functionSelector": "a25a34b1", + "id": 18869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPositionInMaxExpArrayTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18858, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18869, + "src": "703:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "703:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "702:12:35" + }, + "returnParameters": { + "id": 18862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18861, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18869, + "src": "738:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18860, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "738:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:7:35" + }, + "scope": 18964, + "src": "664:140:35", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18884, + "nodeType": "Block", + "src": "896:56:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18880, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18871, + "src": "930:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18881, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18873, + "src": "934:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18878, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "913:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "generalExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 6546, + "src": "913:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint8) pure returns (uint256)" + } + }, + "id": 18882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "913:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18877, + "id": 18883, + "nodeType": "Return", + "src": "906:39:35" + } + ] + }, + "documentation": null, + "functionSelector": "6cab5055", + "id": 18885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalExpTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18871, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "834:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "834:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18873, + "mutability": "mutable", + "name": "_precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "846:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "846:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "833:30:35" + }, + "returnParameters": { + "id": 18877, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18876, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "887:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "887:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "886:9:35" + }, + "scope": 18964, + "src": "810:142:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18897, + "nodeType": "Block", + "src": "1025:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18894, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18887, + "src": "1059:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18892, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1042:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "optimalLog", + "nodeType": "MemberAccess", + "referencedDeclaration": 6866, + "src": "1042:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1042:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18891, + "id": 18896, + "nodeType": "Return", + "src": "1035:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "3e8a38ab", + "id": 18898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalLogTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18888, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18887, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18898, + "src": "982:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "982:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "981:11:35" + }, + "returnParameters": { + "id": 18891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18890, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18898, + "src": "1016:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1016:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1015:9:35" + }, + "scope": 18964, + "src": "958:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18910, + "nodeType": "Block", + "src": "1141:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18907, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18900, + "src": "1175:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18905, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1158:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "optimalExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 7276, + "src": "1158:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1158:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18904, + "id": 18909, + "nodeType": "Return", + "src": "1151:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "acdee8cb", + "id": 18911, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalExpTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18900, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18911, + "src": "1098:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1098:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1097:11:35" + }, + "returnParameters": { + "id": 18904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18911, + "src": "1132:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1132:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1131:9:35" + }, + "scope": 18964, + "src": "1074:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18928, + "nodeType": "Block", + "src": "1284:55:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18924, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18913, + "src": "1325:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18925, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18915, + "src": "1329:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18922, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1301:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "normalizedWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 8656, + "src": "1301:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 18926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1301:31:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18921, + "id": 18927, + "nodeType": "Return", + "src": "1294:38:35" + } + ] + }, + "documentation": null, + "functionSelector": "3e75c6ca", + "id": 18929, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedWeightsTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18913, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1221:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1221:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18915, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1233:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18914, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1233:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1220:24:35" + }, + "returnParameters": { + "id": 18921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18918, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1268:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18917, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1268:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18920, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1276:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18919, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1276:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1267:16:35" + }, + "scope": 18964, + "src": "1190:149:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18946, + "nodeType": "Block", + "src": "1437:53:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18942, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18931, + "src": "1476:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18943, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18933, + "src": "1480:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18940, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1454:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "accurateWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 8721, + "src": "1454:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 18944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1454:29:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18939, + "id": 18945, + "nodeType": "Return", + "src": "1447:36:35" + } + ] + }, + "documentation": null, + "functionSelector": "e4883121", + "id": 18947, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateWeightsTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18931, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1374:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1374:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18933, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1386:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1386:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1373:24:35" + }, + "returnParameters": { + "id": 18939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18936, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1421:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18935, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1421:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18938, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1429:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18937, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1429:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1420:16:35" + }, + "scope": 18964, + "src": "1345:145:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18962, + "nodeType": "Block", + "src": "1574:46:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18958, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18949, + "src": "1606:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18959, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18951, + "src": "1610:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18956, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1591:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "roundDiv", + "nodeType": "MemberAccess", + "referencedDeclaration": 8747, + "src": "1591:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 18960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1591:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18955, + "id": 18961, + "nodeType": "Return", + "src": "1584:29:35" + } + ] + }, + "documentation": null, + "functionSelector": "47d0b686", + "id": 18963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDivTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18949, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1518:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18948, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1518:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18951, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1530:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18950, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1530:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1517:24:35" + }, + "returnParameters": { + "id": 18955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18954, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1565:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1565:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1564:9:35" + }, + "scope": 18964, + "src": "1496:124:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18965, + "src": "195:1427:35" + } + ], + "src": "51:1572:35" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorFormula.sol", + "exportedSymbols": { + "TestBancorFormula": [ + 18964 + ] + }, + "id": 18965, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18803, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:35" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/BancorFormula.sol", + "file": "../converter/BancorFormula.sol", + "id": 18804, + "nodeType": "ImportDirective", + "scope": 18965, + "sourceUnit": 8978, + "src": "75:40:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 18805, + "name": "BancorFormula", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8977, + "src": "225:13:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorFormula_$8977", + "typeString": "contract BancorFormula" + } + }, + "id": 18806, + "nodeType": "InheritanceSpecifier", + "src": "225:13:35" + } + ], + "contractDependencies": [ + 8977, + 13177 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 18964, + "linearizedBaseContracts": [ + 18964, + 8977, + 13177 + ], + "name": "TestBancorFormula", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 18829, + "nodeType": "Block", + "src": "363:65:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18823, + "name": "_baseN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18808, + "src": "392:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18824, + "name": "_baseD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18810, + "src": "400:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18825, + "name": "_expN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18812, + "src": "408:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 18826, + "name": "_expD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18814, + "src": "415:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 18821, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "380:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "power", + "nodeType": "MemberAccess", + "referencedDeclaration": 5820, + "src": "380:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint32_$_t_uint32_$returns$_t_uint256_$_t_uint8_$", + "typeString": "function (uint256,uint256,uint32,uint32) view returns (uint256,uint8)" + } + }, + "id": 18827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "380:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint8_$", + "typeString": "tuple(uint256,uint8)" + } + }, + "functionReturnParameters": 18820, + "id": 18828, + "nodeType": "Return", + "src": "373:48:35" + } + ] + }, + "documentation": null, + "functionSelector": "8c5ce82a", + "id": 18830, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "powerTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18815, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18808, + "mutability": "mutable", + "name": "_baseN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "264:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18807, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18810, + "mutability": "mutable", + "name": "_baseD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "280:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18809, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "280:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18812, + "mutability": "mutable", + "name": "_expN", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "296:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18811, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "296:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18814, + "mutability": "mutable", + "name": "_expD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "310:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18813, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "310:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "263:60:35" + }, + "returnParameters": { + "id": 18820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18817, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "347:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18816, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "347:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18819, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18830, + "src": "356:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18818, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "356:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "346:16:35" + }, + "scope": 18964, + "src": "245:183:35", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18842, + "nodeType": "Block", + "src": "501:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18839, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18832, + "src": "535:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18837, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "518:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "generalLog", + "nodeType": "MemberAccess", + "referencedDeclaration": 5906, + "src": "518:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "518:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18836, + "id": 18841, + "nodeType": "Return", + "src": "511:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "4982d52d", + "id": 18843, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalLogTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18833, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18832, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18843, + "src": "458:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18831, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "458:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "457:11:35" + }, + "returnParameters": { + "id": 18836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18835, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18843, + "src": "492:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18834, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "492:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "491:9:35" + }, + "scope": 18964, + "src": "434:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18855, + "nodeType": "Block", + "src": "615:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18852, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18845, + "src": "648:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18850, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "632:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "floorLog2", + "nodeType": "MemberAccess", + "referencedDeclaration": 5969, + "src": "632:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) pure returns (uint8)" + } + }, + "id": 18853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 18849, + "id": 18854, + "nodeType": "Return", + "src": "625:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "ce782e08", + "id": 18856, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "floorLog2Test", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18846, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18845, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18856, + "src": "573:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18844, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "573:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "572:12:35" + }, + "returnParameters": { + "id": 18849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18848, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18856, + "src": "608:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18847, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "608:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "607:7:35" + }, + "scope": 18964, + "src": "550:108:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18868, + "nodeType": "Block", + "src": "745:59:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18865, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18858, + "src": "794:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18863, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "762:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "findPositionInMaxExpArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 6036, + "src": "762:31:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 18866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "762:35:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 18862, + "id": 18867, + "nodeType": "Return", + "src": "755:42:35" + } + ] + }, + "documentation": null, + "functionSelector": "a25a34b1", + "id": 18869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "findPositionInMaxExpArrayTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18858, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18869, + "src": "703:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "703:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "702:12:35" + }, + "returnParameters": { + "id": 18862, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18861, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18869, + "src": "738:5:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18860, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "738:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:7:35" + }, + "scope": 18964, + "src": "664:140:35", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18884, + "nodeType": "Block", + "src": "896:56:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18880, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18871, + "src": "930:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18881, + "name": "_precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18873, + "src": "934:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 18878, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "913:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "generalExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 6546, + "src": "913:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint256,uint8) pure returns (uint256)" + } + }, + "id": 18882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "913:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18877, + "id": 18883, + "nodeType": "Return", + "src": "906:39:35" + } + ] + }, + "documentation": null, + "functionSelector": "6cab5055", + "id": 18885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generalExpTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18871, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "834:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "834:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18873, + "mutability": "mutable", + "name": "_precision", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "846:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 18872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "846:5:35", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "833:30:35" + }, + "returnParameters": { + "id": 18877, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18876, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18885, + "src": "887:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18875, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "887:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "886:9:35" + }, + "scope": 18964, + "src": "810:142:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18897, + "nodeType": "Block", + "src": "1025:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18894, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18887, + "src": "1059:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18892, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1042:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "optimalLog", + "nodeType": "MemberAccess", + "referencedDeclaration": 6866, + "src": "1042:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1042:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18891, + "id": 18896, + "nodeType": "Return", + "src": "1035:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "3e8a38ab", + "id": 18898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalLogTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18888, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18887, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18898, + "src": "982:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "982:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "981:11:35" + }, + "returnParameters": { + "id": 18891, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18890, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18898, + "src": "1016:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1016:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1015:9:35" + }, + "scope": 18964, + "src": "958:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18910, + "nodeType": "Block", + "src": "1141:43:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18907, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18900, + "src": "1175:1:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18905, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1158:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "optimalExp", + "nodeType": "MemberAccess", + "referencedDeclaration": 7276, + "src": "1158:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 18908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1158:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18904, + "id": 18909, + "nodeType": "Return", + "src": "1151:26:35" + } + ] + }, + "documentation": null, + "functionSelector": "acdee8cb", + "id": 18911, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "optimalExpTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18900, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18911, + "src": "1098:9:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18899, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1098:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1097:11:35" + }, + "returnParameters": { + "id": 18904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18903, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18911, + "src": "1132:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1132:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1131:9:35" + }, + "scope": 18964, + "src": "1074:110:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18928, + "nodeType": "Block", + "src": "1284:55:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18924, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18913, + "src": "1325:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18925, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18915, + "src": "1329:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18922, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1301:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "normalizedWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 8656, + "src": "1301:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 18926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1301:31:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18921, + "id": 18927, + "nodeType": "Return", + "src": "1294:38:35" + } + ] + }, + "documentation": null, + "functionSelector": "3e75c6ca", + "id": 18929, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "normalizedWeightsTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18913, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1221:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1221:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18915, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1233:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18914, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1233:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1220:24:35" + }, + "returnParameters": { + "id": 18921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18918, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1268:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18917, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1268:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18920, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18929, + "src": "1276:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18919, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1276:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1267:16:35" + }, + "scope": 18964, + "src": "1190:149:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18946, + "nodeType": "Block", + "src": "1437:53:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18942, + "name": "_a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18931, + "src": "1476:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18943, + "name": "_b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18933, + "src": "1480:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18940, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1454:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "accurateWeights", + "nodeType": "MemberAccess", + "referencedDeclaration": 8721, + "src": "1454:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint32_$_t_uint32_$", + "typeString": "function (uint256,uint256) pure returns (uint32,uint32)" + } + }, + "id": 18944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1454:29:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint32_$_t_uint32_$", + "typeString": "tuple(uint32,uint32)" + } + }, + "functionReturnParameters": 18939, + "id": 18945, + "nodeType": "Return", + "src": "1447:36:35" + } + ] + }, + "documentation": null, + "functionSelector": "e4883121", + "id": 18947, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "accurateWeightsTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18931, + "mutability": "mutable", + "name": "_a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1374:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18930, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1374:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18933, + "mutability": "mutable", + "name": "_b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1386:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1386:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1373:24:35" + }, + "returnParameters": { + "id": 18939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18936, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1421:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18935, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1421:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18938, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18947, + "src": "1429:6:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 18937, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "1429:6:35", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1420:16:35" + }, + "scope": 18964, + "src": "1345:145:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 18962, + "nodeType": "Block", + "src": "1574:46:35", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 18958, + "name": "_n", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18949, + "src": "1606:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 18959, + "name": "_d", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18951, + "src": "1610:2:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 18956, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1591:5:35", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorFormula_$18964", + "typeString": "contract super TestBancorFormula" + } + }, + "id": 18957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "roundDiv", + "nodeType": "MemberAccess", + "referencedDeclaration": 8747, + "src": "1591:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 18960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1591:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18955, + "id": 18961, + "nodeType": "Return", + "src": "1584:29:35" + } + ] + }, + "documentation": null, + "functionSelector": "47d0b686", + "id": 18963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "roundDivTest", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18949, + "mutability": "mutable", + "name": "_n", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1518:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18948, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1518:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18951, + "mutability": "mutable", + "name": "_d", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1530:10:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18950, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1530:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1517:24:35" + }, + "returnParameters": { + "id": 18955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18954, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18963, + "src": "1565:7:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1565:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1564:9:35" + }, + "scope": 18964, + "src": "1496:124:35", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + } + ], + "scope": 18965, + "src": "195:1427:35" + } + ], + "src": "51:1572:35" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.790Z", + "devdoc": { + "kind": "dev", + "methods": { + "balancedWeights(uint256,uint256,uint256,uint256,uint256)": { + "details": "The arbitrage incentive is to convert to the point where the on-chain price is equal to the off-chain price. We want this operation to also impact the primary reserve balance becoming equal to the primary reserve staked balance. In other words, we want the arbitrager to convert the difference between the reserve balance and the reserve staked balance. Formula input: - let t denote the primary reserve token staked balance - let s denote the primary reserve token balance - let r denote the secondary reserve token balance - let q denote the numerator of the rate between the tokens - let p denote the denominator of the rate between the tokens Where p primary tokens are equal to q secondary tokens Formula output: - compute x = W(t / r * q / p * log(s / t)) / log(s / t) - return x / (1 + x) as the weight of the primary reserve token - return 1 / (1 + x) as the weight of the secondary reserve token Where W is the Lambert W Function If the rate-provider provides the rates for a common unit, for example: - P = 2 ==> 2 primary reserve tokens = 1 ether - Q = 3 ==> 3 secondary reserve tokens = 1 ether Then you can simply use p = P and q = Q If the rate-provider provides the rates for a single unit, for example: - P = 2 ==> 1 primary reserve token = 2 ethers - Q = 3 ==> 1 secondary reserve token = 3 ethers Then you can simply use p = Q and q = P", + "params": { + "_primaryReserveBalance": "the primary reserve token balance", + "_primaryReserveStakedBalance": "the primary reserve token staked balance", + "_reserveRateDenominator": "the denominator of the rate between the tokens Note that `numerator / denominator` should represent the amount of secondary tokens equal to one primary token", + "_reserveRateNumerator": "the numerator of the rate between the tokens", + "_secondaryReserveBalance": "the secondary reserve token balance" + }, + "returns": { + "_0": "the weight of the primary reserve token and the weight of the secondary reserve token, both in ppm (0-1000000)" + } + }, + "calculateCrossConnectorReturn(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateCrossReserveReturn(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateFundCost(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateLiquidateReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculatePurchaseReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "calculateSaleReturn(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "crossReserveRate(uint256,uint32,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "crossReserveTargetAmount(uint256,uint32,uint256,uint32,uint256)": { + "details": "given two reserve balances/weights and a sell amount (in the first reserve token), calculates the target amount for a conversion from the source reserve token to the target reserve token Formula: return = _targetReserveBalance * (1 - (_sourceReserveBalance / (_sourceReserveBalance + _amount)) ^ (_sourceReserveWeight / _targetReserveWeight))", + "params": { + "_amount": "source reserve amount", + "_sourceReserveBalance": "source reserve balance", + "_sourceReserveWeight": "source reserve weight, represented in ppm (1-1000000)", + "_targetReserveBalance": "target reserve balance", + "_targetReserveWeight": "target reserve weight, represented in ppm (1-1000000)" + }, + "returns": { + "_0": "target reserve amount" + } + }, + "fundCost(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of requested smart tokens, calculates the amount of reserve tokens required for purchasing the given amount of smart tokens Formula: return = _reserveBalance * (((_supply + _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio) - 1)", + "params": { + "_amount": "requested amount of smart tokens", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + }, + "fundSupplyAmount(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of reserve tokens to fund with, calculates the amount of smart tokens received for purchasing with the given amount of reserve tokens Formula: return = _supply * ((_amount / _reserveBalance + 1) ^ (_reserveRatio / MAX_WEIGHT) - 1)", + "params": { + "_amount": "amount of reserve tokens to fund with", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "smart token amount" + } + }, + "init()": { + "details": "should be executed after construction (too large for the constructor)" + }, + "liquidateRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "liquidateReserveAmount(uint256,uint256,uint32,uint256)": { + "details": "given a smart token supply, reserve balance, reserve ratio and an amount of smart tokens to liquidate, calculates the amount of reserve tokens received for selling the given amount of smart tokens Formula: return = _reserveBalance * (1 - ((_supply - _amount) / _supply) ^ (MAX_WEIGHT / _reserveRatio))", + "params": { + "_amount": "amount of smart tokens to liquidate", + "_reserveBalance": "reserve balance", + "_reserveRatio": "reserve ratio, represented in ppm (2-2000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + }, + "purchaseRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "purchaseTargetAmount(uint256,uint256,uint32,uint256)": { + "details": "given a token supply, reserve balance, weight and a deposit amount (in the reserve token), calculates the target amount for a given conversion (in the main token) Formula: return = _supply * ((1 + _amount / _reserveBalance) ^ (_reserveWeight / 1000000) - 1)", + "params": { + "_amount": "amount of reserve tokens to get the target amount for", + "_reserveBalance": "reserve balance", + "_reserveWeight": "reserve weight, represented in ppm (1-1000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "smart token amount" + } + }, + "saleRate(uint256,uint256,uint32,uint256)": { + "details": "deprecated, backward compatibility" + }, + "saleTargetAmount(uint256,uint256,uint32,uint256)": { + "details": "given a token supply, reserve balance, weight and a sell amount (in the main token), calculates the target amount for a given conversion (in the reserve token) Formula: return = _reserveBalance * (1 - (1 - _amount / _supply) ^ (1000000 / _reserveWeight))", + "params": { + "_amount": "amount of smart tokens to get the target amount for", + "_reserveBalance": "reserve balance", + "_reserveWeight": "reserve weight, represented in ppm (1-1000000)", + "_supply": "smart token supply" + }, + "returns": { + "_0": "reserve token amount" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestBancorNetwork.json b/apps/cic-eth/tests/testdata/bancor/TestBancorNetwork.json new file mode 100644 index 00000000..712ae943 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestBancorNetwork.json @@ -0,0 +1,7046 @@ +{ + "contractName": "TestBancorNetwork", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_fromAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_trader", + "type": "address" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "claimAndConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "claimAndConvert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "claimAndConvertFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "claimAndConvertFor2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "contract IBancorX", + "name": "_bancorX", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "completeXConversion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + } + ], + "name": "conversionPath", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convertByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convertFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "convertFor2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "etherTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturnByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxAffiliateFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "rateByPath", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IEtherToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "bool", + "name": "_register", + "type": "bool" + } + ], + "name": "registerEtherToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxAffiliateFee", + "type": "uint256" + } + ], + "name": "setMaxAffiliateFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_targetBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_targetAccount", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + } + ], + "name": "xConvert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_targetBlockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_targetAccount", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_conversionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_affiliateAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_affiliateFee", + "type": "uint256" + } + ], + "name": "xConvert2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "isV28OrHigherConverterExternal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReturnOld", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReturnNew", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"claimAndConvert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"claimAndConvert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"claimAndConvertFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"claimAndConvertFor2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"contract IBancorX\",\"name\":\"_bancorX\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"completeXConversion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"}],\"name\":\"conversionPath\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convertByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convertFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"convertFor2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"etherTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturnByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReturnNew\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReturnOld\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"isV28OrHigherConverterExternal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxAffiliateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"rateByPath\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IEtherToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_register\",\"type\":\"bool\"}],\"name\":\"registerEtherToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxAffiliateFee\",\"type\":\"uint256\"}],\"name\":\"setMaxAffiliateFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_targetBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_targetAccount\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"}],\"name\":\"xConvert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_path\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_targetBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_targetAccount\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_conversionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_affiliateAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_affiliateFee\",\"type\":\"uint256\"}],\"name\":\"xConvert2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"claimAndConvert(address[],uint256,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvert2(address[],uint256,uint256,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvertFor(address[],uint256,uint256,address)\":{\"details\":\"deprecated, backward compatibility\"},\"claimAndConvertFor2(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"completeXConversion(address[],address,uint256,uint256,address)\":{\"details\":\"allows a user to convert a token that was sent from another blockchain into any other token on the BancorNetwork ideally this transaction is created before the previous conversion is even complete, so so the input amount isn't known at that point - the amount is actually take from the BancorX contract directly by specifying the conversion id\",\"params\":{\"_bancorX\":\"address of the BancorX contract for the source token\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this conversion\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero\",\"_path\":\"conversion path\"},\"returns\":{\"_0\":\"amount of tokens received from the conversion\"}},\"conversionPath(address,address)\":{\"details\":\"returns the conversion path between two tokens in the network note that this method is quite expensive in terms of gas and should generally be called off-chain\",\"params\":{\"_sourceToken\":\"source token address\",\"_targetToken\":\"target token address\"},\"returns\":{\"_0\":\"conversion path between the two tokens\"}},\"convert(address[],uint256,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"convert2(address[],uint256,uint256,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"convertByPath(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"converts the token to any other token in the bancor network by following a predefined conversion path and transfers the result tokens to a target account affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees) note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_affiliateAccount\":\"wallet address to receive the affiliate fee or 0x0 to disable affiliate fee\",\"_affiliateFee\":\"affiliate fee in PPM or 0 to disable affiliate fee\",\"_amount\":\"amount to convert from, in the source token\",\"_beneficiary\":\"account that will receive the conversion result or 0x0 to send the result to the sender account\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\"},\"returns\":{\"_0\":\"amount of tokens received from the conversion\"}},\"convertFor(address[],uint256,uint256,address)\":{\"details\":\"deprecated, backward compatibility\"},\"convertFor2(address[],uint256,uint256,address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturnByPath(address[],uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"rateByPath(address[],uint256)\":{\"details\":\"returns the expected target amount of converting a given amount on a given path note that there is no support for circular paths\",\"params\":{\"_amount\":\"amount of _path[0] tokens received from the sender\",\"_path\":\"conversion path (see conversion path format above)\"},\"returns\":{\"_0\":\"expected target amount\"}},\"registerEtherToken(address,bool)\":{\"details\":\"allows the owner to register/unregister ether tokens\",\"params\":{\"_register\":\"true to register, false to unregister\",\"_token\":\"ether token contract address\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setMaxAffiliateFee(uint256)\":{\"details\":\"allows the owner to update the maximum affiliate-fee\",\"params\":{\"_maxAffiliateFee\":\"maximum affiliate-fee\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"xConvert(address[],uint256,uint256,bytes32,bytes32,uint256)\":{\"details\":\"converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_amount\":\"amount to convert from, in the source token\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this transaction\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\",\"_targetAccount\":\"address/account on the target blockchain to send the BNT to\",\"_targetBlockchain\":\"blockchain BNT will be issued on\"},\"returns\":{\"_0\":\"the amount of BNT received from this conversion\"}},\"xConvert2(address[],uint256,uint256,bytes32,bytes32,uint256,address,uint256)\":{\"details\":\"converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)\",\"params\":{\"_affiliateAccount\":\"affiliate account\",\"_affiliateFee\":\"affiliate fee in PPM\",\"_amount\":\"amount to convert from, in the source token\",\"_conversionId\":\"pre-determined unique (if non zero) id which refers to this transaction\",\"_minReturn\":\"if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero\",\"_path\":\"conversion path, see conversion path format above\",\"_targetAccount\":\"address/account on the target blockchain to send the BNT to\",\"_targetBlockchain\":\"blockchain BNT will be issued on\"},\"returns\":{\"_0\":\"the amount of BNT received from this conversion\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":\"TestBancorNetwork\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol\":{\"keccak256\":\"0xb1817f3d45dd66177f17cf45f1b660186ee35575222a11c9bc0e0d44b32846ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce648a9b8038bb11d1ed091a16aa831a973ff2896ae9aae6b34cb9a8d0e02b00\",\"dweb:/ipfs/QmQKqVVXV6dDBd8saigyEALeLwjG8nhqK8wLRqDGaKSDV6\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol\":{\"keccak256\":\"0xc40ca5fce07a0b65d5739e15b7c0a1adb7b1abf40d6cfe5bd15794a68fc73ccf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e72a37e36080c3f65b9f4da8feccb955d4ea4429145c034e081e4577358c8eb9\",\"dweb:/ipfs/QmR5tF1rLfnRwSKJjwXNaoXdMt73SB94B9kBF8cyeTqkaP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b191690556175306004553480156200002457600080fd5b5060405162003d6138038062003d61833981810160405260408110156200004a57600080fd5b508051602090910151600080546001600160a01b03191633179055600180806200007481620001a6565b50600280546001600160a01b039092166001600160a01b03199283168117909155600380549092161790555073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60005260056020527fa1829a9003092132f585b6ccdd167c19fe9774dbdea4260287e8a8e8ca8185d7805460ff191660011790556040518290620000f99062000205565b90815260405190819003602001906000f0801580156200011d573d6000803e3d6000fd5b50600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055508181604051620001549062000212565b9182526020820152604080519182900301906000f0801580156200017c573d6000803e3d6000fd5b50600780546001600160a01b0319166001600160a01b039290921691909117905550620002209050565b6001600160a01b03811662000202576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b60f88062003b5983390190565b6101108062003c5183390190565b61392980620002306000396000f3fe6080604052600436106101ee5760003560e01c806389f9cc611161010d578063c7ba24bc116100a0578063d734fa191161006f578063d734fa1914610c9a578063e57738e514610d25578063f2fde38b14610d48578063f3898a9714610d7b578063f3bc7d2a14610d91576101ee565b8063c7ba24bc14610aee578063c98fefed14610ba1578063cb32564e14610bb7578063d4ee1d9014610c85576101ee565b8063b1e9932b116100dc578063b1e9932b1461089a578063b4a176d31461095c578063b77d239b14610971578063c52173de14610a36576101ee565b806389f9cc61146106e05780638da5cb5b146107ab57806398e95740146107c0578063ab6214ce146107d5576101ee565b80635d732ff21161018557806379ba50971161015457806379ba5097146105d35780637b103999146105e85780637f9c0ecd146105fd5780638077ccf7146106ad576101ee565b80635d732ff2146105355780635e35359e1461054a57806361cd756e1461058d578063699e7546146105be576101ee565b80632978c10e116101c15780632978c10e1461036c5780632fe8a6ad1461045057806349d10b6414610465578063569706eb1461047a576101ee565b8063024c7ec7146101f357806302ef521e1461022157806303613f391461025c5780630c8496cc146102a3575b600080fd5b3480156101ff57600080fd5b5061021f6004803603602081101561021657600080fd5b50351515610dbb565b005b34801561022d57600080fd5b5061021f6004803603604081101561024457600080fd5b506001600160a01b0381351690602001351515610de1565b34801561026857600080fd5b5061028f6004803603602081101561027f57600080fd5b50356001600160a01b0316610e2a565b604080519115158252519081900360200190f35b3480156102af57600080fd5b50610353600480360360408110156102c657600080fd5b810190602081018135600160201b8111156102e057600080fd5b8201836020820111156102f257600080fd5b803590602001918460208302840111600160201b8311171561031357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610e3d915050565b6040805192835260208301919091528051918290030190f35b34801561037857600080fd5b5061043e600480360360c081101561038f57600080fd5b810190602081018135600160201b8111156103a957600080fd5b8201836020820111156103bb57600080fd5b803590602001918460208302840111600160201b831117156103dc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135610e55565b60408051918252519081900360200190f35b34801561045c57600080fd5b5061028f610e70565b34801561047157600080fd5b5061021f610e80565b61043e600480360360a081101561049057600080fd5b810190602081018135600160201b8111156104aa57600080fd5b8201836020820111156104bc57600080fd5b803590602001918460208302840111600160201b831117156104dd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135169060600135611088565b34801561054157600080fd5b5061043e6110a3565b34801561055657600080fd5b5061021f6004803603606081101561056d57600080fd5b506001600160a01b038135811691602081013590911690604001356110a9565b34801561059957600080fd5b506105a26110e2565b604080516001600160a01b039092168252519081900360200190f35b3480156105ca57600080fd5b506103536110f1565b3480156105df57600080fd5b5061021f611116565b3480156105f457600080fd5b506105a26111cd565b34801561060957600080fd5b5061043e6004803603604081101561062057600080fd5b810190602081018135600160201b81111561063a57600080fd5b82018360208201111561064c57600080fd5b803590602001918460208302840111600160201b8311171561066d57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506111dc915050565b3480156106b957600080fd5b5061028f600480360360208110156106d057600080fd5b50356001600160a01b03166118f9565b3480156106ec57600080fd5b5061043e600480360360a081101561070357600080fd5b810190602081018135600160201b81111561071d57600080fd5b82018360208201111561072f57600080fd5b803590602001918460208302840111600160201b8311171561075057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550506001600160a01b03833581169450602084013593604081013593506060013516905061190e565b3480156107b757600080fd5b506105a2611a85565b3480156107cc57600080fd5b50610353611a94565b61043e600480360360c08110156107eb57600080fd5b810190602081018135600160201b81111561080557600080fd5b82018360208201111561081757600080fd5b803590602001918460208302840111600160201b8311171561083857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611ab1565b3480156108a657600080fd5b5061043e600480360360808110156108bd57600080fd5b810190602081018135600160201b8111156108d757600080fd5b8201836020820111156108e957600080fd5b803590602001918460208302840111600160201b8311171561090a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356001600160a01b0316611ad7565b34801561096857600080fd5b5061021f611af1565b61043e600480360360c081101561098757600080fd5b810190602081018135600160201b8111156109a157600080fd5b8201836020820111156109b357600080fd5b803590602001918460208302840111600160201b831117156109d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611b1d565b61043e600480360360c0811015610a4c57600080fd5b810190602081018135600160201b811115610a6657600080fd5b820183602082011115610a7857600080fd5b803590602001918460208302840111600160201b83111715610a9957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060408101359060608101359060800135611cf8565b348015610afa57600080fd5b5061043e60048036036060811015610b1157600080fd5b810190602081018135600160201b811115610b2b57600080fd5b820183602082011115610b3d57600080fd5b803590602001918460208302840111600160201b83111715610b5e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135611d0b565b61043e600480360360808110156108bd57600080fd5b61043e6004803603610100811015610bce57600080fd5b810190602081018135600160201b811115610be857600080fd5b820183602082011115610bfa57600080fd5b803590602001918460208302840111600160201b83111715610c1b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906040810135906060810135906080810135906001600160a01b0360a0820135169060c00135611d25565b348015610c9157600080fd5b506105a2611e80565b348015610ca657600080fd5b50610cd560048036036040811015610cbd57600080fd5b506001600160a01b0381358116916020013516611e8f565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610d11578181015183820152602001610cf9565b505050509050019250505060405180910390f35b348015610d3157600080fd5b5061043e600480360360a081101561049057600080fd5b348015610d5457600080fd5b5061021f60048036036020811015610d6b57600080fd5b50356001600160a01b0316611fe3565b61043e60048036036060811015610b1157600080fd5b348015610d9d57600080fd5b5061021f60048036036020811015610db457600080fd5b5035612061565b610dc36120c2565b60038054911515600160a01b0260ff60a01b19909216919091179055565b610de96120c2565b81610df381612117565b82610dfd8161216b565b50506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000610e35826121bf565b90505b919050565b600080610e4a84846111dc565b946000945092505050565b6000610e65878787878787611b1d565b979650505050505050565b600354600160a01b900460ff1681565b6000546001600160a01b0316331480610ea35750600354600160a01b900460ff16155b610ee8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610f066f436f6e7472616374526567697374727960801b6122d6565b6002549091506001600160a01b03808316911614801590610f2f57506001600160a01b03811615155b610f77576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fd957600080fd5b505afa158015610fed573d6000803e3d6000fd5b505050506040513d602081101561100357600080fd5b50516001600160a01b03161415611058576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061109986868660008787611b1d565b9695505050505050565b60045481565b6110b16120c2565b826110bb81612117565b826110c581612117565b836110cf8161216b565b6110da868686612354565b505050505050565b6003546001600160a01b031681565b600754600090819061110e906001600160a01b03168280806124b4565b915091509091565b6001546001600160a01b03163314611169576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000806000806000806000806112016c42616e636f72466f726d756c6160981b6122d6565b905088965060028a51118015611222575060028a518161121d57fe5b066001145b611266576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b60025b8a518110156118e85760008b600283038151811061128357fe5b6020026020010151905060008c600184038151811061129e57fe5b6020026020010151905060008d84815181106112b657fe5b60200260200101519050816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f957600080fd5b505afa15801561130d573d6000803e3d6000fd5b505050506040513d602081101561132357600080fd5b505195506113318684612628565b925061133d8682612628565b9050816001600160a01b0316816001600160a01b0316141561162a57600384108061139057508d600385038151811061137257fe5b60200260200101516001600160a01b0316826001600160a01b031614155b156113fd57816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ce57600080fd5b505afa1580156113e2573d6000803e3d6000fd5b505050506040513d60208110156113f857600080fd5b505198505b856001600160a01b031663d8959512846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144a57600080fd5b505afa15801561145e573d6000803e3d6000fd5b505050506040513d602081101561147457600080fd5b505160408051630e53aae960e01b81526001600160a01b0386811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156114c357600080fd5b505afa1580156114d7573d6000803e3d6000fd5b505050506040513d60a08110156114ed57600080fd5b506020908101516040805163799287f160e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b0388169263f3250fe292608480840193829003018186803b15801561155357600080fd5b505afa158015611567573d6000803e3d6000fd5b505050506040513d602081101561157d57600080fd5b505160408051632bce69e560e11b81529051919c5061161291620f42409161160c916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b1580156115cf57600080fd5b505afa1580156115e3573d6000803e3d6000fd5b505050506040513d60208110156115f957600080fd5b50518e9063ffffffff9081169061268816565b906126e6565b9a8b90039a9950611623898c612745565b98506118dd565b816001600160a01b0316836001600160a01b031614156118cb57600384108061167b57508d600385038151811061165d57fe5b60200260200101516001600160a01b0316826001600160a01b031614155b156116e857816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d60208110156116e357600080fd5b505198505b856001600160a01b031663d8959512826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561173557600080fd5b505afa158015611749573d6000803e3d6000fd5b505050506040513d602081101561175f57600080fd5b505160408051630e53aae960e01b81526001600160a01b0384811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156117ae57600080fd5b505afa1580156117c2573d6000803e3d6000fd5b505050506040513d60a08110156117d857600080fd5b5060209081015160408051633b6785ab60e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b038816926376cf0b5692608480840193829003018186803b15801561183e57600080fd5b505afa158015611852573d6000803e3d6000fd5b505050506040513d602081101561186857600080fd5b505160408051632bce69e560e11b81529051919c506118ba91620f42409161160c916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b1580156115cf57600080fd5b9a8b90039a9950611623898c61278e565b6118d78684838e6124b4565b909b5099505b505050600201611269565b509596505050505050505b92915050565b60056020526000908152604090205460ff1681565b6000846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561194957600080fd5b505afa15801561195d573d6000803e3d6000fd5b505050506040513d602081101561197357600080fd5b505186516001600160a01b0390911690879060009061198e57fe5b60200260200101516001600160a01b0316146119f1576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f534f555243455f544f4b454e0000000000000000604482015290519081900360640190fd5b6000856001600160a01b031663aafd6b7686336040518363ffffffff1660e01b815260040180838152602001826001600160a01b031681526020019250505060206040518083038186803b158015611a4857600080fd5b505afa158015611a5c573d6000803e3d6000fd5b505050506040513d6020811015611a7257600080fd5b50519050610e6587828686600080611b1d565b6000546001600160a01b031681565b600654600090819061110e906001600160a01b03168280806124b4565b600084611abd816127db565b611acb888888888888611b1d565b98975050505050505050565b6000611ae885858585600080611b1d565b95945050505050565b611af96120c2565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611b27612821565b6003805460ff60a81b1916600160a81b17905584611b44816127db565b60028851118015611b6057506002885181611b5b57fe5b066001145b611ba4576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b611bd788600081518110611bb457fe5b602002602001015189600181518110611bc957fe5b602002602001015189612871565b60006001600160a01b038516611c3b578315611c36576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b611c9e565b836000108015611c4d57506004548411155b611c9a576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b5060015b336001600160a01b03871615611cb15750855b6060611cbe8b8385612a5c565b90506000611ccf828c8c8b8b612e59565b9050611cdc82828561332d565b6003805460ff60a81b191690559b9a5050505050505050505050565b6000610e65878787878787600080611d25565b6000611d1d8484846000806000611b1d565b949350505050565b600086611d31816127db565b60008a60018c510381518110611d4357fe5b602002602001015190506000611d6266084c2dcc6dee4b60cb1b6122d6565b9050611d786721272a2a37b5b2b760c11b6122d6565b6001600160a01b0316826001600160a01b031614611ddd576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f5441524745545f544f4b454e0000000000000000604482015290519081900360640190fd5b6000611ded8d8d8d308b8b611b1d565b9050611dfa83838361340b565b6040805163109f00dd60e21b8152600481018c9052602481018b905260448101839052606481018a905290516001600160a01b0384169163427c037491608480830192600092919082900301818387803b158015611e5757600080fd5b505af1158015611e6b573d6000803e3d6000fd5b50929f9e505050505050505050505050505050565b6001546001600160a01b031681565b60606000611eb37321b7b73b32b939b4b7b72830ba342334b73232b960611b6122d6565b9050806001600160a01b031663a1c421cd85856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060006040518083038186803b158015611f1357600080fd5b505afa158015611f27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f5057600080fd5b8101908080516040519392919084600160201b821115611f6f57600080fd5b908301906020820185811115611f8457600080fd5b82518660208202830111600160201b82111715611fa057600080fd5b82525081516020918201928201910280838360005b83811015611fcd578181015183820152602001611fb5565b5050505090500160405250505091505092915050565b611feb6120c2565b6000546001600160a01b038281169116141561203f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6120696120c2565b620f42408111156120bd576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b600455565b6000546001600160a01b03163314612115576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116612168576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415612168576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b6020831061222b5780518252601f19909201916020918201910161220c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461228c576040519150601f19603f3d011682016040523d82523d6000602084013e612291565b606091505b50915091508180156122a4575080516020145b156122cb578080602001905160208110156122be57600080fd5b50519350610e3892505050565b506000949350505050565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d602081101561234c57600080fd5b505192915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106123d15780518252601f1990920191602091820191016123b2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612433576040519150601f19603f3d011682016040523d82523d6000602084013e612438565b606091505b5091509150818015612466575080511580612466575080806020019051602081101561246357600080fd5b50515b6124ad576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b604080516001600160a01b0380861660248301528085166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166303c2803f60e31b178152925182516000948594938593606093918c169286928291908083835b6020831061253e5780518252601f19909201916020918201910161251f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461259e576040519150601f19603f3d011682016040523d82523d6000602084013e6125a3565b606091505b50915091508115612614578051604014156125e4578080602001905160408110156125cd57600080fd5b508051602090910151909550935061261f92505050565b8051602014156126145780806020019051602081101561260357600080fd5b505194506000935061261f92505050565b600080945094505050505b94509492505050565b6001600160a01b03811660009081526005602052604081205460ff1661264f5750806118f3565b612658836121bf565b15612678575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6118f3565b612681836134b5565b9392505050565b600082612697575060006118f3565b828202828482816126a457fe5b0414612681576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808211612731576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161273c57fe5b04949350505050565b600082820183811015612681576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000818310156127d5576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b60008111612168576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b600354600160a81b900460ff1615612115576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b6000826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128ac57600080fd5b505afa1580156128c0573d6000803e3d6000fd5b505050506040513d60208110156128d657600080fd5b5051905060006128e5826121bf565b905034156129a857823414612941576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b806129a35761294f826134b5565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561298957600080fd5b505af115801561299d573d6000803e3d6000fd5b50505050505b6124ad565b6001600160a01b03851660009081526005602052604090205460ff1615612a3e576129d5853330866135f4565b80156129a357846001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612a2157600080fd5b505af1158015612a35573d6000803e3d6000fd5b505050506124ad565b8015612a50576129a3853384866135f4565b6124ad853330866135f4565b6060806002855181612a6a57fe5b0467ffffffffffffffff81118015612a8157600080fd5b50604051908082528060200260200182016040528015612abb57816020015b612aa86138b7565b815260200190600190039081612aa05790505b509050600080612ad56721272a2a37b5b2b760c11b6122d6565b905060005b6001885103811015612c69576000888260010181518110612af757fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b50518a519091506000908b9060028601908110612b7f57fe5b602002602001015190506000898015612b96575086155b8015612bb35750856001600160a01b0316826001600160a01b0316145b90508015612bc057600196505b6040518060e00160405280846001600160a01b03168152602001856001600160a01b031681526020018d8781518110612bf557fe5b60200260200101516001600160a01b03168152602001836001600160a01b0316815260200160006001600160a01b03168152602001612c33856121bf565b15158152821515602090910152886002870481518110612c4f57fe5b602002602001018190525050505050600281019050612ada565b612c716138b7565b84600081518110612c7e57fe5b6020908102919091018101516040808201516001600160a01b0316600090815260059093529091205490915060ff1615612cf5578060a0015115612cdb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6040820152612cf5565b8051612ce6906134b5565b6001600160a01b031660408201525b84600186510381518110612d0557fe5b60209081029190910181015160608101516001600160a01b03166000908152600590925260409091205490915060ff1615612d7d578060a0015115612d635773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6060820152612d7d565b8051612d6e906134b5565b6001600160a01b031660608201525b600091505b8451821015612e4c57848281518110612d9757fe5b602002602001015190508060a0015115612e3a578060c0015115612dc057306080820152612e35565b6001855103821415612de0576001600160a01b0388166080820152612e35565b848260010181518110612def57fe5b602002602001015160a0015115612e2e57848260010181518110612e0f57fe5b6020908102919091010151516001600160a01b03166080820152612e35565b3060808201525b612e41565b3060808201525b600190910190612d82565b5092979650505050505050565b60008085815b88518110156132d757612e706138b7565b898281518110612e7c57fe5b602002602001015190508060a0015115612f0e578115801590612eca5750306001600160a01b03168a6001840381518110612eb357fe5b6020026020010151608001516001600160a01b0316145b8015612ef157506040808201516001600160a01b031660009081526005602052205460ff16155b15612f0957612f098160400151826000015185612354565b612f42565b80602001516001600160a01b031681604001516001600160a01b031614612f4257612f42816040015182600001518561340b565b8060a00151612fea57805160408083015160608401518251635e5144eb60e01b81526001600160a01b039283166004820152908216602482015260448101879052600160648201529151921691635e5144eb916084808201926020929091908290030181600087803b158015612fb757600080fd5b505af1158015612fcb573d6000803e3d6000fd5b505050506040513d6020811015612fe157600080fd5b50519350613155565b6040808201516001600160a01b031660009081526005602052205460ff16156130af57805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff91349160a480830192602092919082900301818588803b15801561308457600080fd5b505af1158015613098573d6000803e3d6000fd5b50505050506040513d6020811015612fe157600080fd5b805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff9160a4808201926020929091908290030181600087803b15801561312657600080fd5b505af115801561313a573d6000803e3d6000fd5b505050506040513d602081101561315057600080fd5b505193505b8060c0015115613251576000613172620f424061160c878a612688565b905081606001516001600160a01b031663a9059cbb89836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156131cf57600080fd5b505af11580156131e3573d6000803e3d6000fd5b505050506040513d60208110156131f957600080fd5b505161324c576040805162461bcd60e51b815260206004820152601760248201527f4552525f4645455f5452414e534645525f4641494c4544000000000000000000604482015290519081900360640190fd5b909303925b80606001516001600160a01b031681604001516001600160a01b031682602001516001600160a01b03167f7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c09586883360405180848152602001838152602001826001600160a01b03168152602001935050505060405180910390a450829150600101612e5f565b5085821015613322576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b509695505050505050565b6133356138b7565b8360018551038151811061334557fe5b60200260200101519050306001600160a01b031681608001516001600160a01b0316146133725750613406565b60608101516001600160a01b03811660009081526005602052604090205460ff16156133fb578160a00151156133a457fe5b806001600160a01b031663205c287884866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612a2157600080fd5b6124ad818486612354565b505050565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b15801561345c57600080fd5b505afa158015613470573d6000803e3d6000fd5b505050506040513d602081101561348657600080fd5b50519050818110156134af5780156134a4576134a48484600061375f565b6134af84848461375f565b50505050565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b1580156134f157600080fd5b505afa158015613505573d6000803e3d6000fd5b505050506040513d602081101561351b57600080fd5b505161ffff16905060005b818110156135d7576000846001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561357457600080fd5b505afa158015613588573d6000803e3d6000fd5b505050506040513d602081101561359e57600080fd5b50516001600160a01b03811660009081526005602052604090205490915060ff16156135ce579250610e38915050565b50600101613526565b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106136795780518252601f19909201916020918201910161365a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146136db576040519150601f19603f3d011682016040523d82523d6000602084013e6136e0565b606091505b509150915081801561370e57508051158061370e575080806020019051602081101561370b57600080fd5b50515b6110da576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106137dc5780518252601f1990920191602091820191016137bd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461383e576040519150601f19603f3d011682016040523d82523d6000602084013e613843565b606091505b5091509150818015613871575080511580613871575080806020019051602081101561386e57600080fd5b50515b6124ad576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fea26469706673582212206bc632095120d9eab122409a35946a0da396e610939a22069cc1d4aacf0bf78e64736f6c634300060c0033608060405234801561001057600080fd5b506040516100f83803806100f88339818101604052602081101561003357600080fd5b505160005560b2806100466000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356072565b60408051918252519081900360200190f35b600054939250505056fea26469706673582212207c43635e931afa21ef81297c792f7a4cc5aa436ebccb817a64a2497d123f8ef064736f6c634300060c0033608060405234801561001057600080fd5b506040516101103803806101108339818101604052604081101561003357600080fd5b50805160209091015160009190915560015560bd806100536000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80631e1401f814602d575b600080fd5b606060048036036060811015604157600080fd5b506001600160a01b038135811691602081013590911690604001356079565b6040805192835260208301919091528051918290030190f35b60005460015493509391505056fea2646970667358221220fe4ef50b70249f4da4a3db7d08718bc5922920750927fef0c67f0f4fe0c95c3964736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c806389f9cc611161010d578063c7ba24bc116100a0578063d734fa191161006f578063d734fa1914610c9a578063e57738e514610d25578063f2fde38b14610d48578063f3898a9714610d7b578063f3bc7d2a14610d91576101ee565b8063c7ba24bc14610aee578063c98fefed14610ba1578063cb32564e14610bb7578063d4ee1d9014610c85576101ee565b8063b1e9932b116100dc578063b1e9932b1461089a578063b4a176d31461095c578063b77d239b14610971578063c52173de14610a36576101ee565b806389f9cc61146106e05780638da5cb5b146107ab57806398e95740146107c0578063ab6214ce146107d5576101ee565b80635d732ff21161018557806379ba50971161015457806379ba5097146105d35780637b103999146105e85780637f9c0ecd146105fd5780638077ccf7146106ad576101ee565b80635d732ff2146105355780635e35359e1461054a57806361cd756e1461058d578063699e7546146105be576101ee565b80632978c10e116101c15780632978c10e1461036c5780632fe8a6ad1461045057806349d10b6414610465578063569706eb1461047a576101ee565b8063024c7ec7146101f357806302ef521e1461022157806303613f391461025c5780630c8496cc146102a3575b600080fd5b3480156101ff57600080fd5b5061021f6004803603602081101561021657600080fd5b50351515610dbb565b005b34801561022d57600080fd5b5061021f6004803603604081101561024457600080fd5b506001600160a01b0381351690602001351515610de1565b34801561026857600080fd5b5061028f6004803603602081101561027f57600080fd5b50356001600160a01b0316610e2a565b604080519115158252519081900360200190f35b3480156102af57600080fd5b50610353600480360360408110156102c657600080fd5b810190602081018135600160201b8111156102e057600080fd5b8201836020820111156102f257600080fd5b803590602001918460208302840111600160201b8311171561031357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505091359250610e3d915050565b6040805192835260208301919091528051918290030190f35b34801561037857600080fd5b5061043e600480360360c081101561038f57600080fd5b810190602081018135600160201b8111156103a957600080fd5b8201836020820111156103bb57600080fd5b803590602001918460208302840111600160201b831117156103dc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135610e55565b60408051918252519081900360200190f35b34801561045c57600080fd5b5061028f610e70565b34801561047157600080fd5b5061021f610e80565b61043e600480360360a081101561049057600080fd5b810190602081018135600160201b8111156104aa57600080fd5b8201836020820111156104bc57600080fd5b803590602001918460208302840111600160201b831117156104dd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b036040820135169060600135611088565b34801561054157600080fd5b5061043e6110a3565b34801561055657600080fd5b5061021f6004803603606081101561056d57600080fd5b506001600160a01b038135811691602081013590911690604001356110a9565b34801561059957600080fd5b506105a26110e2565b604080516001600160a01b039092168252519081900360200190f35b3480156105ca57600080fd5b506103536110f1565b3480156105df57600080fd5b5061021f611116565b3480156105f457600080fd5b506105a26111cd565b34801561060957600080fd5b5061043e6004803603604081101561062057600080fd5b810190602081018135600160201b81111561063a57600080fd5b82018360208201111561064c57600080fd5b803590602001918460208302840111600160201b8311171561066d57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506111dc915050565b3480156106b957600080fd5b5061028f600480360360208110156106d057600080fd5b50356001600160a01b03166118f9565b3480156106ec57600080fd5b5061043e600480360360a081101561070357600080fd5b810190602081018135600160201b81111561071d57600080fd5b82018360208201111561072f57600080fd5b803590602001918460208302840111600160201b8311171561075057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550506001600160a01b03833581169450602084013593604081013593506060013516905061190e565b3480156107b757600080fd5b506105a2611a85565b3480156107cc57600080fd5b50610353611a94565b61043e600480360360c08110156107eb57600080fd5b810190602081018135600160201b81111561080557600080fd5b82018360208201111561081757600080fd5b803590602001918460208302840111600160201b8311171561083857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611ab1565b3480156108a657600080fd5b5061043e600480360360808110156108bd57600080fd5b810190602081018135600160201b8111156108d757600080fd5b8201836020820111156108e957600080fd5b803590602001918460208302840111600160201b8311171561090a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356001600160a01b0316611ad7565b34801561096857600080fd5b5061021f611af1565b61043e600480360360c081101561098757600080fd5b810190602081018135600160201b8111156109a157600080fd5b8201836020820111156109b357600080fd5b803590602001918460208302840111600160201b831117156109d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906001600160a01b03604082013581169160608101359091169060800135611b1d565b61043e600480360360c0811015610a4c57600080fd5b810190602081018135600160201b811115610a6657600080fd5b820183602082011115610a7857600080fd5b803590602001918460208302840111600160201b83111715610a9957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060208101359060408101359060608101359060800135611cf8565b348015610afa57600080fd5b5061043e60048036036060811015610b1157600080fd5b810190602081018135600160201b811115610b2b57600080fd5b820183602082011115610b3d57600080fd5b803590602001918460208302840111600160201b83111715610b5e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135611d0b565b61043e600480360360808110156108bd57600080fd5b61043e6004803603610100811015610bce57600080fd5b810190602081018135600160201b811115610be857600080fd5b820183602082011115610bfa57600080fd5b803590602001918460208302840111600160201b83111715610c1b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020810135906040810135906060810135906080810135906001600160a01b0360a0820135169060c00135611d25565b348015610c9157600080fd5b506105a2611e80565b348015610ca657600080fd5b50610cd560048036036040811015610cbd57600080fd5b506001600160a01b0381358116916020013516611e8f565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610d11578181015183820152602001610cf9565b505050509050019250505060405180910390f35b348015610d3157600080fd5b5061043e600480360360a081101561049057600080fd5b348015610d5457600080fd5b5061021f60048036036020811015610d6b57600080fd5b50356001600160a01b0316611fe3565b61043e60048036036060811015610b1157600080fd5b348015610d9d57600080fd5b5061021f60048036036020811015610db457600080fd5b5035612061565b610dc36120c2565b60038054911515600160a01b0260ff60a01b19909216919091179055565b610de96120c2565b81610df381612117565b82610dfd8161216b565b50506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000610e35826121bf565b90505b919050565b600080610e4a84846111dc565b946000945092505050565b6000610e65878787878787611b1d565b979650505050505050565b600354600160a01b900460ff1681565b6000546001600160a01b0316331480610ea35750600354600160a01b900460ff16155b610ee8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610f066f436f6e7472616374526567697374727960801b6122d6565b6002549091506001600160a01b03808316911614801590610f2f57506001600160a01b03811615155b610f77576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fd957600080fd5b505afa158015610fed573d6000803e3d6000fd5b505050506040513d602081101561100357600080fd5b50516001600160a01b03161415611058576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b600061109986868660008787611b1d565b9695505050505050565b60045481565b6110b16120c2565b826110bb81612117565b826110c581612117565b836110cf8161216b565b6110da868686612354565b505050505050565b6003546001600160a01b031681565b600754600090819061110e906001600160a01b03168280806124b4565b915091509091565b6001546001600160a01b03163314611169576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000806000806000806000806112016c42616e636f72466f726d756c6160981b6122d6565b905088965060028a51118015611222575060028a518161121d57fe5b066001145b611266576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b60025b8a518110156118e85760008b600283038151811061128357fe5b6020026020010151905060008c600184038151811061129e57fe5b6020026020010151905060008d84815181106112b657fe5b60200260200101519050816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f957600080fd5b505afa15801561130d573d6000803e3d6000fd5b505050506040513d602081101561132357600080fd5b505195506113318684612628565b925061133d8682612628565b9050816001600160a01b0316816001600160a01b0316141561162a57600384108061139057508d600385038151811061137257fe5b60200260200101516001600160a01b0316826001600160a01b031614155b156113fd57816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ce57600080fd5b505afa1580156113e2573d6000803e3d6000fd5b505050506040513d60208110156113f857600080fd5b505198505b856001600160a01b031663d8959512846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144a57600080fd5b505afa15801561145e573d6000803e3d6000fd5b505050506040513d602081101561147457600080fd5b505160408051630e53aae960e01b81526001600160a01b0386811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156114c357600080fd5b505afa1580156114d7573d6000803e3d6000fd5b505050506040513d60a08110156114ed57600080fd5b506020908101516040805163799287f160e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b0388169263f3250fe292608480840193829003018186803b15801561155357600080fd5b505afa158015611567573d6000803e3d6000fd5b505050506040513d602081101561157d57600080fd5b505160408051632bce69e560e11b81529051919c5061161291620f42409161160c916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b1580156115cf57600080fd5b505afa1580156115e3573d6000803e3d6000fd5b505050506040513d60208110156115f957600080fd5b50518e9063ffffffff9081169061268816565b906126e6565b9a8b90039a9950611623898c612745565b98506118dd565b816001600160a01b0316836001600160a01b031614156118cb57600384108061167b57508d600385038151811061165d57fe5b60200260200101516001600160a01b0316826001600160a01b031614155b156116e857816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d60208110156116e357600080fd5b505198505b856001600160a01b031663d8959512826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561173557600080fd5b505afa158015611749573d6000803e3d6000fd5b505050506040513d602081101561175f57600080fd5b505160408051630e53aae960e01b81526001600160a01b0384811660048301529151929a5090881691630e53aae99160248082019260a092909190829003018186803b1580156117ae57600080fd5b505afa1580156117c2573d6000803e3d6000fd5b505050506040513d60a08110156117d857600080fd5b5060209081015160408051633b6785ab60e11b8152600481018d9052602481018c905263ffffffff83166044820152606481018f905290519199506001600160a01b038816926376cf0b5692608480840193829003018186803b15801561183e57600080fd5b505afa158015611852573d6000803e3d6000fd5b505050506040513d602081101561186857600080fd5b505160408051632bce69e560e11b81529051919c506118ba91620f42409161160c916001600160a01b038b169163579cd3ca916004808301926020929190829003018186803b1580156115cf57600080fd5b9a8b90039a9950611623898c61278e565b6118d78684838e6124b4565b909b5099505b505050600201611269565b509596505050505050505b92915050565b60056020526000908152604090205460ff1681565b6000846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561194957600080fd5b505afa15801561195d573d6000803e3d6000fd5b505050506040513d602081101561197357600080fd5b505186516001600160a01b0390911690879060009061198e57fe5b60200260200101516001600160a01b0316146119f1576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f534f555243455f544f4b454e0000000000000000604482015290519081900360640190fd5b6000856001600160a01b031663aafd6b7686336040518363ffffffff1660e01b815260040180838152602001826001600160a01b031681526020019250505060206040518083038186803b158015611a4857600080fd5b505afa158015611a5c573d6000803e3d6000fd5b505050506040513d6020811015611a7257600080fd5b50519050610e6587828686600080611b1d565b6000546001600160a01b031681565b600654600090819061110e906001600160a01b03168280806124b4565b600084611abd816127db565b611acb888888888888611b1d565b98975050505050505050565b6000611ae885858585600080611b1d565b95945050505050565b611af96120c2565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611b27612821565b6003805460ff60a81b1916600160a81b17905584611b44816127db565b60028851118015611b6057506002885181611b5b57fe5b066001145b611ba4576040805162461bcd60e51b815260206004820152601060248201526f08aa4a4be929cac82989288bea082a8960831b604482015290519081900360640190fd5b611bd788600081518110611bb457fe5b602002602001015189600181518110611bc957fe5b602002602001015189612871565b60006001600160a01b038516611c3b578315611c36576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b611c9e565b836000108015611c4d57506004548411155b611c9a576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b5060015b336001600160a01b03871615611cb15750855b6060611cbe8b8385612a5c565b90506000611ccf828c8c8b8b612e59565b9050611cdc82828561332d565b6003805460ff60a81b191690559b9a5050505050505050505050565b6000610e65878787878787600080611d25565b6000611d1d8484846000806000611b1d565b949350505050565b600086611d31816127db565b60008a60018c510381518110611d4357fe5b602002602001015190506000611d6266084c2dcc6dee4b60cb1b6122d6565b9050611d786721272a2a37b5b2b760c11b6122d6565b6001600160a01b0316826001600160a01b031614611ddd576040805162461bcd60e51b815260206004820152601860248201527f4552525f494e56414c49445f5441524745545f544f4b454e0000000000000000604482015290519081900360640190fd5b6000611ded8d8d8d308b8b611b1d565b9050611dfa83838361340b565b6040805163109f00dd60e21b8152600481018c9052602481018b905260448101839052606481018a905290516001600160a01b0384169163427c037491608480830192600092919082900301818387803b158015611e5757600080fd5b505af1158015611e6b573d6000803e3d6000fd5b50929f9e505050505050505050505050505050565b6001546001600160a01b031681565b60606000611eb37321b7b73b32b939b4b7b72830ba342334b73232b960611b6122d6565b9050806001600160a01b031663a1c421cd85856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060006040518083038186803b158015611f1357600080fd5b505afa158015611f27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f5057600080fd5b8101908080516040519392919084600160201b821115611f6f57600080fd5b908301906020820185811115611f8457600080fd5b82518660208202830111600160201b82111715611fa057600080fd5b82525081516020918201928201910280838360005b83811015611fcd578181015183820152602001611fb5565b5050505090500160405250505091505092915050565b611feb6120c2565b6000546001600160a01b038281169116141561203f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6120696120c2565b620f42408111156120bd576040805162461bcd60e51b81526020600482015260196024820152784552525f494e56414c49445f414646494c494154455f46454560381b604482015290519081900360640190fd5b600455565b6000546001600160a01b03163314612115576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116612168576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415612168576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b60408051600481526024810182526020810180516001600160e01b031663349814a760e21b1781529151815160009384926060926001600160a01b03881692610fa0928792909182918083835b6020831061222b5780518252601f19909201916020918201910161220c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303818686fa925050503d806000811461228c576040519150601f19603f3d011682016040523d82523d6000602084013e612291565b606091505b50915091508180156122a4575080516020145b156122cb578080602001905160208110156122be57600080fd5b50519350610e3892505050565b506000949350505050565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d602081101561234c57600080fd5b505192915050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106123d15780518252601f1990920191602091820191016123b2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612433576040519150601f19603f3d011682016040523d82523d6000602084013e612438565b606091505b5091509150818015612466575080511580612466575080806020019051602081101561246357600080fd5b50515b6124ad576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b604080516001600160a01b0380861660248301528085166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166303c2803f60e31b178152925182516000948594938593606093918c169286928291908083835b6020831061253e5780518252601f19909201916020918201910161251f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461259e576040519150601f19603f3d011682016040523d82523d6000602084013e6125a3565b606091505b50915091508115612614578051604014156125e4578080602001905160408110156125cd57600080fd5b508051602090910151909550935061261f92505050565b8051602014156126145780806020019051602081101561260357600080fd5b505194506000935061261f92505050565b600080945094505050505b94509492505050565b6001600160a01b03811660009081526005602052604081205460ff1661264f5750806118f3565b612658836121bf565b15612678575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6118f3565b612681836134b5565b9392505050565b600082612697575060006118f3565b828202828482816126a457fe5b0414612681576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808211612731576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161273c57fe5b04949350505050565b600082820183811015612681576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000818310156127d5576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b60008111612168576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b600354600160a81b900460ff1615612115576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b6000826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128ac57600080fd5b505afa1580156128c0573d6000803e3d6000fd5b505050506040513d60208110156128d657600080fd5b5051905060006128e5826121bf565b905034156129a857823414612941576040805162461bcd60e51b815260206004820152601760248201527f4552525f4554485f414d4f554e545f4d49534d41544348000000000000000000604482015290519081900360640190fd5b806129a35761294f826134b5565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561298957600080fd5b505af115801561299d573d6000803e3d6000fd5b50505050505b6124ad565b6001600160a01b03851660009081526005602052604090205460ff1615612a3e576129d5853330866135f4565b80156129a357846001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612a2157600080fd5b505af1158015612a35573d6000803e3d6000fd5b505050506124ad565b8015612a50576129a3853384866135f4565b6124ad853330866135f4565b6060806002855181612a6a57fe5b0467ffffffffffffffff81118015612a8157600080fd5b50604051908082528060200260200182016040528015612abb57816020015b612aa86138b7565b815260200190600190039081612aa05790505b509050600080612ad56721272a2a37b5b2b760c11b6122d6565b905060005b6001885103811015612c69576000888260010181518110612af757fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3c57600080fd5b505afa158015612b50573d6000803e3d6000fd5b505050506040513d6020811015612b6657600080fd5b50518a519091506000908b9060028601908110612b7f57fe5b602002602001015190506000898015612b96575086155b8015612bb35750856001600160a01b0316826001600160a01b0316145b90508015612bc057600196505b6040518060e00160405280846001600160a01b03168152602001856001600160a01b031681526020018d8781518110612bf557fe5b60200260200101516001600160a01b03168152602001836001600160a01b0316815260200160006001600160a01b03168152602001612c33856121bf565b15158152821515602090910152886002870481518110612c4f57fe5b602002602001018190525050505050600281019050612ada565b612c716138b7565b84600081518110612c7e57fe5b6020908102919091018101516040808201516001600160a01b0316600090815260059093529091205490915060ff1615612cf5578060a0015115612cdb5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6040820152612cf5565b8051612ce6906134b5565b6001600160a01b031660408201525b84600186510381518110612d0557fe5b60209081029190910181015160608101516001600160a01b03166000908152600590925260409091205490915060ff1615612d7d578060a0015115612d635773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6060820152612d7d565b8051612d6e906134b5565b6001600160a01b031660608201525b600091505b8451821015612e4c57848281518110612d9757fe5b602002602001015190508060a0015115612e3a578060c0015115612dc057306080820152612e35565b6001855103821415612de0576001600160a01b0388166080820152612e35565b848260010181518110612def57fe5b602002602001015160a0015115612e2e57848260010181518110612e0f57fe5b6020908102919091010151516001600160a01b03166080820152612e35565b3060808201525b612e41565b3060808201525b600190910190612d82565b5092979650505050505050565b60008085815b88518110156132d757612e706138b7565b898281518110612e7c57fe5b602002602001015190508060a0015115612f0e578115801590612eca5750306001600160a01b03168a6001840381518110612eb357fe5b6020026020010151608001516001600160a01b0316145b8015612ef157506040808201516001600160a01b031660009081526005602052205460ff16155b15612f0957612f098160400151826000015185612354565b612f42565b80602001516001600160a01b031681604001516001600160a01b031614612f4257612f42816040015182600001518561340b565b8060a00151612fea57805160408083015160608401518251635e5144eb60e01b81526001600160a01b039283166004820152908216602482015260448101879052600160648201529151921691635e5144eb916084808201926020929091908290030181600087803b158015612fb757600080fd5b505af1158015612fcb573d6000803e3d6000fd5b505050506040513d6020811015612fe157600080fd5b50519350613155565b6040808201516001600160a01b031660009081526005602052205460ff16156130af57805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff91349160a480830192602092919082900301818588803b15801561308457600080fd5b505af1158015613098573d6000803e3d6000fd5b50505050506040513d6020811015612fe157600080fd5b805160408083015160608401516080850151835163e8dc12ff60e01b81526001600160a01b03938416600482015291831660248301526044820188905233606483015282166084820152915192169163e8dc12ff9160a4808201926020929091908290030181600087803b15801561312657600080fd5b505af115801561313a573d6000803e3d6000fd5b505050506040513d602081101561315057600080fd5b505193505b8060c0015115613251576000613172620f424061160c878a612688565b905081606001516001600160a01b031663a9059cbb89836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156131cf57600080fd5b505af11580156131e3573d6000803e3d6000fd5b505050506040513d60208110156131f957600080fd5b505161324c576040805162461bcd60e51b815260206004820152601760248201527f4552525f4645455f5452414e534645525f4641494c4544000000000000000000604482015290519081900360640190fd5b909303925b80606001516001600160a01b031681604001516001600160a01b031682602001516001600160a01b03167f7154b38b5dd31bb3122436a96d4e09aba5b323ae1fd580025fab55074334c09586883360405180848152602001838152602001826001600160a01b03168152602001935050505060405180910390a450829150600101612e5f565b5085821015613322576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b509695505050505050565b6133356138b7565b8360018551038151811061334557fe5b60200260200101519050306001600160a01b031681608001516001600160a01b0316146133725750613406565b60608101516001600160a01b03811660009081526005602052604090205460ff16156133fb578160a00151156133a457fe5b806001600160a01b031663205c287884866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612a2157600080fd5b6124ad818486612354565b505050565b60408051636eb1769f60e11b81523060048201526001600160a01b038481166024830152915160009286169163dd62ed3e916044808301926020929190829003018186803b15801561345c57600080fd5b505afa158015613470573d6000803e3d6000fd5b505050506040513d602081101561348657600080fd5b50519050818110156134af5780156134a4576134a48484600061375f565b6134af84848461375f565b50505050565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b1580156134f157600080fd5b505afa158015613505573d6000803e3d6000fd5b505050506040513d602081101561351b57600080fd5b505161ffff16905060005b818110156135d7576000846001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561357457600080fd5b505afa158015613588573d6000803e3d6000fd5b505050506040513d602081101561359e57600080fd5b50516001600160a01b03811660009081526005602052604090205490915060ff16156135ce579250610e38915050565b50600101613526565b5073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9392505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106136795780518252601f19909201916020918201910161365a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146136db576040519150601f19603f3d011682016040523d82523d6000602084013e6136e0565b606091505b509150915081801561370e57508051158061370e575080806020019051602081101561370b57600080fd5b50515b6110da576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106137dc5780518252601f1990920191602091820191016137bd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461383e576040519150601f19603f3d011682016040523d82523d6000602084013e613843565b606091505b5091509150818015613871575080511580613871575080806020019051602081101561386e57600080fd5b50515b6124ad576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fea26469706673582212206bc632095120d9eab122409a35946a0da396e610939a22069cc1d4aacf0bf78e64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "1337:885:36:-:0;;;349:27:59;;;-1:-1:-1;;;;349:27:59;;;2563:5:0;2530:38;;1466:208:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1466:208:36;;;;;;;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;1556:1:36;;;594:23:64;1556:1:36;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;2196:42:0::1;2122:8:56;3636:32:0::0;:11:::1;:32;::::0;;:39;;-1:-1:-1;;3636:39:0::1;2122::56::0;3636::0::1;::::0;;:32;1586:25:36;1603:7;;1586:25:::1;::::0;::::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;::::1;;;;;;;;;;::::0;::::1;;;;;;1571:12;;:40;;;;;-1:-1:-1::0;;;;;1571:40:36::1;;;;;-1:-1:-1::0;;;;;1571:40:36::1;;;;;;1653:7;1662:4;1636:31;;;;;:::i;:::-;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;;;-1:-1:-1;1636:31:36::1;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;1621:12:36::1;:46:::0;;-1:-1:-1;;;;;;1621:46:36::1;-1:-1:-1::0;;;;;1621:46:36;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1337:885:36;;-1:-1:-1;1337:885:36;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;1337:885:36:-;;;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "1337:885:36:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;4297:227:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4297:227:0;;;;;;;;;;:::i;1680:156:36:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1680:156:36;-1:-1:-1;;;;;1680:156:36;;:::i;:::-;;;;;;;;;;;;;;;;;;31327:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31327:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31327:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31327:162:0;;-1:-1:-1;;31327:162:0;;;-1:-1:-1;31327:162:0;;-1:-1:-1;;31327:162:0:i;:::-;;;;;;;;;;;;;;;;;;;;;;;34120:394;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;34120:394:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;34120:394:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34120:394:0;;-1:-1:-1;;34120:394:0;;;-1:-1:-1;;;34120:394:0;;;;;-1:-1:-1;;;;;34120:394:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1333:38:56;;;;;;;;;;;;;:::i;2300:925::-;;;;;;;;;;;;;:::i;31842:359:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31842:359:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31842:359:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31842:359:0;;-1:-1:-1;;31842:359:0;;;-1:-1:-1;;;31842:359:0;;;;;-1:-1:-1;;;;;31842:359:0;;;;;;;;;;:::i;2530:38::-;;;;;;;;;;;;;:::i;1196:290:62:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:62;;;;;;;;;;;;;;;;;:::i;1243:37:56:-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;2034:186:36;;;;;;;;;;;;;:::i;1422:217:57:-;;;;;;;;;;;;;:::i;1154:33:56:-;;;;;;;;;;;;;:::i;5591:2853:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5591:2853:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5591:2853:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5591:2853:0;;-1:-1:-1;;5591:2853:0;;;-1:-1:-1;5591:2853:0;;-1:-1:-1;;5591:2853:0:i;2606:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2606:48:0;-1:-1:-1;;;;;2606:48:0;;:::i;15856:607::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15856:607:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15856:607:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15856:607:0;;-1:-1:-1;;;;;;;15856:607:0;;;;;-1:-1:-1;15856:607:0;;;;;;;;;;-1:-1:-1;15856:607:0;;;;;-1:-1:-1;15856:607:0;:::i;219:29:57:-;;;;;;;;;;;;;:::i;1842:186:36:-;;;;;;;;;;;;;:::i;32589:440:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;32589:440:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;32589:440:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32589:440:0;;-1:-1:-1;;32589:440:0;;;-1:-1:-1;;;32589:440:0;;;;;-1:-1:-1;;;;;32589:440:0;;;;;;;;;;;;;;;;;;;:::i;33806:240::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33806:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33806:240:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33806:240:0;;-1:-1:-1;;33806:240:0;;;-1:-1:-1;;;33806:240:0;;;;;;;;-1:-1:-1;;;;;33806:240:0;;:::i;3304:137:56:-;;;;;;;;;;;;;:::i;9608:1669:0:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9608:1669:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9608:1669:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9608:1669:0;;-1:-1:-1;;9608:1669:0;;;-1:-1:-1;;;9608:1669:0;;;;;-1:-1:-1;;;;;9608:1669:0;;;;;;;;;;;;;;;;;;;:::i;12269:407::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12269:407:0;;-1:-1:-1;;12269:407:0;;;-1:-1:-1;;;12269:407:0;;;;;;;;;;;;;;;;;;;:::i;33103:205::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33103:205:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;33103:205:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33103:205:0;;-1:-1:-1;;33103:205:0;;;-1:-1:-1;;;33103:205:0;;;;:::i;32275:240::-;;;;;;;;;;;;;;;13781:1124;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13781:1124:0;;-1:-1:-1;;13781:1124:0;;;-1:-1:-1;;;13781:1124:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;13781:1124:0;;;;;;;;;;:::i;255:23:57:-;;;;;;;;;;;;;:::i;4906:290:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4906:290:0;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33382:350;;;;;;;;;;;;;;;;;;;;;;;;;1164:167:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;31563:205:0:-;;;;;;;;;;;;;;;3841:230;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3841:230:0;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;4297:227:0:-;726:12:57;:10;:12::i;:::-;4426:6:0::1;594:23:64;608:8;594:13;:23::i;:::-;4460:6:0::2;948:18:64;957:8;948;:18::i;:::-;-1:-1:-1::0;;;;;;;4485:19:0;;;::::3;;::::0;;;:11:::3;:19;::::0;;;;:31;;-1:-1:-1;;4485:31:0::3;::::0;::::3;;::::0;;;::::3;::::0;;4297:227::o;1680:156:36:-;1766:4;1789:40;1818:10;1789:28;:40::i;:::-;1782:47;;1680:156;;;;:::o;31327:162:0:-;31414:7;31423;31451:26;31462:5;31469:7;31451:10;:26::i;:::-;31443:38;31479:1;;-1:-1:-1;31327:162:0;-1:-1:-1;;;31327:162:0:o;34120:394::-;34385:7;34417:89;34431:5;34438:7;34447:10;34459:12;34473:17;34492:13;34417;:89::i;:::-;34410:96;34120:394;-1:-1:-1;;;;;;;34120:394:0:o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;31842:359:0:-;32074:7;32106:87;32120:5;32127:7;32136:10;32156:1;32160:17;32179:13;32106;:87::i;:::-;32099:94;31842:359;-1:-1:-1;;;;;;31842:359:0:o;2530:38::-;;;;:::o;1196:290:62:-;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:64::3;::::2;749::57::1;1196:290:62::0;;;:::o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;2034:186:36:-;2153:12;;2081:7;;;;2116:97;;-1:-1:-1;;;;;2153:12:36;2081:7;;;2116:9;:97::i;:::-;2109:104;;;;2034:186;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;5591:2853:0:-;5673:7;5693:14;5718:11;5740:14;5765:15;5791:13;5815:20;5846:22;5886:25;-1:-1:-1;;;5886:9:0;:25::i;:::-;5846:66;;5934:7;5925:16;;6049:1;6034:5;:12;:16;:41;;;;;6069:1;6054:5;:12;:16;;;;;;6074:1;6054:21;6034:41;6026:70;;;;;-1:-1:-1;;;6026:70:0;;;;;;;;;;;;-1:-1:-1;;;6026:70:0;;;;;;;;;;;;;;;6171:1;6154:2257;6178:5;:12;6174:1;:16;6154:2257;;;6215:23;6253:5;6263:1;6259;:5;6253:12;;;;;;;;;;;;;;6215:51;;6281:14;6298:5;6308:1;6304;:5;6298:12;;;;;;;;;;;;;;6281:29;;6325:23;6363:5;6369:1;6363:8;;;;;;;;;;;;;;6325:47;;6437:6;-1:-1:-1;;;;;6420:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6420:32:0;;-1:-1:-1;6524:48:0;6420:32;6560:11;6524:24;:48::i;:::-;6510:62;;6601:48;6626:9;6637:11;6601:24;:48::i;:::-;6587:62;;6694:6;-1:-1:-1;;;;;6670:30:0;6678:11;-1:-1:-1;;;;;6670:30:0;;6666:1734;;;6817:1;6813;:5;:31;;;;6832:5;6842:1;6838;:5;6832:12;;;;;;;;;;;;;;-1:-1:-1;;;;;6822:22:0;:6;-1:-1:-1;;;;;6822:22:0;;;6813:31;6809:100;;;6888:6;-1:-1:-1;;;;;6876:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6876:33:0;;-1:-1:-1;6809:100:0;6996:9;-1:-1:-1;;;;;6996:29:0;;7026:11;6996:42;;;;;;;;;;;;;-1:-1:-1;;;;;6996:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6996:42:0;7076:33;;;-1:-1:-1;;;7076:33:0;;-1:-1:-1;;;;;7076:33:0;;;;;;;;;6996:42;;-1:-1:-1;7076:20:0;;;;;;:33;;;;;;;;;;;;;;;:20;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7076:33:0;;;;;;7137:61;;-1:-1:-1;;;7137:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7076:33;;-1:-1:-1;;;;;;7137:28:0;;;;;:61;;;;;;;;;;:28;:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7137:61:0;7234:25;;;-1:-1:-1;;;7234:25:0;;;;7137:61;;-1:-1:-1;7223:57:0;;2119:7;;7223:37;;-1:-1:-1;;;;;7234:23:0;;;;;:25;;;;;7137:61;;7234:25;;;;;;;:23;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7234:25:0;7223:6;;:37;;;;;:10;:37;:::i;:::-;:41;;:57::i;:::-;7299:13;;;;;7217:63;-1:-1:-1;7415:18:0;:6;7299:13;7415:10;:18::i;:::-;7406:27;;6666:1734;;;7496:6;-1:-1:-1;;;;;7472:30:0;7480:11;-1:-1:-1;;;;;7472:30:0;;7468:932;;;7620:1;7616;:5;:31;;;;7635:5;7645:1;7641;:5;7635:12;;;;;;;;;;;;;;-1:-1:-1;;;;;7625:22:0;:6;-1:-1:-1;;;;;7625:22:0;;;7616:31;7612:100;;;7691:6;-1:-1:-1;;;;;7679:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7679:33:0;;-1:-1:-1;7612:100:0;7799:9;-1:-1:-1;;;;;7799:29:0;;7829:11;7799:42;;;;;;;;;;;;;-1:-1:-1;;;;;7799:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7799:42:0;7879:33;;;-1:-1:-1;;;7879:33:0;;-1:-1:-1;;;;;7879:33:0;;;;;;;;;7799:42;;-1:-1:-1;7879:20:0;;;;;;:33;;;;;;;;;;;;;;;:20;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7879:33:0;;;;;;7940:57;;-1:-1:-1;;;7940:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7879:33;;-1:-1:-1;;;;;;7940:24:0;;;;;:57;;;;;;;;;;:24;:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7940:57:0;8033:25;;;-1:-1:-1;;;8033:25:0;;;;7940:57;;-1:-1:-1;8022:57:0;;2119:7;;8022:37;;-1:-1:-1;;;;;8033:23:0;;;;;:25;;;;;7940:57;;8033:25;;;;;;;:23;:25;;;;;;;;;;8022:57;8098:13;;;;;8016:63;-1:-1:-1;8214:18:0;:6;8098:13;8214:10;:18::i;7468:932::-;8330:54;8340:9;8351:11;8364;8377:6;8330:9;:54::i;:::-;8314:70;;-1:-1:-1;8314:70:0;-1:-1:-1;7468:932:0;-1:-1:-1;;;6197:1:0;6192:6;6154:2257;;;-1:-1:-1;8430:6:0;;-1:-1:-1;;;;;;;5591:2853:0;;;;;:::o;2606:48::-;;;;;;;;;;;;;;;:::o;15856:607::-;16026:7;16146:8;-1:-1:-1;;;;;16146:14:0;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16146:16:0;16133:8;;-1:-1:-1;;;;;16121:41:0;;;;16133:5;;16139:1;;16133:8;;;;;;;;;;-1:-1:-1;;;;;16121:41:0;;16113:78;;;;;-1:-1:-1;;;16113:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16260:14;16277:8;-1:-1:-1;;;;;16277:27:0;;16305:13;16320:10;16277:54;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16277:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16277:54:0;;-1:-1:-1;16386:69:0;16400:5;16277:54;16415:10;16427:12;16449:1;;16386:13;:69::i;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;1842:186:36:-;1961:12;;1889:7;;;;1924:97;;-1:-1:-1;;;;;1961:12:36;1889:7;;;1924:9;:97::i;32589:440:0:-;32900:7;32870:10;252:24:64;269:6;252:16;:24::i;:::-;32932:89:0::1;32946:5;32953:7;32962:10;32974:12;32988:17;33007:13;32932;:89::i;:::-;32925:96:::0;32589:440;-1:-1:-1;;;;;;;;32589:440:0:o;33806:240::-;33941:7;33968:70;33982:5;33989:7;33998:10;34010:12;34032:1;34036;33968:13;:70::i;:::-;33961:77;33806:240;-1:-1:-1;;;;;33806:240:0:o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;9608:1669:0:-;9934:7;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:59;-1:-1:-1;;;603:13:59;;;9904:10:0;252:24:64::1;9904:10:0::0;252:16:64::1;:24::i;:::-;10088:1:0::2;10073:5;:12;:16;:41;;;;;10108:1;10093:5;:12;:16;;;;;;10113:1;10093:21;10073:41;10065:70;;;::::0;;-1:-1:-1;;;10065:70:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10065:70:0;;;;;;;;;;;;;::::2;;10227:77;10257:5;10263:1;10257:8;;;;;;;;;;;;;;10285:5;10291:1;10285:8;;;;;;;;;;;;;;10296:7;10227:17;:77::i;:::-;10363:24;-1:-1:-1::0;;;;;10410:40:0;::::2;10406:303;;10475:18:::0;;10467:56:::2;;;::::0;;-1:-1:-1;;;10467:56:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10467:56:0;;;;;;;;;;;;;::::2;;10406:303;;;10577:13;10573:1;:17;:53;;;;;10611:15;;10594:13;:32;;10573:53;10565:91;;;::::0;;-1:-1:-1;;;10565:91:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;10565:91:0;;;;;;;;;;;;;::::2;;-1:-1:-1::0;10693:4:0::2;10406:303;10791:10;-1:-1:-1::0;;;;;10816:26:0;::::2;::::0;10812:71:::2;;-1:-1:-1::0;10871:12:0;10812:71:::2;10945:28;10976:61;10997:5;11004:11;11017:19;10976:20;:61::i;:::-;10945:92;;11048:14;11065:73;11078:4;11084:7;11093:10;11105:17;11124:13;11065:12;:73::i;:::-;11048:90;;11199:44;11217:4;11223:6;11231:11;11199:17;:44::i;:::-;639:6:59::0;:14;;-1:-1:-1;;;;639:14:59;;;11263:6:0;9608:1669;-1:-1:-1;;;;;;;;;;;9608:1669:0:o;12269:407::-;12534:7;12566:102;12576:5;12583:7;12592:10;12604:17;12623:14;12639:13;12662:1;12666;12566:9;:102::i;33103:205::-;33205:7;33232:68;33246:5;33253:7;33262:10;33282:1;33294;33298;33232:13;:68::i;:::-;33225:75;33103:205;-1:-1:-1;;;;33103:205:0:o;13781:1124::-;14152:7;14122:10;252:24:64;269:6;252:16;:24::i;:::-;14177:23:0::1;14215:5;14236:1;14221:5;:12;:16;14215:23;;;;;;;;;;;;;;14177:62;;14250:16;14278:19;-1:-1:-1::0;;;14278:9:0::1;:19::i;:::-;14250:48;;14399:20;-1:-1:-1::0;;;14399:9:0::1;:20::i;:::-;-1:-1:-1::0;;;;;14372:48:0::1;:11;-1:-1:-1::0;;;;;14372:48:0::1;;14364:85;;;::::0;;-1:-1:-1;;;14364:85:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;14511:14;14528:99;14542:5;14549:7;14558:10;14586:4;14594:17;14613:13;14528;:99::i;:::-;14511:116;;14676:54;14692:11;14713:7;14723:6;14676:15;:54::i;:::-;14796:75;::::0;;-1:-1:-1;;;14796:75:0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14796:17:0;::::1;::::0;::::1;::::0;:75;;;;;-1:-1:-1;;14796:75:0;;;;;;;-1:-1:-1;14796:17:0;:75;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;14891:6:0;;13781:1124;-1:-1:-1;;;;;;;;;;;;;;;13781:1124:0:o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;4906:290:0:-;5003:16;5032:32;5089:33;-1:-1:-1;;;5089:9:0;:33::i;:::-;5032:91;;5141:10;-1:-1:-1;;;;;5141:19:0;;5161:12;5175;5141:47;;;;;;;;;;;;;-1:-1:-1;;;;;5141:47:0;;;;;;-1:-1:-1;;;;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5141:47:0;;;;;;;;;;;;-1:-1:-1;5141:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5134:54;;;4906:290;;;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;3841:230:0:-;726:12:57;:10;:12::i;:::-;2119:7:0::1;3954:16;:34;;3946:72;;;::::0;;-1:-1:-1;;;3946:72:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3946:72:0;;;;;;;;;;;;;::::1;;4029:15;:34:::0;3841:230::o;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;30833:420:0;30948:54;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30948:54:0;-1:-1:-1;;;30948:54:0;;;31055:49;;;;30911:4;;;;30928:17;;-1:-1:-1;;;;;31055:30:0;;;31092:4;;30948:54;;31055:49;;;;;;30948:54;31055:49;;;;;;;;;;-1:-1:-1;;31055:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31013:91;;;;31121:7;:34;;;;;31132:10;:17;31153:2;31132:23;31121:34;31117:104;;;31190:10;31179:30;;;;;;;;;;;;;;;-1:-1:-1;31179:30:0;;-1:-1:-1;31172:37:0;;-1:-1:-1;;;31172:37:0;31117:104;-1:-1:-1;31240:5:0;;30833:420;-1:-1:-1;;;;30833:420:0:o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o;1485:312:61:-;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o;29889:670:0:-;30067:85;;;-1:-1:-1;;;;;30067:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;30067:85:0;-1:-1:-1;;;30067:85:0;;;30205:31;;;;30018:7;;;;30067:85;30018:7;;30047:17;;30205:25;;;;30067:85;;30205:31;;30067:85;30205:31;;30067:85;30205:31;;;;;;;;;;-1:-1:-1;;30205:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30163:73;;;;30253:7;30249:277;;;30281:10;:17;30302:2;30281:23;30277:113;;;30343:10;30332:42;;;;;;;;;;;;;;;-1:-1:-1;30332:42:0;;;;;;;;;-1:-1:-1;30332:42:0;-1:-1:-1;30325:49:0;;-1:-1:-1;;;30325:49:0;30277:113;30410:10;:17;30431:2;30410:23;30406:109;;;30473:10;30462:33;;;;;;;;;;;;;;;-1:-1:-1;30462:33:0;;-1:-1:-1;30497:1:0;;-1:-1:-1;30454:45:0;;-1:-1:-1;;;30454:45:0;30406:109;30546:1;30549;30538:13;;;;;;;29889:670;;;;;;;;:::o;29362:336::-;-1:-1:-1;;;;;29490:19:0;;29461:11;29490:19;;;:11;:19;;;;;;;;29485:52;;-1:-1:-1;29531:6:0;29524:13;;29485:52;29554:34;29577:10;29554:22;:34::i;:::-;29550:79;;;-1:-1:-1;2196:42:0;29603:26;;29550:79;29649:41;29679:10;29649:29;:41::i;:::-;29642:48;29362:336;-1:-1:-1;;;29362:336:0:o;1149:250:60:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;1627:174;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:60:o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;778:147;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;351:112:64:-;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;-1:-1:-1;;;418:37:64;;;;;;;;;;;;;;716:89:59;772:6;;-1:-1:-1;;;772:6:59;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;;;20128:1710:0;20243:25;20290:7;-1:-1:-1;;;;;20290:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20290:15:0;;-1:-1:-1;20318:21:0;20342:38;20290:15;20342:22;:38::i;:::-;20318:62;-1:-1:-1;20413:9:0;:13;20409:1422;;20499:7;20486:9;:20;20478:56;;;;;-1:-1:-1;;;20478:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20769:16;20764:137;;20824:45;20854:14;20824:29;:45::i;:::-;-1:-1:-1;;;;;20804:75:0;;20888:9;20804:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20764:137;20409:1422;;;-1:-1:-1;;;;;20955:25:0;;;;;;:11;:25;;;;;;;;20951:880;;;21167:66;21184:12;21198:10;21218:4;21225:7;21167:16;:66::i;:::-;21303:16;21299:91;;;21358:12;-1:-1:-1;;;;;21338:43:0;;21382:7;21338:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20951:880;;;21605:16;21601:218;;;21640:76;21657:12;21671:10;21691:14;21708:7;21640:16;:76::i;21601:218::-;21753:66;21770:12;21784:10;21804:4;21811:7;21753:16;:66::i;23592:4261::-;23735:23;23771:28;23848:1;23823:15;:22;:26;;;;;;23802:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;23771:79;;23863:26;23908:20;23943;-1:-1:-1;;;23943:9:0;:20::i;:::-;23908:56;;24060:9;24080:1251;24121:1;24096:15;:22;:26;24092:1;:30;24080:1251;;;24147:23;24190:15;24206:1;24210;24206:5;24190:22;;;;;;;;;;;;;;24147:66;;24228:20;24270:6;-1:-1:-1;;;;;24270:12:0;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24270:14:0;24339:22;;24270:14;;-1:-1:-1;24301:23:0;;24339:15;;24359:1;24355:5;;;24339:22;;;;;;;;;;;;24301:61;;24455:24;24482:20;:46;;;;;24507:21;24506:22;24482:46;:73;;;;;24547:8;-1:-1:-1;;;;;24532:23:0;:11;-1:-1:-1;;;;;24532:23:0;;24482:73;24455:100;;24574:19;24570:70;;;24636:4;24612:28;;24570:70;24671:648;;;;;;;;24834:9;-1:-1:-1;;;;;24671:648:0;;;;;24758:6;-1:-1:-1;;;;;24671:648:0;;;;;24938:15;24954:1;24938:18;;;;;;;;;;;;;;-1:-1:-1;;;;;24671:648:0;;;;;24989:11;-1:-1:-1;;;;;24671:648:0;;;;;25134:1;-1:-1:-1;;;;;24671:648:0;;;;;25211:33;25234:9;25211:22;:33::i;:::-;24671:648;;;;;;;;;;;;24657:4;24666:1;24662;:5;24657:11;;;;;;;;;;;;;:662;;;;24080:1251;;;;24129:1;24124:6;;;;24080:1251;;;25393:30;;:::i;:::-;25426:4;25431:1;25426:7;;;;;;;;;;;;;;;;;;;25460:20;;;;;-1:-1:-1;;;;;25448:33:0;;;;;:11;:33;;;;;;;25426:7;;-1:-1:-1;25448:33:0;;25444:472;;;25594:8;:31;;;25590:314;;;2196:42;25644:20;;;:42;25590:314;;;25885:18;;25855:49;;:29;:49::i;:::-;-1:-1:-1;;;;;25832:72:0;:20;;;:72;25590:314;25965:4;25984:1;25970:4;:11;:15;25965:21;;;;;;;;;;;;;;;;;;;26013:20;;;;-1:-1:-1;;;;;26001:33:0;;;;;:11;:33;;;;;;;;25965:21;;-1:-1:-1;26001:33:0;;25997:472;;;26147:8;:31;;;26143:314;;;2196:42;26197:20;;;:42;26143:314;;;26438:18;;26408:49;;:29;:49::i;:::-;-1:-1:-1;;;;;26385:72:0;:20;;;:72;26143:314;26536:1;26532:5;;26527:1295;26543:4;:11;26539:1;:15;26527:1295;;;26587:4;26592:1;26587:7;;;;;;;;;;;;;;26576:18;;26746:8;:31;;;26742:1069;;;26902:8;:28;;;26898:709;;;26992:4;26953:20;;;:45;26898:709;;;27125:1;27111:4;:11;:15;27106:1;:20;27102:505;;;-1:-1:-1;;;;;27149:35:0;;:20;;;:35;27102:505;;;27310:4;27315:1;27319;27315:5;27310:11;;;;;;;;;;;;;;:34;;;27306:301;;;27398:4;27403:1;27407;27403:5;27398:11;;;;;;;;;;;;;;;;;;:21;-1:-1:-1;;;;;27367:53:0;:20;;;:53;27306:301;;;27601:4;27562:20;;;:45;27306:301;26742:1069;;;27789:4;27750:20;;;:45;26742:1069;26556:3;;;;;26527:1295;;;-1:-1:-1;27841:4:0;;23592:4261;-1:-1:-1;;;;;;;23592:4261:0:o;17080:2701::-;17289:7;;17357;17289;17422:2194;17446:5;:12;17442:1;:16;17422:2194;;;17480:30;;:::i;:::-;17513:5;17519:1;17513:8;;;;;;;;;;;;;;17480:41;;17574:8;:31;;;17570:889;;;17820:6;;;;;:51;;;17866:4;-1:-1:-1;;;;;17830:41:0;:5;17840:1;17836;:5;17830:12;;;;;;;;;;;;;;:24;;;-1:-1:-1;;;;;17830:41:0;;17820:51;:89;;;;-1:-1:-1;17888:20:0;;;;;-1:-1:-1;;;;;17876:33:0;;;;;:11;:33;;;;;;17875:34;17820:89;17816:191;;;17932:75;17945:8;:20;;;17975:8;:18;;;17996:10;17932:12;:75::i;:::-;17570:889;;;18235:8;:15;;;-1:-1:-1;;;;;18191:61:0;:8;:20;;;-1:-1:-1;;;;;18191:61:0;;18187:272;;18365:78;18381:8;:20;;;18411:8;:18;;;18432:10;18365:15;:78::i;:::-;18514:8;:31;;;18509:564;;18600:18;;18628:20;;;;;18650;;;;18575:111;;-1:-1:-1;;;18575:111:0;;-1:-1:-1;;;;;18575:111:0;;;;;;;;;;;;;;;;;;;;18684:1;18575:111;;;;;;:52;;;;;:111;;;;;;;;;;;;;;;18600:18;18575:52;:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18575:111:0;;-1:-1:-1;18509:564:0;;;18722:20;;;;;-1:-1:-1;;;;;18710:33:0;;;;;:11;:33;;;;;;18706:367;;;18773:18;;18820:20;;;;;18842;;;;18888;;;;18773:136;;-1:-1:-1;;;18773:136:0;;-1:-1:-1;;;;;18773:136:0;;;;;;;;;;;;;;;;;;;;18876:10;18773:136;;;;;;;;;;;;:26;;;;;18808:9;;18773:136;;;;;;;;;;;;;;18808:9;18773:26;:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18706:367;18957:18;;18984:20;;;;;19006;;;;19052;;;;18957:116;;-1:-1:-1;;;18957:116:0;;-1:-1:-1;;;;;18957:116:0;;;;;;;;;;;;;;;;;;;;19040:10;18957:116;;;;;;;;;;;;:26;;;;;:116;;;;;;;;;;;;;;;:18;:26;:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18957:116:0;;-1:-1:-1;18706:367:0;19138:8;:28;;;19134:308;;;19187:23;19213:47;2119:7;19213:27;:8;19226:13;19213:12;:27::i;:47::-;19187:73;;19287:8;:20;;;-1:-1:-1;;;;;19287:29:0;;19317:17;19336:15;19287:65;;;;;;;;;;;;;-1:-1:-1;;;;;19287:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19287:65:0;19279:101;;;;;-1:-1:-1;;;19279:101:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;19399:27;;;;19134:308;19513:8;:20;;;-1:-1:-1;;;;;19463:105:0;19491:8;:20;;;-1:-1:-1;;;;;19463:105:0;19474:8;:15;;;-1:-1:-1;;;;;19463:105:0;;19535:10;19547:8;19557:10;19463:105;;;;;;;;;;;;;;-1:-1:-1;;;;;19463:105:0;;;;;;;;;;;;;;;;;-1:-1:-1;19596:8:0;;-1:-1:-1;17460:3:0;;17422:2194;;;;19712:10;19700:8;:22;;19692:53;;;;;-1:-1:-1;;;19692:53:0;;;;;;;;;;;;-1:-1:-1;;;19692:53:0;;;;;;;;;;;;;;;-1:-1:-1;19765:8:0;17080:2701;-1:-1:-1;;;;;;17080:2701:0:o;22182:893::-;22306:30;;:::i;:::-;22339:5;22360:1;22345:5;:12;:16;22339:23;;;;;;;;;;;;;;22306:56;;22476:4;-1:-1:-1;;;;;22444:37:0;:8;:20;;;-1:-1:-1;;;;;22444:37:0;;22440:63;;22496:7;;;22440:63;22541:20;;;;-1:-1:-1;;;;;22607:24:0;;22515:23;22607:24;;;:11;:24;;;;;;;;22603:465;;;22732:8;:31;;;22731:32;22724:40;;;;22889:11;-1:-1:-1;;;;;22869:44:0;;22914:12;22928:7;22869:67;;;;;;;;;;;;;-1:-1:-1;;;;;22869:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22603:465;23008:48;23021:11;23034:12;23048:7;23008:12;:48::i;22182:893::-;;;;:::o;28319:348::-;28437:41;;;-1:-1:-1;;;28437:41:0;;28462:4;28437:41;;;;-1:-1:-1;;;;;28437:41:0;;;;;;;;;28417:17;;28437:16;;;;;:41;;;;;;;;;;;;;;:16;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28437:41:0;;-1:-1:-1;28493:18:0;;;28489:171;;;28532:13;;28528:68;;28564:32;28576:6;28584:8;28594:1;28564:11;:32::i;:::-;28611:37;28623:6;28631:8;28641:6;28611:11;:37::i;:::-;28319:348;;;;:::o;28751:449::-;28835:11;28859:20;28882:10;-1:-1:-1;;;;;28882:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28882:32:0;28859:55;;;-1:-1:-1;28930:9:0;28925:229;28949:12;28945:1;:16;28925:229;;;28983:31;29017:10;-1:-1:-1;;;;;29017:26:0;;29044:1;29017:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29017:29:0;-1:-1:-1;;;;;29065:32:0;;;;;;:11;29017:29;29065:32;;;;;29017:29;;-1:-1:-1;29065:32:0;;29061:81;;;29123:19;-1:-1:-1;29116:26:0;;-1:-1:-1;;29116:26:0;29061:81;-1:-1:-1;28963:3:0;;28925:229;;;-1:-1:-1;2196:42:0;;28751:449;-1:-1:-1;;;28751:449:0:o;2190:348:61:-;2355:71;;;-1:-1:-1;;;;;2355:71:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:61;-1:-1:-1;;;2355:71:61;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:61;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:61;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:61;;;;;;;;;;;;;;;;;;;;;;;;;;;815:320;966:63;;;-1:-1:-1;;;;;966:63:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;966:63:61;-1:-1:-1;;;966:63:61;;;945:85;;;;910:12;;924:17;;945:20;;;;966:63;945:85;;;966:63;945:85;;966:63;945:85;;;;;;;;;;-1:-1:-1;;945:85:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;909:121;;;;1048:7;:57;;;;-1:-1:-1;1060:11:61;;:16;;:44;;;1091:4;1080:24;;;;;;;;;;;;;;;-1:-1:-1;1080:24:61;1060:44;1040:88;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../BancorNetwork.sol\";\n\ncontract OldConverter {\n uint256 private amount;\n\n constructor(uint256 _amount) public {\n amount = _amount;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount);\n }\n}\n\ncontract NewConverter {\n uint256 private amount;\n uint256 private fee;\n\n constructor(uint256 _amount, uint256 _fee) public {\n amount = _amount;\n fee = _fee;\n }\n\n function getReturn(IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount) external view returns (uint256, uint256) {\n _sourceToken;\n _targetToken;\n _amount;\n return (amount, fee);\n }\n}\n\ncontract ConverterV27OrLowerWithoutFallback {\n}\n\ncontract ConverterV27OrLowerWithFallback {\n receive() external payable {\n }\n}\n\ncontract ConverterV28OrHigherWithoutFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n}\n\ncontract ConverterV28OrHigherWithFallback {\n function isV28OrHigher() public pure returns (bool) {\n return true;\n }\n\n receive() external payable {\n revert();\n }\n}\n\ncontract TestBancorNetwork is BancorNetwork {\n OldConverter private oldConverter;\n NewConverter private newConverter;\n\n constructor(uint256 _amount, uint256 _fee) public BancorNetwork(IContractRegistry(address(1))) {\n oldConverter = new OldConverter(_amount);\n newConverter = new NewConverter(_amount, _fee);\n }\n\n function isV28OrHigherConverterExternal(IConverter _converter) external view returns (bool) {\n return super.isV28OrHigherConverter(_converter);\n }\n\n function getReturnOld() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(oldConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n\n function getReturnNew() external view returns (uint256, uint256) {\n return getReturn(IConverter(payable(address(newConverter))), IERC20Token(0), IERC20Token(0), uint256(0));\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestBancorNetwork.sol", + "exportedSymbols": { + "ConverterV27OrLowerWithFallback": [ + 19052 + ], + "ConverterV27OrLowerWithoutFallback": [ + 19047 + ], + "ConverterV28OrHigherWithFallback": [ + 19077 + ], + "ConverterV28OrHigherWithoutFallback": [ + 19061 + ], + "NewConverter": [ + 19046 + ], + "OldConverter": [ + 19001 + ], + "TestBancorNetwork": [ + 19188 + ] + }, + "id": 19189, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 18966, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:36" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/BancorNetwork.sol", + "file": "../BancorNetwork.sol", + "id": 18967, + "nodeType": "ImportDirective", + "scope": 19189, + "sourceUnit": 1977, + "src": "75:30:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19001, + "linearizedBaseContracts": [ + 19001 + ], + "name": "OldConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 18969, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19001, + "src": "135:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "135:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 18978, + "nodeType": "Block", + "src": "200:33:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 18974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "210:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 18975, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18971, + "src": "219:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "210:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18977, + "nodeType": "ExpressionStatement", + "src": "210:16:36" + } + ] + }, + "documentation": null, + "id": 18979, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18971, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 18979, + "src": "176:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "176:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:17:36" + }, + "returnParameters": { + "id": 18973, + "nodeType": "ParameterList", + "parameters": [], + "src": "200:0:36" + }, + "scope": 19001, + "src": "164:69:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 18999, + "nodeType": "Block", + "src": "359:93:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 18990, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18981, + "src": "369:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18991, + "nodeType": "ExpressionStatement", + "src": "369:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18992, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18983, + "src": "391:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 18993, + "nodeType": "ExpressionStatement", + "src": "391:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 18994, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18985, + "src": "413:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 18995, + "nodeType": "ExpressionStatement", + "src": "413:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 18996, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18969, + "src": "438:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 18997, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "437:8:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 18989, + "id": 18998, + "nodeType": "Return", + "src": "430:15:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19000, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 18986, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18981, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "258:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18980, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "258:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18983, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "284:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 18982, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "284:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 18985, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "310:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18984, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "310:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "257:69:36" + }, + "returnParameters": { + "id": 18989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 18988, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19000, + "src": "350:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "349:9:36" + }, + "scope": 19001, + "src": "239:213:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "107:347:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19046, + "linearizedBaseContracts": [ + 19046 + ], + "name": "NewConverter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19003, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "484:22:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19002, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "484:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19005, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19046, + "src": "512:19:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19004, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "512:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19020, + "nodeType": "Block", + "src": "588:53:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19012, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "598:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19013, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19007, + "src": "607:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "598:16:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19015, + "nodeType": "ExpressionStatement", + "src": "598:16:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19016, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "624:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19017, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19009, + "src": "630:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "624:10:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19019, + "nodeType": "ExpressionStatement", + "src": "624:10:36" + } + ] + }, + "documentation": null, + "id": 19021, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19007, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "550:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "550:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19009, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19021, + "src": "567:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19008, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "549:31:36" + }, + "returnParameters": { + "id": 19011, + "nodeType": "ParameterList", + "parameters": [], + "src": "588:0:36" + }, + "scope": 19046, + "src": "538:103:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19044, + "nodeType": "Block", + "src": "776:98:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19034, + "name": "_sourceToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19023, + "src": "786:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19035, + "nodeType": "ExpressionStatement", + "src": "786:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19036, + "name": "_targetToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19025, + "src": "808:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19037, + "nodeType": "ExpressionStatement", + "src": "808:12:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19038, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19027, + "src": "830:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19039, + "nodeType": "ExpressionStatement", + "src": "830:7:36" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 19040, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19003, + "src": "855:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19041, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19005, + "src": "863:3:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19042, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "854:13:36", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19033, + "id": 19043, + "nodeType": "Return", + "src": "847:20:36" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 19045, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19023, + "mutability": "mutable", + "name": "_sourceToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "666:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19022, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "666:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19025, + "mutability": "mutable", + "name": "_targetToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "692:24:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19024, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "692:11:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19027, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "718:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19026, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "718:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "665:69:36" + }, + "returnParameters": { + "id": 19033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19030, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "758:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "758:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19032, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19045, + "src": "767:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19031, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "757:18:36" + }, + "scope": 19046, + "src": "647:227:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "456:420:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19047, + "linearizedBaseContracts": [ + 19047 + ], + "name": "ConverterV27OrLowerWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 19189, + "src": "878:47:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19052, + "linearizedBaseContracts": [ + 19052 + ], + "name": "ConverterV27OrLowerWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19050, + "nodeType": "Block", + "src": "1001:7:36", + "statements": [] + }, + "documentation": null, + "id": 19051, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19048, + "nodeType": "ParameterList", + "parameters": [], + "src": "981:2:36" + }, + "returnParameters": { + "id": 19049, + "nodeType": "ParameterList", + "parameters": [], + "src": "1001:0:36" + }, + "scope": 19052, + "src": "974:34:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "927:83:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19061, + "linearizedBaseContracts": [ + 19061 + ], + "name": "ConverterV28OrHigherWithoutFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19059, + "nodeType": "Block", + "src": "1115:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19057, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1132:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19056, + "id": 19058, + "nodeType": "Return", + "src": "1125:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19053, + "nodeType": "ParameterList", + "parameters": [], + "src": "1085:2:36" + }, + "returnParameters": { + "id": 19056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19055, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19060, + "src": "1109:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1109:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1108:6:36" + }, + "scope": 19061, + "src": "1063:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19189, + "src": "1012:133:36" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19077, + "linearizedBaseContracts": [ + 19077 + ], + "name": "ConverterV28OrHigherWithFallback", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19068, + "nodeType": "Block", + "src": "1247:28:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1264:4:36", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 19065, + "id": 19067, + "nodeType": "Return", + "src": "1257:11:36" + } + ] + }, + "documentation": null, + "functionSelector": "d260529c", + "id": 19069, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigher", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19062, + "nodeType": "ParameterList", + "parameters": [], + "src": "1217:2:36" + }, + "returnParameters": { + "id": 19065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19064, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19069, + "src": "1241:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19063, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1241:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1240:6:36" + }, + "scope": 19077, + "src": "1195:80:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19075, + "nodeType": "Block", + "src": "1308:25:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19072, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "1318:6:36", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 19073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1318:8:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19074, + "nodeType": "ExpressionStatement", + "src": "1318:8:36" + } + ] + }, + "documentation": null, + "id": 19076, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19070, + "nodeType": "ParameterList", + "parameters": [], + "src": "1288:2:36" + }, + "returnParameters": { + "id": 19071, + "nodeType": "ParameterList", + "parameters": [], + "src": "1308:0:36" + }, + "scope": 19077, + "src": "1281:52:36", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1147:188:36" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19078, + "name": "BancorNetwork", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1976, + "src": "1367:13:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BancorNetwork_$1976", + "typeString": "contract BancorNetwork" + } + }, + "id": 19079, + "nodeType": "InheritanceSpecifier", + "src": "1367:13:36" + } + ], + "contractDependencies": [ + 1976, + 19001, + 19046, + 21719, + 21818, + 22242, + 22526, + 22575, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19188, + "linearizedBaseContracts": [ + 19188, + 1976, + 22242, + 21719, + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TestBancorNetwork", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19081, + "mutability": "mutable", + "name": "oldConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1387:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + }, + "typeName": { + "contractScope": null, + "id": 19080, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1387:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19083, + "mutability": "mutable", + "name": "newConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19188, + "src": "1426:33:36", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + }, + "typeName": { + "contractScope": null, + "id": 19082, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1426:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19113, + "nodeType": "Block", + "src": "1561:113:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19098, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1571:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19101, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1603:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1586:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$returns$_t_contract$_OldConverter_$19001_$", + "typeString": "function (uint256) returns (contract OldConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19099, + "name": "OldConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19001, + "src": "1590:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + }, + "id": 19102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1586:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "src": "1571:40:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + }, + "id": 19104, + "nodeType": "ExpressionStatement", + "src": "1571:40:36" + }, + { + "expression": { + "argumentTypes": null, + "id": 19111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19105, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "1621:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19108, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19085, + "src": "1653:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 19109, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19087, + "src": "1662:4:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "1636:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_uint256_$_t_uint256_$returns$_t_contract$_NewConverter_$19046_$", + "typeString": "function (uint256,uint256) returns (contract NewConverter)" + }, + "typeName": { + "contractScope": null, + "id": 19106, + "name": "NewConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19046, + "src": "1640:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + }, + "id": 19110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1636:31:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "src": "1621:46:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + }, + "id": 19112, + "nodeType": "ExpressionStatement", + "src": "1621:46:36" + } + ] + }, + "documentation": null, + "id": 19114, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 19093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1556:1:36", + "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" + } + ], + "id": 19092, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1548:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1548:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19090, + "name": "IContractRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22831, + "src": "1530:17:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IContractRegistry_$22831_$", + "typeString": "type(contract IContractRegistry)" + } + }, + "id": 19095, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1530:29:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19096, + "modifierName": { + "argumentTypes": null, + "id": 19089, + "name": "BancorNetwork", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1976, + "src": "1516:13:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_BancorNetwork_$1976_$", + "typeString": "type(contract BancorNetwork)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1516:44:36" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19085, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1478:15:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1478:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19087, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19114, + "src": "1495:12:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1495:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1477:31:36" + }, + "returnParameters": { + "id": 19097, + "nodeType": "ParameterList", + "parameters": [], + "src": "1561:0:36" + }, + "scope": 19188, + "src": "1466:208:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19126, + "nodeType": "Block", + "src": "1772:64:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19123, + "name": "_converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19116, + "src": "1818:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + ], + "expression": { + "argumentTypes": null, + "id": 19121, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "1789:5:36", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestBancorNetwork_$19188", + "typeString": "contract super TestBancorNetwork" + } + }, + "id": 19122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isV28OrHigherConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 1719, + "src": "1789:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$returns$_t_bool_$", + "typeString": "function (contract IConverter) view returns (bool)" + } + }, + "id": 19124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1789:40:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 19120, + "id": 19125, + "nodeType": "Return", + "src": "1782:47:36" + } + ] + }, + "documentation": null, + "functionSelector": "03613f39", + "id": 19127, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isV28OrHigherConverterExternal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19116, + "mutability": "mutable", + "name": "_converter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1720:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19115, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "1720:10:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1719:23:36" + }, + "returnParameters": { + "id": 19120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19119, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19127, + "src": "1766:4:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19118, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1766:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1765:6:36" + }, + "scope": 19188, + "src": "1680:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19156, + "nodeType": "Block", + "src": "1907:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19140, + "name": "oldConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19081, + "src": "1961:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_OldConverter_$19001", + "typeString": "contract OldConverter" + } + ], + "id": 19139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1953:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1953:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1945:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1945:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1945:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19135, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "1934:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1990:1:36", + "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": 19144, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1978:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19146, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1978:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19148, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2006:1:36", + "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": 19147, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "1994:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2018:1:36", + "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": 19151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2010:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19134, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "1924:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19133, + "id": 19155, + "nodeType": "Return", + "src": "1917:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "98e95740", + "id": 19157, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnOld", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1863:2:36" + }, + "returnParameters": { + "id": 19133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19130, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1889:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1889:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19157, + "src": "1898:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1898:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1888:18:36" + }, + "scope": 19188, + "src": "1842:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19186, + "nodeType": "Block", + "src": "2099:121:36", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19170, + "name": "newConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19083, + "src": "2153:12:36", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_NewConverter_$19046", + "typeString": "contract NewConverter" + } + ], + "id": 19169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 19168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2145:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2145:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2137:8:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 19166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2137:8:36", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2137:30:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19165, + "name": "IConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13340, + "src": "2126:10:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IConverter_$13340_$", + "typeString": "type(contract IConverter)" + } + }, + "id": 19173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2126:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19175, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:1:36", + "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": 19174, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2170:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2198:1:36", + "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": 19177, + "name": "IERC20Token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21127, + "src": "2186:11:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20Token_$21127_$", + "typeString": "type(contract IERC20Token)" + } + }, + "id": 19179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2186:14:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 19182, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2210:1:36", + "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": 19181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 19180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2202:7:36", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 19183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2202:10:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19164, + "name": "getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "2116:9:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IConverter_$13340_$_t_contract$_IERC20Token_$21127_$_t_contract$_IERC20Token_$21127_$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (contract IConverter,contract IERC20Token,contract IERC20Token,uint256) view returns (uint256,uint256)" + } + }, + "id": 19184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:97:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 19163, + "id": 19185, + "nodeType": "Return", + "src": "2109:104:36" + } + ] + }, + "documentation": null, + "functionSelector": "699e7546", + "id": 19187, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturnNew", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19158, + "nodeType": "ParameterList", + "parameters": [], + "src": "2055:2:36" + }, + "returnParameters": { + "id": 19163, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19160, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2081:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2081:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19162, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19187, + "src": "2090:7:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19161, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2090:7:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2080:18:36" + }, + "scope": 19188, + "src": "2034:186:36", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19189, + "src": "1337:885:36" + } + ], + "src": "51:2172:36" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.802Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "claimAndConvert(address[],uint256,uint256)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvert2(address[],uint256,uint256,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvertFor(address[],uint256,uint256,address)": { + "details": "deprecated, backward compatibility" + }, + "claimAndConvertFor2(address[],uint256,uint256,address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "completeXConversion(address[],address,uint256,uint256,address)": { + "details": "allows a user to convert a token that was sent from another blockchain into any other token on the BancorNetwork ideally this transaction is created before the previous conversion is even complete, so so the input amount isn't known at that point - the amount is actually take from the BancorX contract directly by specifying the conversion id", + "params": { + "_bancorX": "address of the BancorX contract for the source token", + "_beneficiary": "wallet to receive the conversion result", + "_conversionId": "pre-determined unique (if non zero) id which refers to this conversion", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be nonzero", + "_path": "conversion path" + }, + "returns": { + "_0": "amount of tokens received from the conversion" + } + }, + "conversionPath(address,address)": { + "details": "returns the conversion path between two tokens in the network note that this method is quite expensive in terms of gas and should generally be called off-chain", + "params": { + "_sourceToken": "source token address", + "_targetToken": "target token address" + }, + "returns": { + "_0": "conversion path between the two tokens" + } + }, + "convert(address[],uint256,uint256)": { + "details": "deprecated, backward compatibility" + }, + "convert2(address[],uint256,uint256,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "convertByPath(address[],uint256,uint256,address,address,uint256)": { + "details": "converts the token to any other token in the bancor network by following a predefined conversion path and transfers the result tokens to a target account affiliate account/fee can also be passed in to receive a conversion fee (on top of the liquidity provider fees) note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_affiliateAccount": "wallet address to receive the affiliate fee or 0x0 to disable affiliate fee", + "_affiliateFee": "affiliate fee in PPM or 0 to disable affiliate fee", + "_amount": "amount to convert from, in the source token", + "_beneficiary": "account that will receive the conversion result or 0x0 to send the result to the sender account", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above" + }, + "returns": { + "_0": "amount of tokens received from the conversion" + } + }, + "convertFor(address[],uint256,uint256,address)": { + "details": "deprecated, backward compatibility" + }, + "convertFor2(address[],uint256,uint256,address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "getReturnByPath(address[],uint256)": { + "details": "deprecated, backward compatibility" + }, + "rateByPath(address[],uint256)": { + "details": "returns the expected target amount of converting a given amount on a given path note that there is no support for circular paths", + "params": { + "_amount": "amount of _path[0] tokens received from the sender", + "_path": "conversion path (see conversion path format above)" + }, + "returns": { + "_0": "expected target amount" + } + }, + "registerEtherToken(address,bool)": { + "details": "allows the owner to register/unregister ether tokens", + "params": { + "_register": "true to register, false to unregister", + "_token": "ether token contract address" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setMaxAffiliateFee(uint256)": { + "details": "allows the owner to update the maximum affiliate-fee", + "params": { + "_maxAffiliateFee": "maximum affiliate-fee" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "xConvert(address[],uint256,uint256,bytes32,bytes32,uint256)": { + "details": "converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_amount": "amount to convert from, in the source token", + "_conversionId": "pre-determined unique (if non zero) id which refers to this transaction", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above", + "_targetAccount": "address/account on the target blockchain to send the BNT to", + "_targetBlockchain": "blockchain BNT will be issued on" + }, + "returns": { + "_0": "the amount of BNT received from this conversion" + } + }, + "xConvert2(address[],uint256,uint256,bytes32,bytes32,uint256,address,uint256)": { + "details": "converts any other token to BNT in the bancor network by following a predefined conversion path and transfers the result to an account on a different blockchain note that the network should already have been given allowance of the source token (if not ETH)", + "params": { + "_affiliateAccount": "affiliate account", + "_affiliateFee": "affiliate fee in PPM", + "_amount": "amount to convert from, in the source token", + "_conversionId": "pre-determined unique (if non zero) id which refers to this transaction", + "_minReturn": "if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero", + "_path": "conversion path, see conversion path format above", + "_targetAccount": "address/account on the target blockchain to send the BNT to", + "_targetBlockchain": "blockchain BNT will be issued on" + }, + "returns": { + "_0": "the amount of BNT received from this conversion" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestChainlinkPriceOracle.json b/apps/cic-eth/tests/testdata/bancor/TestChainlinkPriceOracle.json new file mode 100644 index 00000000..68a5b322 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestChainlinkPriceOracle.json @@ -0,0 +1,1148 @@ +{ + "contractName": "TestChainlinkPriceOracle", + "abi": [ + { + "inputs": [ + { + "internalType": "int256", + "name": "_answer", + "type": "int256" + } + ], + "name": "setAnswer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "setTimestamp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "latestAnswer", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"_answer\",\"type\":\"int256\"}],\"name\":\"setAnswer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"setTimestamp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestChainlinkPriceOracle.sol\":\"TestChainlinkPriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestChainlinkPriceOracle.sol\":{\"keccak256\":\"0x1b9910e63f953facfddd082041f218c93bf49a4a0fae7afc6c733ba7231509b7\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://df98ce67ec1d9739ade570fd3bf423a7ab53c5bd203820cc2d0df4cb3b80e320\",\"dweb:/ipfs/QmawAySi2MDVmuSpUn31rPezTZPHsQ9tVvME6zV4rcMshN\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060eb8061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060465760003560e01c806350d25bcd14604b5780638205bf6a14606357806399213cd8146069578063a0a2b573146085575b600080fd5b6051609f565b60408051918252519081900360200190f35b605160a5565b608360048036036020811015607d57600080fd5b503560ab565b005b608360048036036020811015609957600080fd5b503560b0565b60005490565b60015490565b600055565b60015556fea2646970667358221220b69ce5dd49de1b63092f81599fc7e55fa5c6251e1405618cd68e8ce77cce560464736f6c634300060c0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060465760003560e01c806350d25bcd14604b5780638205bf6a14606357806399213cd8146069578063a0a2b573146085575b600080fd5b6051609f565b60408051918252519081900360200190f35b605160a5565b608360048036036020811015607d57600080fd5b503560ab565b005b608360048036036020811015609957600080fd5b503560b0565b60005490565b60015490565b600055565b60015556fea2646970667358221220b69ce5dd49de1b63092f81599fc7e55fa5c6251e1405618cd68e8ce77cce560464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "172:502:37:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "172:502:37:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;471:94;;;:::i;:::-;;;;;;;;;;;;;;;;571:101;;;:::i;296:75::-;;;;;;;;;;;;;;;;-1:-1:-1;296:75:37;;:::i;:::-;;377:88;;;;;;;;;;;;;;;;-1:-1:-1;377:88:37;;:::i;471:94::-;527:6;552;471:94;:::o;571:101::-;656:9;;571:101;:::o;296:75::-;348:6;:16;296:75::o;377:88::-;436:9;:22;377:88::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/interfaces/IChainlinkPriceOracle.sol\";\n\n/*\n Chainlink price oracle mock\n*/\ncontract TestChainlinkPriceOracle is IChainlinkPriceOracle {\n int256 private answer;\n uint256 private timestamp;\n\n function setAnswer(int256 _answer) public {\n answer = _answer;\n }\n\n function setTimestamp(uint256 _timestamp) public {\n timestamp = _timestamp;\n }\n\n function latestAnswer() external view override returns (int256) {\n return answer;\n }\n\n function latestTimestamp() external view override returns (uint256) {\n return timestamp;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestChainlinkPriceOracle.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestChainlinkPriceOracle.sol", + "exportedSymbols": { + "TestChainlinkPriceOracle": [ + 19236 + ] + }, + "id": 19237, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19190, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:37" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "../utility/interfaces/IChainlinkPriceOracle.sol", + "id": 19191, + "nodeType": "ImportDirective", + "scope": 19237, + "sourceUnit": 22822, + "src": "75:57:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19192, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "209:21:37", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 19193, + "nodeType": "InheritanceSpecifier", + "src": "209:21:37" + } + ], + "contractDependencies": [ + 22821 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19236, + "linearizedBaseContracts": [ + 19236, + 22821 + ], + "name": "TestChainlinkPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19195, + "mutability": "mutable", + "name": "answer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19236, + "src": "237:21:37", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19194, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "237:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19197, + "mutability": "mutable", + "name": "timestamp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19236, + "src": "264:25:37", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19196, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19206, + "nodeType": "Block", + "src": "338:33:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19202, + "name": "answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19195, + "src": "348:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19203, + "name": "_answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19199, + "src": "357:7:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "348:16:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 19205, + "nodeType": "ExpressionStatement", + "src": "348:16:37" + } + ] + }, + "documentation": null, + "functionSelector": "99213cd8", + "id": 19207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setAnswer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19199, + "mutability": "mutable", + "name": "_answer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19207, + "src": "315:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19198, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "315:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "314:16:37" + }, + "returnParameters": { + "id": 19201, + "nodeType": "ParameterList", + "parameters": [], + "src": "338:0:37" + }, + "scope": 19236, + "src": "296:75:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19216, + "nodeType": "Block", + "src": "426:39:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19212, + "name": "timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19197, + "src": "436:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19213, + "name": "_timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19209, + "src": "448:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "436:22:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19215, + "nodeType": "ExpressionStatement", + "src": "436:22:37" + } + ] + }, + "documentation": null, + "functionSelector": "a0a2b573", + "id": 19217, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTimestamp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19209, + "mutability": "mutable", + "name": "_timestamp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19217, + "src": "399:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:20:37" + }, + "returnParameters": { + "id": 19211, + "nodeType": "ParameterList", + "parameters": [], + "src": "426:0:37" + }, + "scope": 19236, + "src": "377:88:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22815 + ], + "body": { + "id": 19225, + "nodeType": "Block", + "src": "535:30:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19223, + "name": "answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19195, + "src": "552:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 19222, + "id": 19224, + "nodeType": "Return", + "src": "545:13:37" + } + ] + }, + "documentation": null, + "functionSelector": "50d25bcd", + "id": 19226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19219, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "509:8:37" + }, + "parameters": { + "id": 19218, + "nodeType": "ParameterList", + "parameters": [], + "src": "492:2:37" + }, + "returnParameters": { + "id": 19222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19221, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19226, + "src": "527:6:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19220, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "527:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "526:8:37" + }, + "scope": 19236, + "src": "471:94:37", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 22820 + ], + "body": { + "id": 19234, + "nodeType": "Block", + "src": "639:33:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19232, + "name": "timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19197, + "src": "656:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19231, + "id": 19233, + "nodeType": "Return", + "src": "649:16:37" + } + ] + }, + "documentation": null, + "functionSelector": "8205bf6a", + "id": 19235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19228, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "612:8:37" + }, + "parameters": { + "id": 19227, + "nodeType": "ParameterList", + "parameters": [], + "src": "595:2:37" + }, + "returnParameters": { + "id": 19231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19230, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19235, + "src": "630:7:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "629:9:37" + }, + "scope": 19236, + "src": "571:101:37", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19237, + "src": "172:502:37" + } + ], + "src": "51:624:37" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestChainlinkPriceOracle.sol", + "exportedSymbols": { + "TestChainlinkPriceOracle": [ + 19236 + ] + }, + "id": 19237, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19190, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:37" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol", + "file": "../utility/interfaces/IChainlinkPriceOracle.sol", + "id": 19191, + "nodeType": "ImportDirective", + "scope": 19237, + "sourceUnit": 22822, + "src": "75:57:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19192, + "name": "IChainlinkPriceOracle", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22821, + "src": "209:21:37", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821", + "typeString": "contract IChainlinkPriceOracle" + } + }, + "id": 19193, + "nodeType": "InheritanceSpecifier", + "src": "209:21:37" + } + ], + "contractDependencies": [ + 22821 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19236, + "linearizedBaseContracts": [ + 19236, + 22821 + ], + "name": "TestChainlinkPriceOracle", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 19195, + "mutability": "mutable", + "name": "answer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19236, + "src": "237:21:37", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19194, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "237:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 19197, + "mutability": "mutable", + "name": "timestamp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19236, + "src": "264:25:37", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19196, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 19206, + "nodeType": "Block", + "src": "338:33:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19202, + "name": "answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19195, + "src": "348:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19203, + "name": "_answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19199, + "src": "357:7:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "src": "348:16:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "id": 19205, + "nodeType": "ExpressionStatement", + "src": "348:16:37" + } + ] + }, + "documentation": null, + "functionSelector": "99213cd8", + "id": 19207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setAnswer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19200, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19199, + "mutability": "mutable", + "name": "_answer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19207, + "src": "315:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19198, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "315:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "314:16:37" + }, + "returnParameters": { + "id": 19201, + "nodeType": "ParameterList", + "parameters": [], + "src": "338:0:37" + }, + "scope": 19236, + "src": "296:75:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19216, + "nodeType": "Block", + "src": "426:39:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19212, + "name": "timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19197, + "src": "436:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19213, + "name": "_timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19209, + "src": "448:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "436:22:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19215, + "nodeType": "ExpressionStatement", + "src": "436:22:37" + } + ] + }, + "documentation": null, + "functionSelector": "a0a2b573", + "id": 19217, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTimestamp", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19210, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19209, + "mutability": "mutable", + "name": "_timestamp", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19217, + "src": "399:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19208, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "398:20:37" + }, + "returnParameters": { + "id": 19211, + "nodeType": "ParameterList", + "parameters": [], + "src": "426:0:37" + }, + "scope": 19236, + "src": "377:88:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 22815 + ], + "body": { + "id": 19225, + "nodeType": "Block", + "src": "535:30:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19223, + "name": "answer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19195, + "src": "552:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "functionReturnParameters": 19222, + "id": 19224, + "nodeType": "Return", + "src": "545:13:37" + } + ] + }, + "documentation": null, + "functionSelector": "50d25bcd", + "id": 19226, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestAnswer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19219, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "509:8:37" + }, + "parameters": { + "id": 19218, + "nodeType": "ParameterList", + "parameters": [], + "src": "492:2:37" + }, + "returnParameters": { + "id": 19222, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19221, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19226, + "src": "527:6:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + }, + "typeName": { + "id": 19220, + "name": "int256", + "nodeType": "ElementaryTypeName", + "src": "527:6:37", + "typeDescriptions": { + "typeIdentifier": "t_int256", + "typeString": "int256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "526:8:37" + }, + "scope": 19236, + "src": "471:94:37", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 22820 + ], + "body": { + "id": 19234, + "nodeType": "Block", + "src": "639:33:37", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19232, + "name": "timestamp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19197, + "src": "656:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19231, + "id": 19233, + "nodeType": "Return", + "src": "649:16:37" + } + ] + }, + "documentation": null, + "functionSelector": "8205bf6a", + "id": 19235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "latestTimestamp", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19228, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "612:8:37" + }, + "parameters": { + "id": 19227, + "nodeType": "ParameterList", + "parameters": [], + "src": "595:2:37" + }, + "returnParameters": { + "id": 19231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19230, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19235, + "src": "630:7:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "629:9:37" + }, + "scope": 19236, + "src": "571:101:37", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19237, + "src": "172:502:37" + } + ], + "src": "51:624:37" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.805Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestContractRegistryClient.json b/apps/cic-eth/tests/testdata/bancor/TestContractRegistryClient.json new file mode 100644 index 00000000..47461d7a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestContractRegistryClient.json @@ -0,0 +1,552 @@ +{ + "contractName": "TestContractRegistryClient", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestContractRegistryClient.sol\":\"TestContractRegistryClient\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestContractRegistryClient.sol\":{\"keccak256\":\"0xdeeb574467dba11f2bfec860d4231655d5f2f04ef450b95d8626643abf6630be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ec073c4ba50f6aa4b84a40e46262ed3a66d4e5bda97fef47807025389c413f5b\",\"dweb:/ipfs/QmXSFnfgcfrUKGzJYWewYzJfLLHrkLXz8HuDdnZGr237WD\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161072e38038061072e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b03191633179055808061005281610083565b50600280546001600160a01b039092166001600160a01b0319928316811790915560038054909216179055506100e1565b6001600160a01b0381166100de576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61063e806100f06000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637b103999116100665780637b103999146101145780638da5cb5b1461011c578063b4a176d314610124578063d4ee1d901461012c578063f2fde38b146101345761009e565b8063024c7ec7146100a35780632fe8a6ad146100c457806349d10b64146100e057806361cd756e146100e857806379ba50971461010c575b600080fd5b6100c2600480360360208110156100b957600080fd5b5035151561015a565b005b6100cc610180565b604080519115158252519081900360200190f35b6100c2610190565b6100f0610398565b604080516001600160a01b039092168252519081900360200190f35b6100c26103a7565b6100f061045e565b6100f061046d565b6100c261047c565b6100f06104a8565b6100c26004803603602081101561014a57600080fd5b50356001600160a01b03166104b7565b610162610535565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806101b35750600354600160a01b900460ff16155b6101f8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102166f436f6e7472616374526567697374727960801b61058a565b6002549091506001600160a01b0380831691161480159061023f57506001600160a01b03811615155b610287576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102e957600080fd5b505afa1580156102fd573d6000803e3d6000fd5b505050506040513d602081101561031357600080fd5b50516001600160a01b03161415610368576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146103fa576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b610484610535565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6104bf610535565b6000546001600160a01b0382811691161415610513576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610588576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156105d657600080fd5b505afa1580156105ea573d6000803e3d6000fd5b505050506040513d602081101561060057600080fd5b50519291505056fea2646970667358221220d6099a9d187e751dddb23212cadb52ed61f8749fd1b93d6fc10fd052177931d364736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80637b103999116100665780637b103999146101145780638da5cb5b1461011c578063b4a176d314610124578063d4ee1d901461012c578063f2fde38b146101345761009e565b8063024c7ec7146100a35780632fe8a6ad146100c457806349d10b64146100e057806361cd756e146100e857806379ba50971461010c575b600080fd5b6100c2600480360360208110156100b957600080fd5b5035151561015a565b005b6100cc610180565b604080519115158252519081900360200190f35b6100c2610190565b6100f0610398565b604080516001600160a01b039092168252519081900360200190f35b6100c26103a7565b6100f061045e565b6100f061046d565b6100c261047c565b6100f06104a8565b6100c26004803603602081101561014a57600080fd5b50356001600160a01b03166104b7565b610162610535565b60038054911515600160a01b0260ff60a01b19909216919091179055565b600354600160a01b900460ff1681565b6000546001600160a01b03163314806101b35750600354600160a01b900460ff16155b6101f8576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006102166f436f6e7472616374526567697374727960801b61058a565b6002549091506001600160a01b0380831691161480159061023f57506001600160a01b03811615155b610287576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102e957600080fd5b505afa1580156102fd573d6000803e3d6000fd5b505050506040513d602081101561031357600080fd5b50516001600160a01b03161415610368576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6003546001600160a01b031681565b6001546001600160a01b031633146103fa576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b610484610535565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6104bf610535565b6000546001600160a01b0382811691161415610513576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610588576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156105d657600080fd5b505afa1580156105ea573d6000803e3d6000fd5b505050506040513d602081101561060057600080fd5b50519291505056fea2646970667358221220d6099a9d187e751dddb23212cadb52ed61f8749fd1b93d6fc10fd052177931d364736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "204:160:38:-:0;;;273:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;273:89:38;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;273:89:38;;594:23:64;273:89:38;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;204:160:38;;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;204:160:38:-;;;;;;;", + "deployedSourceMap": "204:160:38:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;1333:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;2300:925;;;:::i;1243:37::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1243:37:56;;;;;;;;;;;;;;1422:217:57;;;:::i;1154:33:56:-;;;:::i;219:29:57:-;;;:::i;3304:137:56:-;;;:::i;255:23:57:-;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;1333:38::-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;2300:925::-;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;1243:37::-;;;-1:-1:-1;;;;;1243:37:56;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;1154:33:56:-;;;-1:-1:-1;;;;;1154:33:56;;:::o;219:29:57:-;;;-1:-1:-1;;;;;219:29:57;;:::o;3304:137:56:-;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:56;;4077:133;-1:-1:-1;;4077:133:56:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/ContractRegistryClient.sol\";\n\n/*\n Utils test helper that exposes the contract registry client functions\n*/\ncontract TestContractRegistryClient is ContractRegistryClient {\n\n constructor(IContractRegistry _registry) public ContractRegistryClient(_registry) {\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestContractRegistryClient.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestContractRegistryClient.sol", + "exportedSymbols": { + "TestContractRegistryClient": [ + 19251 + ] + }, + "id": 19252, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19238, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:38" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 19239, + "nodeType": "ImportDirective", + "scope": 19252, + "sourceUnit": 21720, + "src": "75:47:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19240, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "243:22:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 19241, + "nodeType": "InheritanceSpecifier", + "src": "243:22:38" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19251, + "linearizedBaseContracts": [ + 19251, + 21719, + 22661, + 21818, + 22847 + ], + "name": "TestContractRegistryClient", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19249, + "nodeType": "Block", + "src": "355:7:38", + "statements": [] + }, + "documentation": null, + "id": 19250, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19246, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19243, + "src": "344:9:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19247, + "modifierName": { + "argumentTypes": null, + "id": 19245, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "321:22:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "321:33:38" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19243, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19250, + "src": "285:27:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19242, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "285:17:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "284:29:38" + }, + "returnParameters": { + "id": 19248, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:38" + }, + "scope": 19251, + "src": "273:89:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19252, + "src": "204:160:38" + } + ], + "src": "51:314:38" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestContractRegistryClient.sol", + "exportedSymbols": { + "TestContractRegistryClient": [ + 19251 + ] + }, + "id": 19252, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19238, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:38" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol", + "file": "../utility/ContractRegistryClient.sol", + "id": 19239, + "nodeType": "ImportDirective", + "scope": 19252, + "sourceUnit": 21720, + "src": "75:47:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19240, + "name": "ContractRegistryClient", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21719, + "src": "243:22:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ContractRegistryClient_$21719", + "typeString": "contract ContractRegistryClient" + } + }, + "id": 19241, + "nodeType": "InheritanceSpecifier", + "src": "243:22:38" + } + ], + "contractDependencies": [ + 21719, + 21818, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19251, + "linearizedBaseContracts": [ + 19251, + 21719, + 22661, + 21818, + 22847 + ], + "name": "TestContractRegistryClient", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19249, + "nodeType": "Block", + "src": "355:7:38", + "statements": [] + }, + "documentation": null, + "id": 19250, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19246, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19243, + "src": "344:9:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19247, + "modifierName": { + "argumentTypes": null, + "id": 19245, + "name": "ContractRegistryClient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21719, + "src": "321:22:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ContractRegistryClient_$21719_$", + "typeString": "type(contract ContractRegistryClient)" + } + }, + "nodeType": "ModifierInvocation", + "src": "321:33:38" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19243, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19250, + "src": "285:27:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19242, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "285:17:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "284:29:38" + }, + "returnParameters": { + "id": 19248, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:38" + }, + "scope": 19251, + "src": "273:89:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19252, + "src": "204:160:38" + } + ], + "src": "51:314:38" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.805Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestConverterFactory.json b/apps/cic-eth/tests/testdata/bancor/TestConverterFactory.json new file mode 100644 index 00000000..d5f6e3cc --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestConverterFactory.json @@ -0,0 +1,2080 @@ +{ + "contractName": "TestConverterFactory", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "NewConverter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "anchorFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterAnchorFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "converterFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "createdAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "createdConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "customFactories", + "outputs": [ + { + "internalType": "contract ITypedConverterCustomFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterAnchorFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterAnchorFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterCustomFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterCustomFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITypedConverterFactory", + "name": "_factory", + "type": "address" + } + ], + "name": "registerTypedConverterFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_converterType", + "type": "uint16" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "name": "createConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"NewConverter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"anchorFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterAnchorFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"converterFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_converterType\",\"type\":\"uint16\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"customFactories\",\"outputs\":[{\"internalType\":\"contract ITypedConverterCustomFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterAnchorFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterAnchorFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterCustomFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterCustomFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ITypedConverterFactory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"registerTypedConverterFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"createAnchor(uint16,string,string,uint8)\":{\"details\":\"creates a new converter anchor with the given arguments and transfers the ownership to the caller\",\"params\":{\"_converterType\":\"converter type, see ConverterBase contract main doc\",\"_decimals\":\"decimals\",\"_name\":\"name\",\"_symbol\":\"symbol\"},\"returns\":{\"_0\":\"new converter anchor\"}},\"createConverter(uint16,address,address,uint32)\":{\"details\":\"creates a new converter with the given arguments and transfers the ownership to the caller\",\"params\":{\"_anchor\":\"anchor governed by the converter\",\"_maxConversionFee\":\"maximum conversion fee, represented in ppm\",\"_registry\":\"address of a contract registry contract\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"new converter\"}},\"registerTypedConverterAnchorFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter anchor factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter anchor factory\"}},\"registerTypedConverterCustomFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter custom factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter custom factory\"}},\"registerTypedConverterFactory(address)\":{\"details\":\"initializes the factory with a specific typed converter factory can only be called by the owner\",\"params\":{\"_factory\":\"typed converter factory\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterFactory.sol\":\"TestConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol\":{\"keccak256\":\"0x41714dbd78e5e77c16aa74186a29e9dada20138e511e9fe0acea24b7184c3782\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://55420446cbabc53516b8ec7a77febbe3f9fc50af97ab97df208477c833f60edb\",\"dweb:/ipfs/QmPMCrQBhDLovSdUHushF2pK6sgjcQCGHNYpTCAPkeBiZB\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterFactory.sol\":{\"keccak256\":\"0x760f2f4127c2de103b937e416480c2a7ebc02054afd204eeb7083c4f609ec38c\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://97de31aad810e9abc63ae4593447a4e57b12ee26b79c42bb22dedb846eb8e8f5\",\"dweb:/ipfs/QmfREFB9MmutBzpyZsejPWmjXeYeKN8YM512jijenQvxXf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b03191633179055611f31806100326000396000f3fe60806040523480156200001157600080fd5b5060043610620001005760003560e01c806379ba50971162000099578063c977aed2116200006f578063c977aed21462000375578063d4ee1d901462000399578063e54b93ef14620003a3578063f2fde38b14620003cc5762000100565b806379ba509714620003385780638cac5e2914620003425780638da5cb5b146200036b5762000100565b80632e9ab7b311620000db5780632e9ab7b314620001a0578063327779a714620002e65780633a8fc520146200030a5780636a4e5391146200032e5762000100565b806312b4c6c1146200010557806315f64b6a14620001305780631814f2d21462000196575b600080fd5b6200012e600480360360208110156200011d57600080fd5b50356001600160a01b0316620003f5565b005b6200017a600480360360808110156200014857600080fd5b50803561ffff169060208101356001600160a01b03908116916040810135909116906060013563ffffffff16620004a1565b604080516001600160a01b039092168252519081900360200190f35b6200017a620004d9565b6200017a60048036036080811015620001b857600080fd5b61ffff8235169190810190604081016020820135640100000000811115620001df57600080fd5b820183602082011115620001f257600080fd5b803590602001918460018302840111640100000000831117156200021557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200026957600080fd5b8201836020820111156200027c57600080fd5b803590602001918460018302840111640100000000831117156200029f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150620004e89050565b6200017a60048036036020811015620002fe57600080fd5b503561ffff1662000520565b6200017a600480360360208110156200032257600080fd5b503561ffff166200053b565b6200017a62000556565b6200012e62000565565b6200012e600480360360208110156200035a57600080fd5b50356001600160a01b03166200061d565b6200017a62000666565b6200017a600480360360208110156200038d57600080fd5b503561ffff1662000675565b6200017a62000690565b6200012e60048036036020811015620003bb57600080fd5b50356001600160a01b03166200069f565b6200012e60048036036020811015620003e457600080fd5b50356001600160a01b0316620006e8565b620003ff62000769565b8060026000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b505afa15801562000453573d6000803e3d6000fd5b505050506040513d60208110156200046a57600080fd5b505161ffff168152602081019190915260400160002080546001600160a01b0319166001600160a01b039290921691909117905550565b6000620004b185858585620007bf565b600580546001600160a01b0319166001600160a01b0392831617908190551695945050505050565b6005546001600160a01b031681565b6000620004f88585858562000964565b600680546001600160a01b0319166001600160a01b0392831617908190551695945050505050565b6002602052600090815260409020546001600160a01b031681565b6003602052600090815260409020546001600160a01b031681565b6006546001600160a01b031681565b6001546001600160a01b03163314620005b9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6200062762000769565b8060046000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b6000546001600160a01b031681565b6004602052600090815260409020546001600160a01b031681565b6001546001600160a01b031681565b620006a962000769565b8060036000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b620006f262000769565b6000546001600160a01b038281169116141562000747576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620007bd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b61ffff84166000908152600260209081526040808320548151630228272b60e31b81526001600160a01b038881166004830152878116602483015263ffffffff8716604483015292518594939092169263114139589260648084019382900301818787803b1580156200083157600080fd5b505af115801562000846573d6000803e3d6000fd5b505050506040513d60208110156200085d57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015620008a557600080fd5b505af1158015620008ba573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b1580156200090657600080fd5b505af11580156200091b573d6000803e3d6000fd5b50506040513392506001600160a01b038416915061ffff8916907fbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a390600090a495945050505050565b61ffff841660009081526003602052604081205481906001600160a01b03168062000a9f578585856040516200099a9062000cba565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620009e0578181015183820152602001620009c6565b50505050905090810190601f16801562000a0e5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000a4357818101518382015260200162000a29565b50505050905090810190601f16801562000a715780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000a96573d6000803e3d6000fd5b50915062000c4e565b806001600160a01b031663a9fd4a2a8787876040518463ffffffff1660e01b81526004018080602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b8381101562000b0c57818101518382015260200162000af2565b50505050905090810190601f16801562000b3a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000b6f57818101518382015260200162000b55565b50505050905090810190601f16801562000b9d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801562000bc057600080fd5b505af115801562000bd5573d6000803e3d6000fd5b505050506040513d602081101562000bec57600080fd5b5051604080516379ba509760e01b815290519193506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801562000c3457600080fd5b505af115801562000c49573d6000803e3d6000fd5b505050505b6040805163f2fde38b60e01b815233600482015290516001600160a01b0384169163f2fde38b91602480830192600092919082900301818387803b15801562000c9657600080fd5b505af115801562000cab573d6000803e3d6000fd5b50939998505050505050505050565b6112338062000cc98339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212200ce86660075dee8ec84f5766d4c209ed7fd72215446fb29212eda921261ca79064736f6c634300060c0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620001005760003560e01c806379ba50971162000099578063c977aed2116200006f578063c977aed21462000375578063d4ee1d901462000399578063e54b93ef14620003a3578063f2fde38b14620003cc5762000100565b806379ba509714620003385780638cac5e2914620003425780638da5cb5b146200036b5762000100565b80632e9ab7b311620000db5780632e9ab7b314620001a0578063327779a714620002e65780633a8fc520146200030a5780636a4e5391146200032e5762000100565b806312b4c6c1146200010557806315f64b6a14620001305780631814f2d21462000196575b600080fd5b6200012e600480360360208110156200011d57600080fd5b50356001600160a01b0316620003f5565b005b6200017a600480360360808110156200014857600080fd5b50803561ffff169060208101356001600160a01b03908116916040810135909116906060013563ffffffff16620004a1565b604080516001600160a01b039092168252519081900360200190f35b6200017a620004d9565b6200017a60048036036080811015620001b857600080fd5b61ffff8235169190810190604081016020820135640100000000811115620001df57600080fd5b820183602082011115620001f257600080fd5b803590602001918460018302840111640100000000831117156200021557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200026957600080fd5b8201836020820111156200027c57600080fd5b803590602001918460018302840111640100000000831117156200029f57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150620004e89050565b6200017a60048036036020811015620002fe57600080fd5b503561ffff1662000520565b6200017a600480360360208110156200032257600080fd5b503561ffff166200053b565b6200017a62000556565b6200012e62000565565b6200012e600480360360208110156200035a57600080fd5b50356001600160a01b03166200061d565b6200017a62000666565b6200017a600480360360208110156200038d57600080fd5b503561ffff1662000675565b6200017a62000690565b6200012e60048036036020811015620003bb57600080fd5b50356001600160a01b03166200069f565b6200012e60048036036020811015620003e457600080fd5b50356001600160a01b0316620006e8565b620003ff62000769565b8060026000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b505afa15801562000453573d6000803e3d6000fd5b505050506040513d60208110156200046a57600080fd5b505161ffff168152602081019190915260400160002080546001600160a01b0319166001600160a01b039290921691909117905550565b6000620004b185858585620007bf565b600580546001600160a01b0319166001600160a01b0392831617908190551695945050505050565b6005546001600160a01b031681565b6000620004f88585858562000964565b600680546001600160a01b0319166001600160a01b0392831617908190551695945050505050565b6002602052600090815260409020546001600160a01b031681565b6003602052600090815260409020546001600160a01b031681565b6006546001600160a01b031681565b6001546001600160a01b03163314620005b9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6200062762000769565b8060046000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b6000546001600160a01b031681565b6004602052600090815260409020546001600160a01b031681565b6001546001600160a01b031681565b620006a962000769565b8060036000836001600160a01b0316633e8ff43f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200043e57600080fd5b620006f262000769565b6000546001600160a01b038281169116141562000747576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620007bd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b61ffff84166000908152600260209081526040808320548151630228272b60e31b81526001600160a01b038881166004830152878116602483015263ffffffff8716604483015292518594939092169263114139589260648084019382900301818787803b1580156200083157600080fd5b505af115801562000846573d6000803e3d6000fd5b505050506040513d60208110156200085d57600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038316916379ba50979160048082019260009290919082900301818387803b158015620008a557600080fd5b505af1158015620008ba573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b1580156200090657600080fd5b505af11580156200091b573d6000803e3d6000fd5b50506040513392506001600160a01b038416915061ffff8916907fbb340bcea68d239ac719bc5cf8c9a1716df04ad3babb8d1e562aa44d19fea3a390600090a495945050505050565b61ffff841660009081526003602052604081205481906001600160a01b03168062000a9f578585856040516200099a9062000cba565b60ff82166040820152606080825284519082015283518190602080830191608084019188019080838360005b83811015620009e0578181015183820152602001620009c6565b50505050905090810190601f16801562000a0e5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000a4357818101518382015260200162000a29565b50505050905090810190601f16801562000a715780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000a96573d6000803e3d6000fd5b50915062000c4e565b806001600160a01b031663a9fd4a2a8787876040518463ffffffff1660e01b81526004018080602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b8381101562000b0c57818101518382015260200162000af2565b50505050905090810190601f16801562000b3a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101562000b6f57818101518382015260200162000b55565b50505050905090810190601f16801562000b9d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801562000bc057600080fd5b505af115801562000bd5573d6000803e3d6000fd5b505050506040513d602081101562000bec57600080fd5b5051604080516379ba509760e01b815290519193506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801562000c3457600080fd5b505af115801562000c49573d6000803e3d6000fd5b505050505b6040805163f2fde38b60e01b815233600482015290516001600160a01b0384169163f2fde38b91602480830192600092919082900301818387803b15801562000c9657600080fd5b505af115801562000cab573d6000803e3d6000fd5b50939998505050505050505050565b6112338062000cc98339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a26469706673582212200ce86660075dee8ec84f5766d4c209ed7fd72215446fb29212eda921261ca79064736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "193:714:39:-:0;;;;;;;;;;;;-1:-1:-1;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;193:714:39;;;;;;", + "deployedSourceMap": "193:714:39:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1350:163:9;;;;;;;;;;;;;;;;-1:-1:-1;1350:163:9;-1:-1:-1;;;;;1350:163:9;;:::i;:::-;;612:293:39;;;;;;;;;;;;;;;;-1:-1:-1;612:293:39;;;;;;;;;-1:-1:-1;;;;;612:293:39;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;612:293:39;;;;;;;;;;;;;;249:34;;;:::i;333:273::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;333:273:39;;;;;;;;-1:-1:-1;333:273:39;;-1:-1:-1;;333:273:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;333:273:39;;-1:-1:-1;;;333:273:39;;;;;-1:-1:-1;333:273:39;;-1:-1:-1;333:273:39:i;914:68:9:-;;;;;;;;;;;;;;;;-1:-1:-1;914:68:9;;;;:::i;989:71::-;;;;;;;;;;;;;;;;-1:-1:-1;989:71:9;;;;:::i;289:37:39:-;;;:::i;1422:217:58:-;;;:::i;2117:172:9:-;;;;;;;;;;;;;;;;-1:-1:-1;2117:172:9;-1:-1:-1;;;;;2117:172:9;;:::i;219:29:58:-;;;:::i;1067:80:9:-;;;;;;;;;;;;;;;;-1:-1:-1;1067:80:9;;;;:::i;255:23:58:-;;;:::i;1729:172:9:-;;;;;;;;;;;;;;;;-1:-1:-1;1729:172:9;-1:-1:-1;;;;;1729:172:9;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;1350:163:9:-;726:12:58;:10;:12::i;:::-;1497:8:9::1;1450:18;:44;1469:8;-1:-1:-1::0;;;;;1469:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1469:24:9;1450:44:::1;;::::0;;1469:24:::1;1450:44:::0;::::1;::::0;;;;;;-1:-1:-1;1450:44:9;:55;;-1:-1:-1;;;;;;1450:55:9::1;-1:-1:-1::0;;;;;1450:55:9;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;1350:163:9:o;612:293:39:-;757:10;798:67;820:5;827:7;836:9;847:17;798:21;:67::i;:::-;779:16;:86;;-1:-1:-1;;;;;;779:86:39;-1:-1:-1;;;;;779:86:39;;;;;;;;882:16;;612:293;-1:-1:-1;;;;;612:293:39:o;249:34::-;;;-1:-1:-1;;;;;249:34:39;;:::o;333:273::-;464:16;508:61;527:14;543:5;550:7;559:9;508:18;:61::i;:::-;492:13;:77;;-1:-1:-1;;;;;;492:77:39;-1:-1:-1;;;;;492:77:39;;;;;;;;586:13;;333:273;-1:-1:-1;;;;;333:273:39:o;914:68:9:-;;;;;;;;;;;;-1:-1:-1;;;;;914:68:9;;:::o;989:71::-;;;;;;;;;;;;-1:-1:-1;;;;;989:71:9;;:::o;289:37:39:-;;;-1:-1:-1;;;;;289:37:39;;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:58;;;-1:-1:-1;;;;;1591:8:58;;1583:16;;;;1610:21;;;1422:217::o;2117:172:9:-;726:12:58;:10;:12::i;:::-;2273:8:9::1;2229:15;:41;2245:8;-1:-1:-1::0;;;;;2245:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;219:29:58::0;;;-1:-1:-1;;;;;219:29:58;;:::o;1067:80:9:-;;;;;;;;;;;;-1:-1:-1;;;;;1067:80:9;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;1729:172:9:-;726:12:58;:10;:12::i;:::-;1885:8:9::1;1841:15;:41;1857:8;-1:-1:-1::0;;;;;1857:22:9::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;1164:167:58::0;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;;813:104::o;3936:503:9:-;4176:25;;;4125:10;4176:25;;;:18;:25;;;;;;;;;:80;;-1:-1:-1;;;4176:80:9;;-1:-1:-1;;;;;4176:80:9;;;;;;;;;;;;;;;;;;;;;;;4125:10;;4176:25;;;;;:41;;:80;;;;;;;;;;4125:10;4176:25;:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4176:80:9;4267:27;;;-1:-1:-1;;;4267:27:9;;;;4176:80;;-1:-1:-1;;;;;;4267:25:9;;;;;:27;;;;;;;;;;;;;;;;:25;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4305:39:9;;;-1:-1:-1;;;4305:39:9;;4333:10;4305:39;;;;;;-1:-1:-1;;;;;4305:27:9;;;-1:-1:-1;4305:27:9;;-1:-1:-1;4305:39:9;;;;;-1:-1:-1;;4305:39:9;;;;;;;-1:-1:-1;4305:27:9;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4362:42:9;;4393:10;;-1:-1:-1;;;;;;4362:42:9;;;-1:-1:-1;4362:42:9;;;;;;;;;4422:9;3936:503;-1:-1:-1;;;;;3936:503:9:o;2696:744::-;2978:31;;;2871:16;2978:31;;;:15;:31;;;;;;2871:16;;-1:-1:-1;;;;;2978:31:9;3026:30;3022:338;;3148:5;3155:7;3164:9;3133:41;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3133:41:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3124:50;;3022:338;;;3262:7;-1:-1:-1;;;;;3262:20:9;;3283:5;3290:7;3299:9;3262:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3262:47:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3262:47:9;3324:24;;;-1:-1:-1;;;3324:24:9;;;;3262:47;;-1:-1:-1;;;;;;3324:22:9;;;;;:24;;;;;;;;;;;;;;;;:22;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3022:338;3372:36;;;-1:-1:-1;;;3372:36:9;;3397:10;3372:36;;;;;;-1:-1:-1;;;;;3372:24:9;;;;;:36;;;;;-1:-1:-1;;3372:36:9;;;;;;;-1:-1:-1;3372:24:9;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3426:6:9;;2696:744;-1:-1:-1;;;;;;;;;2696:744:9:o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/ConverterFactory.sol\";\n\n/*\n Utils test helper that exposes the converter factory functions\n*/\ncontract TestConverterFactory is ConverterFactory {\n IConverter public createdConverter;\n IConverterAnchor public createdAnchor;\n\n function createAnchor(uint16 _converterType, string memory _name, string memory _symbol, uint8 _decimals) public override returns (IConverterAnchor) {\n createdAnchor = super.createAnchor(_converterType, _name, _symbol, _decimals);\n return createdAnchor;\n }\n\n function createConverter(uint16 _type, IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) public override returns (IConverter) {\n createdConverter = super.createConverter(_type, _anchor, _registry, _maxConversionFee);\n return createdConverter;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterFactory.sol", + "exportedSymbols": { + "TestConverterFactory": [ + 19315 + ] + }, + "id": 19316, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19253, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:39" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol", + "file": "../converter/ConverterFactory.sol", + "id": 19254, + "nodeType": "ImportDirective", + "scope": 19316, + "sourceUnit": 10245, + "src": "75:43:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19255, + "name": "ConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10244, + "src": "226:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterFactory_$10244", + "typeString": "contract ConverterFactory" + } + }, + "id": 19256, + "nodeType": "InheritanceSpecifier", + "src": "226:16:39" + } + ], + "contractDependencies": [ + 10244, + 13389, + 22153, + 23182 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19315, + "linearizedBaseContracts": [ + 19315, + 10244, + 22153, + 23182, + 13389 + ], + "name": "TestConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1814f2d2", + "id": 19258, + "mutability": "mutable", + "name": "createdConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19315, + "src": "249:34:39", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19257, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "249:10:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "6a4e5391", + "id": 19260, + "mutability": "mutable", + "name": "createdAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19315, + "src": "289:37:39", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19259, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "289:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 10195 + ], + "body": { + "id": 19286, + "nodeType": "Block", + "src": "482:124:39", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19274, + "name": "createdAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19260, + "src": "492:13:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19277, + "name": "_converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19262, + "src": "527:14:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19278, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19264, + "src": "543:5:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19279, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19266, + "src": "550:7:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19280, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19268, + "src": "559:9:39", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 19275, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "508:5:39", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterFactory_$19315", + "typeString": "contract super TestConverterFactory" + } + }, + "id": 19276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 10195, + "src": "508:18:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,string memory,string memory,uint8) returns (contract IConverterAnchor)" + } + }, + "id": 19281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "508:61:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "492:77:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 19283, + "nodeType": "ExpressionStatement", + "src": "492:77:39" + }, + { + "expression": { + "argumentTypes": null, + "id": 19284, + "name": "createdAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19260, + "src": "586:13:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 19273, + "id": 19285, + "nodeType": "Return", + "src": "579:20:39" + } + ] + }, + "documentation": null, + "functionSelector": "2e9ab7b3", + "id": 19287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19270, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "446:8:39" + }, + "parameters": { + "id": 19269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19262, + "mutability": "mutable", + "name": "_converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "355:21:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19261, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "355:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19264, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "378:19:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19263, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "378:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19266, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "399:21:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19265, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "399:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19268, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "422:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19267, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "422:5:39", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:84:39" + }, + "returnParameters": { + "id": 19273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19272, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "464:16:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19271, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "464:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:18:39" + }, + "scope": 19315, + "src": "333:273:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 10243 + ], + "body": { + "id": 19313, + "nodeType": "Block", + "src": "769:136:39", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19301, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19258, + "src": "779:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19304, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19289, + "src": "820:5:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19305, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19291, + "src": "827:7:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 19306, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19293, + "src": "836:9:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19307, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19295, + "src": "847:17:39", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 19302, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "798:5:39", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterFactory_$19315", + "typeString": "contract super TestConverterFactory" + } + }, + "id": 19303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 10243, + "src": "798:21:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$23166_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) returns (contract IConverter)" + } + }, + "id": 19308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:67:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "779:86:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 19310, + "nodeType": "ExpressionStatement", + "src": "779:86:39" + }, + { + "expression": { + "argumentTypes": null, + "id": 19311, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19258, + "src": "882:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 19300, + "id": 19312, + "nodeType": "Return", + "src": "875:23:39" + } + ] + }, + "documentation": null, + "functionSelector": "15f64b6a", + "id": 19314, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19297, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "739:8:39" + }, + "parameters": { + "id": 19296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19289, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "637:12:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19288, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "637:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19291, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "651:24:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19290, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "651:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19293, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "677:27:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19292, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23166, + "src": "677:17:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19295, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "706:24:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19294, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "706:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "636:95:39" + }, + "returnParameters": { + "id": 19300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19299, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "757:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19298, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "757:10:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "756:12:39" + }, + "scope": 19315, + "src": "612:293:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19316, + "src": "193:714:39" + } + ], + "src": "51:857:39" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterFactory.sol", + "exportedSymbols": { + "TestConverterFactory": [ + 19315 + ] + }, + "id": 19316, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19253, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:39" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterFactory.sol", + "file": "../converter/ConverterFactory.sol", + "id": 19254, + "nodeType": "ImportDirective", + "scope": 19316, + "sourceUnit": 10245, + "src": "75:43:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19255, + "name": "ConverterFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 10244, + "src": "226:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterFactory_$10244", + "typeString": "contract ConverterFactory" + } + }, + "id": 19256, + "nodeType": "InheritanceSpecifier", + "src": "226:16:39" + } + ], + "contractDependencies": [ + 10244, + 13389, + 22153, + 23182 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19315, + "linearizedBaseContracts": [ + 19315, + 10244, + 22153, + 23182, + 13389 + ], + "name": "TestConverterFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1814f2d2", + "id": 19258, + "mutability": "mutable", + "name": "createdConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19315, + "src": "249:34:39", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19257, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "249:10:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "6a4e5391", + "id": 19260, + "mutability": "mutable", + "name": "createdAnchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19315, + "src": "289:37:39", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19259, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "289:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "public" + }, + { + "baseFunctions": [ + 10195 + ], + "body": { + "id": 19286, + "nodeType": "Block", + "src": "482:124:39", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19274, + "name": "createdAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19260, + "src": "492:13:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19277, + "name": "_converterType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19262, + "src": "527:14:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19278, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19264, + "src": "543:5:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19279, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19266, + "src": "550:7:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19280, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19268, + "src": "559:9:39", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "argumentTypes": null, + "id": 19275, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "508:5:39", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterFactory_$19315", + "typeString": "contract super TestConverterFactory" + } + }, + "id": 19276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createAnchor", + "nodeType": "MemberAccess", + "referencedDeclaration": 10195, + "src": "508:18:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_IConverterAnchor_$13349_$", + "typeString": "function (uint16,string memory,string memory,uint8) returns (contract IConverterAnchor)" + } + }, + "id": 19281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "508:61:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "src": "492:77:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 19283, + "nodeType": "ExpressionStatement", + "src": "492:77:39" + }, + { + "expression": { + "argumentTypes": null, + "id": 19284, + "name": "createdAnchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19260, + "src": "586:13:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 19273, + "id": 19285, + "nodeType": "Return", + "src": "579:20:39" + } + ] + }, + "documentation": null, + "functionSelector": "2e9ab7b3", + "id": 19287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19270, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "446:8:39" + }, + "parameters": { + "id": 19269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19262, + "mutability": "mutable", + "name": "_converterType", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "355:21:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19261, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "355:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19264, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "378:19:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19263, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "378:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19266, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "399:21:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19265, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "399:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19268, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "422:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19267, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "422:5:39", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:84:39" + }, + "returnParameters": { + "id": 19273, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19272, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19287, + "src": "464:16:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19271, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "464:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:18:39" + }, + "scope": 19315, + "src": "333:273:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 10243 + ], + "body": { + "id": 19313, + "nodeType": "Block", + "src": "769:136:39", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19301, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19258, + "src": "779:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19304, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19289, + "src": "820:5:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19305, + "name": "_anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19291, + "src": "827:7:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + { + "argumentTypes": null, + "id": 19306, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19293, + "src": "836:9:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19307, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19295, + "src": "847:17:39", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + ], + "expression": { + "argumentTypes": null, + "id": 19302, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "798:5:39", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterFactory_$19315", + "typeString": "contract super TestConverterFactory" + } + }, + "id": 19303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 10243, + "src": "798:21:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_contract$_IConverterAnchor_$13349_$_t_contract$_IContractRegistry_$23166_$_t_uint32_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,contract IConverterAnchor,contract IContractRegistry,uint32) returns (contract IConverter)" + } + }, + "id": 19308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:67:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "779:86:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 19310, + "nodeType": "ExpressionStatement", + "src": "779:86:39" + }, + { + "expression": { + "argumentTypes": null, + "id": 19311, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19258, + "src": "882:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 19300, + "id": 19312, + "nodeType": "Return", + "src": "875:23:39" + } + ] + }, + "documentation": null, + "functionSelector": "15f64b6a", + "id": 19314, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19297, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "739:8:39" + }, + "parameters": { + "id": 19296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19289, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "637:12:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19288, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "637:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19291, + "mutability": "mutable", + "name": "_anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "651:24:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 19290, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "651:16:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19293, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "677:27:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19292, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23166, + "src": "677:17:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23166", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19295, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "706:24:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19294, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "706:6:39", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "636:95:39" + }, + "returnParameters": { + "id": 19300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19299, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19314, + "src": "757:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19298, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "757:10:39", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "756:12:39" + }, + "scope": 19315, + "src": "612:293:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19316, + "src": "193:714:39" + } + ], + "src": "51:857:39" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-09T23:40:29.190Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "createAnchor(uint16,string,string,uint8)": { + "details": "creates a new converter anchor with the given arguments and transfers the ownership to the caller", + "params": { + "_converterType": "converter type, see ConverterBase contract main doc", + "_decimals": "decimals", + "_name": "name", + "_symbol": "symbol" + }, + "returns": { + "_0": "new converter anchor" + } + }, + "createConverter(uint16,address,address,uint32)": { + "details": "creates a new converter with the given arguments and transfers the ownership to the caller", + "params": { + "_anchor": "anchor governed by the converter", + "_maxConversionFee": "maximum conversion fee, represented in ppm", + "_registry": "address of a contract registry contract", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "new converter" + } + }, + "registerTypedConverterAnchorFactory(address)": { + "details": "initializes the factory with a specific typed converter anchor factory can only be called by the owner", + "params": { + "_factory": "typed converter anchor factory" + } + }, + "registerTypedConverterCustomFactory(address)": { + "details": "initializes the factory with a specific typed converter custom factory can only be called by the owner", + "params": { + "_factory": "typed converter custom factory" + } + }, + "registerTypedConverterFactory(address)": { + "details": "initializes the factory with a specific typed converter factory can only be called by the owner", + "params": { + "_factory": "typed converter factory" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestConverterRegistry.json b/apps/cic-eth/tests/testdata/bancor/TestConverterRegistry.json new file mode 100644 index 00000000..3b1f7122 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestConverterRegistry.json @@ -0,0 +1,2635 @@ +{ + "contractName": "TestConverterRegistry", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + } + ], + "name": "ConverterAnchorRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "ConvertibleTokenRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "LiquidityPoolRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_smartToken", + "type": "address" + } + ], + "name": "SmartTokenRemoved", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "addConverter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "createdConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_anchors", + "type": "address[]" + } + ], + "name": "getConvertersByAnchors", + "outputs": [ + { + "internalType": "contract IConverter[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_smartTokens", + "type": "address[]" + } + ], + "name": "getConvertersBySmartTokens", + "outputs": [ + { + "internalType": "contract IConverter[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenAnchors", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + } + ], + "name": "getConvertibleTokenSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getConvertibleTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "getLiquidityPoolByConfig", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "getLiquidityPoolByReserveConfig", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidityPools", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getSmartToken", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSmartTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSmartTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "isConverterValid", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenAnchor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_convertibleToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isConvertibleTokenSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isLiquidityPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "isSimilarLiquidityPoolRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_value", + "type": "address" + } + ], + "name": "isSmartToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IConverter", + "name": "_converter", + "type": "address" + } + ], + "name": "removeConverter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint32[]", + "name": "_reserveWeights", + "type": "uint32[]" + } + ], + "name": "newConverter", + "outputs": [ + { + "internalType": "contract IConverter", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"ConverterAnchorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"}],\"name\":\"ConverterAnchorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"ConvertibleTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"ConvertibleTokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPool\",\"type\":\"address\"}],\"name\":\"LiquidityPoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_liquidityPool\",\"type\":\"address\"}],\"name\":\"LiquidityPoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"SmartTokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_smartToken\",\"type\":\"address\"}],\"name\":\"SmartTokenRemoved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"addConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_anchors\",\"type\":\"address[]\"}],\"name\":\"getConvertersByAnchors\",\"outputs\":[{\"internalType\":\"contract IConverter[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_smartTokens\",\"type\":\"address[]\"}],\"name\":\"getConvertersBySmartTokens\",\"outputs\":[{\"internalType\":\"contract IConverter[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenAnchors\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"}],\"name\":\"getConvertibleTokenSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConvertibleTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getLiquidityPool\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"getLiquidityPoolByConfig\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"getLiquidityPoolByReserveConfig\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPoolCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidityPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getSmartToken\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSmartTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"isConverterValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenAnchor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_convertibleToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isConvertibleTokenSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isLiquidityPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"isSimilarLiquidityPoolRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"isSmartToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"_reserveWeights\",\"type\":\"uint32[]\"}],\"name\":\"newConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"_converter\",\"type\":\"address\"}],\"name\":\"removeConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addConverter(address)\":{\"details\":\"adds an existing converter to the registry can only be called by the owner\",\"params\":{\"_converter\":\"converter\"}},\"getAnchor(uint256)\":{\"details\":\"returns the converter anchor at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"anchor at the given index\"}},\"getAnchorCount()\":{\"details\":\"returns the number of converter anchors in the registry\",\"returns\":{\"_0\":\"number of anchors\"}},\"getAnchors()\":{\"details\":\"returns the list of converter anchors in the registry\",\"returns\":{\"_0\":\"list of anchors\"}},\"getConvertersByAnchors(address[])\":{\"details\":\"returns a list of converters for a given list of anchors this is a utility function that can be used to reduce the number of calls to the contract\",\"params\":{\"_anchors\":\"list of converter anchors\"},\"returns\":{\"_0\":\"list of converters\"}},\"getConvertersBySmartTokens(address[])\":{\"details\":\"deprecated, backward compatibility, use `getConvertersByAnchors`\"},\"getConvertibleToken(uint256)\":{\"details\":\"returns the convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"convertible token at the given index\"}},\"getConvertibleTokenAnchor(address,uint256)\":{\"details\":\"returns the converter anchor associated with a given convertible token at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"anchor associated with the given convertible token at the given index\"}},\"getConvertibleTokenAnchorCount(address)\":{\"details\":\"returns the number of converter anchors associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"number of anchors associated with the given convertible token\"}},\"getConvertibleTokenAnchors(address)\":{\"details\":\"returns the list of aoncerter anchors associated with a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\"},\"returns\":{\"_0\":\"list of anchors associated with the given convertible token\"}},\"getConvertibleTokenCount()\":{\"details\":\"returns the number of convertible tokens in the registry\",\"returns\":{\"_0\":\"number of convertible tokens\"}},\"getConvertibleTokenSmartToken(address,uint256)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchor`\"},\"getConvertibleTokenSmartTokenCount(address)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`\"},\"getConvertibleTokenSmartTokens(address)\":{\"details\":\"deprecated, backward compatibility, use `getConvertibleTokenAnchors`\"},\"getConvertibleTokens()\":{\"details\":\"returns the list of convertible tokens in the registry\",\"returns\":{\"_0\":\"list of convertible tokens\"}},\"getLiquidityPool(uint256)\":{\"details\":\"returns the liquidity pool at a given index\",\"params\":{\"_index\":\"index\"},\"returns\":{\"_0\":\"liquidity pool at the given index\"}},\"getLiquidityPoolByConfig(uint16,address[],uint32[])\":{\"details\":\"searches for a liquidity pool with specific configuration\",\"params\":{\"_reserveTokens\":\"reserve tokens\",\"_reserveWeights\":\"reserve weights\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"the liquidity pool, or zero if no such liquidity pool exists\"}},\"getLiquidityPoolByReserveConfig(address[],uint32[])\":{\"details\":\"deprecated, backward compatibility, use `getLiquidityPoolByConfig`\"},\"getLiquidityPoolCount()\":{\"details\":\"returns the number of liquidity pools in the registry\",\"returns\":{\"_0\":\"number of liquidity pools\"}},\"getLiquidityPools()\":{\"details\":\"returns the list of liquidity pools in the registry\",\"returns\":{\"_0\":\"list of liquidity pools\"}},\"getSmartToken(uint256)\":{\"details\":\"deprecated, backward compatibility, use `getAnchor`\"},\"getSmartTokenCount()\":{\"details\":\"deprecated, backward compatibility, use `getAnchorCount`\"},\"getSmartTokens()\":{\"details\":\"deprecated, backward compatibility, use `getAnchors`\"},\"isAnchor(address)\":{\"details\":\"checks whether or not a given value is a converter anchor\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is an anchor, false if not\"}},\"isConverterValid(address)\":{\"details\":\"checks whether or not a given converter is valid\",\"params\":{\"_converter\":\"converter\"},\"returns\":{\"_0\":\"true if the given converter is valid, false if not\"}},\"isConvertibleToken(address)\":{\"details\":\"checks whether or not a given value is a convertible token\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a convertible token, false if not\"}},\"isConvertibleTokenAnchor(address,address)\":{\"details\":\"checks whether or not a given value is a converter anchor of a given convertible token\",\"params\":{\"_convertibleToken\":\"convertible token\",\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is an anchor of the given convertible token, false if not\"}},\"isConvertibleTokenSmartToken(address,address)\":{\"details\":\"deprecated, backward compatibility, use `isConvertibleTokenAnchor`\"},\"isLiquidityPool(address)\":{\"details\":\"checks whether or not a given value is a liquidity pool\",\"params\":{\"_value\":\"value\"},\"returns\":{\"_0\":\"true if the given value is a liquidity pool, false if not\"}},\"isSimilarLiquidityPoolRegistered(address)\":{\"details\":\"checks if a liquidity pool with given configuration is already registered\",\"params\":{\"_converter\":\"converter with specific configuration\"},\"returns\":{\"_0\":\"if a liquidity pool with the same configuration is already registered\"}},\"isSmartToken(address)\":{\"details\":\"deprecated, backward compatibility, use `isAnchor`\"},\"newConverter(uint16,string,string,uint8,uint32,address[],uint32[])\":{\"details\":\"creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry\",\"params\":{\"_decimals\":\"token / pool decimals\",\"_maxConversionFee\":\"maximum conversion-fee\",\"_name\":\"token / pool name\",\"_reserveTokens\":\"reserve tokens\",\"_reserveWeights\":\"reserve weights\",\"_symbol\":\"token / pool symbol\",\"_type\":\"converter type, see ConverterBase contract main doc\"},\"returns\":{\"_0\":\"new converter\"}},\"removeConverter(address)\":{\"details\":\"removes a converter from the registry anyone can remove an existing converter from the registry, as long as the converter is invalid note that the owner can also remove valid converters\",\"params\":{\"_converter\":\"converter\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterRegistry.sol\":\"TestConverterRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol\":{\"keccak256\":\"0xee1e037bda67806cfe010a96d32b4cd56b7b1f9dbc2b13710e43aa376661096a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://31a779ae265721924fb94991483fe0f42ec74c3794e1cb5eef2163f0f288f527\",\"dweb:/ipfs/QmNUNuNqBZYEyj8ABB1Xrx3HDFukdM4awv3oszUXnDURUf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistry.sol\":{\"keccak256\":\"0x827d22d6c52b3e5128595090a3694847e9c54a760abf0e47a8870a7235537723\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://edae6c2f9f6fde390032189dda1b7f720521a31df5eb98e001d04bbf44dcfa02\",\"dweb:/ipfs/QmRz2EG3tcKeKXwHizciEr19ZEH2SidtQ9rkprKc6iR5Tz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterRegistryData.sol\":{\"keccak256\":\"0xc2b8e75bf4d69b34f9687d90d8eb31e8462bfcf25565f5ca399151648624c73a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e3825b1ccce31117c984a7605376ec2e6f18b15cdd61e9d5624667332a935dd7\",\"dweb:/ipfs/QmeRHtWU1oZJtL8UxJQMbwmTyMhf8Z3DJz6XubFxbP5xQx\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterRegistry.sol\":{\"keccak256\":\"0x6484d0fb77b287b5453c3722f8fdea20ba9a180d1da54c886dd148779d5d82ea\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://09b2152d1cc50e635c5eb7bad4c0e6a3c8d5f26f8ee2e42ee34ddefe7ce6a55d\",\"dweb:/ipfs/QmdzZ1Ax3eZkam9ogjA5rY1c7UHZh9A9vUiKzJZXrqm8UZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200337238038062003372833981810160405260208110156200003757600080fd5b5051600080546001600160a01b0319163317905580808062000059816200008d565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905550620000ec9050565b6001600160a01b038116620000e9576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b61327680620000fc6000396000f3fe608060405234801561001057600080fd5b50600436106102745760003560e01c80637b10399911610151578063b4c4197a116100c3578063d8cced2a11610087578063d8cced2a14610c02578063e571049b14610c28578063e85455d714610c30578063effb3c6e14610c56578063f2fde38b14610c5e578063f4fb86c014610c8457610274565b8063b4c4197a14610a75578063c22b82f014610aa3578063d3182bed14610bc6578063d4ee1d9014610bce578063d6c4b5b214610bd657610274565b8063954254f511610115578063954254f5146109c15780639e76a007146109e7578063a109d21414610a0d578063a43d5e9414610a2a578063a74498aa14610a50578063b4a176d314610a6d57610274565b80637b103999146109665780637f45c4c31461096e578063865cf194146109765780638da5cb5b146109935780638f1d0e1a1461099b57610274565b80634c7df18f116101ea57806361cd756e116101ae57806361cd756e146108f257806369be4784146108fa5780636ce1c4dc14610902578063725b87861461092857806379ba5097146109565780637a5f0ffd1461095e57610274565b80634c7df18f146105b35780635a0a6618146105d05780635f1b50fe1461081d578063603f51e414610825578063610c0b051461085157610274565b80631f8e26201161023c5780631f8e26201461046a5780632fe8a6ad1461050b5780633ab8857c146105275780634123ef601461054d57806349c5f32b1461057357806349d10b64146105ab57610274565b8063024c7ec71461027957806304ceaf411461029a57806311839064146102f25780631814f2d2146103185780631d3fccd51461033c575b600080fd5b6102986004803603602081101561028f57600080fd5b50351515610caa565b005b6102a2610cd0565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102de5781810151838201526020016102c6565b505050509050019250505060405180910390f35b6102a26004803603602081101561030857600080fd5b50356001600160a01b0316610cdf565b610320610e12565b604080516001600160a01b039092168252519081900360200190f35b6103206004803603606081101561035257600080fd5b61ffff8235169190810190604081016020820135600160201b81111561037757600080fd5b82018360208201111561038957600080fd5b803590602001918460208302840111600160201b831117156103aa57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103f957600080fd5b82018360208201111561040b57600080fd5b803590602001918460208302840111600160201b8311171561042c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610e21945050505050565b6102a26004803603602081101561048057600080fd5b810190602081018135600160201b81111561049a57600080fd5b8201836020820111156104ac57600080fd5b803590602001918460208302840111600160201b831117156104cd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610f08945050505050565b610513610f19565b604080519115158252519081900360200190f35b6105136004803603602081101561053d57600080fd5b50356001600160a01b0316610f29565b6105136004803603602081101561056357600080fd5b50356001600160a01b0316610fc0565b6105996004803603602081101561058957600080fd5b50356001600160a01b0316610fcb565b60408051918252519081900360200190f35b610298611030565b610320600480360360208110156105c957600080fd5b5035611238565b610320600480360360e08110156105e657600080fd5b61ffff8235169190810190604081016020820135600160201b81111561060b57600080fd5b82018360208201111561061d57600080fd5b803590602001918460018302840111600160201b8311171561063e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561069057600080fd5b8201836020820111156106a257600080fd5b803590602001918460018302840111600160201b831117156106c357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff8535169563ffffffff60208701351695919450925060608101915060400135600160201b81111561072a57600080fd5b82018360208201111561073c57600080fd5b803590602001918460208302840111600160201b8311171561075d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107ac57600080fd5b8201836020820111156107be57600080fd5b803590602001918460208302840111600160201b831117156107df57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611294945050505050565b6102a26112d0565b6103206004803603604081101561083b57600080fd5b506001600160a01b0381351690602001356113ed565b6102a26004803603602081101561086757600080fd5b810190602081018135600160201b81111561088157600080fd5b82018360208201111561089357600080fd5b803590602001918460208302840111600160201b831117156108b457600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061148d945050505050565b61032061158e565b61059961159d565b6102986004803603602081101561091857600080fd5b50356001600160a01b031661161f565b6105136004803603604081101561093e57600080fd5b506001600160a01b0381358116916020013516611685565b610298611691565b610599611748565b610320611799565b6102a26117a8565b6103206004803603602081101561098c57600080fd5b50356117f9565b610320611855565b610513600480360360208110156109b157600080fd5b50356001600160a01b0316611864565b610513600480360360208110156109d757600080fd5b50356001600160a01b0316611a6d565b610298600480360360208110156109fd57600080fd5b50356001600160a01b0316611b5c565b61032060048036036020811015610a2357600080fd5b5035611bc9565b61059960048036036020811015610a4057600080fd5b50356001600160a01b0316611bd4565b61032060048036036020811015610a6657600080fd5b5035611bdf565b610298611c3b565b61051360048036036040811015610a8b57600080fd5b506001600160a01b0381358116916020013516611c67565b61032060048036036040811015610ab957600080fd5b810190602081018135600160201b811115610ad357600080fd5b820183602082011115610ae557600080fd5b803590602001918460208302840111600160201b83111715610b0657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b5557600080fd5b820183602082011115610b6757600080fd5b803590602001918460208302840111600160201b83111715610b8857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611cdd945050505050565b610599611cff565b610320611d50565b61032060048036036040811015610bec57600080fd5b506001600160a01b038135169060200135611d5f565b61051360048036036020811015610c1857600080fd5b50356001600160a01b0316611d6b565b610599611dd0565b61051360048036036020811015610c4657600080fd5b50356001600160a01b0316611dda565b6102a2611e3f565b61029860048036036020811015610c7457600080fd5b50356001600160a01b0316611e90565b6102a260048036036020811015610c9a57600080fd5b50356001600160a01b0316611f0e565b610cb2611f19565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060610cda611e3f565b905090565b6060610cf8600080516020613221833981519152611f6e565b6001600160a01b031663f4fb86c0836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d4457600080fd5b505afa158015610d58573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d8157600080fd5b8101908080516040519392919084600160201b821115610da057600080fd5b908301906020820185811115610db557600080fd5b82518660208202830111600160201b82111715610dd157600080fd5b82525081516020918201928201910280838360005b83811015610dfe578181015183820152602001610de6565b505050509050016040525050509050919050565b6004546001600160a01b031681565b600081518351148015610e35575060018351115b15610efd576060610e4584611fba565b905060005b8151811015610efa576000828281518110610e6157fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea657600080fd5b505afa158015610eba573d6000803e3d6000fd5b505050506040513d6020811015610ed057600080fd5b50519050610ee081898989612250565b15610ef057509250610f01915050565b5050600101610e4a565b50505b5060005b9392505050565b6060610f138261148d565b92915050565b600354600160a01b900460ff1681565b6000610f42600080516020613221833981519152611f6e565b6001600160a01b0316633ab8857c836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b505afa158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b505192915050565b6000610f1382611d6b565b6000610fe4600080516020613221833981519152611f6e565b6001600160a01b031663a43d5e94836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6000546001600160a01b03163314806110535750600354600160a01b900460ff16155b611098576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006110b66f436f6e7472616374526567697374727960801b611f6e565b6002549091506001600160a01b038083169116148015906110df57506001600160a01b03811615155b611127576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561118957600080fd5b505afa15801561119d573d6000803e3d6000fd5b505050506040513d60208110156111b357600080fd5b50516001600160a01b03161415611208576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6000611251600080516020613221833981519152611f6e565b6001600160a01b031663a109d214836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b60006112a588888888888888612362565b600480546001600160a01b0319166001600160a01b0392831617908190551698975050505050505050565b60606112e9600080516020613221833981519152611f6e565b6001600160a01b0316635f1b50fe6040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b505afa158015611335573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561135e57600080fd5b8101908080516040519392919084600160201b82111561137d57600080fd5b90830190602082018581111561139257600080fd5b82518660208202830111600160201b821117156113ae57600080fd5b82525081516020918201928201910280838360005b838110156113db5781810151838201526020016113c3565b50505050905001604052505050905090565b6000611406600080516020613221833981519152611f6e565b6001600160a01b031663d6c4b5b284846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561145a57600080fd5b505afa15801561146e573d6000803e3d6000fd5b505050506040513d602081101561148457600080fd5b50519392505050565b606080825167ffffffffffffffff811180156114a857600080fd5b506040519080825280602002602001820160405280156114d2578160200160208202803683370190505b50905060005b8351811015611587578381815181106114ed57fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561152d57600080fd5b505afa158015611541573d6000803e3d6000fd5b505050506040513d602081101561155757600080fd5b5051825183908390811061156757fe5b6001600160a01b03909216602092830291909101909101526001016114d8565b5092915050565b6003546001600160a01b031681565b60006115b6600080516020613221833981519152611f6e565b6001600160a01b03166369be47846040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b505afa158015611602573d6000803e3d6000fd5b505050506040513d602081101561161857600080fd5b5051905090565b611627611f19565b61163081611a6d565b611679576040805162461bcd60e51b815260206004820152601560248201527422a9292fa4a72b20a624a22fa1a7a72b22a92a22a960591b604482015290519081900360640190fd5b611682816128b7565b50565b6000610f018383611c67565b6001546001600160a01b031633146116e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000611761600080516020613221833981519152611f6e565b6001600160a01b0316637a5f0ffd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b6002546001600160a01b031681565b60606117c1600080516020613221833981519152611f6e565b6001600160a01b0316637f45c4c36040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b6000611812600080516020613221833981519152611f6e565b6001600160a01b031663865cf194836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b6000546001600160a01b031681565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d60208110156118ca57600080fd5b505161ffff16905060608167ffffffffffffffff811180156118eb57600080fd5b50604051908082528060200260200182016040528015611915578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561193157600080fd5b5060405190808252806020026020018201604052801561195b578160200160208202803683370190505b50905060005b83811015611a42576000866001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119af57600080fd5b505afa1580156119c3573d6000803e3d6000fd5b505050506040513d60208110156119d957600080fd5b5051845190915081908590849081106119ee57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611a188782612a72565b838381518110611a2457fe5b63ffffffff9092166020928302919091019091015250600101611961565b506000611a59611a528786612af9565b8484610e21565b6001600160a01b0316141595945050505050565b6000816001600160a01b0316826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ab257600080fd5b505afa158015611ac6573d6000803e3d6000fd5b505050506040513d6020811015611adc57600080fd5b505160408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b158015611b2057600080fd5b505afa158015611b34573d6000803e3d6000fd5b505050506040513d6020811015611b4a57600080fd5b50516001600160a01b03161492915050565b6000546001600160a01b0316331480611b7b5750611b7981611a6d565b155b611bc0576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b61168281612c1e565b6000610f1382611238565b6000610f1382610fcb565b6000611bf8600080516020613221833981519152611f6e565b6001600160a01b031663a74498aa836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b611c43611f19565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611c80600080516020613221833981519152611f6e565b6001600160a01b031663725b878684846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561145a57600080fd5b6000610f016001845111611cf2576000611cf5565b60015b60ff168484610e21565b6000611d18600080516020613221833981519152611f6e565b6001600160a01b031663e571049b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b6001546001600160a01b031681565b6000610f0183836113ed565b6000611d84600080516020613221833981519152611f6e565b6001600160a01b0316634123ef60836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6000610cda611cff565b6000611df3600080516020613221833981519152611f6e565b6001600160a01b031663e85455d7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6060611e58600080516020613221833981519152611f6e565b6001600160a01b03166304ceaf416040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b611e98611f19565b6000546001600160a01b0382811691161415611eec576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6060610f1382610cdf565b6000546001600160a01b03163314611f6c576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610f8e57600080fd5b60606000611fd5600080516020613221833981519152611f6e565b90506000816001600160a01b031663a43d5e9485600081518110611ff557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561203a57600080fd5b505afa15801561204e573d6000803e3d6000fd5b505050506040513d602081101561206457600080fd5b50519050600060015b855181101561211e576000846001600160a01b031663a43d5e9488848151811061209357fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156120d857600080fd5b505afa1580156120ec573d6000803e3d6000fd5b505050506040513d602081101561210257600080fd5b5051905080841115612115578093508192505b5060010161206d565b50826001600160a01b031663f4fb86c086838151811061213a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561217f57600080fd5b505afa158015612193573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156121bc57600080fd5b8101908080516040519392919084600160201b8211156121db57600080fd5b9083019060208201858111156121f057600080fd5b82518660208202830111600160201b8211171561220c57600080fd5b82525081516020918201928201910280838360005b83811015612239578181015183820152602001612221565b505050509050016040525050509350505050919050565b600080856001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561228c57600080fd5b505afa1580156122a0573d6000803e3d6000fd5b505050506040513d60208110156122b657600080fd5b505161ffff1690506122c88682612af9565b61ffff168561ffff16146122e057600091505061235a565b808451146122f257600091505061235a565b60005b84518110156123535761231b8786838151811061230e57fe5b6020026020010151612a72565b63ffffffff1684828151811061232d57fe5b602002602001015163ffffffff161461234b5760009250505061235a565b6001016122f5565b5060019150505b949350505050565b815181516000919081146123b4576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524553455256455360601b604482015290519081900360640190fd5b60006123c18a8686610e21565b6001600160a01b031614612411576040805162461bcd60e51b81526020600482015260126024820152714552525f414c52454144595f45584953545360701b604482015290519081900360640190fd5b600061242f6f436f6e766572746572466163746f727960801b611f6e565b90506000816001600160a01b0316632e9ab7b38c8c8c8c6040518563ffffffff1660e01b8152600401808561ffff16815260200180602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156124a9578181015183820152602001612491565b50505050905090810190601f1680156124d65780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156125095781810151838201526020016124f1565b50505050905090810190601f1680156125365780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561255957600080fd5b505af115801561256d573d6000803e3d6000fd5b505050506040513d602081101561258357600080fd5b505160025460408051630afb25b560e11b815261ffff8f1660048201526001600160a01b038085166024830152928316604482015263ffffffff8b1660648201529051929350600092918516916315f64b6a9160848082019260209290919082900301818787803b1580156125f757600080fd5b505af115801561260b573d6000803e3d6000fd5b505050506040513d602081101561262157600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801561266857600080fd5b505af115801561267c573d6000803e3d6000fd5b50505050806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b5050505060005b8481101561278557816001600160a01b0316636a49d2c48983815181106126f957fe5b602002602001015189848151811061270d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561276157600080fd5b505af1158015612775573d6000803e3d6000fd5b5050600190920191506126d69050565b50816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156127d557600080fd5b505af11580156127e9573d6000803e3d6000fd5b50505050806001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561282857600080fd5b505af115801561283c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561288757600080fd5b505af115801561289b573d6000803e3d6000fd5b505050506128a8816128b7565b9b9a5050505050505050505050565b60006128d0600080516020613221833981519152611f6e565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561290d57600080fd5b505afa158015612921573d6000803e3d6000fd5b505050506040513d602081101561293757600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b15801561297f57600080fd5b505afa158015612993573d6000803e3d6000fd5b505050506040513d60208110156129a957600080fd5b505161ffff1690506129bb8383612dd2565b60018111156129d3576129ce8383612ea5565b6129de565b6129de838384612f44565b60005b81811015612a6b57612a6384866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612a3157600080fd5b505afa158015612a45573d6000803e3d6000fd5b505050506040513d6020811015612a5b57600080fd5b505185612f44565b6001016129e1565b5050505050565b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015612ac257600080fd5b505afa158015612ad6573d6000803e3d6000fd5b505050506040513d60a0811015612aec57600080fd5b5060200151949350505050565b60408051600481526024810182526020810180516001600160e01b0316633e8ff43f60e01b1781529151815160009384936060936001600160a01b03891693919290918291908083835b60208310612b625780518252601f199092019160209182019101612b43565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612bc2576040519150601f19603f3d011682016040523d82523d6000602084013e612bc7565b606091505b5091509150818015612bda575080516020145b15612c0057808060200190516020811015612bf457600080fd5b50519250610f13915050565b60018411612c0f576000612c12565b60015b60ff1695945050505050565b6000612c37600080516020613221833981519152611f6e565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c7457600080fd5b505afa158015612c88573d6000803e3d6000fd5b505050506040513d6020811015612c9e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b158015612ce657600080fd5b505afa158015612cfa573d6000803e3d6000fd5b505050506040513d6020811015612d1057600080fd5b505161ffff169050612d228383612ff9565b6001811115612d3a57612d3583836130cc565b612d45565b612d4583838461316b565b60005b81811015612a6b57612dca84866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612d9857600080fd5b505afa158015612dac573d6000803e3d6000fd5b505050506040513d6020811015612dc257600080fd5b50518561316b565b600101612d48565b816001600160a01b0316638de6c3eb826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612e2157600080fd5b505af1158015612e35573d6000803e3d6000fd5b50506040516001600160a01b03841692507fc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd9150600090a26040516001600160a01b038216907f88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab90600090a25050565b816001600160a01b031663ee6a934c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612ef457600080fd5b505af1158015612f08573d6000803e3d6000fd5b50506040516001600160a01b03841692507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d899150600090a25050565b826001600160a01b03166336900c1183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015612fa457600080fd5b505af1158015612fb8573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507ff2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a590600090a3505050565b816001600160a01b031663ceb9838c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561304857600080fd5b505af115801561305c573d6000803e3d6000fd5b50506040516001600160a01b03841692507fbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d9150600090a26040516001600160a01b038216907f2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf90600090a25050565b816001600160a01b031663ae22107f826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561311b57600080fd5b505af115801561312f573d6000803e3d6000fd5b50506040516001600160a01b03841692507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee609150600090a25050565b826001600160a01b031663fba8f03183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507f9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced4390600090a350505056fe42616e636f72436f6e7665727465725265676973747279446174610000000000a2646970667358221220f18e7b2a58ad0e4b8a03736e0f6ae0e4277fb1fb6282c5f4f8b7824083465cbd64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102745760003560e01c80637b10399911610151578063b4c4197a116100c3578063d8cced2a11610087578063d8cced2a14610c02578063e571049b14610c28578063e85455d714610c30578063effb3c6e14610c56578063f2fde38b14610c5e578063f4fb86c014610c8457610274565b8063b4c4197a14610a75578063c22b82f014610aa3578063d3182bed14610bc6578063d4ee1d9014610bce578063d6c4b5b214610bd657610274565b8063954254f511610115578063954254f5146109c15780639e76a007146109e7578063a109d21414610a0d578063a43d5e9414610a2a578063a74498aa14610a50578063b4a176d314610a6d57610274565b80637b103999146109665780637f45c4c31461096e578063865cf194146109765780638da5cb5b146109935780638f1d0e1a1461099b57610274565b80634c7df18f116101ea57806361cd756e116101ae57806361cd756e146108f257806369be4784146108fa5780636ce1c4dc14610902578063725b87861461092857806379ba5097146109565780637a5f0ffd1461095e57610274565b80634c7df18f146105b35780635a0a6618146105d05780635f1b50fe1461081d578063603f51e414610825578063610c0b051461085157610274565b80631f8e26201161023c5780631f8e26201461046a5780632fe8a6ad1461050b5780633ab8857c146105275780634123ef601461054d57806349c5f32b1461057357806349d10b64146105ab57610274565b8063024c7ec71461027957806304ceaf411461029a57806311839064146102f25780631814f2d2146103185780631d3fccd51461033c575b600080fd5b6102986004803603602081101561028f57600080fd5b50351515610caa565b005b6102a2610cd0565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102de5781810151838201526020016102c6565b505050509050019250505060405180910390f35b6102a26004803603602081101561030857600080fd5b50356001600160a01b0316610cdf565b610320610e12565b604080516001600160a01b039092168252519081900360200190f35b6103206004803603606081101561035257600080fd5b61ffff8235169190810190604081016020820135600160201b81111561037757600080fd5b82018360208201111561038957600080fd5b803590602001918460208302840111600160201b831117156103aa57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103f957600080fd5b82018360208201111561040b57600080fd5b803590602001918460208302840111600160201b8311171561042c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610e21945050505050565b6102a26004803603602081101561048057600080fd5b810190602081018135600160201b81111561049a57600080fd5b8201836020820111156104ac57600080fd5b803590602001918460208302840111600160201b831117156104cd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610f08945050505050565b610513610f19565b604080519115158252519081900360200190f35b6105136004803603602081101561053d57600080fd5b50356001600160a01b0316610f29565b6105136004803603602081101561056357600080fd5b50356001600160a01b0316610fc0565b6105996004803603602081101561058957600080fd5b50356001600160a01b0316610fcb565b60408051918252519081900360200190f35b610298611030565b610320600480360360208110156105c957600080fd5b5035611238565b610320600480360360e08110156105e657600080fd5b61ffff8235169190810190604081016020820135600160201b81111561060b57600080fd5b82018360208201111561061d57600080fd5b803590602001918460018302840111600160201b8311171561063e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561069057600080fd5b8201836020820111156106a257600080fd5b803590602001918460018302840111600160201b831117156106c357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff8535169563ffffffff60208701351695919450925060608101915060400135600160201b81111561072a57600080fd5b82018360208201111561073c57600080fd5b803590602001918460208302840111600160201b8311171561075d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156107ac57600080fd5b8201836020820111156107be57600080fd5b803590602001918460208302840111600160201b831117156107df57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611294945050505050565b6102a26112d0565b6103206004803603604081101561083b57600080fd5b506001600160a01b0381351690602001356113ed565b6102a26004803603602081101561086757600080fd5b810190602081018135600160201b81111561088157600080fd5b82018360208201111561089357600080fd5b803590602001918460208302840111600160201b831117156108b457600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061148d945050505050565b61032061158e565b61059961159d565b6102986004803603602081101561091857600080fd5b50356001600160a01b031661161f565b6105136004803603604081101561093e57600080fd5b506001600160a01b0381358116916020013516611685565b610298611691565b610599611748565b610320611799565b6102a26117a8565b6103206004803603602081101561098c57600080fd5b50356117f9565b610320611855565b610513600480360360208110156109b157600080fd5b50356001600160a01b0316611864565b610513600480360360208110156109d757600080fd5b50356001600160a01b0316611a6d565b610298600480360360208110156109fd57600080fd5b50356001600160a01b0316611b5c565b61032060048036036020811015610a2357600080fd5b5035611bc9565b61059960048036036020811015610a4057600080fd5b50356001600160a01b0316611bd4565b61032060048036036020811015610a6657600080fd5b5035611bdf565b610298611c3b565b61051360048036036040811015610a8b57600080fd5b506001600160a01b0381358116916020013516611c67565b61032060048036036040811015610ab957600080fd5b810190602081018135600160201b811115610ad357600080fd5b820183602082011115610ae557600080fd5b803590602001918460208302840111600160201b83111715610b0657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b5557600080fd5b820183602082011115610b6757600080fd5b803590602001918460208302840111600160201b83111715610b8857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611cdd945050505050565b610599611cff565b610320611d50565b61032060048036036040811015610bec57600080fd5b506001600160a01b038135169060200135611d5f565b61051360048036036020811015610c1857600080fd5b50356001600160a01b0316611d6b565b610599611dd0565b61051360048036036020811015610c4657600080fd5b50356001600160a01b0316611dda565b6102a2611e3f565b61029860048036036020811015610c7457600080fd5b50356001600160a01b0316611e90565b6102a260048036036020811015610c9a57600080fd5b50356001600160a01b0316611f0e565b610cb2611f19565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6060610cda611e3f565b905090565b6060610cf8600080516020613221833981519152611f6e565b6001600160a01b031663f4fb86c0836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d4457600080fd5b505afa158015610d58573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d8157600080fd5b8101908080516040519392919084600160201b821115610da057600080fd5b908301906020820185811115610db557600080fd5b82518660208202830111600160201b82111715610dd157600080fd5b82525081516020918201928201910280838360005b83811015610dfe578181015183820152602001610de6565b505050509050016040525050509050919050565b6004546001600160a01b031681565b600081518351148015610e35575060018351115b15610efd576060610e4584611fba565b905060005b8151811015610efa576000828281518110610e6157fe5b602002602001015190506000816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea657600080fd5b505afa158015610eba573d6000803e3d6000fd5b505050506040513d6020811015610ed057600080fd5b50519050610ee081898989612250565b15610ef057509250610f01915050565b5050600101610e4a565b50505b5060005b9392505050565b6060610f138261148d565b92915050565b600354600160a01b900460ff1681565b6000610f42600080516020613221833981519152611f6e565b6001600160a01b0316633ab8857c836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b505afa158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b505192915050565b6000610f1382611d6b565b6000610fe4600080516020613221833981519152611f6e565b6001600160a01b031663a43d5e94836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6000546001600160a01b03163314806110535750600354600160a01b900460ff16155b611098576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006110b66f436f6e7472616374526567697374727960801b611f6e565b6002549091506001600160a01b038083169116148015906110df57506001600160a01b03811615155b611127576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561118957600080fd5b505afa15801561119d573d6000803e3d6000fd5b505050506040513d60208110156111b357600080fd5b50516001600160a01b03161415611208576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b6000611251600080516020613221833981519152611f6e565b6001600160a01b031663a109d214836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b60006112a588888888888888612362565b600480546001600160a01b0319166001600160a01b0392831617908190551698975050505050505050565b60606112e9600080516020613221833981519152611f6e565b6001600160a01b0316635f1b50fe6040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b505afa158015611335573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561135e57600080fd5b8101908080516040519392919084600160201b82111561137d57600080fd5b90830190602082018581111561139257600080fd5b82518660208202830111600160201b821117156113ae57600080fd5b82525081516020918201928201910280838360005b838110156113db5781810151838201526020016113c3565b50505050905001604052505050905090565b6000611406600080516020613221833981519152611f6e565b6001600160a01b031663d6c4b5b284846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561145a57600080fd5b505afa15801561146e573d6000803e3d6000fd5b505050506040513d602081101561148457600080fd5b50519392505050565b606080825167ffffffffffffffff811180156114a857600080fd5b506040519080825280602002602001820160405280156114d2578160200160208202803683370190505b50905060005b8351811015611587578381815181106114ed57fe5b60200260200101516001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561152d57600080fd5b505afa158015611541573d6000803e3d6000fd5b505050506040513d602081101561155757600080fd5b5051825183908390811061156757fe5b6001600160a01b03909216602092830291909101909101526001016114d8565b5092915050565b6003546001600160a01b031681565b60006115b6600080516020613221833981519152611f6e565b6001600160a01b03166369be47846040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b505afa158015611602573d6000803e3d6000fd5b505050506040513d602081101561161857600080fd5b5051905090565b611627611f19565b61163081611a6d565b611679576040805162461bcd60e51b815260206004820152601560248201527422a9292fa4a72b20a624a22fa1a7a72b22a92a22a960591b604482015290519081900360640190fd5b611682816128b7565b50565b6000610f018383611c67565b6001546001600160a01b031633146116e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000611761600080516020613221833981519152611f6e565b6001600160a01b0316637a5f0ffd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b6002546001600160a01b031681565b60606117c1600080516020613221833981519152611f6e565b6001600160a01b0316637f45c4c36040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b6000611812600080516020613221833981519152611f6e565b6001600160a01b031663865cf194836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b6000546001600160a01b031681565b600080826001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b1580156118a057600080fd5b505afa1580156118b4573d6000803e3d6000fd5b505050506040513d60208110156118ca57600080fd5b505161ffff16905060608167ffffffffffffffff811180156118eb57600080fd5b50604051908082528060200260200182016040528015611915578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561193157600080fd5b5060405190808252806020026020018201604052801561195b578160200160208202803683370190505b50905060005b83811015611a42576000866001600160a01b03166319b64015836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119af57600080fd5b505afa1580156119c3573d6000803e3d6000fd5b505050506040513d60208110156119d957600080fd5b5051845190915081908590849081106119ee57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050611a188782612a72565b838381518110611a2457fe5b63ffffffff9092166020928302919091019091015250600101611961565b506000611a59611a528786612af9565b8484610e21565b6001600160a01b0316141595945050505050565b6000816001600160a01b0316826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ab257600080fd5b505afa158015611ac6573d6000803e3d6000fd5b505050506040513d6020811015611adc57600080fd5b505160408051638da5cb5b60e01b815290516001600160a01b0390921691638da5cb5b91600480820192602092909190829003018186803b158015611b2057600080fd5b505afa158015611b34573d6000803e3d6000fd5b505050506040513d6020811015611b4a57600080fd5b50516001600160a01b03161492915050565b6000546001600160a01b0316331480611b7b5750611b7981611a6d565b155b611bc0576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b61168281612c1e565b6000610f1382611238565b6000610f1382610fcb565b6000611bf8600080516020613221833981519152611f6e565b6001600160a01b031663a74498aa836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f8e57600080fd5b611c43611f19565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b6000611c80600080516020613221833981519152611f6e565b6001600160a01b031663725b878684846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561145a57600080fd5b6000610f016001845111611cf2576000611cf5565b60015b60ff168484610e21565b6000611d18600080516020613221833981519152611f6e565b6001600160a01b031663e571049b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ee57600080fd5b6001546001600160a01b031681565b6000610f0183836113ed565b6000611d84600080516020613221833981519152611f6e565b6001600160a01b0316634123ef60836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6000610cda611cff565b6000611df3600080516020613221833981519152611f6e565b6001600160a01b031663e85455d7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f8e57600080fd5b6060611e58600080516020613221833981519152611f6e565b6001600160a01b03166304ceaf416040518163ffffffff1660e01b815260040160006040518083038186803b15801561132157600080fd5b611e98611f19565b6000546001600160a01b0382811691161415611eec576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6060610f1382610cdf565b6000546001600160a01b03163314611f6c576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015610f8e57600080fd5b60606000611fd5600080516020613221833981519152611f6e565b90506000816001600160a01b031663a43d5e9485600081518110611ff557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561203a57600080fd5b505afa15801561204e573d6000803e3d6000fd5b505050506040513d602081101561206457600080fd5b50519050600060015b855181101561211e576000846001600160a01b031663a43d5e9488848151811061209357fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156120d857600080fd5b505afa1580156120ec573d6000803e3d6000fd5b505050506040513d602081101561210257600080fd5b5051905080841115612115578093508192505b5060010161206d565b50826001600160a01b031663f4fb86c086838151811061213a57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561217f57600080fd5b505afa158015612193573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156121bc57600080fd5b8101908080516040519392919084600160201b8211156121db57600080fd5b9083019060208201858111156121f057600080fd5b82518660208202830111600160201b8211171561220c57600080fd5b82525081516020918201928201910280838360005b83811015612239578181015183820152602001612221565b505050509050016040525050509350505050919050565b600080856001600160a01b03166371f52bf36040518163ffffffff1660e01b815260040160206040518083038186803b15801561228c57600080fd5b505afa1580156122a0573d6000803e3d6000fd5b505050506040513d60208110156122b657600080fd5b505161ffff1690506122c88682612af9565b61ffff168561ffff16146122e057600091505061235a565b808451146122f257600091505061235a565b60005b84518110156123535761231b8786838151811061230e57fe5b6020026020010151612a72565b63ffffffff1684828151811061232d57fe5b602002602001015163ffffffff161461234b5760009250505061235a565b6001016122f5565b5060019150505b949350505050565b815181516000919081146123b4576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524553455256455360601b604482015290519081900360640190fd5b60006123c18a8686610e21565b6001600160a01b031614612411576040805162461bcd60e51b81526020600482015260126024820152714552525f414c52454144595f45584953545360701b604482015290519081900360640190fd5b600061242f6f436f6e766572746572466163746f727960801b611f6e565b90506000816001600160a01b0316632e9ab7b38c8c8c8c6040518563ffffffff1660e01b8152600401808561ffff16815260200180602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b838110156124a9578181015183820152602001612491565b50505050905090810190601f1680156124d65780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156125095781810151838201526020016124f1565b50505050905090810190601f1680156125365780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561255957600080fd5b505af115801561256d573d6000803e3d6000fd5b505050506040513d602081101561258357600080fd5b505160025460408051630afb25b560e11b815261ffff8f1660048201526001600160a01b038085166024830152928316604482015263ffffffff8b1660648201529051929350600092918516916315f64b6a9160848082019260209290919082900301818787803b1580156125f757600080fd5b505af115801561260b573d6000803e3d6000fd5b505050506040513d602081101561262157600080fd5b5051604080516379ba509760e01b815290519192506001600160a01b038416916379ba50979160048082019260009290919082900301818387803b15801561266857600080fd5b505af115801561267c573d6000803e3d6000fd5b50505050806001600160a01b03166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b5050505060005b8481101561278557816001600160a01b0316636a49d2c48983815181106126f957fe5b602002602001015189848151811061270d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b031681526020018263ffffffff16815260200192505050600060405180830381600087803b15801561276157600080fd5b505af1158015612775573d6000803e3d6000fd5b5050600190920191506126d69050565b50816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156127d557600080fd5b505af11580156127e9573d6000803e3d6000fd5b50505050806001600160a01b031663cdc91c696040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561282857600080fd5b505af115801561283c573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561288757600080fd5b505af115801561289b573d6000803e3d6000fd5b505050506128a8816128b7565b9b9a5050505050505050505050565b60006128d0600080516020613221833981519152611f6e565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561290d57600080fd5b505afa158015612921573d6000803e3d6000fd5b505050506040513d602081101561293757600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b15801561297f57600080fd5b505afa158015612993573d6000803e3d6000fd5b505050506040513d60208110156129a957600080fd5b505161ffff1690506129bb8383612dd2565b60018111156129d3576129ce8383612ea5565b6129de565b6129de838384612f44565b60005b81811015612a6b57612a6384866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612a3157600080fd5b505afa158015612a45573d6000803e3d6000fd5b505050506040513d6020811015612a5b57600080fd5b505185612f44565b6001016129e1565b5050505050565b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015612ac257600080fd5b505afa158015612ad6573d6000803e3d6000fd5b505050506040513d60a0811015612aec57600080fd5b5060200151949350505050565b60408051600481526024810182526020810180516001600160e01b0316633e8ff43f60e01b1781529151815160009384936060936001600160a01b03891693919290918291908083835b60208310612b625780518252601f199092019160209182019101612b43565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114612bc2576040519150601f19603f3d011682016040523d82523d6000602084013e612bc7565b606091505b5091509150818015612bda575080516020145b15612c0057808060200190516020811015612bf457600080fd5b50519250610f13915050565b60018411612c0f576000612c12565b60015b60ff1695945050505050565b6000612c37600080516020613221833981519152611f6e565b90506000826001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c7457600080fd5b505afa158015612c88573d6000803e3d6000fd5b505050506040513d6020811015612c9e57600080fd5b5051604080516371f52bf360e01b815290519192506000916001600160a01b038616916371f52bf3916004808301926020929190829003018186803b158015612ce657600080fd5b505afa158015612cfa573d6000803e3d6000fd5b505050506040513d6020811015612d1057600080fd5b505161ffff169050612d228383612ff9565b6001811115612d3a57612d3583836130cc565b612d45565b612d4583838461316b565b60005b81811015612a6b57612dca84866001600160a01b03166319b64015846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612d9857600080fd5b505afa158015612dac573d6000803e3d6000fd5b505050506040513d6020811015612dc257600080fd5b50518561316b565b600101612d48565b816001600160a01b0316638de6c3eb826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612e2157600080fd5b505af1158015612e35573d6000803e3d6000fd5b50506040516001600160a01b03841692507fc0a6d303d67b7ed9fa0abae1c48878df32acc0e7ca4334c7dad2bceeee5956fd9150600090a26040516001600160a01b038216907f88881feecdf61136ac4bdb1f681f2f3746a82910263d21ffea94750d2a78c0ab90600090a25050565b816001600160a01b031663ee6a934c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015612ef457600080fd5b505af1158015612f08573d6000803e3d6000fd5b50506040516001600160a01b03841692507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d899150600090a25050565b826001600160a01b03166336900c1183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015612fa457600080fd5b505af1158015612fb8573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507ff2e7cf6d6ed3f77039511409a43d4fa5108f09ab71d72b014380364c910233a590600090a3505050565b816001600160a01b031663ceb9838c826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561304857600080fd5b505af115801561305c573d6000803e3d6000fd5b50506040516001600160a01b03841692507fbfdf1baaa7e4871111360083540f067050014f651c9e4610a2a4a4bdf8bfab5d9150600090a26040516001600160a01b038216907f2aff63790c7da80d1c50ede92d23bc841c384837735c92c184331f3d7b91e5bf90600090a25050565b816001600160a01b031663ae22107f826040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561311b57600080fd5b505af115801561312f573d6000803e3d6000fd5b50506040516001600160a01b03841692507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee609150600090a25050565b826001600160a01b031663fba8f03183836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b1580156131cb57600080fd5b505af11580156131df573d6000803e3d6000fd5b50506040516001600160a01b038085169350851691507f9430ad6ff45d6c3e126c7711bf0036bd9bc6b202fa19628abd88e59cf43ced4390600090a350505056fe42616e636f72436f6e7665727465725265676973747279446174610000000000a2646970667358221220f18e7b2a58ad0e4b8a03736e0f6ae0e4277fb1fb6282c5f4f8b7824083465cbd64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "195:673:40:-:0;;;294:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;294:84:40;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;294:84:40;;;594:23:64;294:84:40;594:13:64;:23::i;:::-;-1:-1:-1;2122:8:56::1;:39:::0;;-1:-1:-1;;;;;2122:39:56;;::::1;-1:-1:-1::0;;;;;;2122:39:56;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;-1:-1:-1;195:673:40;;-1:-1:-1;195:673:40;692:128:64;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;195:673:40:-;;;;;;;", + "deployedSourceMap": "195:673:40:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3655:224:56;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:56;;;;:::i;:::-;;23430:103:10;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11304:249;;;;;;;;;;;;;;;;-1:-1:-1;11304:249:10;-1:-1:-1;;;;;11304:249:10;;:::i;253:34:40:-;;;:::i;:::-;;;;-1:-1:-1;;;;;253:34:40;;;;;;;;;;;;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15233:1026:10;;;;;;;;-1:-1:-1;15233:1026:10;;-1:-1:-1;;;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;15233:1026:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15233:1026:10;;-1:-1:-1;15233:1026:10;;-1:-1:-1;;;;;15233:1026:10:i;25232:171::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25232:171:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25232:171:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25232:171:10;;-1:-1:-1;25232:171:10;;-1:-1:-1;;;;;25232:171:10:i;1333:38:56:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;10347:191:10;;;;;;;;;;;;;;;;-1:-1:-1;10347:191:10;-1:-1:-1;;;;;10347:191:10;;:::i;23835:107::-;;;;;;;;;;;;;;;;-1:-1:-1;23835:107:10;-1:-1:-1;;;;;23835:107:10;;:::i;10799:248::-;;;;;;;;;;;;;;;;-1:-1:-1;10799:248:10;-1:-1:-1;;;;;10799:248:10;;:::i;:::-;;;;;;;;;;;;;;;;2300:925:56;;;:::i;7106:189:10:-;;;;;;;;;;;;;;;;-1:-1:-1;7106:189:10;;:::i;384:482:40:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;384:482:40;;;;;;;;-1:-1:-1;384:482:40;;-1:-1:-1;;;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;384:482:40;;;;;;;;;;;;;;;;-1:-1:-1;384:482:40;-1:-1:-1;384:482:40;;;;-1:-1:-1;384:482:40;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;384:482:40;;;;;;;;-1:-1:-1;384:482:40;;-1:-1:-1;;;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;384:482:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;384:482:40;;-1:-1:-1;384:482:40;;-1:-1:-1;;;;;384:482:40:i;9568:187:10:-;;;:::i;11805:271::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;11805:271:10;;;;;;;;:::i;12939:362::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12939:362:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12939:362:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12939:362:10;;-1:-1:-1;12939:362:10;;-1:-1:-1;;;;;12939:362:10:i;1243:37:56:-;;;:::i;9235:186:10:-;;;:::i;5648:::-;;;;;;;;;;;;;;;;-1:-1:-1;5648:186:10;-1:-1:-1;;;;;5648:186:10;;:::i;24939:189::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24939:189:10;;;;;;;;;;:::i;1422:217:57:-;;;:::i;7818:180:10:-;;;:::i;1154:33:56:-;;;:::i;8139:181:10:-;;;:::i;9933:200::-;;;;;;;;;;;;;;;;-1:-1:-1;9933:200:10;;:::i;219:29:57:-;;;:::i;13976:891:10:-;;;;;;;;;;;;;;;;-1:-1:-1;13976:891:10;-1:-1:-1;;;;;13976:891:10;;:::i;13503:199::-;;;;;;;;;;;;;;;;-1:-1:-1;13503:199:10;-1:-1:-1;;;;;13503:199:10;;:::i;6123:202::-;;;;;;;;;;;;;;;;-1:-1:-1;6123:202:10;-1:-1:-1;;;;;6123:202:10;;:::i;23624:121::-;;;;;;;;;;;;;;;;-1:-1:-1;23624:121:10;;:::i;24054:180::-;;;;;;;;;;;;;;;;-1:-1:-1;24054:180:10;-1:-1:-1;;;;;24054:180:10;;:::i;8492:199::-;;;;;;;;;;;;;;;;-1:-1:-1;8492:199:10;;:::i;3304:137:56:-;;;:::i;12391:257:10:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12391:257:10;;;;;;;;;;:::i;25509:268::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25509:268:10;;;;;;;;-1:-1:-1;25509:268:10;;-1:-1:-1;;;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25509:268:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25509:268:10;;-1:-1:-1;25509:268:10;;-1:-1:-1;;;;;25509:268:10:i;6464:170::-;;;:::i;255:23:57:-;;;:::i;24630:203:10:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24630:203:10;;;;;;;;:::i;7498:175::-;;;;;;;;;;;;;;;;-1:-1:-1;7498:175:10;-1:-1:-1;;;;;7498:175:10;;:::i;23236:102::-;;;:::i;8899:185::-;;;;;;;;;;;;;;;;-1:-1:-1;8899:185:10;-1:-1:-1;;;;;8899:185:10;;:::i;6769:171::-;;;:::i;1164:167:57:-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;24342:181:10:-;;;;;;;;;;;;;;;;-1:-1:-1;24342:181:10;-1:-1:-1;;;;;24342:181:10;;:::i;3655:224:56:-;726:12:57;:10;:12::i;:::-;3815:26:56::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:56::1;-1:-1:-1::0;;;;3815:56:56;;::::1;::::0;;;::::1;::::0;;3655:224::o;23430:103:10:-;23477:16;23513:12;:10;:12::i;:::-;23506:19;;23430:103;:::o;11304:249::-;11401:16;11460:34;-1:-1:-1;;;;;;;;;;;11460:9:10;:34::i;:::-;-1:-1:-1;;;;;11437:89:10;;11527:17;11437:108;;;;;;;;;;;;;-1:-1:-1;;;;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11437:108:10;;;;;;;;;;;;-1:-1:-1;11437:108:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11430:115;;11304:249;;;:::o;253:34:40:-;;;-1:-1:-1;;;;;253:34:40;;:::o;15233:1026:10:-;15372:16;15508:15;:22;15483:14;:21;:47;:76;;;;;15558:1;15534:14;:21;:25;15483:76;15479:734;;;15651:40;15694:44;15723:14;15694:28;:44::i;:::-;15651:87;;15825:9;15820:382;15844:23;:30;15840:1;:34;15820:382;;;15900:23;15943;15967:1;15943:26;;;;;;;;;;;;;;15900:70;;15989:20;16031:6;-1:-1:-1;;;;;16031:12:10;;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16031:14:10;;-1:-1:-1;16070:80:10;16031:14;16111:5;16118:14;16134:15;16070:29;:80::i;:::-;16066:120;;;-1:-1:-1;16180:6:10;-1:-1:-1;16173:13:10;;-1:-1:-1;;16173:13:10;16066:120;-1:-1:-1;;15876:3:10;;15820:382;;;;15479:734;;-1:-1:-1;16249:1:10;15233:1026;;;;;;:::o;25232:171::-;25320:19;25359:36;25382:12;25359:22;:36::i;:::-;25352:43;25232:171;-1:-1:-1;;25232:171:10:o;1333:38:56:-;;;-1:-1:-1;;;1333:38:56;;;;;:::o;10347:191:10:-;10421:4;10468:34;-1:-1:-1;;;;;;;;;;;10468:9:10;:34::i;:::-;-1:-1:-1;;;;;10445:77:10;;10523:6;10445:85;;;;;;;;;;;;;-1:-1:-1;;;;;10445:85:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10445:85:10;;10347:191;-1:-1:-1;;10347:191:10:o;23835:107::-;23894:4;23918:16;23927:6;23918:8;:16::i;10799:248::-;10900:7;10950:34;-1:-1:-1;;;;;;;;;;;10950:9:10;:34::i;:::-;-1:-1:-1;;;;;10927:93:10;;11021:17;10927:112;;;;;;;;;;;;;-1:-1:-1;;;;;10927:112:10;;;;;;;;;;;;;;;;;;;;;;;;;;2300:925:56;2417:5;;-1:-1:-1;;;;;2417:5:56;2403:10;:19;;:50;;-1:-1:-1;2427:26:56;;-1:-1:-1;;;2427:26:56;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;-1:-1:-1;;;2395:80:56;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:56;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:56;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:56;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;-1:-1:-1;;;2698:94:56;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:56;:11;-1:-1:-1;;;;;2907:21:56;;-1:-1:-1;;;2907:40:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:56;-1:-1:-1;;;;;2907:54:56;;;2899:87;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;-1:-1:-1;;;2899:87:56;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:56;;;-1:-1:-1;;;;;;3078:23:56;;;;;;;3195:22;;;;;;;;;;;2300:925::o;7106:189:10:-;7171:16;7230:34;-1:-1:-1;;;;;;;;;;;7230:9:10;:34::i;:::-;-1:-1:-1;;;;;7207:72:10;;7280:6;7207:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;384:482:40;668:10;709:116;728:5;735;742:7;751:9;762:17;781:14;809:15;709:18;:116::i;:::-;690:16;:135;;-1:-1:-1;;;;;;690:135:40;-1:-1:-1;;;;;690:135:40;;;;;;;;843:16;;384:482;-1:-1:-1;;;;;;;;384:482:40:o;9568:187:10:-;9630:16;9689:34;-1:-1:-1;;;;;;;;;;;9689:9:10;:34::i;:::-;-1:-1:-1;;;;;9666:79:10;;:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9666:81:10;;;;;;;;;;;;-1:-1:-1;9666:81:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9659:88;;9568:187;:::o;11805:271::-;11917:16;11976:34;-1:-1:-1;;;;;;;;;;;11976:9:10;:34::i;:::-;-1:-1:-1;;;;;11953:88:10;;12042:17;12061:6;11953:115;;;;;;;;;;;;;-1:-1:-1;;;;;11953:115:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11953:115:10;;11805:271;-1:-1:-1;;;11805:271:10:o;12939:362::-;13019:19;13051:30;13101:8;:15;13084:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13084:33:10;;13051:66;;13135:9;13130:133;13154:8;:15;13150:1;:19;13130:133;;;13241:8;13250:1;13241:11;;;;;;;;;;;;;;-1:-1:-1;;;;;13224:35:10;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13224:37:10;13189:13;;:10;;13200:1;;13189:13;;;;;;-1:-1:-1;;;;;13189:74:10;;;:13;;;;;;;;;;;:74;13171:3;;13130:133;;;-1:-1:-1;13283:10:10;12939:362;-1:-1:-1;;12939:362:10:o;1243:37:56:-;;;-1:-1:-1;;;;;1243:37:56;;:::o;9235:186:10:-;9301:7;9351:34;-1:-1:-1;;;;;;;;;;;9351:9:10;:34::i;:::-;-1:-1:-1;;;;;9328:83:10;;:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9328:85:10;;-1:-1:-1;9235:186:10;:::o;5648:::-;726:12:57;:10;:12::i;:::-;5729:28:10::1;5746:10;5729:16;:28::i;:::-;5721:62;;;::::0;;-1:-1:-1;;;5721:62:10;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5721:62:10;;;;;;;;;;;;;::::1;;5794:32;5815:10;5794:20;:32::i;:::-;5648:186:::0;:::o;24939:189::-;25045:4;25069:51;25094:17;25113:6;25069:24;:51::i;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;7818:180:10:-;7881:7;7931:34;-1:-1:-1;;;;;;;;;;;7931:9:10;:34::i;:::-;-1:-1:-1;;;;;7908:80:10;;:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1154:33:56;;;-1:-1:-1;;;;;1154:33:56;;:::o;8139:181:10:-;8198:16;8257:34;-1:-1:-1;;;;;;;;;;;8257:9:10;:34::i;:::-;-1:-1:-1;;;;;8234:76:10;;:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9933:200;10008:11;10062:34;-1:-1:-1;;;;;;;;;;;10062:9:10;:34::i;:::-;-1:-1:-1;;;;;10039:78:10;;10118:6;10039:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;219:29:57;;;-1:-1:-1;;;;;219:29:57;;:::o;13976:891:10:-;14062:4;14079:25;14107:10;-1:-1:-1;;;;;14107:30:10;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14107:32:10;14079:60;;;-1:-1:-1;14150:34:10;14079:60;14187:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14187:36:10;;14150:73;;14234:30;14280:17;14267:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14267:31:10;;14234:64;;14375:9;14370:254;14394:17;14390:1;:21;14370:254;;;14433:24;14460:10;-1:-1:-1;;;;;14460:26:10;;14487:1;14460:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14460:29:10;14504:16;;14460:29;;-1:-1:-1;14460:29:10;;14504:13;;14518:1;;14504:16;;;;;;;;;;;:31;-1:-1:-1;;;;;14504:31:10;;;-1:-1:-1;;;;;14504:31:10;;;;;14570:42;14587:10;14599:12;14570:16;:42::i;:::-;14550:14;14565:1;14550:17;;;;;;;;:62;;;;:17;;;;;;;;;;;:62;-1:-1:-1;14413:3:10;;14370:254;;;-1:-1:-1;14857:1:10;14732:104;14757:47;14774:10;14786:17;14757:16;:47::i;:::-;14806:13;14821:14;14732:24;:104::i;:::-;-1:-1:-1;;;;;14732:127:10;;;;13976:891;-1:-1:-1;;;;;13976:891:10:o;13503:199::-;13573:4;13683:10;-1:-1:-1;;;;;13645:49:10;:10;-1:-1:-1;;;;;13645:16:10;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13645:18:10;:26;;;-1:-1:-1;;;13645:26:10;;;;-1:-1:-1;;;;;13645:24:10;;;;;;:26;;;;;:18;;:26;;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13645:26:10;-1:-1:-1;;;;;13645:49:10;;;13503:199;-1:-1:-1;;13503:199:10:o;6123:202::-;6211:5;;-1:-1:-1;;;;;6211:5:10;6197:10;:19;;:52;;;6221:28;6238:10;6221:16;:28::i;:::-;6220:29;6197:52;6189:82;;;;;-1:-1:-1;;;6189:82:10;;;;;;;;;;;;-1:-1:-1;;;6189:82:10;;;;;;;;;;;;;;;6282:35;6306:10;6282:23;:35::i;23624:121::-;23684:16;23720:17;23730:6;23720:9;:17::i;24054:180::-;24150:7;24177:49;24208:17;24177:30;:49::i;8492:199::-;8564:16;8623:34;-1:-1:-1;;;;;;;;;;;8623:9:10;:34::i;:::-;-1:-1:-1;;;;;8600:75:10;;8676:6;8600:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3304:137:56;726:12:57;:10;:12::i;:::-;3421::56::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:56::1;-1:-1:-1::0;;;;;3421:12:56;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;12391:257:10:-;12502:4;12549:34;-1:-1:-1;;;;;;;;;;;12549:9:10;:34::i;:::-;-1:-1:-1;;;;;12526:87:10;;12614:17;12633:6;12526:114;;;;;;;;;;;;;-1:-1:-1;;;;;12526:114:10;;;;;;-1:-1:-1;;;;;12526:114:10;;;;;;;;;;;;;;;;;;;;;;;;;;;25509:268;25641:16;25677:92;25726:1;25702:14;:21;:25;:33;;25734:1;25702:33;;;25730:1;25702:33;25677:92;;25737:14;25753:15;25677:24;:92::i;6464:170::-;6520:7;6570:34;-1:-1:-1;;;;;;;;;;;6570:9:10;:34::i;:::-;-1:-1:-1;;;;;6547:77:10;;:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;255:23:57;;;-1:-1:-1;;;;;255:23:57;;:::o;24630:203:10:-;24737:16;24773:52;24799:17;24818:6;24773:25;:52::i;7498:175::-;7562:4;7609:34;-1:-1:-1;;;;;;;;;;;7609:9:10;:34::i;:::-;-1:-1:-1;;;;;7586:71:10;;7658:6;7586:79;;;;;;;;;;;;;-1:-1:-1;;;;;7586:79:10;;;;;;;;;;;;;;;;;;;;;;;;;;23236:102;23287:7;23314:16;:14;:16::i;8899:185::-;8970:4;9017:34;-1:-1:-1;;;;;;;;;;;9017:9:10;:34::i;:::-;-1:-1:-1;;;;;8994:74:10;;9069:6;8994:82;;;;;;;;;;;;;-1:-1:-1;;;;;8994:82:10;;;;;;;;;;;;;;;;;;;;;;;;;;6769:171;6821:16;6880:34;-1:-1:-1;;;;;;;;;;;6880:9:10;:34::i;:::-;-1:-1:-1;;;;;6857:73:10;;:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1164:167:57;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;24342:181:10:-;24434:16;24470:45;24497:17;24470:26;:45::i;813:104:57:-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;4077:133:56:-;4169:8;;:33;;;-1:-1:-1;;;4169:33:56;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:56;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;20557:934:10;20654:16;20683:44;20753:34;-1:-1:-1;;;;;;;;;;;20753:9:10;:34::i;:::-;20683:105;;20799:22;20824:21;-1:-1:-1;;;;;20824:56:10;;20881:14;20896:1;20881:17;;;;;;;;;;;;;;20824:75;;;;;;;;;;;;;-1:-1:-1;;;;;20824:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20824:75:10;;-1:-1:-1;20910:13:10;21043:1;21026:363;21050:14;:21;21046:1;:25;21026:363;;;21093:35;21131:21;-1:-1:-1;;;;;21131:56:10;;21188:14;21203:1;21188:17;;;;;;;;;;;;;;21131:75;;;;;;;;;;;;;-1:-1:-1;;;;;21131:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21131:75:10;;-1:-1:-1;21225:44:10;;;21221:157;;;21307:27;21290:44;;21361:1;21353:9;;21221:157;-1:-1:-1;21073:3:10;;21026:363;;;;21408:21;-1:-1:-1;;;;;21408:52:10;;21461:14;21476:5;21461:21;;;;;;;;;;;;;;21408:75;;;;;;;;;;;;;-1:-1:-1;;;;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;21408:75:10;;;;;;;;;;;;-1:-1:-1;21408:75:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21401:82;;;;;20557:934;;;:::o;21499:658::-;21667:4;21684:25;21712:10;-1:-1:-1;;;;;21712:30:10;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21712:32:10;21684:60;;;-1:-1:-1;21770:47:10;21787:10;21684:60;21770:16;:47::i;:::-;21761:56;;:5;:56;;;21757:87;;21839:5;21832:12;;;;;21757:87;21886:17;21861:14;:21;:42;21857:73;;21925:5;21918:12;;;;;21857:73;21948:9;21943:183;21967:14;:21;21963:1;:25;21943:183;;;22036:47;22053:10;22065:14;22080:1;22065:17;;;;;;;;;;;;;;22036:16;:47::i;:::-;22014:69;;:15;22030:1;22014:18;;;;;;;;;;;;;;:69;;;22010:104;;22109:5;22102:12;;;;;;22010:104;21990:3;;21943:183;;;;22145:4;22138:11;;;21499:658;;;;;;;:::o;4179:1300::-;4516:21;;4566:22;;4471:10;;4516:21;4556:32;;4548:65;;;;;-1:-1:-1;;;4548:65:10;;;;;;;;;;;;-1:-1:-1;;;4548:65:10;;;;;;;;;;;;;;;4717:1;4632:64;4657:5;4664:14;4680:15;4632:24;:64::i;:::-;-1:-1:-1;;;;;4632:87:10;;4624:118;;;;;-1:-1:-1;;;4624:118:10;;;;;;;;;;;;-1:-1:-1;;;4624:118:10;;;;;;;;;;;;;;;4755:25;4801:28;-1:-1:-1;;;4801:9:10;:28::i;:::-;4755:75;;4841:23;4884:7;-1:-1:-1;;;;;4884:20:10;;4905:5;4912;4919:7;4928:9;4884:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4884:54:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4884:54:10;5023:8;;4984:67;;;-1:-1:-1;;;4984:67:10;;;;;;;;;-1:-1:-1;;;;;4984:67:10;;;;;;;5023:8;;;4984:67;;;;;;;;;;;;;4884:54;;-1:-1:-1;4950:20:10;;4984:23;;;;;;:67;;;;;4884:54;;4984:67;;;;;;;;4950:20;4984:23;:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4984:67:10;5065:24;;;-1:-1:-1;;;5065:24:10;;;;4984:67;;-1:-1:-1;;;;;;5065:22:10;;;;;:24;;;;;;;;;;;;;;;;:22;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5100:9;-1:-1:-1;;;;;5100:25:10;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5145:9;5140:109;5164:6;5160:1;:10;5140:109;;;5190:9;-1:-1:-1;;;;;5190:20:10;;5211:14;5226:1;5211:17;;;;;;;;;;;;;;5230:15;5246:1;5230:18;;;;;;;;;;;;;;5190:59;;;;;;;;;;;;;-1:-1:-1;;;;;5190:59:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5172:3:10;;;;;-1:-1:-1;5140:109:10;;-1:-1:-1;5140:109:10;;;5262:6;-1:-1:-1;;;;;5262:24:10;;5295:9;5262:44;;;;;;;;;;;;;-1:-1:-1;;;;;5262:44:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5317:9;-1:-1:-1;;;;;5317:31:10;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5361:39:10;;;-1:-1:-1;;;5361:39:10;;5389:10;5361:39;;;;;;-1:-1:-1;;;;;5361:27:10;;;-1:-1:-1;5361:27:10;;-1:-1:-1;5361:39:10;;;;;-1:-1:-1;;5361:39:10;;;;;;;-1:-1:-1;5361:27:10;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5413:31;5434:9;5413:20;:31::i;:::-;5462:9;4179:1300;-1:-1:-1;;;;;;;;;;;4179:1300:10:o;18900:810::-;18972:44;19042:34;-1:-1:-1;;;;;;;;;;;19042:9:10;:34::i;:::-;18972:105;;19088:23;19125:10;-1:-1:-1;;;;;19114:28:10;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19114:30:10;19183:32;;;-1:-1:-1;;;19183:32:10;;;;19114:30;;-1:-1:-1;19155:25:10;;-1:-1:-1;;;;;19183:30:10;;;;;:32;;;;;19114:30;;19183:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19183:32:10;19155:60;;;-1:-1:-1;19265:40:10;19275:21;19298:6;19265:9;:40::i;:::-;19340:1;19320:17;:21;19316:196;;;19356:47;19373:21;19396:6;19356:16;:47::i;:::-;19316:196;;;19432:80;19452:21;19495:6;19505;19432:19;:80::i;:::-;19565:9;19560:142;19584:17;19580:1;:21;19560:142;;;19621:81;19641:21;19664:10;-1:-1:-1;;;;;19664:26:10;;19691:1;19664:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19664:29:10;19695:6;19621:19;:81::i;:::-;19603:3;;19560:142;;;;18900:810;;;;:::o;22294:208::-;22392:6;22414:13;22434:10;-1:-1:-1;;;;;22434:21:10;;22456:13;22434:36;;;;;;;;;;;;;-1:-1:-1;;;;;22434:36:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22434:36:10;;;;22294:208;-1:-1:-1;;;;22294:208:10:o;22736:404::-;22927:52;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22927:52:10;-1:-1:-1;;;22927:52:10;;;22896:84;;;;22835:6;;;;22869:23;;-1:-1:-1;;;;;22896:30:10;;;22927:52;;22896:84;;;;22927:52;22896:84;;22927:52;22896:84;;;;;;;;;;-1:-1:-1;;22896:84:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22854:126;;;;22995:7;:34;;;;;23006:10;:17;23027:2;23006:23;22995:34;22991:93;;;23063:10;23052:32;;;;;;;;;;;;;;;-1:-1:-1;23052:32:10;;-1:-1:-1;23045:39:10;;-1:-1:-1;;23045:39:10;22991:93;23123:1;23102:18;:22;:30;;23131:1;23102:30;;;23127:1;23102:30;23095:37;;;22736:404;-1:-1:-1;;;;;22736:404:10:o;19718:831::-;19793:44;19863:34;-1:-1:-1;;;;;;;;;;;19863:9:10;:34::i;:::-;19793:105;;19909:23;19946:10;-1:-1:-1;;;;;19935:28:10;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19935:30:10;20004:32;;;-1:-1:-1;;;20004:32:10;;;;19935:30;;-1:-1:-1;19976:25:10;;-1:-1:-1;;;;;20004:30:10;;;;;:32;;;;;19935:30;;20004:32;;;;;;;:30;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20004:32:10;19976:60;;;-1:-1:-1;20089:43:10;20102:21;20125:6;20089:12;:43::i;:::-;20167:1;20147:17;:21;20143:202;;;20183:50;20203:21;20226:6;20183:19;:50::i;:::-;20143:202;;;20262:83;20285:21;20328:6;20338;20262:22;:83::i;:::-;20401:9;20396:145;20420:17;20416:1;:21;20396:145;;;20457:84;20480:21;20503:10;-1:-1:-1;;;;;20503:26:10;;20530:1;20503:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20503:29:10;20534:6;20457:22;:84::i;:::-;20439:3;;20396:145;;16388:250;16500:22;-1:-1:-1;;;;;16500:36:10;;16537:7;16500:45;;;;;;;;;;;;;-1:-1:-1;;;;;16500:45:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16561:29:10;;-1:-1:-1;;;;;16561:29:10;;;-1:-1:-1;16561:29:10;;-1:-1:-1;16561:29:10;;;16606:24;;-1:-1:-1;;;;;16606:24:10;;;;;;;;16388:250;;:::o;17187:257::-;17319:22;-1:-1:-1;;;;;17319:39:10;;17359:20;17319:61;;;;;;;;;;;;;-1:-1:-1;;;;;17319:61:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17396:40:10;;-1:-1:-1;;;;;17396:40:10;;;-1:-1:-1;17396:40:10;;-1:-1:-1;17396:40:10;;;17187:257;;:::o;18078:296::-;18231:22;-1:-1:-1;;;;;18231:42:10;;18274:17;18293:7;18231:70;;;;;;;;;;;;;-1:-1:-1;;;;;18231:70:10;;;;;;-1:-1:-1;;;;;18231:70:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18317:49:10;;-1:-1:-1;;;;;18317:49:10;;;;-1:-1:-1;18317:49:10;;;-1:-1:-1;18317:49:10;;;;;18078:296;;;:::o;16772:260::-;16887:22;-1:-1:-1;;;;;16887:39:10;;16927:7;16887:48;;;;;;;;;;;;;-1:-1:-1;;;;;16887:48:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16951:31:10;;-1:-1:-1;;;;;16951:31:10;;;-1:-1:-1;16951:31:10;;-1:-1:-1;16951:31:10;;;16998:26;;-1:-1:-1;;;;;16998:26:10;;;;;;;;16772:260;;:::o;17604:265::-;17739:22;-1:-1:-1;;;;;17739:42:10;;17782:20;17739:64;;;;;;;;;;;;;-1:-1:-1;;;;;17739:64:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17819:42:10;;-1:-1:-1;;;;;17819:42:10;;;-1:-1:-1;17819:42:10;;-1:-1:-1;17819:42:10;;;17604:265;;:::o;18588:304::-;18744:22;-1:-1:-1;;;;;18744:45:10;;18790:17;18809:7;18744:73;;;;;;;;;;;;;-1:-1:-1;;;;;18744:73:10;;;;;;-1:-1:-1;;;;;18744:73:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;18833:51:10;;-1:-1:-1;;;;;18833:51:10;;;;-1:-1:-1;18833:51:10;;;-1:-1:-1;18833:51:10;;;;;18588:304;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/ConverterRegistry.sol\";\n\n/*\n Utils test helper that exposes the converter registry functions\n*/\ncontract TestConverterRegistry is ConverterRegistry {\n IConverter public createdConverter;\n\n constructor(IContractRegistry _registry) public ConverterRegistry(_registry) {\n }\n\n function newConverter(\n uint16 _type,\n string memory _name,\n string memory _symbol,\n uint8 _decimals,\n uint32 _maxConversionFee,\n IERC20Token[] memory _reserveTokens,\n uint32[] memory _reserveWeights\n )\n public override returns (IConverter) {\n createdConverter = super.newConverter(_type, _name, _symbol, _decimals, _maxConversionFee, _reserveTokens,\n _reserveWeights);\n\n return createdConverter;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterRegistry.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterRegistry.sol", + "exportedSymbols": { + "TestConverterRegistry": [ + 19370 + ] + }, + "id": 19371, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19317, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:40" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol", + "file": "../converter/ConverterRegistry.sol", + "id": 19318, + "nodeType": "ImportDirective", + "scope": 19371, + "sourceUnit": 11668, + "src": "75:44:40", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19319, + "name": "ConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11667, + "src": "229:17:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterRegistry_$11667", + "typeString": "contract ConverterRegistry" + } + }, + "id": 19320, + "nodeType": "InheritanceSpecifier", + "src": "229:17:40" + } + ], + "contractDependencies": [ + 11667, + 13501, + 21719, + 21818, + 22526, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19370, + "linearizedBaseContracts": [ + 19370, + 11667, + 22526, + 21719, + 22661, + 21818, + 22847, + 13501 + ], + "name": "TestConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1814f2d2", + "id": 19322, + "mutability": "mutable", + "name": "createdConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19370, + "src": "253:34:40", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19321, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "253:10:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19330, + "nodeType": "Block", + "src": "371:7:40", + "statements": [] + }, + "documentation": null, + "id": 19331, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19327, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19324, + "src": "360:9:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19328, + "modifierName": { + "argumentTypes": null, + "id": 19326, + "name": "ConverterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11667, + "src": "342:17:40", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterRegistry_$11667_$", + "typeString": "type(contract ConverterRegistry)" + } + }, + "nodeType": "ModifierInvocation", + "src": "342:28:40" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19324, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19331, + "src": "306:27:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19323, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "306:17:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "305:29:40" + }, + "returnParameters": { + "id": 19329, + "nodeType": "ParameterList", + "parameters": [], + "src": "371:0:40" + }, + "scope": 19370, + "src": "294:84:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 10454 + ], + "body": { + "id": 19368, + "nodeType": "Block", + "src": "680:186:40", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19353, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19322, + "src": "690:16:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19356, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19333, + "src": "728:5:40", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19357, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19335, + "src": "735:5:40", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19358, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19337, + "src": "742:7:40", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19359, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19339, + "src": "751:9:40", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 19360, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19341, + "src": "762:17:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 19361, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19344, + "src": "781:14:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 19362, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19347, + "src": "809:15:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 19354, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "709:5:40", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterRegistry_$19370", + "typeString": "contract super TestConverterRegistry" + } + }, + "id": 19355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "newConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 10454, + "src": "709:18:40", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$_t_uint32_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,string memory,string memory,uint8,uint32,contract IERC20Token[] memory,uint32[] memory) returns (contract IConverter)" + } + }, + "id": 19363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:116:40", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "690:135:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 19365, + "nodeType": "ExpressionStatement", + "src": "690:135:40" + }, + { + "expression": { + "argumentTypes": null, + "id": 19366, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19322, + "src": "843:16:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 19352, + "id": 19367, + "nodeType": "Return", + "src": "836:23:40" + } + ] + }, + "documentation": null, + "functionSelector": "5a0a6618", + "id": 19369, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19349, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "650:8:40" + }, + "parameters": { + "id": 19348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19333, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "415:12:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19332, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "415:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19335, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "437:19:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19334, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "437:6:40", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19337, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "466:21:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19336, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "466:6:40", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19339, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "497:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19338, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "497:5:40", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19341, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "522:24:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19340, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "522:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19344, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "556:35:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 19342, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "556:11:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19343, + "length": null, + "nodeType": "ArrayTypeName", + "src": "556:13:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19347, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "601:31:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 19345, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "601:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19346, + "length": null, + "nodeType": "ArrayTypeName", + "src": "601:8:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "405:233:40" + }, + "returnParameters": { + "id": 19352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19351, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "668:10:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19350, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "668:10:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "667:12:40" + }, + "scope": 19370, + "src": "384:482:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19371, + "src": "195:673:40" + } + ], + "src": "51:818:40" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestConverterRegistry.sol", + "exportedSymbols": { + "TestConverterRegistry": [ + 19370 + ] + }, + "id": 19371, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19317, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:40" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterRegistry.sol", + "file": "../converter/ConverterRegistry.sol", + "id": 19318, + "nodeType": "ImportDirective", + "scope": 19371, + "sourceUnit": 11668, + "src": "75:44:40", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19319, + "name": "ConverterRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 11667, + "src": "229:17:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ConverterRegistry_$11667", + "typeString": "contract ConverterRegistry" + } + }, + "id": 19320, + "nodeType": "InheritanceSpecifier", + "src": "229:17:40" + } + ], + "contractDependencies": [ + 11667, + 13501, + 21719, + 21818, + 22526, + 22661, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19370, + "linearizedBaseContracts": [ + 19370, + 11667, + 22526, + 21719, + 22661, + 21818, + 22847, + 13501 + ], + "name": "TestConverterRegistry", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "1814f2d2", + "id": 19322, + "mutability": "mutable", + "name": "createdConverter", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19370, + "src": "253:34:40", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19321, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "253:10:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19330, + "nodeType": "Block", + "src": "371:7:40", + "statements": [] + }, + "documentation": null, + "id": 19331, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19327, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19324, + "src": "360:9:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + } + ], + "id": 19328, + "modifierName": { + "argumentTypes": null, + "id": 19326, + "name": "ConverterRegistry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11667, + "src": "342:17:40", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ConverterRegistry_$11667_$", + "typeString": "type(contract ConverterRegistry)" + } + }, + "nodeType": "ModifierInvocation", + "src": "342:28:40" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19325, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19324, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19331, + "src": "306:27:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19323, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22831, + "src": "306:17:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$22831", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "305:29:40" + }, + "returnParameters": { + "id": 19329, + "nodeType": "ParameterList", + "parameters": [], + "src": "371:0:40" + }, + "scope": 19370, + "src": "294:84:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 10454 + ], + "body": { + "id": 19368, + "nodeType": "Block", + "src": "680:186:40", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19353, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19322, + "src": "690:16:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19356, + "name": "_type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19333, + "src": "728:5:40", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + { + "argumentTypes": null, + "id": 19357, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19335, + "src": "735:5:40", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19358, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19337, + "src": "742:7:40", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 19359, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19339, + "src": "751:9:40", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 19360, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19341, + "src": "762:17:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + { + "argumentTypes": null, + "id": 19361, + "name": "_reserveTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19344, + "src": "781:14:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + } + }, + { + "argumentTypes": null, + "id": 19362, + "name": "_reserveWeights", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19347, + "src": "809:15:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[] memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 19354, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "709:5:40", + "typeDescriptions": { + "typeIdentifier": "t_super$_TestConverterRegistry_$19370", + "typeString": "contract super TestConverterRegistry" + } + }, + "id": 19355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "newConverter", + "nodeType": "MemberAccess", + "referencedDeclaration": 10454, + "src": "709:18:40", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint16_$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$_t_uint32_$_t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr_$_t_array$_t_uint32_$dyn_memory_ptr_$returns$_t_contract$_IConverter_$13340_$", + "typeString": "function (uint16,string memory,string memory,uint8,uint32,contract IERC20Token[] memory,uint32[] memory) returns (contract IConverter)" + } + }, + "id": 19363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:116:40", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "src": "690:135:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "id": 19365, + "nodeType": "ExpressionStatement", + "src": "690:135:40" + }, + { + "expression": { + "argumentTypes": null, + "id": 19366, + "name": "createdConverter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19322, + "src": "843:16:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "functionReturnParameters": 19352, + "id": 19367, + "nodeType": "Return", + "src": "836:23:40" + } + ] + }, + "documentation": null, + "functionSelector": "5a0a6618", + "id": 19369, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "newConverter", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19349, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "650:8:40" + }, + "parameters": { + "id": 19348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19333, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "415:12:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 19332, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "415:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19335, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "437:19:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19334, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "437:6:40", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19337, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "466:21:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19336, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "466:6:40", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19339, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "497:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19338, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "497:5:40", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19341, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "522:24:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19340, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "522:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19344, + "mutability": "mutable", + "name": "_reserveTokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "556:35:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_memory_ptr", + "typeString": "contract IERC20Token[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 19342, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "556:11:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "id": 19343, + "length": null, + "nodeType": "ArrayTypeName", + "src": "556:13:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20Token_$21127_$dyn_storage_ptr", + "typeString": "contract IERC20Token[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19347, + "mutability": "mutable", + "name": "_reserveWeights", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "601:31:40", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr", + "typeString": "uint32[]" + }, + "typeName": { + "baseType": { + "id": 19345, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "601:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19346, + "length": null, + "nodeType": "ArrayTypeName", + "src": "601:8:40", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr", + "typeString": "uint32[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "405:233:40" + }, + "returnParameters": { + "id": 19352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19351, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19369, + "src": "668:10:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + }, + "typeName": { + "contractScope": null, + "id": 19350, + "name": "IConverter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13340, + "src": "668:10:40", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverter_$13340", + "typeString": "contract IConverter" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "667:12:40" + }, + "scope": 19370, + "src": "384:482:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19371, + "src": "195:673:40" + } + ], + "src": "51:818:40" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.806Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "addConverter(address)": { + "details": "adds an existing converter to the registry can only be called by the owner", + "params": { + "_converter": "converter" + } + }, + "getAnchor(uint256)": { + "details": "returns the converter anchor at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "anchor at the given index" + } + }, + "getAnchorCount()": { + "details": "returns the number of converter anchors in the registry", + "returns": { + "_0": "number of anchors" + } + }, + "getAnchors()": { + "details": "returns the list of converter anchors in the registry", + "returns": { + "_0": "list of anchors" + } + }, + "getConvertersByAnchors(address[])": { + "details": "returns a list of converters for a given list of anchors this is a utility function that can be used to reduce the number of calls to the contract", + "params": { + "_anchors": "list of converter anchors" + }, + "returns": { + "_0": "list of converters" + } + }, + "getConvertersBySmartTokens(address[])": { + "details": "deprecated, backward compatibility, use `getConvertersByAnchors`" + }, + "getConvertibleToken(uint256)": { + "details": "returns the convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "convertible token at the given index" + } + }, + "getConvertibleTokenAnchor(address,uint256)": { + "details": "returns the converter anchor associated with a given convertible token at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "anchor associated with the given convertible token at the given index" + } + }, + "getConvertibleTokenAnchorCount(address)": { + "details": "returns the number of converter anchors associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "number of anchors associated with the given convertible token" + } + }, + "getConvertibleTokenAnchors(address)": { + "details": "returns the list of aoncerter anchors associated with a given convertible token", + "params": { + "_convertibleToken": "convertible token" + }, + "returns": { + "_0": "list of anchors associated with the given convertible token" + } + }, + "getConvertibleTokenCount()": { + "details": "returns the number of convertible tokens in the registry", + "returns": { + "_0": "number of convertible tokens" + } + }, + "getConvertibleTokenSmartToken(address,uint256)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchor`" + }, + "getConvertibleTokenSmartTokenCount(address)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchorCount`" + }, + "getConvertibleTokenSmartTokens(address)": { + "details": "deprecated, backward compatibility, use `getConvertibleTokenAnchors`" + }, + "getConvertibleTokens()": { + "details": "returns the list of convertible tokens in the registry", + "returns": { + "_0": "list of convertible tokens" + } + }, + "getLiquidityPool(uint256)": { + "details": "returns the liquidity pool at a given index", + "params": { + "_index": "index" + }, + "returns": { + "_0": "liquidity pool at the given index" + } + }, + "getLiquidityPoolByConfig(uint16,address[],uint32[])": { + "details": "searches for a liquidity pool with specific configuration", + "params": { + "_reserveTokens": "reserve tokens", + "_reserveWeights": "reserve weights", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "the liquidity pool, or zero if no such liquidity pool exists" + } + }, + "getLiquidityPoolByReserveConfig(address[],uint32[])": { + "details": "deprecated, backward compatibility, use `getLiquidityPoolByConfig`" + }, + "getLiquidityPoolCount()": { + "details": "returns the number of liquidity pools in the registry", + "returns": { + "_0": "number of liquidity pools" + } + }, + "getLiquidityPools()": { + "details": "returns the list of liquidity pools in the registry", + "returns": { + "_0": "list of liquidity pools" + } + }, + "getSmartToken(uint256)": { + "details": "deprecated, backward compatibility, use `getAnchor`" + }, + "getSmartTokenCount()": { + "details": "deprecated, backward compatibility, use `getAnchorCount`" + }, + "getSmartTokens()": { + "details": "deprecated, backward compatibility, use `getAnchors`" + }, + "isAnchor(address)": { + "details": "checks whether or not a given value is a converter anchor", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is an anchor, false if not" + } + }, + "isConverterValid(address)": { + "details": "checks whether or not a given converter is valid", + "params": { + "_converter": "converter" + }, + "returns": { + "_0": "true if the given converter is valid, false if not" + } + }, + "isConvertibleToken(address)": { + "details": "checks whether or not a given value is a convertible token", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a convertible token, false if not" + } + }, + "isConvertibleTokenAnchor(address,address)": { + "details": "checks whether or not a given value is a converter anchor of a given convertible token", + "params": { + "_convertibleToken": "convertible token", + "_value": "value" + }, + "returns": { + "_0": "true if the given value is an anchor of the given convertible token, false if not" + } + }, + "isConvertibleTokenSmartToken(address,address)": { + "details": "deprecated, backward compatibility, use `isConvertibleTokenAnchor`" + }, + "isLiquidityPool(address)": { + "details": "checks whether or not a given value is a liquidity pool", + "params": { + "_value": "value" + }, + "returns": { + "_0": "true if the given value is a liquidity pool, false if not" + } + }, + "isSimilarLiquidityPoolRegistered(address)": { + "details": "checks if a liquidity pool with given configuration is already registered", + "params": { + "_converter": "converter with specific configuration" + }, + "returns": { + "_0": "if a liquidity pool with the same configuration is already registered" + } + }, + "isSmartToken(address)": { + "details": "deprecated, backward compatibility, use `isAnchor`" + }, + "newConverter(uint16,string,string,uint8,uint32,address[],uint32[])": { + "details": "creates a zero supply liquid token / empty liquidity pool and adds its converter to the registry", + "params": { + "_decimals": "token / pool decimals", + "_maxConversionFee": "maximum conversion-fee", + "_name": "token / pool name", + "_reserveTokens": "reserve tokens", + "_reserveWeights": "reserve weights", + "_symbol": "token / pool symbol", + "_type": "converter type, see ConverterBase contract main doc" + }, + "returns": { + "_0": "new converter" + } + }, + "removeConverter(address)": { + "details": "removes a converter from the registry anyone can remove an existing converter from the registry, as long as the converter is invalid note that the owner can also remove valid converters", + "params": { + "_converter": "converter" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV1Converter.json b/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV1Converter.json new file mode 100644 index 00000000..cc20fe69 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV1Converter.json @@ -0,0 +1,3038 @@ +{ + "contractName": "TestLiquidityPoolV1Converter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_connectorBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_connectorWeight", + "type": "uint32" + } + ], + "name": "PriceDataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_reserveAmounts", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "_reserveTokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserveAmount", + "type": "uint256" + } + ], + "name": "addLiquidityCost", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_reserveAmount", + "type": "uint256" + } + ], + "name": "addLiquidityReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "currentTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + } + ], + "name": "decimalLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "fund", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "geometricMean", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isStandardPool", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "liquidate", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevAverageRate", + "outputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevAverageRateUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + } + ], + "name": "recentAverageRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_reserveMinReturnAmounts", + "type": "uint256[]" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20Token[]", + "name": "_reserveTokens", + "type": "address[]" + } + ], + "name": "removeLiquidityReturn", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_d", + "type": "uint256" + } + ], + "name": "roundDiv", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "contract IEtherToken", + "name": "_etherToken", + "type": "address" + } + ], + "name": "setEtherToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_currentTime", + "type": "uint256" + } + ], + "name": "setTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_connectorBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_connectorWeight\",\"type\":\"uint32\"}],\"name\":\"PriceDataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_reserveAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_reserveTokenIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserveAmount\",\"type\":\"uint256\"}],\"name\":\"addLiquidityCost\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_reserveAmount\",\"type\":\"uint256\"}],\"name\":\"addLiquidityReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"}],\"name\":\"decimalLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"fund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"geometricMean\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isStandardPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"liquidate\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevAverageRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"d\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevAverageRateUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"recentAverageRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_reserveMinReturnAmounts\",\"type\":\"uint256[]\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20Token[]\",\"name\":\"_reserveTokens\",\"type\":\"address[]\"}],\"name\":\"removeLiquidityReturn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_d\",\"type\":\"uint256\"}],\"name\":\"roundDiv\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IEtherToken\",\"name\":\"_etherToken\",\"type\":\"address\"}],\"name\":\"setEtherToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_currentTime\",\"type\":\"uint256\"}],\"name\":\"setTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"addLiquidity(address[],uint256[],uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller note that prior to version 28, you should use 'fund' instead\",\"params\":{\"_minReturn\":\"token minimum return-amount\",\"_reserveAmounts\":\"amount of each reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"amount of pool tokens issued\"}},\"addLiquidityCost(address[],uint256,uint256)\":{\"details\":\"given the amount of one of the reserve tokens to add liquidity of, returns the required amount of each one of the other reserve tokens since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)\",\"params\":{\"_reserveAmount\":\"amount of the relevant reserve token\",\"_reserveTokenIndex\":\"index of the relevant reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the required amount of each one of the reserve tokens\"}},\"addLiquidityReturn(address,uint256)\":{\"details\":\"given the amount of one of the reserve tokens to add liquidity of, returns the amount of pool tokens entitled for it since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)\",\"params\":{\"_reserveAmount\":\"amount of the reserve token\",\"_reserveToken\":\"address of the reserve token\"},\"returns\":{\"_0\":\"the amount of pool tokens entitled\"}},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"converterType()\":{\"details\":\"returns the converter type\",\"returns\":{\"_0\":\"see the converter types in the the main contract doc\"}},\"decimalLength(uint256)\":{\"details\":\"returns the number of decimal digits in a given value\",\"params\":{\"_x\":\"value (assumed positive)\"},\"returns\":{\"_0\":\"the number of decimal digits in the given value\"}},\"fund(uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller for example, if the caller increases the supply by 10%, then it will cost an amount equal to 10% of each reserve token balance note that starting from version 28, you should use 'addLiquidity' instead\",\"params\":{\"_amount\":\"amount to increase the supply by (in the pool token)\"},\"returns\":{\"_0\":\"amount of pool tokens issued\"}},\"geometricMean(uint256[])\":{\"details\":\"returns the average number of decimal digits in a given list of values\",\"params\":{\"_values\":\"list of values (each of which assumed positive)\"},\"returns\":{\"_0\":\"the average number of decimal digits in the given list of values\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"liquidate(uint256)\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool for example, if the holder sells 10% of the supply, then they will receive 10% of each reserve token balance in return note that starting from version 28, you should use 'removeLiquidity' instead\",\"params\":{\"_amount\":\"amount to liquidate (in the pool token)\"},\"returns\":{\"_0\":\"the amount of each reserve token granted for the given amount of pool tokens\"}},\"recentAverageRate(address)\":{\"details\":\"returns the recent average rate of 1 `_token` in the other reserve token units note that the rate can only be queried for reserves in a standard pool\",\"params\":{\"_token\":\"token to get the rate for\"},\"returns\":{\"_0\":\"recent average rate between the reserves (numerator)\",\"_1\":\"recent average rate between the reserves (denominator)\"}},\"removeLiquidity(uint256,address[],uint256[])\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool note that prior to version 28, you should use 'liquidate' instead\",\"params\":{\"_amount\":\"token amount\",\"_reserveMinReturnAmounts\":\"minimum return-amount of each reserve token\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the amount of each reserve token granted for the given amount of pool tokens\"}},\"removeLiquidityReturn(uint256,address[])\":{\"details\":\"returns the amount of each reserve token entitled for a given amount of pool tokens\",\"params\":{\"_amount\":\"amount of pool tokens\",\"_reserveTokens\":\"address of each reserve token\"},\"returns\":{\"_0\":\"the amount of each reserve token entitled for the given amount of pool tokens\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"roundDiv(uint256,uint256)\":{\"details\":\"returns the nearest integer to a given quotient\",\"params\":{\"_d\":\"quotient denominator\",\"_n\":\"quotient numerator\"},\"returns\":{\"_0\":\"the nearest integer to the given quotient\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"targetAmountAndFee(address,address,uint256)\":{\"details\":\"returns the expected target amount of converting one reserve to another along with the fee\",\"params\":{\"_amount\":\"amount of tokens received from the user\",\"_sourceToken\":\"contract address of the source reserve token\",\"_targetToken\":\"contract address of the target reserve token\"},\"returns\":{\"_0\":\"expected target amount\",\"_1\":\"expected fee\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV1Converter.sol\":\"TestLiquidityPoolV1Converter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol\":{\"keccak256\":\"0xa85da56481d8c3e936853f4292f67bb41a534163c11fdb380507fa99b8453648\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://20ab9df64f764e0b050525e489165119026ff12af769bf417ed682b5f3ee70d3\",\"dweb:/ipfs/QmVupKPZQwoTd5ifKDx71iyFVZ7hQvMeimMz7VE4TBn53v\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV1Converter.sol\":{\"keccak256\":\"0xd12303567a04356c1733b883e6d9322e2d584285731d4a397da1c0df19af48b2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e4d5c7f62b49ba0323616dad891d919f5b30ba7b9cf1c427b61563f4dac4203a\",\"dweb:/ipfs/Qme7748qCaccxdjt2T4XrFuSxjBEHD55aVtC1FwFaJavj5\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b191690557fc0829421c1d260bd3cb3e0f06cfe2d52db2ce3150000000000000000000000006008556009805460ff191690553480156200004c57600080fd5b50604051620057b5380380620057b5833981810160405260608110156200007257600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828282828180620000ab8162000148565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000e28162000148565b81620000ee81620001a7565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b199092169190911790555062000206975050505050505050565b6001600160a01b038116620001a4576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff82161115620001a4576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b61559f80620002166000396000f3fe6080604052600436106103b15760003560e01c806371f52bf3116101e7578063ca1d209d1161010d578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611114578063ecbca55d1461115a578063f2fde38b1461118a578063fc0c546a146111bd57610442565b8063d66bd52414611066578063d895951214611099578063dc8de379146110cc578063e2c52468146110ff57610442565b8063d260529c116100dc578063d260529c14611012578063d3fb73b414611027578063d4ee1d901461103c578063d55ec6971461105157610442565b8063ca1d209d14610fa1578063cdc91c6914610fbe578063d031370b14610fd3578063d18e81b314610ffd57610442565b80639b99a8e211610185578063b4a176d311610154578063b4a176d314610f32578063bbb7e5d814610f47578063bf75455814610f77578063c45d3d9214610f8c57610442565b80639b99a8e214610cf5578063a60e772414610d0a578063af94b8d814610db8578063b127c0a514610dfb57610442565b80637d8916bd116101c15780637d8916bd14610af357806380d9416d14610c185780638da5cb5b14610ccb57806394c275ad14610ce057610442565b806371f52bf314610ab457806379ba509714610ac95780637b10399914610ade57610442565b8063395900d4116102d7578063579cd3ca1161026a578063690d832011610239578063690d8320146109e55780636a49d2c414610a185780636aa5332c14610a575780636ad419a814610a8157610442565b8063579cd3ca146109455780635e35359e1461095a57806361cd756e1461099d57806367b6d57c146109b257610442565b806349d10b64116102a657806349d10b64146108af5780634af80f0e146108c45780634e40c260146108f757806354fd4d501461093057610442565b8063395900d4146107ec5780633beb26c41461082f5780633e8ff43f14610859578063415f12401461088557610442565b80631d4db7911161034f57806322f3e2d41161031e57806322f3e2d4146107985780632fe8a6ad146107ad57806338a5e016146107c257806338e9f27a146107d757610442565b80631d4db791146106af5780631e1401f8146106d65780631f0181bc1461073257806321e6b53d1461076557610442565b806312c2aca41161038b57806312c2aca414610508578063154588371461053157806319b64015146106365780631cfab2901461067c57610442565b8063024c7ec7146104475780630c7d5cd8146104735780630e53aae9146104a157610442565b366104425760008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610440576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561045357600080fd5b506104406004803603602081101561046a57600080fd5b503515156111d2565b34801561047f57600080fd5b506104886111f8565b6040805163ffffffff9092168252519081900360200190f35b3480156104ad57600080fd5b506104d4600480360360208110156104c457600080fd5b50356001600160a01b0316611204565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b34801561051457600080fd5b5061051d61129b565b604080519115158252519081900360200190f35b34801561053d57600080fd5b506105e66004803603604081101561055457600080fd5b81359190810190604081016020820135600160201b81111561057557600080fd5b82018360208201111561058757600080fd5b803590602001918460208302840111600160201b831117156105a857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506112e2945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561062257818101518382015260200161060a565b505050509050019250505060405180910390f35b34801561064257600080fd5b506106606004803603602081101561065957600080fd5b5035611389565b604080516001600160a01b039092168252519081900360200190f35b34801561068857600080fd5b506104886004803603602081101561069f57600080fd5b50356001600160a01b03166113b3565b3480156106bb57600080fd5b506106c46113e5565b60408051918252519081900360200190f35b3480156106e257600080fd5b50610719600480360360608110156106f957600080fd5b506001600160a01b038135811691602081013590911690604001356113eb565b6040805192835260208301919091528051918290030190f35b34801561073e57600080fd5b506107196004803603602081101561075557600080fd5b50356001600160a01b0316611406565b34801561077157600080fd5b506104406004803603602081101561078857600080fd5b50356001600160a01b03166114bd565b3480156107a457600080fd5b5061051d6114d1565b3480156107b957600080fd5b5061051d611550565b3480156107ce57600080fd5b50610440611560565b3480156107e357600080fd5b5061051d611572565b3480156107f857600080fd5b506104406004803603606081101561080f57600080fd5b506001600160a01b0381358116916020810135909116906040013561157b565b34801561083b57600080fd5b506104406004803603602081101561085257600080fd5b5035611601565b34801561086557600080fd5b5061086e611606565b6040805161ffff9092168252519081900360200190f35b34801561089157600080fd5b506105e6600480360360208110156108a857600080fd5b503561160b565b3480156108bb57600080fd5b50610440611849565b3480156108d057600080fd5b50610440600480360360208110156108e757600080fd5b50356001600160a01b0316611a51565b34801561090357600080fd5b506106c46004803603604081101561091a57600080fd5b506001600160a01b038135169060200135611a86565b34801561093c57600080fd5b5061086e611bc2565b34801561095157600080fd5b50610488611bc7565b34801561096657600080fd5b506104406004803603606081101561097d57600080fd5b506001600160a01b03813581169160208101359091169060400135611bda565b3480156109a957600080fd5b50610660611d0b565b3480156109be57600080fd5b50610440600480360360208110156109d557600080fd5b50356001600160a01b0316611d1a565b3480156109f157600080fd5b5061044060048036036020811015610a0857600080fd5b50356001600160a01b0316611dc6565b348015610a2457600080fd5b5061044060048036036040811015610a3b57600080fd5b5080356001600160a01b0316906020013563ffffffff16611eed565b348015610a6357600080fd5b506106c460048036036020811015610a7a57600080fd5b5035611fb6565b348015610a8d57600080fd5b5061044060048036036020811015610aa457600080fd5b50356001600160a01b0316611fd8565b348015610ac057600080fd5b5061086e612005565b348015610ad557600080fd5b50610440612014565b348015610aea57600080fd5b506106606120cb565b6106c460048036036060811015610b0957600080fd5b810190602081018135600160201b811115610b2357600080fd5b820183602082011115610b3557600080fd5b803590602001918460208302840111600160201b83111715610b5657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ba557600080fd5b820183602082011115610bb757600080fd5b803590602001918460208302840111600160201b83111715610bd857600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506120da915050565b348015610c2457600080fd5b506105e660048036036060811015610c3b57600080fd5b810190602081018135600160201b811115610c5557600080fd5b820183602082011115610c6757600080fd5b803590602001918460208302840111600160201b83111715610c8857600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356123a4565b348015610cd757600080fd5b50610660612653565b348015610cec57600080fd5b50610488612662565b348015610d0157600080fd5b5061086e612675565b348015610d1657600080fd5b506106c460048036036020811015610d2d57600080fd5b810190602081018135600160201b811115610d4757600080fd5b820183602082011115610d5957600080fd5b803590602001918460208302840111600160201b83111715610d7a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061267b945050505050565b348015610dc457600080fd5b5061071960048036036060811015610ddb57600080fd5b506001600160a01b038135811691602081013590911690604001356126cd565b348015610e0757600080fd5b506105e660048036036060811015610e1e57600080fd5b81359190810190604081016020820135600160201b811115610e3f57600080fd5b820183602082011115610e5157600080fd5b803590602001918460208302840111600160201b83111715610e7257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ec157600080fd5b820183602082011115610ed357600080fd5b803590602001918460208302840111600160201b83111715610ef457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612870945050505050565b348015610f3e57600080fd5b506104406129ac565b348015610f5357600080fd5b506106c460048036036040811015610f6a57600080fd5b50803590602001356129d8565b348015610f8357600080fd5b5061051d6129f0565b348015610f9857600080fd5b506106606129f5565b6106c460048036036020811015610fb757600080fd5b5035612a04565b348015610fca57600080fd5b50610440612e7f565b348015610fdf57600080fd5b5061066060048036036020811015610ff657600080fd5b5035612ed8565b34801561100957600080fd5b506106c4612eff565b34801561101e57600080fd5b5061051d611606565b34801561103357600080fd5b50610660612f05565b34801561104857600080fd5b50610660612f14565b34801561105d57600080fd5b50610440612f23565b34801561107257600080fd5b506104d46004803603602081101561108957600080fd5b50356001600160a01b031661300b565b3480156110a557600080fd5b506106c4600480360360208110156110bc57600080fd5b50356001600160a01b031661304d565b3480156110d857600080fd5b506106c4600480360360208110156110ef57600080fd5b50356001600160a01b0316613054565b34801561110b57600080fd5b5061071961307d565b6106c4600480360360a081101561112a57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516613086565b34801561116657600080fd5b506104406004803603602081101561117d57600080fd5b503563ffffffff16613296565b34801561119657600080fd5b50610440600480360360208110156111ad57600080fd5b50356001600160a01b031661337d565b3480156111c957600080fd5b506106606133fb565b6111da61340a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b60008060008060006112146154e1565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561132757600080fd5b505afa15801561133b573d6000803e3d6000fd5b505050506040513d602081101561135157600080fd5b5051905060006113706c42616e636f72466f726d756c6160981b61345d565b905061137e858584846134db565b925050505b92915050565b60006006828154811061139857fe5b6000918252602090912001546001600160a01b031692915050565b6000816113bf81613620565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b6000806113f98585856126cd565b915091505b935093915050565b600954600090819060ff1661145a576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b61146261550f565b61146a61368d565b9050600660008154811061147a57fe5b6000918252602090912001546001600160a01b03858116911614156114ab57805160209091015190925090506114b8565b6020810151905190925090505b915091565b6114c561340a565b6114ce81611d1a565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561151557600080fd5b505afa158015611529573d6000803e3d6000fd5b505050506040513d602081101561153f57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b61156861340a565b611570612e7f565b565b60095460ff1681565b61158361340a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b1580156115e457600080fd5b505af11580156115f8573d6000803e3d6000fd5b50505050505050565b600d55565b600190565b6060611615613828565b6003805460ff60a81b1916600160a81b1790558161166c576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b15801561173e57600080fd5b505af1158015611752573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff8111801561177357600080fd5b5060405190808252806020026020018201604052801561179d578160200160208202803683370190505b50905060005b81518110156117cd5760018282815181106117ba57fe5b60209081029190910101526001016117a3565b50611834600680548060200260200160405190810160405280929190818152602001828054801561182757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611809575b5050505050828487613878565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b031633148061186c5750600354600160a01b900460ff16155b6118b1576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118cf6f436f6e7472616374526567697374727960801b61345d565b6002549091506001600160a01b038083169116148015906118f857506001600160a01b03811615155b611940576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119a257600080fd5b505afa1580156119b6573d6000803e3d6000fd5b505050506040513d60208110156119cc57600080fd5b50516001600160a01b03161415611a21576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611a5961340a565b80611a6381613a83565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611aca57600080fd5b505afa158015611ade573d6000803e3d6000fd5b505050506040513d6020811015611af457600080fd5b505190506000611b136c42616e636f72466f726d756c6160981b61345d565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611b8d57600080fd5b505afa158015611ba1573d6000803e3d6000fd5b505050506040513d6020811015611bb757600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611be2613828565b6003805460ff60a81b1916600160a81b179055611bfd61340a565b6000611c22762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611c5c5750611c5a6114d1565b155b80611c7457506000546001600160a01b038281169116145b611cb9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611cc4848484613ad7565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611cf857611cf884613b08565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611d2261340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611d4681613be1565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611daa57600080fd5b505af1158015611dbe573d6000803e3d6000fd5b505050505050565b611dce613828565b6003805460ff60a81b1916600160a81b179055611de961340a565b60008051602061552a833981519152611e0181613620565b6000611e26762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b9050611e306114d1565b1580611e4957506000546001600160a01b038281169116145b611e8e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611ec3573d6000803e3d6000fd5b50611edb60008051602061552a833981519152613b08565b50506003805460ff60a81b1916905550565b611ef561340a565b611eff8282613c43565b6006546002148015611f535750600760006006600081548110611f1e57fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611fa15750600760006006600181548110611f6c57fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611fd15760019190910190600a9004611fbb565b5092915050565b600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055565b600061200f612675565b905090565b6001546001600160a01b03163314612067576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b60006120e4613828565b6003805460ff60a81b1916600160a81b1790556120ff613e65565b61210a848484613ead565b60005b84518110156121ba5760008051602061552a8339815191526001600160a01b031685828151811061213a57fe5b60200260200101516001600160a01b031614156121b2573484828151811061215e57fe5b6020026020010151146121b2576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b60010161210d565b50341561224a5760008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661224a576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561229a57600080fd5b505afa1580156122ae573d6000803e3d6000fd5b505050506040513d60208110156122c457600080fd5b5051905060006122d5868684614142565b905083811015612321576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b15801561237557600080fd5b505af1158015612389573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156123bf57600080fd5b506040519080825280602002602001820160405280156123e9578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d602081101561246657600080fd5b5051905060006124856c42616e636f72466f726d756c6160981b61345d565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106124a957fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561252357600080fd5b505afa158015612537573d6000803e3d6000fd5b505050506040513d602081101561254d57600080fd5b5051905060005b845181101561264457826001600160a01b031663ebbb215885600760008d868151811061257d57fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b1580156125f757600080fd5b505afa15801561260b573d6000803e3d6000fd5b505050506040513d602081101561262157600080fd5b5051855186908390811061263157fe5b6020908102919091010152600101612554565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156126b4576126a885828151811061269b57fe5b6020026020010151611fb6565b90920191600101612684565b5060016126c183836129d8565b03600a0a949350505050565b6000806126d8613e65565b846126e281613620565b846126ec81613620565b856001600160a01b0316876001600160a01b0316141561274c576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006127676c42616e636f72466f726d756c6160981b61345d565b6001600160a01b03166394491fab61277e8a613054565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166127a98b613054565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561282457600080fd5b505afa158015612838573d6000803e3d6000fd5b505050506040513d602081101561284e57600080fd5b50519050600061285d8261416d565b9182900399919850909650505050505050565b606061287a613828565b6003805460ff60a81b1916600160a81b179055612895613e65565b6128a0838386613ead565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128f057600080fd5b505afa158015612904573d6000803e3d6000fd5b505050506040513d602081101561291a57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b15801561297257600080fd5b505af1158015612986573d6000803e3d6000fd5b5050505061299684848388613878565b6003805460ff60a81b1916905595945050505050565b6129b461340a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600081600281048401816129e857fe5b049392505050565b600181565b6005546001600160a01b031681565b6000612a0e613828565b6003805460ff60a81b1916600160a81b179055612a2961419e565b60008051602061552a833981519152600052600760205260008051602061554a83398151915254612a5a90346141de565b60008051602061552a83398151915260009081526007602090815260008051602061554a8339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612ac957600080fd5b505afa158015612add573d6000803e3d6000fd5b505050506040513d6020811015612af357600080fd5b505190506000612b126c42616e636f72466f726d756c6160981b61345d565b60065490915060005b81811015612dfc57600060068281548110612b3257fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612bb457600080fd5b505afa158015612bc8573d6000803e3d6000fd5b505050506040513d6020811015612bde57600080fd5b505190506001600160a01b03831660008051602061552a8339815191521415612d295780341115612c3e5760405133903483900380156108fc02916000818181858888f19350505050158015612c38573d6000803e3d6000fd5b50612d24565b80341015612d24573415612c91576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612cb090600160601b90046001600160a01b031633308461422b565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612d0b57600080fd5b505af1158015612d1f573d6000803e3d6000fd5b505050505b612d35565b612d358333308461422b565b6000612d418383614396565b6001600160a01b0385166000908152600760205260408120829055909150612d69898c614396565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612deb9082908790859063ffffffff166143df565b505060019093019250612b1b915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612e5157600080fd5b505af1158015612e65573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612e8761340a565b612e8f61444e565b6004546001906001600160a01b0316612ea6611606565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612ee557fe5b6000918252602090912001546001600160a01b0316905081565b600d5481565b6004546001600160a01b031681565b6001546001600160a01b031681565b612f2b61340a565b6000612f50762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b6004549091506000906001600160a01b0316612f6a611606565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612fa38161337d565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612feb57600080fd5b505af1158015612fff573d6000803e3d6000fd5b505050506114ce612014565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b6000611383825b60008161306081613620565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000613090613828565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b6130bd81613be1565b856001600160a01b0316876001600160a01b0316141561311d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061322a575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561317d57600080fd5b505afa158015613191573d6000803e3d6000fd5b505050506040513d60208110156131a757600080fd5b5051801561322a575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156131fd57600080fd5b505afa158015613211573d6000803e3d6000fd5b505050506040513d602081101561322757600080fd5b50515b613271576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b61327e87878787876144b2565b6003805460ff60a81b19169055979650505050505050565b61329e61340a565b60085463ffffffff600160201b90910481169082161115613306576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61338561340a565b6000546001600160a01b03828116911614156133d9576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314611570576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156134a957600080fd5b505afa1580156134bd573d6000803e3d6000fd5b505050506040513d60208110156134d357600080fd5b505192915050565b606080845167ffffffffffffffff811180156134f657600080fd5b50604051908082528060200260200182016040528015613520578160200160208202803683370190505b50905060005b815181101561361657836001600160a01b0316638074590a86600760008a868151811061354f57fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156135c957600080fd5b505afa1580156135dd573d6000803e3d6000fd5b505050506040513d60208110156135f357600080fd5b5051825183908390811061360357fe5b6020908102919091010152600101613526565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff166114ce576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b61369561550f565b6000600c546136a2614775565b039050806136c857505060408051808201909152600a548152600b5460208201526112df565b60006007600060066001815481106136dc57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061371657fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054905061025883106137615760408051808201909152918252602082015291506112df9050565b61376961550f565b5060408051808201909152600a548152600b5460208201819052600090613790908561478f565b82519091506000906137a2908561478f565b905060006137c86137b3848961478f565b6137c2846102588b900361478f565b90614396565b905060006137ef6102586137e988886020015161478f90919063ffffffff16565b9061478f565b905061380982826c0c9f2c9cd04674edea400000006147ed565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff1615611570576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b606061388261419e565b600061389d6c42616e636f72466f726d756c6160981b61345d565b905060006138ab85856141de565b905060606138bb858988866134db565b905060005b8851811015613a775760008982815181106138d757fe5b6020026020010151905060008383815181106138ef57fe5b6020026020010151905089838151811061390557fe5b602002602001015181101561395a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b03821660009081526007602052604081205461397d90836141de565b6001600160a01b038416600081815260076020526040902082905590915060008051602061552a83398151915214156139e357604051339083156108fc029084906000818181858888f193505050501580156139dd573d6000803e3d6000fd5b506139ee565b6139ee83338461481f565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b038316600090815260076020526040902060010154613a6c9087908590849063ffffffff166143df565b5050506001016138c0565b50979650505050505050565b6001600160a01b0381163014156114ce576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613adf61340a565b82613ae98161497f565b82613af38161497f565b83613afd81613a83565b611dbe86868661481f565b80613b1281613620565b6001600160a01b03821660008051602061552a8339815191521415613b51576001600160a01b0382166000908152600760205260409020479055613bdd565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613b9757600080fd5b505afa158015613bab573d6000803e3d6000fd5b505050506040513d6020811015613bc157600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613bea8161345d565b6001600160a01b0316336001600160a01b0316146114ce576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613c4b61340a565b613c536149d0565b81613c5d8161497f565b82613c6781613a83565b82613c7181614a17565b6004546001600160a01b03868116911614801590613cb257506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613cf9576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613d61576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613d6c612675565b61ffff1610613dbe576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613e6d6114d1565b611570576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613f00576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613f4a576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140fb5760076000878581518110613f6757fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613fe7576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b808210156140495785828151811061400057fe5b60200260200101516001600160a01b03166006848154811061401e57fe5b6000918252602090912001546001600160a01b0316141561403e57614049565b600190910190613fec565b808210614093576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60008584815181106140a157fe5b6020026020010151116140f0576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613f4f565b60008411611dbe576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161415a576141538484614a87565b905061264c565b614165848484614ba6565b949350505050565b60085460009061138390620f424090614198908590600160401b900463ffffffff9081169061478f16565b90614ed3565b60065460005b81811015613bdd576141d6600682815481106141bc57fe5b6000918252602090912001546001600160a01b0316613b08565b6001016141a4565b600081831015614225576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106142b05780518252601f199092019160209182019101614291565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614312576040519150601f19603f3d011682016040523d82523d6000602084013e614317565b606091505b5091509150818015614345575080511580614345575080806020019051602081101561434257600080fd5b50515b611dbe576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b60008282018381101561264c576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461441d85620f424061478f565b6144308863ffffffff8088169061478f16565b6040805192835260208301919091528051918290030190a350505050565b6001614458612675565b61ffff16116144aa576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b611570614f32565b60008060006144c28888886126cd565b915091508160001415614515576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61451e87613054565b821061452657fe5b6001600160a01b03881660008051602061552a833981519152141561459857853414614593576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61466f565b341580156146295750856146266145ae8a613054565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b1580156145f457600080fd5b505afa158015614608573d6000803e3d6000fd5b505050506040513d602081101561461e57600080fd5b5051906141de565b10155b61466f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b61467888613b08565b6001600160a01b03871660009081526007602052604090205461469b90836141de565b6001600160a01b03881660008181526007602052604090209190915560008051602061552a8339815191521415614708576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614702573d6000803e3d6000fd5b50614713565b61471387858461481f565b60095460ff16801561472d5750614728614775565b600c54105b156147525761473a61368d565b8051600a5560200151600b5561474e614775565b600c555b614760888887898686614ff9565b61476a8888615062565b509695505050505050565b6000600d5460001415614788574261200f565b50600d5490565b60008261479e57506000611383565b828202828482816147ab57fe5b041461264c576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080828511806147fd57508284115b156148165761480d858585615266565b915091506113fe565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061489c5780518252601f19909201916020918201910161487d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146148fe576040519150601f19603f3d011682016040523d82523d6000602084013e614903565b606091505b5091509150818015614931575080511580614931575080806020019051602081101561492e57600080fd5b50515b614978576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b0381166114ce576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6149d86114d1565b15611570576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff16118015614a365750620f424063ffffffff821611155b6114ce576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b600080614a938361267b565b905060005b8451811015614b9e576000858281518110614aaf57fe5b602002602001015190506000858381518110614ac757fe5b6020026020010151905060008051602061552a8339815191526001600160a01b0316826001600160a01b031614614b0457614b048233308461422b565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614b949085908490849063ffffffff166143df565b5050600101614a98565b509392505050565b6000614bb061419e565b60008051602061552a833981519152600052600760205260008051602061554a83398151915254614be190346141de565b60008051602061552a8339815191526000908152600760205260008051602061554a83398151915291909155614c266c42616e636f72466f726d756c6160981b61345d565b90506000614c36828588886152ab565b90506000614c448583614396565b905060005b8751811015614ec7576000888281518110614c6057fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614ce657600080fd5b505afa158015614cfa573d6000803e3d6000fd5b505050506040513d6020811015614d1057600080fd5b5051905080614d5f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614d6b57fe5b6020026020010151811115614d7c57fe5b6001600160a01b03831660008051602061552a83398151915214614dab57614da68333308461422b565b614e16565b808a8581518110614db857fe5b60200260200101511115614e1657336001600160a01b03166108fc828c8781518110614de057fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614e14573d6000803e3d6000fd5b505b6000614e228383614396565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614eb79087908690849063ffffffff166143df565b505060019092019150614c499050565b50909695505050505050565b6000808211614f1e576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614f2957fe5b04949350505050565b614f3a61340a565b6000614f44612675565b61ffff1611614f96576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614fd957600080fd5b505af1158015614fed573d6000803e3d6000fd5b5050505061157061419e565b600160ff1b811061500657fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b257600080fd5b505afa1580156150c6573d6000803e3d6000fd5b505050506040513d60208110156150dc57600080fd5b5051905060006150eb84613054565b905060006150f884613054565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161513f908590859061478f16565b905060006151568663ffffffff8086169061478f16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36151ad878a88876143df565b6151b9878987866143df565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561527d57505060028104806113fe565b838510156152905761480d858585615471565b60008061529e868887615471565b9890975095505050505050565b60008060015b84518110156153785761531b600760008784815181106152cd57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061530557fe5b602002602001015161478f90919063ffffffff16565b6153666007600088868151811061532e57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061530557fe5b1015615370578091505b6001016152b1565b50856001600160a01b0316632f55bdb5866007600088868151811061539957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff168786815181106153e457fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561543b57600080fd5b505afa15801561544f573d6000803e3d6000fd5b505050506040513d602081101561546557600080fd5b50519695505050505050565b6000806000836000198161548157fe5b049050808611156154ba57600081600101878161549a57fe5b0460010190508087816154a957fe5b0496508086816154b557fe5b049550505b60006154d18786026154cc8989614396565b6129d8565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea264697066735822122089c0c3358ca8c545b32bb44e5b659e8ecd8dc9cf301a41360cca2d8fe72d849b64736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106103b15760003560e01c806371f52bf3116101e7578063ca1d209d1161010d578063d66bd524116100a0578063e8dc12ff1161006f578063e8dc12ff14611114578063ecbca55d1461115a578063f2fde38b1461118a578063fc0c546a146111bd57610442565b8063d66bd52414611066578063d895951214611099578063dc8de379146110cc578063e2c52468146110ff57610442565b8063d260529c116100dc578063d260529c14611012578063d3fb73b414611027578063d4ee1d901461103c578063d55ec6971461105157610442565b8063ca1d209d14610fa1578063cdc91c6914610fbe578063d031370b14610fd3578063d18e81b314610ffd57610442565b80639b99a8e211610185578063b4a176d311610154578063b4a176d314610f32578063bbb7e5d814610f47578063bf75455814610f77578063c45d3d9214610f8c57610442565b80639b99a8e214610cf5578063a60e772414610d0a578063af94b8d814610db8578063b127c0a514610dfb57610442565b80637d8916bd116101c15780637d8916bd14610af357806380d9416d14610c185780638da5cb5b14610ccb57806394c275ad14610ce057610442565b806371f52bf314610ab457806379ba509714610ac95780637b10399914610ade57610442565b8063395900d4116102d7578063579cd3ca1161026a578063690d832011610239578063690d8320146109e55780636a49d2c414610a185780636aa5332c14610a575780636ad419a814610a8157610442565b8063579cd3ca146109455780635e35359e1461095a57806361cd756e1461099d57806367b6d57c146109b257610442565b806349d10b64116102a657806349d10b64146108af5780634af80f0e146108c45780634e40c260146108f757806354fd4d501461093057610442565b8063395900d4146107ec5780633beb26c41461082f5780633e8ff43f14610859578063415f12401461088557610442565b80631d4db7911161034f57806322f3e2d41161031e57806322f3e2d4146107985780632fe8a6ad146107ad57806338a5e016146107c257806338e9f27a146107d757610442565b80631d4db791146106af5780631e1401f8146106d65780631f0181bc1461073257806321e6b53d1461076557610442565b806312c2aca41161038b57806312c2aca414610508578063154588371461053157806319b64015146106365780631cfab2901461067c57610442565b8063024c7ec7146104475780630c7d5cd8146104735780630e53aae9146104a157610442565b366104425760008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff16610440576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b34801561045357600080fd5b506104406004803603602081101561046a57600080fd5b503515156111d2565b34801561047f57600080fd5b506104886111f8565b6040805163ffffffff9092168252519081900360200190f35b3480156104ad57600080fd5b506104d4600480360360208110156104c457600080fd5b50356001600160a01b0316611204565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b34801561051457600080fd5b5061051d61129b565b604080519115158252519081900360200190f35b34801561053d57600080fd5b506105e66004803603604081101561055457600080fd5b81359190810190604081016020820135600160201b81111561057557600080fd5b82018360208201111561058757600080fd5b803590602001918460208302840111600160201b831117156105a857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506112e2945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561062257818101518382015260200161060a565b505050509050019250505060405180910390f35b34801561064257600080fd5b506106606004803603602081101561065957600080fd5b5035611389565b604080516001600160a01b039092168252519081900360200190f35b34801561068857600080fd5b506104886004803603602081101561069f57600080fd5b50356001600160a01b03166113b3565b3480156106bb57600080fd5b506106c46113e5565b60408051918252519081900360200190f35b3480156106e257600080fd5b50610719600480360360608110156106f957600080fd5b506001600160a01b038135811691602081013590911690604001356113eb565b6040805192835260208301919091528051918290030190f35b34801561073e57600080fd5b506107196004803603602081101561075557600080fd5b50356001600160a01b0316611406565b34801561077157600080fd5b506104406004803603602081101561078857600080fd5b50356001600160a01b03166114bd565b3480156107a457600080fd5b5061051d6114d1565b3480156107b957600080fd5b5061051d611550565b3480156107ce57600080fd5b50610440611560565b3480156107e357600080fd5b5061051d611572565b3480156107f857600080fd5b506104406004803603606081101561080f57600080fd5b506001600160a01b0381358116916020810135909116906040013561157b565b34801561083b57600080fd5b506104406004803603602081101561085257600080fd5b5035611601565b34801561086557600080fd5b5061086e611606565b6040805161ffff9092168252519081900360200190f35b34801561089157600080fd5b506105e6600480360360208110156108a857600080fd5b503561160b565b3480156108bb57600080fd5b50610440611849565b3480156108d057600080fd5b50610440600480360360208110156108e757600080fd5b50356001600160a01b0316611a51565b34801561090357600080fd5b506106c46004803603604081101561091a57600080fd5b506001600160a01b038135169060200135611a86565b34801561093c57600080fd5b5061086e611bc2565b34801561095157600080fd5b50610488611bc7565b34801561096657600080fd5b506104406004803603606081101561097d57600080fd5b506001600160a01b03813581169160208101359091169060400135611bda565b3480156109a957600080fd5b50610660611d0b565b3480156109be57600080fd5b50610440600480360360208110156109d557600080fd5b50356001600160a01b0316611d1a565b3480156109f157600080fd5b5061044060048036036020811015610a0857600080fd5b50356001600160a01b0316611dc6565b348015610a2457600080fd5b5061044060048036036040811015610a3b57600080fd5b5080356001600160a01b0316906020013563ffffffff16611eed565b348015610a6357600080fd5b506106c460048036036020811015610a7a57600080fd5b5035611fb6565b348015610a8d57600080fd5b5061044060048036036020811015610aa457600080fd5b50356001600160a01b0316611fd8565b348015610ac057600080fd5b5061086e612005565b348015610ad557600080fd5b50610440612014565b348015610aea57600080fd5b506106606120cb565b6106c460048036036060811015610b0957600080fd5b810190602081018135600160201b811115610b2357600080fd5b820183602082011115610b3557600080fd5b803590602001918460208302840111600160201b83111715610b5657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ba557600080fd5b820183602082011115610bb757600080fd5b803590602001918460208302840111600160201b83111715610bd857600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506120da915050565b348015610c2457600080fd5b506105e660048036036060811015610c3b57600080fd5b810190602081018135600160201b811115610c5557600080fd5b820183602082011115610c6757600080fd5b803590602001918460208302840111600160201b83111715610c8857600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602001356123a4565b348015610cd757600080fd5b50610660612653565b348015610cec57600080fd5b50610488612662565b348015610d0157600080fd5b5061086e612675565b348015610d1657600080fd5b506106c460048036036020811015610d2d57600080fd5b810190602081018135600160201b811115610d4757600080fd5b820183602082011115610d5957600080fd5b803590602001918460208302840111600160201b83111715610d7a57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061267b945050505050565b348015610dc457600080fd5b5061071960048036036060811015610ddb57600080fd5b506001600160a01b038135811691602081013590911690604001356126cd565b348015610e0757600080fd5b506105e660048036036060811015610e1e57600080fd5b81359190810190604081016020820135600160201b811115610e3f57600080fd5b820183602082011115610e5157600080fd5b803590602001918460208302840111600160201b83111715610e7257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ec157600080fd5b820183602082011115610ed357600080fd5b803590602001918460208302840111600160201b83111715610ef457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612870945050505050565b348015610f3e57600080fd5b506104406129ac565b348015610f5357600080fd5b506106c460048036036040811015610f6a57600080fd5b50803590602001356129d8565b348015610f8357600080fd5b5061051d6129f0565b348015610f9857600080fd5b506106606129f5565b6106c460048036036020811015610fb757600080fd5b5035612a04565b348015610fca57600080fd5b50610440612e7f565b348015610fdf57600080fd5b5061066060048036036020811015610ff657600080fd5b5035612ed8565b34801561100957600080fd5b506106c4612eff565b34801561101e57600080fd5b5061051d611606565b34801561103357600080fd5b50610660612f05565b34801561104857600080fd5b50610660612f14565b34801561105d57600080fd5b50610440612f23565b34801561107257600080fd5b506104d46004803603602081101561108957600080fd5b50356001600160a01b031661300b565b3480156110a557600080fd5b506106c4600480360360208110156110bc57600080fd5b50356001600160a01b031661304d565b3480156110d857600080fd5b506106c4600480360360208110156110ef57600080fd5b50356001600160a01b0316613054565b34801561110b57600080fd5b5061071961307d565b6106c4600480360360a081101561112a57600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516613086565b34801561116657600080fd5b506104406004803603602081101561117d57600080fd5b503563ffffffff16613296565b34801561119657600080fd5b50610440600480360360208110156111ad57600080fd5b50356001600160a01b031661337d565b3480156111c957600080fd5b506106606133fb565b6111da61340a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60085463ffffffff1681565b60008060008060006112146154e1565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff600160201b82048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b60008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff165b90565b60048054604080516318160ddd60e01b815290516060936000936001600160a01b0316926318160ddd9281830192602092829003018186803b15801561132757600080fd5b505afa15801561133b573d6000803e3d6000fd5b505050506040513d602081101561135157600080fd5b5051905060006113706c42616e636f72466f726d756c6160981b61345d565b905061137e858584846134db565b925050505b92915050565b60006006828154811061139857fe5b6000918252602090912001546001600160a01b031692915050565b6000816113bf81613620565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b600c5481565b6000806113f98585856126cd565b915091505b935093915050565b600954600090819060ff1661145a576040805162461bcd60e51b815260206004820152601560248201527411549497d393d397d4d510539110549117d413d3d3605a1b604482015290519081900360640190fd5b61146261550f565b61146a61368d565b9050600660008154811061147a57fe5b6000918252602090912001546001600160a01b03858116911614156114ab57805160209091015190925090506114b8565b6020810151905190925090505b915091565b6114c561340a565b6114ce81611d1a565b50565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b15801561151557600080fd5b505afa158015611529573d6000803e3d6000fd5b505050506040513d602081101561153f57600080fd5b50516001600160a01b031614905090565b600354600160a01b900460ff1681565b61156861340a565b611570612e7f565b565b60095460ff1681565b61158361340a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b1580156115e457600080fd5b505af11580156115f8573d6000803e3d6000fd5b50505050505050565b600d55565b600190565b6060611615613828565b6003805460ff60a81b1916600160a81b1790558161166c576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301879052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b15801561173e57600080fd5b505af1158015611752573d6000803e3d6000fd5b505060065460609250905067ffffffffffffffff8111801561177357600080fd5b5060405190808252806020026020018201604052801561179d578160200160208202803683370190505b50905060005b81518110156117cd5760018282815181106117ba57fe5b60209081029190910101526001016117a3565b50611834600680548060200260200160405190810160405280929190818152602001828054801561182757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611809575b5050505050828487613878565b6003805460ff60a81b19169055949350505050565b6000546001600160a01b031633148061186c5750600354600160a01b900460ff16155b6118b1576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60006118cf6f436f6e7472616374526567697374727960801b61345d565b6002549091506001600160a01b038083169116148015906118f857506001600160a01b03811615155b611940576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119a257600080fd5b505afa1580156119b6573d6000803e3d6000fd5b505050506040513d60208110156119cc57600080fd5b50516001600160a01b03161415611a21576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611a5961340a565b80611a6381613a83565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516318160ddd60e01b8152905160009384936001600160a01b0316926318160ddd9281830192602092829003018186803b158015611aca57600080fd5b505afa158015611ade573d6000803e3d6000fd5b505050506040513d6020811015611af457600080fd5b505190506000611b136c42616e636f72466f726d756c6160981b61345d565b6001600160a01b03868116600090815260076020908152604091829020546008548351632f55bdb560e01b815260048101899052602481019290925263ffffffff16604482015260648101899052915193945091841692632f55bdb592608480840193919291829003018186803b158015611b8d57600080fd5b505afa158015611ba1573d6000803e3d6000fd5b505050506040513d6020811015611bb757600080fd5b505195945050505050565b602781565b600854600160401b900463ffffffff1681565b611be2613828565b6003805460ff60a81b1916600160a81b179055611bfd61340a565b6000611c22762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff161580611c5c5750611c5a6114d1565b155b80611c7457506000546001600160a01b038281169116145b611cb9576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b611cc4848484613ad7565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff1615611cf857611cf884613b08565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b611d2261340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b611d4681613be1565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b158015611daa57600080fd5b505af1158015611dbe573d6000803e3d6000fd5b505050505050565b611dce613828565b6003805460ff60a81b1916600160a81b179055611de961340a565b60008051602061552a833981519152611e0181613620565b6000611e26762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b9050611e306114d1565b1580611e4957506000546001600160a01b038281169116145b611e8e576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015611ec3573d6000803e3d6000fd5b50611edb60008051602061552a833981519152613b08565b50506003805460ff60a81b1916905550565b611ef561340a565b611eff8282613c43565b6006546002148015611f535750600760006006600081548110611f1e57fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b8015611fa15750600760006006600181548110611f6c57fe5b6000918252602080832091909101546001600160a01b0316835282019290925260400190206001015463ffffffff166207a120145b6009805460ff19169115159190911790555050565b600080825b8015611fd15760019190910190600a9004611fbb565b5092915050565b600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff909216919091179055565b600061200f612675565b905090565b6001546001600160a01b03163314612067576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b60006120e4613828565b6003805460ff60a81b1916600160a81b1790556120ff613e65565b61210a848484613ead565b60005b84518110156121ba5760008051602061552a8339815191526001600160a01b031685828151811061213a57fe5b60200260200101516001600160a01b031614156121b2573484828151811061215e57fe5b6020026020010151146121b2576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b60010161210d565b50341561224a5760008051602061552a83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1661224a576040805162461bcd60e51b81526020600482015260126024820152714552525f4e4f5f4554485f5245534552564560701b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561229a57600080fd5b505afa1580156122ae573d6000803e3d6000fd5b505050506040513d60208110156122c457600080fd5b5051905060006122d5868684614142565b905083811015612321576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b600480546040805163219e412d60e21b8152339381019390935260248301849052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b15801561237557600080fd5b505af1158015612389573d6000803e3d6000fd5b50506003805460ff60a81b1916905550909695505050505050565b606080845167ffffffffffffffff811180156123bf57600080fd5b506040519080825280602002602001820160405280156123e9578160200160208202803683370190505b5090506000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d602081101561246657600080fd5b5051905060006124856c42616e636f72466f726d756c6160981b61345d565b90506000816001600160a01b0316632f55bdb584600760008c8c815181106124a957fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018b905251608480840193829003018186803b15801561252357600080fd5b505afa158015612537573d6000803e3d6000fd5b505050506040513d602081101561254d57600080fd5b5051905060005b845181101561264457826001600160a01b031663ebbb215885600760008d868151811061257d57fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff1660448401526064830187905251608480840193829003018186803b1580156125f757600080fd5b505afa15801561260b573d6000803e3d6000fd5b505050506040513d602081101561262157600080fd5b5051855186908390811061263157fe5b6020908102919091010152600101612554565b509293505050505b9392505050565b6000546001600160a01b031681565b600854600160201b900463ffffffff1681565b60065490565b80516000908190815b818110156126b4576126a885828151811061269b57fe5b6020026020010151611fb6565b90920191600101612684565b5060016126c183836129d8565b03600a0a949350505050565b6000806126d8613e65565b846126e281613620565b846126ec81613620565b856001600160a01b0316876001600160a01b0316141561274c576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60006127676c42616e636f72466f726d756c6160981b61345d565b6001600160a01b03166394491fab61277e8a613054565b6001600160a01b038b1660009081526007602052604090206001015463ffffffff166127a98b613054565b6001600160a01b038c166000908152600760209081526040918290206001015482516001600160e01b031960e089901b168152600481019690965263ffffffff94851660248701526044860193909352929091166064840152608483018b90525160a480840193829003018186803b15801561282457600080fd5b505afa158015612838573d6000803e3d6000fd5b505050506040513d602081101561284e57600080fd5b50519050600061285d8261416d565b9182900399919850909650505050505050565b606061287a613828565b6003805460ff60a81b1916600160a81b179055612895613e65565b6128a0838386613ead565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128f057600080fd5b505afa158015612904573d6000803e3d6000fd5b505050506040513d602081101561291a57600080fd5b5051600480546040805163a24835d160e01b8152339381019390935260248301899052519293506001600160a01b03169163a24835d19160448082019260009290919082900301818387803b15801561297257600080fd5b505af1158015612986573d6000803e3d6000fd5b5050505061299684848388613878565b6003805460ff60a81b1916905595945050505050565b6129b461340a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600081600281048401816129e857fe5b049392505050565b600181565b6005546001600160a01b031681565b6000612a0e613828565b6003805460ff60a81b1916600160a81b179055612a2961419e565b60008051602061552a833981519152600052600760205260008051602061554a83398151915254612a5a90346141de565b60008051602061552a83398151915260009081526007602090815260008051602061554a8339815191529290925560048054604080516318160ddd60e01b8152905193946001600160a01b03909216936318160ddd938281019392829003018186803b158015612ac957600080fd5b505afa158015612add573d6000803e3d6000fd5b505050506040513d6020811015612af357600080fd5b505190506000612b126c42616e636f72466f726d756c6160981b61345d565b60065490915060005b81811015612dfc57600060068281548110612b3257fe5b60009182526020808320909101546001600160a01b03908116808452600783526040808520546008548251631d77642b60e31b8152600481018d90526024810183905263ffffffff9091166044820152606481018e9052915192965094939289169263ebbb215892608480840193829003018186803b158015612bb457600080fd5b505afa158015612bc8573d6000803e3d6000fd5b505050506040513d6020811015612bde57600080fd5b505190506001600160a01b03831660008051602061552a8339815191521415612d295780341115612c3e5760405133903483900380156108fc02916000818181858888f19350505050158015612c38573d6000803e3d6000fd5b50612d24565b80341015612d24573415612c91576040805162461bcd60e51b81526020600482015260156024820152744552525f494e56414c49445f4554485f56414c554560581b604482015290519081900360640190fd5b600854612cb090600160601b90046001600160a01b031633308461422b565b6008600c9054906101000a90046001600160a01b03166001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612d0b57600080fd5b505af1158015612d1f573d6000803e3d6000fd5b505050505b612d35565b612d358333308461422b565b6000612d418383614396565b6001600160a01b0385166000908152600760205260408120829055909150612d69898c614396565b604080518581526020810185905280820183905290519192506001600160a01b0387169133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038516600090815260076020526040902060010154612deb9082908790859063ffffffff166143df565b505060019093019250612b1b915050565b50600480546040805163219e412d60e21b8152339381019390935260248301889052516001600160a01b039091169163867904b491604480830192600092919082900301818387803b158015612e5157600080fd5b505af1158015612e65573d6000803e3d6000fd5b50506003805460ff60a81b19169055509495945050505050565b612e8761340a565b612e8f61444e565b6004546001906001600160a01b0316612ea6611606565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4565b60068181548110612ee557fe5b6000918252602090912001546001600160a01b0316905081565b600d5481565b6004546001600160a01b031681565b6001546001600160a01b031681565b612f2b61340a565b6000612f50762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61345d565b6004549091506000906001600160a01b0316612f6a611606565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612fa38161337d565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612feb57600080fd5b505af1158015612fff573d6000803e3d6000fd5b505050506114ce612014565b6007602052600090815260409020805460019091015463ffffffff81169060ff600160201b8204811691650100000000008104821691600160301b9091041685565b6000611383825b60008161306081613620565b50506001600160a01b031660009081526007602052604090205490565b600a54600b5482565b6000613090613828565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b6130bd81613be1565b856001600160a01b0316876001600160a01b0316141561311d576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b0316158061322a575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561317d57600080fd5b505afa158015613191573d6000803e3d6000fd5b505050506040513d60208110156131a757600080fd5b5051801561322a575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b1580156131fd57600080fd5b505afa158015613211573d6000803e3d6000fd5b505050506040513d602081101561322757600080fd5b50515b613271576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b61327e87878787876144b2565b6003805460ff60a81b19169055979650505050505050565b61329e61340a565b60085463ffffffff600160201b90910481169082161115613306576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61338561340a565b6000546001600160a01b03828116911614156133d9576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000546001600160a01b03163314611570576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b1580156134a957600080fd5b505afa1580156134bd573d6000803e3d6000fd5b505050506040513d60208110156134d357600080fd5b505192915050565b606080845167ffffffffffffffff811180156134f657600080fd5b50604051908082528060200260200182016040528015613520578160200160208202803683370190505b50905060005b815181101561361657836001600160a01b0316638074590a86600760008a868151811061354f57fe5b6020908102919091018101516001600160a01b031682528181019290925260409081016000205460085482516001600160e01b031960e088901b1681526004810195909552602485019190915263ffffffff166044840152606483018c905251608480840193829003018186803b1580156135c957600080fd5b505afa1580156135dd573d6000803e3d6000fd5b505050506040513d60208110156135f357600080fd5b5051825183908390811061360357fe5b6020908102919091010152600101613526565b5095945050505050565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff166114ce576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b61369561550f565b6000600c546136a2614775565b039050806136c857505060408051808201909152600a548152600b5460208201526112df565b60006007600060066001815481106136dc57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181205460068054919350600791839190829061371657fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054905061025883106137615760408051808201909152918252602082015291506112df9050565b61376961550f565b5060408051808201909152600a548152600b5460208201819052600090613790908561478f565b82519091506000906137a2908561478f565b905060006137c86137b3848961478f565b6137c2846102588b900361478f565b90614396565b905060006137ef6102586137e988886020015161478f90919063ffffffff16565b9061478f565b905061380982826c0c9f2c9cd04674edea400000006147ed565b6040805180820190915291825260208201529850505050505050505090565b600354600160a81b900460ff1615611570576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b606061388261419e565b600061389d6c42616e636f72466f726d756c6160981b61345d565b905060006138ab85856141de565b905060606138bb858988866134db565b905060005b8851811015613a775760008982815181106138d757fe5b6020026020010151905060008383815181106138ef57fe5b6020026020010151905089838151811061390557fe5b602002602001015181101561395a576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b03821660009081526007602052604081205461397d90836141de565b6001600160a01b038416600081815260076020526040902082905590915060008051602061552a83398151915214156139e357604051339083156108fc029084906000818181858888f193505050501580156139dd573d6000803e3d6000fd5b506139ee565b6139ee83338461481f565b604080518381526020810183905280820188905290516001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b9181900360600190a36001600160a01b038316600090815260076020526040902060010154613a6c9087908590849063ffffffff166143df565b5050506001016138c0565b50979650505050505050565b6001600160a01b0381163014156114ce576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b613adf61340a565b82613ae98161497f565b82613af38161497f565b83613afd81613a83565b611dbe86868661481f565b80613b1281613620565b6001600160a01b03821660008051602061552a8339815191521415613b51576001600160a01b0382166000908152600760205260409020479055613bdd565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613b9757600080fd5b505afa158015613bab573d6000803e3d6000fd5b505050506040513d6020811015613bc157600080fd5b50516001600160a01b0383166000908152600760205260409020555b5050565b613bea8161345d565b6001600160a01b0316336001600160a01b0316146114ce576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b613c4b61340a565b613c536149d0565b81613c5d8161497f565b82613c6781613a83565b82613c7181614a17565b6004546001600160a01b03868116911614801590613cb257506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b613cf9576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f42400381169085161115613d61576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff613d6c612675565b61ffff1610613dbe576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b613e6d6114d1565b611570576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b600654835160009182918114613f00576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b84518114613f4a576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600092505b808310156140fb5760076000878581518110613f6757fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060010160069054906101000a900460ff16613fe7576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b600091505b808210156140495785828151811061400057fe5b60200260200101516001600160a01b03166006848154811061401e57fe5b6000918252602090912001546001600160a01b0316141561403e57614049565b600190910190613fec565b808210614093576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60008584815181106140a157fe5b6020026020010151116140f0576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b600190920191613f4f565b60008411611dbe576040805162461bcd60e51b815260206004820152600f60248201526e11549497d6915493d7d05353d55395608a1b604482015290519081900360640190fd5b60008161415a576141538484614a87565b905061264c565b614165848484614ba6565b949350505050565b60085460009061138390620f424090614198908590600160401b900463ffffffff9081169061478f16565b90614ed3565b60065460005b81811015613bdd576141d6600682815481106141bc57fe5b6000918252602090912001546001600160a01b0316613b08565b6001016141a4565b600081831015614225576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106142b05780518252601f199092019160209182019101614291565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614312576040519150601f19603f3d011682016040523d82523d6000602084013e614317565b606091505b5091509150818015614345575080511580614345575080806020019051602081101561434257600080fd5b50515b611dbe576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b60008282018381101561264c576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6004546001600160a01b0380851691167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c2461441d85620f424061478f565b6144308863ffffffff8088169061478f16565b6040805192835260208301919091528051918290030190a350505050565b6001614458612675565b61ffff16116144aa576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b611570614f32565b60008060006144c28888886126cd565b915091508160001415614515576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b61451e87613054565b821061452657fe5b6001600160a01b03881660008051602061552a833981519152141561459857853414614593576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b61466f565b341580156146295750856146266145ae8a613054565b604080516370a0823160e01b815230600482015290516001600160a01b038d16916370a08231916024808301926020929190829003018186803b1580156145f457600080fd5b505afa158015614608573d6000803e3d6000fd5b505050506040513d602081101561461e57600080fd5b5051906141de565b10155b61466f576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b61467888613b08565b6001600160a01b03871660009081526007602052604090205461469b90836141de565b6001600160a01b03881660008181526007602052604090209190915560008051602061552a8339815191521415614708576040516001600160a01b0385169083156108fc029084906000818181858888f19350505050158015614702573d6000803e3d6000fd5b50614713565b61471387858461481f565b60095460ff16801561472d5750614728614775565b600c54105b156147525761473a61368d565b8051600a5560200151600b5561474e614775565b600c555b614760888887898686614ff9565b61476a8888615062565b509695505050505050565b6000600d5460001415614788574261200f565b50600d5490565b60008261479e57506000611383565b828202828482816147ab57fe5b041461264c576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600080828511806147fd57508284115b156148165761480d858585615266565b915091506113fe565b50929391925050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061489c5780518252601f19909201916020918201910161487d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146148fe576040519150601f19603f3d011682016040523d82523d6000602084013e614903565b606091505b5091509150818015614931575080511580614931575080806020019051602081101561492e57600080fd5b50515b614978576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6001600160a01b0381166114ce576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b6149d86114d1565b15611570576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b60008163ffffffff16118015614a365750620f424063ffffffff821611155b6114ce576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b600080614a938361267b565b905060005b8451811015614b9e576000858281518110614aaf57fe5b602002602001015190506000858381518110614ac757fe5b6020026020010151905060008051602061552a8339815191526001600160a01b0316826001600160a01b031614614b0457614b048233308461422b565b6001600160a01b0382166000818152600760209081526040918290208490558151848152908101849052808201879052905133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038216600090815260076020526040902060010154614b949085908490849063ffffffff166143df565b5050600101614a98565b509392505050565b6000614bb061419e565b60008051602061552a833981519152600052600760205260008051602061554a83398151915254614be190346141de565b60008051602061552a8339815191526000908152600760205260008051602061554a83398151915291909155614c266c42616e636f72466f726d756c6160981b61345d565b90506000614c36828588886152ab565b90506000614c448583614396565b905060005b8751811015614ec7576000888281518110614c6057fe5b6020908102919091018101516001600160a01b038082166000908152600784526040808220546008548251631d77642b60e31b8152600481018f90526024810183905263ffffffff9091166044820152606481018b90529151949650949193928a169263ebbb215892608480840193919291829003018186803b158015614ce657600080fd5b505afa158015614cfa573d6000803e3d6000fd5b505050506040513d6020811015614d1057600080fd5b5051905080614d5f576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b898481518110614d6b57fe5b6020026020010151811115614d7c57fe5b6001600160a01b03831660008051602061552a83398151915214614dab57614da68333308461422b565b614e16565b808a8581518110614db857fe5b60200260200101511115614e1657336001600160a01b03166108fc828c8781518110614de057fe5b6020026020010151039081150290604051600060405180830381858888f19350505050158015614e14573d6000803e3d6000fd5b505b6000614e228383614396565b6001600160a01b03851660008181526007602090815260409182902084905581518681529081018490528082018a90529051929350909133917f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f7919081900360600190a36001600160a01b038416600090815260076020526040902060010154614eb79087908690849063ffffffff166143df565b505060019092019150614c499050565b50909695505050505050565b6000808211614f1e576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481614f2957fe5b04949350505050565b614f3a61340a565b6000614f44612675565b61ffff1611614f96576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b158015614fd957600080fd5b505af1158015614fed573d6000803e3d6000fd5b5050505061157061419e565b600160ff1b811061500657fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b257600080fd5b505afa1580156150c6573d6000803e3d6000fd5b505050506040513d60208110156150dc57600080fd5b5051905060006150eb84613054565b905060006150f884613054565b6001600160a01b038087166000908152600760205260408082206001908101549389168352908220015492935063ffffffff9182169282169161513f908590859061478f16565b905060006151568663ffffffff8086169061478f16565b604080518481526020810183905281519293506001600160a01b03808c1693908d16927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24928290030190a36151ad878a88876143df565b6151b9878987866143df565b604080518881526020810188905263ffffffff86168183015290516001600160a01b038b16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2604080518881526020810187905263ffffffff85168183015290516001600160a01b038a16917f8a6a7f53b3c8fa1dc4b83e3f1be668c1b251ff8d44cdcb83eb3acec3fec6a788919081900360600190a2505050505050505050565b6000808385141561527d57505060028104806113fe565b838510156152905761480d858585615471565b60008061529e868887615471565b9890975095505050505050565b60008060015b84518110156153785761531b600760008784815181106152cd57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015485848151811061530557fe5b602002602001015161478f90919063ffffffff16565b6153666007600088868151811061532e57fe5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000015486848151811061530557fe5b1015615370578091505b6001016152b1565b50856001600160a01b0316632f55bdb5866007600088868151811061539957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000154600860009054906101000a900463ffffffff168786815181106153e457fe5b60200260200101516040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff16815260200182815260200194505050505060206040518083038186803b15801561543b57600080fd5b505afa15801561544f573d6000803e3d6000fd5b505050506040513d602081101561546557600080fd5b50519695505050505050565b6000806000836000198161548157fe5b049050808611156154ba57600081600101878161549a57fe5b0460010190508087816154a957fe5b0496508086816154b557fe5b049550505b60006154d18786026154cc8989614396565b6129d8565b9794889003965093945050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0ea264697066735822122089c0c3358ca8c545b32bb44e5b659e8ecd8dc9cf301a41360cca2d8fe72d849b64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "152:641:41:-:0;;;349:27:60;;;-1:-1:-1;;;;349:27:60;;;586:89:26;2899:30:8;586:89:26;989:34;;;-1:-1:-1;;989:34:26;;;257:214:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;257:214:41;;;;;;;;;;;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;257:214:41;;;;;;;;;;;;;;594:23:65;257:214:41;594:13:65;:23::i;:::-;-1:-1:-1;2122:8:57::1;:39:::0;;-1:-1:-1;;;;;2122:39:57;;::::1;-1:-1:-1::0;;;;;;2122:39:57;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;6069:7:8;594:23:65;6069:7:8;594:13:65;:23::i;:::-;6168:17:8;7294:35:::2;6168:17:::0;7294:19:::2;:35::i;:::-;-1:-1:-1::0;;6203:6:8::3;:16:::0;;-1:-1:-1;;;;;6203:16:8;;::::3;-1:-1:-1::0;;;;;;6203:16:8;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;6230:16:8::3;:36:::0;;::::3;::::0;;::::3;::::0;::::3;-1:-1:-1::0;;;;6230:36:8;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;152:641:41;;-1:-1:-1;;;;;;;;152:641:41;692:128:65;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;7404:156:8:-;1846:7;7489:32;;;;;7481:71;;;;;-1:-1:-1;;;7481:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;152:641:41;;;;;;;", + "deployedSourceMap": "152:641:41:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8454:29:8;;:8;:29;;:35;;-1:-1:-1;;;8454:35:8;;;;8446:67;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;;;;152:641:41;;;;;3655:224:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:57;;;;:::i;2899:30:8:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22514:248;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22514:248:8;-1:-1:-1;;;;;22514:248:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17176:113;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20265:410:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20265:410:26;;-1:-1:-1;20265:410:26;;-1:-1:-1;;;;;20265:410:26:i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22836:145:8;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22836:145:8;;:::i;:::-;;;;-1:-1:-1;;;;;22836:145:8;;;;;;;;;;;;;;16300:204;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16300:204:8;-1:-1:-1;;;;;16300:204:8;;:::i;1206:40:26:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;23471:208:8;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;23471:208:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;7816:436:26;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7816:436:26;-1:-1:-1;;;;;7816:436:26;;:::i;22136:130:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22136:130:8;-1:-1:-1;;;;;22136:130:8;;:::i;10641:121::-;;;;;;;;;;;;;:::i;1333:38:57:-;;;;;;;;;;;;;:::i;22340:100:8:-;;;;;;;;;;;;;:::i;989:34:26:-;;;;;;;;;;;;;:::i;12220:157:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12220:157:8;;;;;;;;;;;;;;;;;:::i;702:89:41:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;702:89:41;;:::i;2555:90:26:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;16888:626;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16888:626:26;;:::i;2300:925:57:-;;;;;;;;;;;;;:::i;10268:202:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10268:202:8;-1:-1:-1;;;;;10268:202:8;;:::i;19492:419:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;19492:419:26;;;;;;;;:::i;2343:35:8:-;;;;;;;;;;;;;:::i;3292:40::-;;;;;;;;;;;;;:::i;13330:735::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13330:735:8;;;;;;;;;;;;;;;;;:::i;1243:37:57:-;;;;;;;;;;;;;:::i;11112:198:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11112:198:8;-1:-1:-1;;;;;11112:198:8;;:::i;9086:554::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9086:554:8;-1:-1:-1;;;;;9086:554:8;;:::i;3376:322:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3376:322:26;;-1:-1:-1;;;;;3376:322:26;;;;;;;;:::i;30782:180::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30782:180:26;;:::i;477:96:41:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;477:96:41;-1:-1:-1;;;;;477:96:41;;:::i;23055:114:8:-;;;;;;;;;;;;;:::i;1422:217:58:-;;;;;;;;;;;;;:::i;1154:33:57:-;;;;;;;;;;;;;:::i;10576:1538:26:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10576:1538:26;;;;;;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10576:1538:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;10576:1538:26;;;-1:-1:-1;10576:1538:26;;-1:-1:-1;;10576:1538:26:i;18168:798::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;18168:798:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;18168:798:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18168:798:26;;-1:-1:-1;;18168:798:26;;;-1:-1:-1;;;18168:798:26;;;;:::i;219:29:58:-;;;;;;;;;;;;;:::i;3041:43:8:-;;;;;;;;;;;;;:::i;14882:112::-;;;;;;;;;;;;;:::i;31607:332:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31607:332:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31607:332:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31607:332:26;;-1:-1:-1;31607:332:26;;-1:-1:-1;;;;;31607:332:26:i;4133:848::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4133:848:26;;;;;;;;;;;;;;;;;:::i;12623:783::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12623:783:26;;;;;;;;-1:-1:-1;12623:783:26;;-1:-1:-1;;;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12623:783:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12623:783:26;;-1:-1:-1;12623:783:26;;-1:-1:-1;;;;;12623:783:26:i;3304:137:57:-;;;;;;;;;;;;;:::i;31208:116:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31208:116:26;;;;;;;:::i;3417:46:8:-;;;;;;;;;;;;;:::i;2473:::-;;;;;;;;;;;;;:::i;13893:2483:26:-;;;;;;;;;;;;;;;;-1:-1:-1;13893:2483:26;;:::i;2918:166::-;;;;;;;;;;;;;:::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2613:34:8;;:::i;224:26:41:-;;;;;;;;;;;;;:::i;9815:82:8:-;;;;;;;;;;;;;:::i;2387:39::-;;;;;;;;;;;;;:::i;255:23:58:-;;;;;;;;;;;;;:::i;14288:374:8:-;;;;;;;;;;;;;:::i;2754:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2754:48:8;-1:-1:-1;;;;;2754:48:8;;:::i;23243:154::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23243:154:8;-1:-1:-1;;;;;23243:154:8;;:::i;16773:225::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16773:225:8;-1:-1:-1;;;;;16773:225:8;;:::i;1068:31:26:-;;;;;;;;;;;;;:::i;17872:782:8:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17872:782:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12580:274::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12580:274:8;;;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;21965:97:8:-;;;;;;;;;;;;;:::i;3655:224:57:-;726:12:58;:10;:12::i;:::-;3815:26:57::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:57::1;-1:-1:-1::0;;;;3815:56:57;;::::1;::::0;;;::::1;::::0;;3655:224::o;2899:30:8:-;;;;;;:::o;22514:248::-;22586:7;22595:6;22603:4;22609;22615;22632:22;;:::i;:::-;-1:-1:-1;;;;;;;;;22657:18:8;;;;;;;;:8;:18;;;;;;;;22632:43;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;-1:-1:-1;22657:18:8;;-1:-1:-1;22657:18:8;;22632:43;22514:248::o;17176:113::-;-1:-1:-1;;;;;;;;;;;17222:4:8;17246:29;:8;:29;;:35;;-1:-1:-1;;;17246:35:8;;;;17176:113;;:::o;20265:410:26:-;20474:6;;;20454:42;;;-1:-1:-1;;;20454:42:26;;;;20398:16;;20432:19;;-1:-1:-1;;;;;20474:6:26;;20454:40;;:42;;;;;;;;;;;20474:6;20454:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20454:42:26;;-1:-1:-1;20507:22:26;20547:25;-1:-1:-1;;;20547:9:26;:25::i;:::-;20507:66;;20591:76;20621:7;20630:14;20646:11;20659:7;20591:29;:76::i;:::-;20584:83;;;;20265:410;;;;;:::o;22836:145:8:-;22907:11;22938:27;22966:6;22938:35;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22938:35:8;;22836:145;-1:-1:-1;;22836:145:8:o;16300:204::-;16435:6;16402:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16466:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:30:::1;;::::0;::::1;;::::0;16300:204::o;1206:40:26:-;;;;:::o;23471:208:8:-;23580:7;23589;23616:55;23635:12;23649;23663:7;23616:18;:55::i;:::-;23609:62;;;;23471:208;;;;;;;:::o;7816:436:26:-;7968:14;;7886:7;;;;7968:14;;7960:48;;;;;-1:-1:-1;;;7960:48:26;;;;;;;;;;;;-1:-1:-1;;;7960:48:26;;;;;;;;;;;;;;;8074:20;;:::i;:::-;8097:19;:17;:19::i;:::-;8074:42;;8141:13;8155:1;8141:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8131:26:26;;;8141:16;;8131:26;8127:82;;;8182:6;;8190;;;;;8182;;-1:-1:-1;8190:6:26;-1:-1:-1;8174:23:26;;8127:82;8229:6;;;;8237;;8229;;-1:-1:-1;8237:6:26;-1:-1:-1;7816:436:26;;;;:::o;22136:130:8:-;726:12:58;:10;:12::i;:::-;22224:34:8::1;22248:9;22224:23;:34::i;:::-;22136:130:::0;:::o;10641:121::-;10723:6;;;:14;;;-1:-1:-1;;;10723:14:8;;;;10699:4;;10749;;-1:-1:-1;;;;;10723:6:8;;:12;;:14;;;;;;;;;;;:6;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10723:14:8;-1:-1:-1;;;;;10723:31:8;;;-1:-1:-1;10641:121:8;:::o;1333:38:57:-;;;-1:-1:-1;;;1333:38:57;;;;;:::o;22340:100:8:-;726:12:58;:10;:12::i;:::-;22409:23:8::1;:21;:23::i;:::-;22340:100::o:0;989:34:26:-;;;;;;:::o;12220:157:8:-;726:12:58;:10;:12::i;:::-;12326:6:8::1;::::0;;:43:::1;::::0;;-1:-1:-1;;;12326:43:8;;-1:-1:-1;;;;;12326:43:8;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;:6;;;::::1;::::0;:21:::1;::::0;:43;;;;;:6:::1;::::0;:43;;;;;;;;:6;;:43;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12220:157:::0;;;:::o;702:89:41:-;758:11;:26;702:89::o;2555:90:26:-;2636:1;2555:90;:::o;16888:626::-;16977:16;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;17019:11:26;17011:39:::1;;;::::0;;-1:-1:-1;;;17011:39:26;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;17011:39:26;;;;;;;;;;;;;::::1;;17063:19;17105:6;;;;;;;;;-1:-1:-1::0;;;;;17105:6:26::1;-1:-1:-1::0;;;;;17085:40:26::1;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;17085:42:26;17158:6:::1;::::0;;17138:57:::1;::::0;;-1:-1:-1;;;17138:57:26;;17175:10:::1;17138:57:::0;;::::1;::::0;;;;;;;;;;;17085:42;;-1:-1:-1;;;;;;17158:6:26::1;::::0;17138:36:::1;::::0;:57;;;;;17158:6:::1;::::0;17138:57;;;;;;;;17158:6;;17138:57;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;17265:13:26::1;:20:::0;17208:40:::1;::::0;-1:-1:-1;17265:20:26;-1:-1:-1;17251:35:26::1;::::0;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;17251:35:26::1;;17208:78;;17302:9;17297:104;17321:23;:30;17317:1;:34;17297:104;;;17400:1;17371:23;17395:1;17371:26;;;;;;;;;::::0;;::::1;::::0;;;;;:30;17353:3:::1;;17297:104;;;;17421:85;17445:13;17421:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;17421:85:26::1;::::0;;;;;::::1;::::0;::::1;;::::0;;::::1;;;;;;;;;17460:23;17485:11;17498:7;17421:23;:85::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;17414:92:26;16888:626;-1:-1:-1;;;;16888:626:26:o;2300:925:57:-;2417:5;;-1:-1:-1;;;;;2417:5:57;2403:10;:19;;:50;;-1:-1:-1;2427:26:57;;-1:-1:-1;;;2427:26:57;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:57;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:57;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:57;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:57;:11;-1:-1:-1;;;;;2907:21:57;;-1:-1:-1;;;2907:40:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:57;-1:-1:-1;;;;;2907:54:57;;;2899:87;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:57;;;-1:-1:-1;;;;;;3078:23:57;;;;;;;3195:22;;;;;;;;;;;2300:925::o;10268:202:8:-;726:12:58;:10;:12::i;:::-;10401:10:8::1;948:18:65;957:8;948;:18::i;:::-;-1:-1:-1::0;10430:19:8::2;:32:::0;;-1:-1:-1;;;;;;10430:32:8::2;-1:-1:-1::0;;;;;10430:32:8;;;::::2;::::0;;;::::2;::::0;;10268:202::o;19492:419:26:-;19686:6;;;19666:42;;;-1:-1:-1;;;19666:42:26;;;;19619:7;;;;-1:-1:-1;;;;;19686:6:26;;19666:40;;:42;;;;;;;;;;;19686:6;19666:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19666:42:26;;-1:-1:-1;19719:22:26;19759:25;-1:-1:-1;;;19759:9:26;:25::i;:::-;-1:-1:-1;;;;;19841:23:26;;;;;;;:8;:23;;;;;;;;;:31;19874:12;;19803:100;;-1:-1:-1;;;19803:100:26;;;;;;;;;;;;;;;19874:12;;19803:100;;;;;;;;;;;;19719:66;;-1:-1:-1;19803:24:26;;;;;;:100;;;;;19841:23;;19803:100;;;;;;:24;:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19803:100:26;;19492:419;-1:-1:-1;;;;;19492:419:26:o;2343:35:8:-;2376:2;2343:35;:::o;3292:40::-;;;-1:-1:-1;;;3292:40:8;;;;;:::o;13330:735::-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;13517:25:8::2;13545:29;-1:-1:-1::0;;;13545:9:8::2;:29::i;:::-;-1:-1:-1::0;;;;;13765:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;:22:::2;;::::0;13517:57;;-1:-1:-1;;;;13765:22:8;::::2;;;13764:23;::::0;:38:::2;;;13792:10;:8;:10::i;:::-;13791:11;13764:38;:68;;;-1:-1:-1::0;13806:5:8::2;::::0;-1:-1:-1;;;;;13806:26:8;;::::2;:5:::0;::::2;:26;13764:68;13756:98;;;::::0;;-1:-1:-1;;;13756:98:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13756:98:8;;;;;;;;;;;;;::::2;;13865:42;13886:6;13894:3;13899:7;13865:20;:42::i;:::-;-1:-1:-1::0;;;;;13994:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;:22:::2;;::::0;-1:-1:-1;;;13994:22:8;::::2;;;13990:67;;;14031:26;14050:6;14031:18;:26::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;;13330:735:8:o;1243:37:57:-;;;-1:-1:-1;;;;;1243:37:57;;:::o;11112:198:8:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;1633:13;1627:5;:20::i;:::-;11267:6:8::2;;;;;;;;;-1:-1:-1::0;;;;;11267:6:8::2;-1:-1:-1::0;;;;;11267:24:8::2;;11292:9;11267:35;;;;;;;;;;;;;-1:-1:-1::0;;;;;11267:35:8::2;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;749:1:58::1;11112:198:8::0;:::o;9086:554::-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;-1:-1:-1::0;;;;;;;;;;;6959:23:8::2;6973:8;6959:13;:23::i;:::-;9259:25:::3;9287:29;-1:-1:-1::0;;;9287:9:8::3;:29::i;:::-;9259:57;;9431:10;:8;:10::i;:::-;9430:11;:41;;;-1:-1:-1::0;9445:5:8::3;::::0;-1:-1:-1;;;;;9445:26:8;;::::3;:5:::0;::::3;:26;9430:41;9422:71;;;::::0;;-1:-1:-1;;;9422:71:8;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;9422:71:8;;;;;;;;;;;;;::::3;;9504:35;::::0;-1:-1:-1;;;;;9504:12:8;::::3;::::0;9517:21:::3;9504:35:::0;::::3;;;::::0;::::3;::::0;;;9517:21;9504:12;:35;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;9593:39;-1:-1:-1::0;;;;;;;;;;;9593:18:8::3;:39::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;9086:554:8:o;3376:322:26:-;726:12:58;:10;:12::i;:::-;3469:33:26::1;3486:6;3494:7;3469:16;:33::i;:::-;3545:13;:20:::0;3569:1:::1;3545:25;:85:::0;::::1;;;;3587:8;:26;3596:13;3610:1;3596:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;3596:16:26::1;3587:26:::0;;;::::1;::::0;;;;;;;;3596:16;3587:33:::1;::::0;::::1;;3624:6;3587:43;3545:85;:145;;;;;3647:8;:26;3656:13;3670:1;3656:16;;;;;;;;;::::0;;;::::1;::::0;;;;;;::::1;::::0;-1:-1:-1;;;;;3656:16:26::1;3647:26:::0;;;::::1;::::0;;;;;;;;3656:16;3647:33:::1;::::0;::::1;;3684:6;3647:43;3545:145;3515:14;:175:::0;;-1:-1:-1;;3515:175:26::1;::::0;::::1;;::::0;;;::::1;::::0;;-1:-1:-1;;3376:322:26:o;30782:180::-;30838:7;;30899:2;30882:53;30903:5;;30882:53;;30932:3;;;;;;30915:2;30910:7;;30882:53;;;-1:-1:-1;30953:1:26;30782:180;-1:-1:-1;;30782:180:26:o;477:96:41:-;542:10;:24;;-1:-1:-1;;;;;542:24:41;;;-1:-1:-1;;;542:24:41;;;;;;;;;;;477:96::o;23055:114:8:-;23116:6;23142:19;:17;:19::i;:::-;23135:26;;23055:114;:::o;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:58;;;-1:-1:-1;;;;;1591:8:58;;1583:16;;;;1610:21;;;1422:217::o;1154:33:57:-;;;-1:-1:-1;;;;;1154:33:57;;:::o;10576:1538:26:-;10775:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;10834:65:26::2;10855:14;10871:15;10888:10;10834:20;:65::i;:::-;11036:9;11031:195;11055:14;:21;11051:1;:25;11031:195;;;-1:-1:-1::0;;;;;;;;;;;;;;;;11100:40:26::2;:14;11115:1;11100:17;;;;;;;;;;;;;;-1:-1:-1::0;;;;;11100:40:26::2;;11096:130;;;11189:9;11167:15;11183:1;11167:18;;;;;;;;;;;;;;:31;11159:67;;;::::0;;-1:-1:-1;;;11159:67:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11159:67:26;;;;;;;;;;;;;::::2;;11078:3;;11031:195;;;-1:-1:-1::0;11346:9:26::2;:13:::0;11342:112:::2;;-1:-1:-1::0;;;;;;;;;;;11384:29:26::2;::::0;:8:::2;:29;::::0;:35;;-1:-1:-1;;;11384:35:26;::::2;;;11376:66;;;::::0;;-1:-1:-1;;;11376:66:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11376:66:26;;;;;;;;;;;;;::::2;;11499:19;11541:6;;;;;;;;;-1:-1:-1::0;;;;;11541:6:26::2;-1:-1:-1::0;;;;;11521:40:26::2;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;11521:42:26;;-1:-1:-1;11669:14:26::2;11686:64;11705:14:::0;11721:15;11521:42;11686:18:::2;:64::i;:::-;11669:81;;11887:10;11877:6;:20;;11869:51;;;::::0;;-1:-1:-1;;;11869:51:26;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11869:51:26;;;;;;;;;;;;;::::2;;11994:6;::::0;;11974:54:::2;::::0;;-1:-1:-1;;;11974:54:26;;12009:10:::2;11974:54:::0;;::::2;::::0;;;;;;;;;;;-1:-1:-1;;;;;11994:6:26;;::::2;::::0;11974:34:::2;::::0;:54;;;;;11994:6:::2;::::0;11974:54;;;;;;;11994:6;;11974:54;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;12100:6:26;;10576:1538;-1:-1:-1;;;;;;10576:1538:26:o;18168:798::-;18331:16;18365:31;18413:14;:21;18399:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18399:36:26;;18365:70;;18448:19;18490:6;;;;;;;;;-1:-1:-1;;;;;18490:6:26;-1:-1:-1;;;;;18470:40:26;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18470:42:26;;-1:-1:-1;18523:22:26;18563:25;-1:-1:-1;;;18563:9:26;:25::i;:::-;18523:66;;18600:14;18617:7;-1:-1:-1;;;;;18617:24:26;;18642:11;18655:8;:44;18664:14;18679:18;18664:34;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18655:44:26;;;;;;;;;;;;;;-1:-1:-1;18655:44:26;:52;18709:12;;18617:121;;-1:-1:-1;;;;;;18617:121:26;;;;;;;;;;;;;;;;;;;;;18709:12;;18617:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18617:121:26;;-1:-1:-1;18756:9:26;18751:173;18775:14;:21;18771:1;:25;18751:173;;;18836:7;-1:-1:-1;;;;;18836:16:26;;18853:11;18866:8;:27;18875:14;18890:1;18875:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18866:27:26;;;;;;;;;;;;;;-1:-1:-1;18866:27:26;:35;18903:12;;18836:88;;-1:-1:-1;;;;;;18836:88:26;;;;;;;;;;;;;;;;;;;;;18903:12;;18836:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18836:88:26;18816:17;;:14;;18831:1;;18816:17;;;;;;;;;;;;;;;:108;18798:3;;18751:173;;;-1:-1:-1;18944:14:26;;-1:-1:-1;;;;18168:798:26;;;;;;:::o;219:29:58:-;;;-1:-1:-1;;;;;219:29:58;;:::o;3041:43:8:-;;;-1:-1:-1;;;3041:43:8;;;;;:::o;14882:112::-;14965:13;:20;14882:112;:::o;31607:332:26:-;31748:14;;31677:7;;;;;31773:90;31797:6;31793:1;:10;31773:90;;;31838:25;31852:7;31860:1;31852:10;;;;;;;;;;;;;;31838:13;:25::i;:::-;31823:40;;;;31805:3;;31773:90;;;;31929:1;31897:29;31906:11;31919:6;31897:8;:29::i;:::-;:33;31889:2;31881:50;;31607:332;-1:-1:-1;;;;31607:332:26:o;4133:848::-;4384:7;4393;6356:9:8;:7;:9::i;:::-;4316:12:26::1;6959:23:8;6973:8;6959:13;:23::i;:::-;4352:12:26::2;6959:23:8;6973:8;6959:13;:23::i;:::-;4469:12:26::3;-1:-1:-1::0;;;;;4453:28:26::3;:12;-1:-1:-1::0;;;;;4453:28:26::3;;;4445:63;;;::::0;;-1:-1:-1;;;4445:63:26;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;4445:63:26;;;;;;;;;;;;;::::3;;4521:14;4553:25;-1:-1:-1::0;;;4553:9:26::3;:25::i;:::-;-1:-1:-1::0;;;;;4538:66:26::3;;4619:28;4634:12;4619:14;:28::i;:::-;-1:-1:-1::0;;;;;4662:22:26;::::3;;::::0;;;:8:::3;:22;::::0;;;;:29:::3;;::::0;::::3;;4706:28;4721:12:::0;4706:14:::3;:28::i;:::-;-1:-1:-1::0;;;;;4749:22:26;::::3;;::::0;;;:8:::3;:22;::::0;;;;;;;;:29:::3;;::::0;4538:273;;-1:-1:-1;;;;;;4538:273:26::3;::::0;;;;;;::::3;::::0;::::3;::::0;;;;4749:29:::3;4538:273:::0;;::::3;::::0;;;;;;;;;;;4749:29;;;::::3;4538:273:::0;;;;;;;;;;;;;;;;;;;;;;;::::3;;::::0;::::3;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;4538:273:26;;-1:-1:-1;4902:11:26::3;4916:20;4538:273:::0;4916:12:::3;:20::i;:::-;4955:12:::0;;;::::3;::::0;;;-1:-1:-1;4133:848:26;;-1:-1:-1;;;;;;;4133:848:26:o;12623:783::-;12814:16;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;12882:71:26::2;12903:14;12919:24;12945:7;12882:20;:71::i;:::-;13033:19;13075:6;;;;;;;;;-1:-1:-1::0;;;;;13075:6:26::2;-1:-1:-1::0;;;;;13055:40:26::2;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;13055:42:26;13166:6:::2;::::0;;13146:57:::2;::::0;;-1:-1:-1;;;13146:57:26;;13183:10:::2;13146:57:::0;;::::2;::::0;;;;;;;;;;;13055:42;;-1:-1:-1;;;;;;13166:6:26::2;::::0;13146:36:::2;::::0;:57;;;;;13166:6:::2;::::0;13146:57;;;;;;;;13166:6;;13146:57;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;13311:87;13335:14;13351:24;13377:11;13390:7;13311:23;:87::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;13304:94:26;12623:783;-1:-1:-1;;;;;12623:783:26:o;3304:137:57:-;726:12:58;:10;:12::i;:::-;3421::57::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:57::1;-1:-1:-1::0;;;;;3421:12:57;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;31208:116:26:-;31271:7;31314:2;31309:1;31314:2;31304:6;31299:2;:11;31298:18;;;;;;;31208:116;-1:-1:-1;;;31208:116:26:o;3417:46:8:-;3459:4;3417:46;:::o;2473:::-;;;-1:-1:-1;;;;;2473:46:8;;:::o;13893:2483:26:-;13994:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;14019:21:26::1;:19;:21::i;:::-;-1:-1:-1::0;;;;;;;;;;;14091:29:26::1;::::0;:8:::1;:29;::::0;-1:-1:-1;;;;;;;;;;;14091:37:26;:52:::1;::::0;14133:9:::1;14091:41;:52::i;:::-;-1:-1:-1::0;;;;;;;;;;;14051:29:26::1;::::0;;;:8:::1;:29;::::0;;;-1:-1:-1;;;;;;;;;;;14051:92:26;;;;14193:6:::1;::::0;;14051:29;14173:42;;-1:-1:-1;;;14173:42:26;;;;14051:29;;-1:-1:-1;;;;;14193:6:26;;::::1;::::0;14173:40:::1;::::0;:42;;::::1;::::0;14051:29;14173:42;;;;;14193:6;14173:42;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;14173:42:26;;-1:-1:-1;14226:22:26::1;14266:25;-1:-1:-1::0;;;14266:9:26::1;:25::i;:::-;14519:13;:20:::0;14226:66;;-1:-1:-1;14496:20:26::1;14550:1612;14574:12;14570:1;:16;14550:1612;;;14608:24;14635:13;14649:1;14635:16;;;;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;-1:-1:-1;;;;;14635:16:26;;::::1;14687:22:::0;;;:8:::1;:22:::0;;;;;;:30;14793:12:::1;::::0;14756:59;;-1:-1:-1;;;14756:59:26;;::::1;::::0;::::1;::::0;;;;;;;;;14793:12:::1;::::0;;::::1;14756:59:::0;;;;;;;;;;;;14635:16;;-1:-1:-1;14687:30:26;14635:16;14756;;::::1;::::0;::::1;::::0;:59;;;;;;;;;;:16;:59;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;14756:59:26;;-1:-1:-1;;;;;;14904:35:26;::::1;-1:-1:-1::0;;;;;;;;;;;14904:35:26::1;14900:616;;;14976:13;14964:9;:25;14960:415;;;15014:46;::::0;:10:::1;::::0;15034:9:::1;:25:::0;;::::1;15014:46:::0;::::1;;;::::0;::::1;::::0;;;15034:25;15014:10;:46;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;14960:415;;;15119:13;15107:9;:25;15103:272;;;15165:9;:14:::0;15157:48:::1;;;::::0;;-1:-1:-1;;;15157:48:26;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;15157:48:26;;;;;;;;;;;;;::::1;;15245:10;::::0;15228:70:::1;::::0;-1:-1:-1;;;15245:10:26;::::1;-1:-1:-1::0;;;;;15245:10:26::1;15257;15277:4;15284:13:::0;15228:16:::1;:70::i;:::-;15321:10;;;;;;;;;-1:-1:-1::0;;;;;15321:10:26::1;-1:-1:-1::0;;;;;15321:19:26::1;;15341:13;15321:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;15103:272;14900:616;;;15428:72;15445:12;15459:10;15479:4;15486:13;15428:16;:72::i;:::-;15573:25;15601:29;:10:::0;15616:13;15601:14:::1;:29::i;:::-;-1:-1:-1::0;;;;;15645:22:26;::::1;;::::0;;;:8:::1;:22;::::0;;;;:50;;;15573:57;;-1:-1:-1;15741:19:26::1;:6:::0;15752:7;15741:10:::1;:19::i;:::-;15851:94;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;15712:48;;-1:-1:-1;;;;;;15851:94:26;::::1;::::0;15866:10:::1;::::0;15851:94:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;;;;;16120:22:26;::::1;;::::0;;;:8:::1;:22;::::0;;;;:29:::1;;::::0;16034:116:::1;::::0;16067:18;;16087:12;;16101:17;;16120:29:::1;;16034:32;:116::i;:::-;-1:-1:-1::0;;14588:3:26::1;::::0;;::::1;::::0;-1:-1:-1;14550:1612:26::1;::::0;-1:-1:-1;;14550:1612:26::1;;-1:-1:-1::0;16254:6:26::1;::::0;;16234:55:::1;::::0;;-1:-1:-1;;;16234:55:26;;16269:10:::1;16234:55:::0;;::::1;::::0;;;;;;;;;;;-1:-1:-1;;;;;16254:6:26;;::::1;::::0;16234:34:::1;::::0;:55;;;;;16254:6:::1;::::0;16234:55;;;;;;;16254:6;;16234:55;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;16361:7:26;;13893:2483;-1:-1:-1;;;;;13893:2483:26:o;2918:166::-;726:12:58;:10;:12::i;:::-;2988:29:26::1;:27;:29::i;:::-;3063:6;::::0;3071:4:::1;::::0;-1:-1:-1;;;;;3063:6:26::1;3046:15;:13;:15::i;:::-;3035:41;;;;;;;;;;;;2918:166::o:0;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2613:34:8;;-1:-1:-1;2613:34:8;:::o;224:26:41:-;;;;:::o;2387:39:8:-;;;-1:-1:-1;;;;;2387:39:8;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;14288:374:8:-;726:12:58;:10;:12::i;:::-;14335:36:8::1;14393:29;-1:-1:-1::0;;;14393:9:8::1;:29::i;:::-;14509:6;::::0;14335:88;;-1:-1:-1;14517:5:8::1;::::0;-1:-1:-1;;;;;14509:6:8::1;14492:15;:13;:15::i;:::-;14481:42;;;;;;;;;;;;14536:45;14562:17;14536;:45::i;:::-;14592:34;::::0;;-1:-1:-1;;;14592:34:8;;2376:2:::1;14592:34;::::0;::::1;::::0;;;-1:-1:-1;;;;;14592:25:8;::::1;::::0;::::1;::::0;:34;;;;;-1:-1:-1;;14592:34:8;;;;;;;-1:-1:-1;14592:25:8;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;14637:17;:15;:17::i;2754:48::-:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;:::o;23243:154::-;23331:7;23358:31;23373:15;16773:225;16927:7;16894:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16959:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:31;;16773:225::o;1068:31:26:-;;;;;;:::o;17872:782:8:-;18123:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;-1:-1:-1;;;1627:20:57::1;18089:14:8::0;1627:5:57::1;:20::i;:::-;18199:12:8::2;-1:-1:-1::0;;;;;18183:28:8::2;:12;-1:-1:-1::0;;;;;18183:28:8::2;;;18175:63;;;::::0;;-1:-1:-1;;;18175:63:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18175:63:8;;;;;;;;;;;;;::::2;;18366:19;::::0;-1:-1:-1;;;;;18366:19:8::2;18358:42:::0;;:158:::2;;-1:-1:-1::0;18422:19:8::2;::::0;:42:::2;::::0;;-1:-1:-1;;;18422:42:8;;-1:-1:-1;;;;;18422:42:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;:33:::2;::::0;:42;;;;;::::2;::::0;;;;;;;;:19;:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18422:42:8;:93;::::2;;;-1:-1:-1::0;18468:19:8::2;::::0;:47:::2;::::0;;-1:-1:-1;;;18468:47:8;;-1:-1:-1;;;;;18468:47:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;:33:::2;::::0;:47;;;;;::::2;::::0;;;;;;;;:19;:47;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18468:47:8;18422:93:::2;18350:207;;;::::0;;-1:-1:-1;;;18350:207:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18350:207:8;;;;;;;;;;;;;::::2;;18577:69;18587:12;18601;18615:7;18624;18633:12;18577:9;:69::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;18570:76:8;17872:782;-1:-1:-1;;;;;;;17872:782:8:o;12580:274::-;726:12:58;:10;:12::i;:::-;12692:16:8::1;::::0;::::1;-1:-1:-1::0;;;12692:16:8;;::::1;::::0;::::1;12674:34:::0;;::::1;;;12666:73;;;::::0;;-1:-1:-1;;;12666:73:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;12775:13;::::0;12755:50:::1;::::0;;12775:13:::1;-1:-1:-1::0;;;12775:13:8;;::::1;::::0;::::1;12755:50:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;12816:13;:30:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;12816:30:8::1;-1:-1:-1::0;;12816:30:8;;::::1;::::0;;;::::1;::::0;;12580:274::o;1164:167:58:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;21965:97:8:-;22048:6;;-1:-1:-1;;;;;22048:6:8;21965:97;:::o;813:104:58:-;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;4077:133:57;4169:8;;:33;;;-1:-1:-1;;;4169:33:57;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:57;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:57;;4077:133;-1:-1:-1;;4077:133:57:o;27252:534:26:-;27441:16;27475:31;27523:14;:21;27509:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27509:36:26;;27475:70;;27561:9;27556:190;27580:14;:21;27576:1;:25;27556:190;;;27641:8;-1:-1:-1;;;;;27641:31:26;;27673:12;27687:8;:27;27696:14;27711:1;27696:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;27687:27:26;;;;;;;;;;;;;;-1:-1:-1;27687:27:26;:35;27724:12;;27641:105;;-1:-1:-1;;;;;;27641:105:26;;;;;;;;;;;;;;;;;;;;;27724:12;;27641:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27641:105:26;27621:17;;:14;;27636:1;;27621:17;;;;;;;;;;;;;;;:125;27603:3;;27556:190;;;-1:-1:-1;27764:14:26;27252:534;-1:-1:-1;;;;;27252:534:26:o;7057:134:8:-;-1:-1:-1;;;;;7135:18:8;;;;;;:8;:18;;;;;:24;;;-1:-1:-1;;;7135:24:8;;;;7127:56;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;;;8436:1703:26;8488:15;;:::i;:::-;8596:19;8627:25;;8618:6;:4;:6::i;:::-;:34;;-1:-1:-1;8757:16:26;8753:71;;-1:-1:-1;;8790:22:26;;;;;;;;;8797:15;8790:22;;;;;;;;;;;8753:71;8890:20;8913:8;:26;8922:13;8936:1;8922:16;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8922:16:26;8913:26;;;;;;;;;;;;:34;8990:13;:16;;8913:34;;-1:-1:-1;8981:8:26;;8922:16;;8990:13;8922:16;;8990;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8990:16:26;8981:26;;;;;;;;;;;;:34;;-1:-1:-1;889:10:26;9147:34;;9143:120;;9205:46;;;;;;;;;;;;;;;;;-1:-1:-1;9198:53:26;;-1:-1:-1;9198:53:26;9143:120;9546:27;;:::i;:::-;-1:-1:-1;9546:45:26;;;;;;;;;9576:15;9546:45;;;;;;;;;;;-1:-1:-1;;9616:31:26;;9634:12;9616:17;:31::i;:::-;9670:13;;9604:43;;-1:-1:-1;9658:9:26;;9670:31;;9688:12;9670:17;:31::i;:::-;9658:43;-1:-1:-1;9809:16:26;9828:64;9873:18;:1;9879:11;9873:5;:18::i;:::-;9828:40;:1;889:10;9834:33;;;9828:5;:40::i;:::-;:44;;:64::i;:::-;9809:83;;9903:16;9922:56;889:10;9922:31;9940:12;9922:11;:13;;;:17;;:31;;;;:::i;:::-;:35;;:56::i;:::-;9903:75;;10014:61;10027:8;10037;738:4;10014:12;:61::i;:::-;10093:38;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;8436:1703:26;:::o;716:89:60:-;772:6;;-1:-1:-1;;;772:6:60;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;;;28249:1695:26;28436:16;28470:21;:19;:21::i;:::-;28504:22;28544:25;-1:-1:-1;;;28544:9:26;:25::i;:::-;28504:66;-1:-1:-1;28581:26:26;28610:25;:12;28627:7;28610:16;:25::i;:::-;28581:54;;28646:31;28680:77;28710:7;28719:14;28735:12;28749:7;28680:29;:77::i;:::-;28646:111;;28775:9;28770:1037;28794:14;:21;28790:1;:25;28770:1037;;;28837:24;28864:14;28879:1;28864:17;;;;;;;;;;;;;;28837:44;;28896:21;28920:14;28935:1;28920:17;;;;;;;;;;;;;;28896:41;;28977:24;29002:1;28977:27;;;;;;;;;;;;;;28960:13;:44;;28952:79;;;;;-1:-1:-1;;;28952:79:26;;;;;;;;;;;;-1:-1:-1;;;28952:79:26;;;;;;;;;;;;;;;-1:-1:-1;;;;;29076:22:26;;29048:25;29076:22;;;:8;:22;;;;;:30;:49;;29111:13;29076:34;:49::i;:::-;-1:-1:-1;;;;;29140:22:26;;;;;;:8;:22;;;;;:50;;;29048:77;;-1:-1:-1;;;;;;;;;;;;29294:35:26;29290:182;;;29348:34;;:10;;:34;;;;;29368:13;;29348:34;;;;29368:13;29348:10;:34;;;;;;;;;;;;;;;;;;;;;29290:182;;;29419:53;29432:12;29446:10;29458:13;29419:12;:53::i;:::-;29494:96;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;29494:96:26;;;29511:10;;29494:96;;;;;;;;;-1:-1:-1;;;;;29765:22:26;;;;;;:8;:22;;;;;:29;;;29679:116;;29712:18;;29732:12;;29746:17;;29765:29;;29679:32;:116::i;:::-;-1:-1:-1;;;28817:3:26;;28770:1037;;;-1:-1:-1;29922:14:26;28249:1695;-1:-1:-1;;;;;;;28249:1695:26:o;1041:126:65:-;-1:-1:-1;;;;;1110:25:65;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;1196:290:63;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;20061:322:8:-:0;20138:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;20168:36:8;::::1;-1:-1:-1::0;;;;;;;;;;;20168:36:8::1;20164:211;;;-1:-1:-1::0;;;;;20219:23:8;::::1;;::::0;;;:8:::1;:23;::::0;;;;20253:21:::1;20219:55:::0;;20164:211:::1;;;20337:38;::::0;;-1:-1:-1;;;20337:38:8;;20369:4:::1;20337:38;::::0;::::1;::::0;;;-1:-1:-1;;;;;20337:23:8;::::1;::::0;::::1;::::0;:38;;;;;::::1;::::0;;;;;;;;:23;:38;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;20337:38:8;-1:-1:-1;;;;;20303:23:8;::::1;;::::0;;;:8:::1;20337:38;20303:23:::0;;;;:72;20164:211:::1;20061:322:::0;;:::o;1722:139:57:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:57;:10;-1:-1:-1;;;;;1793:38:57;;1785:68;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;;;15286:803:8;726:12:58;:10;:12::i;:::-;6615:11:8::1;:9;:11::i;:::-;15460:6:::2;594:23:65;608:8;594:13;:23::i;:::-;15494:6:8::3;948:18:65;957:8;948;:18::i;:::-;15531:7:8::4;7656:28;7676:7;7656:19;:28::i;:::-;15618:6:::5;::::0;-1:-1:-1;;;;;15591:34:8;;::::5;15618:6:::0;::::5;15591:34;::::0;::::5;::::0;:61:::5;;-1:-1:-1::0;;;;;;15630:16:8;::::5;;::::0;;;:8:::5;:16;::::0;;;;:22:::5;;::::0;-1:-1:-1;;;15630:22:8;::::5;;;15629:23;15591:61;15583:93;;;::::0;;-1:-1:-1;;;15583:93:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15583:93:8;;;;;;;;;;;;;::::5;;15723:12;::::0;::::5;::::0;;::::5;1846:7;15706:29;15695:40:::0;::::5;::::0;;::::5;;;15687:79;;;::::0;;-1:-1:-1;;;15687:79:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;15785:32;:19;:17;:19::i;:::-;:32;;;15777:70;;;::::0;;-1:-1:-1;;;15777:70:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15777:70:8;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;;;;15889:16:8;;::::5;15860:26;15889:16:::0;;;:8:::5;:16;::::0;;;;15916:22;;;15949:17:::5;::::0;;::::5;:27:::0;;-1:-1:-1;;15949:27:8::5;::::0;;::::5;-1:-1:-1::0;;15949:27:8;;::::5;;15987:23:::0;;;::::5;-1:-1:-1::0;;;15987:23:8::5;::::0;;;:16:::5;16021:26:::0;;;;::::5;::::0;;;;;;;;::::5;::::0;;-1:-1:-1;;;;;;16021:26:8::5;::::0;;::::5;::::0;;;16058:12:::5;:23:::0;;;;::::5;::::0;;::::5;::::0;;::::5;::::0;::::5;::::0;;;::::5;::::0;;15286:803::o;6440:87::-;6492:10;:8;:10::i;:::-;6484:35;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;;;21082:1181:26;21306:13;:20;21355:21;;21247:9;;;;21345:31;;21337:63;;;;;-1:-1:-1;;;21337:63:26;;;;;;;;;;;;-1:-1:-1;;;21337:63:26;;;;;;;;;;;;;;;21429:15;:22;21419:6;:32;21411:63;;;;;-1:-1:-1;;;21411:63:26;;;;;;;;;;;;-1:-1:-1;;;21411:63:26;;;;;;;;;;;;;;;21496:1;21492:5;;21487:650;21503:6;21499:1;:10;21487:650;;;21627:8;:27;21636:14;21651:1;21636:17;;;;;;;;;;;;;;-1:-1:-1;;;;;21627:27:26;-1:-1:-1;;;;;21627:27:26;;;;;;;;;;;;:33;;;;;;;;;;;;21619:65;;;;;-1:-1:-1;;;21619:65:26;;;;;;;;;;;;-1:-1:-1;;;21619:65:26;;;;;;;;;;;;;;;21708:1;21704:5;;21699:133;21715:6;21711:1;:10;21699:133;;;21771:14;21786:1;21771:17;;;;;;;;;;;;;;-1:-1:-1;;;;;21751:37:26;:13;21765:1;21751:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21751:16:26;:37;21747:69;;;21811:5;;21747:69;21723:3;;;;;21699:133;;;21946:6;21942:1;:10;21934:42;;;;;-1:-1:-1;;;21934:42:26;;;;;;;;;;;;-1:-1:-1;;;21934:42:26;;;;;;;;;;;;;;;22101:1;22080:15;22096:1;22080:18;;;;;;;;;;;;;;:22;22072:53;;;;;-1:-1:-1;;;22072:53:26;;;;;;;;;;;;-1:-1:-1;;;22072:53:26;;;;;;;;;;;;;;;21511:3;;;;;21487:650;;;22234:1;22224:7;:11;22216:39;;;;;-1:-1:-1;;;22216:39:26;;;;;;;;;;;;-1:-1:-1;;;22216:39:26;;;;;;;;;;;;;;22580:379;22736:7;22765:17;22761:99;;22804:56;22828:14;22844:15;22804:23;:56::i;:::-;22797:63;;;;22761:99;22878:73;22905:14;22921:15;22938:12;22878:26;:73::i;:::-;22871:80;22580:379;-1:-1:-1;;;;22580:379:26:o;19713:155:8:-;19826:13;;19781:7;;19808:52;;1846:7;;19808:32;;:13;;-1:-1:-1;;;19826:13:8;;19808:52;19826:13;;;;19808:17;:32;:::i;:::-;:36;;:52::i;20456:205::-;20530:13;:20;20507;20561:92;20585:12;20581:1;:16;20561:92;;;20617:36;20636:13;20650:1;20636:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20636:16:8;20617:18;:36::i;:::-;20599:3;;20561:92;;778:147:61;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;2190:348:62:-;2355:71;;;-1:-1:-1;;;;;2355:71:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:62;-1:-1:-1;;;2355:71:62;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:62;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:62;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:62;;;;;;;;;;;;;;;;;;;;;;;;;;;386:169:61;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;33843:310:26;34046:6;;-1:-1:-1;;;;;34010:135:26;;;;34046:6;34010:135;34071:35;:15;1846:7:8;34071:19:26;:35::i;:::-;34108:36;:16;:36;;;;;:20;:36;:::i;:::-;34010:135;;;;;;;;;;;;;;;;;;;;;;33843:310;;;;:::o;2501:239:13:-;2661:1;2639:19;:17;:19::i;:::-;:23;;;2631:61;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;;;;2703:29;:27;:29::i;5564:1852:26:-;5753:7;5826:14;5842:11;5857:55;5876:12;5890;5904:7;5857:18;:55::i;:::-;5825:87;;;;5993:6;6003:1;5993:11;;5985:46;;;;;-1:-1:-1;;;5985:46:26;;;;;;;;;;;;-1:-1:-1;;;5985:46:26;;;;;;;;;;;;;;;6128:28;6143:12;6128:14;:28::i;:::-;6119:6;:37;6112:45;;;;-1:-1:-1;;;;;6237:35:26;;-1:-1:-1;;;;;;;;;;;6237:35:26;6233:270;;;6308:7;6295:9;:20;6287:56;;;;;-1:-1:-1;;;6287:56:26;;;;;;;;;;;;-1:-1:-1;;;6287:56:26;;;;;;;;;;;;;;;6233:270;;;6380:9;:14;:100;;;;;6473:7;6398:71;6440:28;6455:12;6440:14;:28::i;:::-;6398:37;;;-1:-1:-1;;;6398:37:26;;6429:4;6398:37;;;;;;-1:-1:-1;;;;;6398:22:26;;;;;:37;;;;;;;;;;;;;;:22;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6398:37:26;;:41;:71::i;:::-;:82;;6380:100;6372:131;;;;;-1:-1:-1;;;6372:131:26;;;;;;;;;;;;-1:-1:-1;;;6372:131:26;;;;;;;;;;;;;;;6554:32;6573:12;6554:18;:32::i;:::-;-1:-1:-1;;;;;6630:22:26;;;;;;:8;:22;;;;;:30;:42;;6665:6;6630:34;:42::i;:::-;-1:-1:-1;;;;;6597:22:26;;;;;;:8;:22;;;;;:75;;;;-1:-1:-1;;;;;;;;;;;6759:35:26;6755:160;;;6809:29;;-1:-1:-1;;;;;6809:21:26;;;:29;;;;;6831:6;;6809:29;;;;6831:6;6809:21;:29;;;;;;;;;;;;;;;;;;;;;6755:160;;;6867:48;6880:12;6894;6908:6;6867:12;:48::i;:::-;6975:14;;;;:52;;;;;7021:6;:4;:6::i;:::-;6993:25;;:34;6975:52;6971:171;;;7062:19;:17;:19::i;:::-;7044:37;;:15;:37;;;;;;7124:6;:4;:6::i;:::-;7096:25;:34;6971:171;7196:82;7220:12;7234;7248:7;7257;7266:6;7274:3;7196:23;:82::i;:::-;7325:57;7355:12;7369;7325:29;:57::i;:::-;-1:-1:-1;7402:6:26;5564:1852;-1:-1:-1;;;;;;5564:1852:26:o;579:117:41:-;627:7;653:11;;668:1;653:16;;:36;;686:3;653:36;;;-1:-1:-1;672:11:41;;;579:117::o;1149:250:61:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:61;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;;;34608:223:26;34691:7;34700;34729:4;34724:2;:9;:22;;;;34742:4;34737:2;:9;34724:22;34720:77;;;34768:29;34784:2;34788;34792:4;34768:15;:29::i;:::-;34761:36;;;;;;34720:77;-1:-1:-1;34816:2:26;;34820;;-1:-1:-1;;34608:223:26:o;1485:312:62:-;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;;1485:312;;;;;:::o;692:128:65:-;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;6701:88:8;6756:10;:8;:10::i;:::-;6755:11;6747:34;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;;;7759:157;7847:1;7837:7;:11;;;:40;;;;-1:-1:-1;1846:7:8;7852:25;;;;;7837:40;7829:79;;;;;-1:-1:-1;;;7829:79:8;;;;;;;;;;;;;;;;;;;;;;;;;;;23240:1215:26;23379:7;23489:14;23506:30;23520:15;23506:13;:30::i;:::-;23489:47;;23633:9;23628:742;23652:14;:21;23648:1;:25;23628:742;;;23695:24;23722:14;23737:1;23722:17;;;;;;;;;;;;;;23695:44;;23754:21;23778:15;23794:1;23778:18;;;;;;;;;;;;;;23754:42;;-1:-1:-1;;;;;;;;;;;;;;;;23817:35:26;:12;-1:-1:-1;;;;;23817:35:26;;23813:193;;23934:72;23951:12;23965:10;23985:4;23992:13;23934:16;:72::i;:::-;-1:-1:-1;;;;;24023:22:26;;;;;;:8;:22;;;;;;;;;:46;;;24091:78;;;;;;;;;;;;;;;;;;;24106:10;;24091:78;;;;;;;;;;-1:-1:-1;;;;;24328:22:26;;;;;;:8;:22;;;;;:29;;;24258:100;;24291:6;;24299:12;;24313:13;;24328:29;;24258:32;:100::i;:::-;-1:-1:-1;;23675:3:26;;23628:742;;;-1:-1:-1;24441:6:26;23240:1215;-1:-1:-1;;;23240:1215:26:o;24792:2004::-;24956:7;24981:21;:19;:21::i;:::-;-1:-1:-1;;;;;;;;;;;25053:29:26;;:8;:29;;-1:-1:-1;;;;;;;;;;;25053:37:26;:52;;25095:9;25053:41;:52::i;:::-;-1:-1:-1;;;;;;;;;;;25013:29:26;;;;:8;:29;;-1:-1:-1;;;;;;;;;;;25013:92:26;;;;25158:25;-1:-1:-1;;;25158:9:26;:25::i;:::-;25118:66;;25195:14;25212:67;25224:7;25233:12;25247:14;25263:15;25212:11;:67::i;:::-;25195:84;-1:-1:-1;25290:26:26;25319:24;:12;25195:84;25319:16;:24::i;:::-;25290:53;;25361:9;25356:1355;25380:14;:21;25376:1;:25;25356:1355;;;25423:24;25450:14;25465:1;25450:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25503:22:26;;;25482:18;25503:22;;;:8;:22;;;;;;:30;25615:12;;25572:64;;-1:-1:-1;;;25572:64:26;;;;;;;;;;;;;;25615:12;;;;25572:64;;;;;;;;;;;;25450:17;;-1:-1:-1;25503:30:26;25482:18;;25572:16;;;;;;:64;;;;;25450:17;;25572:64;;;;;;:16;:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25572:64:26;;-1:-1:-1;25659:17:26;25651:52;;;;;-1:-1:-1;;;25651:52:26;;;;;;;;;;;;-1:-1:-1;;;25651:52:26;;;;;;;;;;;;;;;25742:15;25758:1;25742:18;;;;;;;;;;;;;;25725:13;:35;;25718:43;;;;-1:-1:-1;;;;;25865:35:26;;-1:-1:-1;;;;;;;;;;;25865:35:26;25861:378;;25982:72;25999:12;26013:10;26033:4;26040:13;25982:16;:72::i;:::-;25861:378;;;26099:13;26078:15;26094:1;26078:18;;;;;;;;;;;;;;:34;26074:165;;;26184:10;-1:-1:-1;;;;;26184:19:26;:55;26225:13;26204:15;26220:1;26204:18;;;;;;;;;;;;;;:34;26184:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26074:165;26256:25;26284:29;:10;26299:13;26284:14;:29::i;:::-;-1:-1:-1;;;;;26328:22:26;;;;;;:8;:22;;;;;;;;;:50;;;26400:94;;;;;;;;;;;;;;;;;;;26256:57;;-1:-1:-1;26328:22:26;;26415:10;;26400:94;;;;;;;;;;-1:-1:-1;;;;;26669:22:26;;;;;;:8;:22;;;;;:29;;;26583:116;;26616:18;;26636:12;;26650:17;;26669:29;;26583:32;:116::i;:::-;-1:-1:-1;;25403:3:26;;;;;-1:-1:-1;25356:1355:26;;-1:-1:-1;25356:1355:26;;-1:-1:-1;26782:6:26;;24792:2004;-1:-1:-1;;;;;;24792:2004:26:o;1627:174:61:-;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:61:o;11633:276:8:-;726:12:58;:10;:12::i;:::-;11803:1:8::1;11781:19;:17;:19::i;:::-;:23;;;11773:61;;;::::0;;-1:-1:-1;;;11773:61:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11773:61:8;;;;;;;;;;;;;::::1;;11845:6;::::0;;:24:::1;::::0;;-1:-1:-1;;;11845:24:8;;;;-1:-1:-1;;;;;11845:6:8;;::::1;::::0;:22:::1;::::0;:24;;::::1;::::0;:6:::1;::::0;:24;;;;;;:6;;:24;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11880:21;:19;:21::i;21084:758::-:0;-1:-1:-1;;;21705:10:8;:21;21698:29;;;;21743:91;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21743:91:8;;;;;;;;;;;;;;;;;;;;;21084:758;;;;;;:::o;32195:1330:26:-;32305:23;32351:6;;;;;;;;;-1:-1:-1;;;;;32351:6:26;-1:-1:-1;;;;;32331:40:26;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32331:42:26;;-1:-1:-1;32384:28:26;32415;32430:12;32415:14;:28::i;:::-;32384:59;;32454:28;32485;32500:12;32485:14;:28::i;:::-;-1:-1:-1;;;;;32553:22:26;;;32524:26;32553:22;;;:8;:22;;;;;;:29;;;;;32622:22;;;;;;;;:29;;32454:59;;-1:-1:-1;32553:29:26;;;;;32622;;;32748:45;;32454:59;;32553:29;;32748:24;:45;:::i;:::-;32732:61;-1:-1:-1;32804:13:26;32820:45;:20;:45;;;;;:24;:45;:::i;:::-;32881:57;;;;;;;;;;;;;;32804:61;;-1:-1:-1;;;;;;32881:57:26;;;;;;;;;;;;;;;;33016:106;33049:15;33066:12;33080:20;33102:19;33016:32;:106::i;:::-;33133;33166:15;33183:12;33197:20;33219:19;33133:32;:106::i;:::-;33323:89;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33323:89:26;;;;;;;;;;;;;33428;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33428:89:26;;;;;;;;;;;;;32195:1330;;;;;;;;;:::o;34928:345::-;35016:7;35025;35055:2;35049;:8;35045:58;;;-1:-1:-1;;35089:1:26;35080:10;;;35072:31;;35045:58;35123:2;35118;:7;35114:62;;;35147:29;35161:2;35165;35169:6;35147:13;:29::i;35114:62::-;35188:9;35199;35212:29;35226:2;35230;35234:6;35212:13;:29::i;:::-;35187:54;;;-1:-1:-1;34928:345:26;-1:-1:-1;;;;;;34928:345:26:o;29952:608::-;30112:7;;30180:1;30163:249;30187:14;:21;30183:1;:25;30163:249;;;30303:66;30333:8;:27;30342:14;30357:1;30342:17;;;;;;;;;;;;;;-1:-1:-1;;;;;30333:27:26;-1:-1:-1;;;;;30333:27:26;;;;;;;;;;;;:35;;;30303:15;30319:8;30303:25;;;;;;;;;;;;;;:29;;:66;;;;:::i;:::-;30234;30257:8;:34;30266:14;30281:8;30266:24;;;;;;;;;;;;;;-1:-1:-1;;;;;30257:34:26;-1:-1:-1;;;;;30257:34:26;;;;;;;;;;;;:42;;;30234:15;30250:1;30234:18;;;;;;;:66;:135;30230:170;;;30399:1;30388:12;;30230:170;30210:3;;30163:249;;;;30429:7;-1:-1:-1;;;;;30429:24:26;;30454:12;30468:8;:34;30477:14;30492:8;30477:24;;;;;;;;;;;;;;-1:-1:-1;;;;;30468:34:26;-1:-1:-1;;;;;30468:34:26;;;;;;;;;;;;:42;;;30512:12;;;;;;;;;;;30526:15;30542:8;30526:25;;;;;;;;;;;;;;30429:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30429:123:26;;29952:608;-1:-1:-1;;;;;;29952:608:26:o;35393:404::-;35479:7;35488;35508:14;35539:6;-1:-1:-1;;35525:20:26;;;;;;35508:37;;35565:6;35560:2;:11;35556:121;;;35588:9;35606:6;35615:1;35606:10;35600:2;:17;;;;;;35620:1;35600:21;35588:33;;35642:1;35636:7;;;;;;;;;35664:1;35658:7;;;;;;;;;35556:121;;35687:9;35699:33;35708:11;;;35721:10;35708:2;35728;35721:6;:10::i;:::-;35699:8;:33::i;:::-;35687:45;35755:10;;;;;-1:-1:-1;35393:404:26;;-1:-1:-1;;;;;35393:404:26:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol\";\n\ncontract TestLiquidityPoolV1Converter is LiquidityPoolV1Converter {\n uint256 public currentTime;\n\n constructor(\n ISmartToken _token,\n IContractRegistry _registry,\n uint32 _maxConversionFee\n )\n LiquidityPoolV1Converter(_token, _registry, _maxConversionFee)\n public\n {\n }\n\n function setEtherToken(IEtherToken _etherToken) public {\n etherToken = _etherToken;\n }\n\n function time() internal view override returns (uint256) {\n return currentTime != 0 ? currentTime : now;\n }\n\n function setTime(uint256 _currentTime) public {\n currentTime = _currentTime;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV1Converter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV1Converter.sol", + "exportedSymbols": { + "TestLiquidityPoolV1Converter": [ + 19427 + ] + }, + "id": 19428, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19372, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:41" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "file": "../converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "id": 19373, + "nodeType": "ImportDirective", + "scope": 19428, + "sourceUnit": 16594, + "src": "75:75:41", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19374, + "name": "LiquidityPoolV1Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16593, + "src": "193:24:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + }, + "id": 19375, + "nodeType": "InheritanceSpecifier", + "src": "193:24:41" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 16593, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19427, + "linearizedBaseContracts": [ + 19427, + 16593, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "TestLiquidityPoolV1Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d18e81b3", + "id": 19377, + "mutability": "mutable", + "name": "currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19427, + "src": "224:26:41", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19391, + "nodeType": "Block", + "src": "464:7:41", + "statements": [] + }, + "documentation": null, + "id": 19392, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19386, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19379, + "src": "407:6:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 19387, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19381, + "src": "415:9:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19388, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19383, + "src": "426:17:41", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 19389, + "modifierName": { + "argumentTypes": null, + "id": 19385, + "name": "LiquidityPoolV1Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16593, + "src": "382:24:41", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV1Converter_$16593_$", + "typeString": "type(contract LiquidityPoolV1Converter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "382:62:41" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19379, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "278:18:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 19378, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "278:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19381, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "306:27:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19380, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "306:17:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19383, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "343:24:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19382, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "343:6:41", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "268:105:41" + }, + "returnParameters": { + "id": 19390, + "nodeType": "ParameterList", + "parameters": [], + "src": "464:0:41" + }, + "scope": 19427, + "src": "257:214:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19401, + "nodeType": "Block", + "src": "532:41:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19397, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "542:10:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19398, + "name": "_etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19394, + "src": "555:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "src": "542:24:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "id": 19400, + "nodeType": "ExpressionStatement", + "src": "542:24:41" + } + ] + }, + "documentation": null, + "functionSelector": "6ad419a8", + "id": 19402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19394, + "mutability": "mutable", + "name": "_etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19402, + "src": "500:23:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 19393, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21487, + "src": "500:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:25:41" + }, + "returnParameters": { + "id": 19396, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:0:41" + }, + "scope": 19427, + "src": "477:96:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 16437 + ], + "body": { + "id": 19415, + "nodeType": "Block", + "src": "636:60:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19408, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "653:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "668:1:41", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "653:16:41", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 19412, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "686:3:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "653:36:41", + "trueExpression": { + "argumentTypes": null, + "id": 19411, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "672:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19407, + "id": 19414, + "nodeType": "Return", + "src": "646:43:41" + } + ] + }, + "documentation": null, + "id": 19416, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "609:8:41" + }, + "parameters": { + "id": 19403, + "nodeType": "ParameterList", + "parameters": [], + "src": "592:2:41" + }, + "returnParameters": { + "id": 19407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19406, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19416, + "src": "627:7:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "626:9:41" + }, + "scope": 19427, + "src": "579:117:41", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19425, + "nodeType": "Block", + "src": "748:43:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19421, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "758:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19422, + "name": "_currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19418, + "src": "772:12:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:26:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19424, + "nodeType": "ExpressionStatement", + "src": "758:26:41" + } + ] + }, + "documentation": null, + "functionSelector": "3beb26c4", + "id": 19426, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19418, + "mutability": "mutable", + "name": "_currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19426, + "src": "719:20:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "719:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "718:22:41" + }, + "returnParameters": { + "id": 19420, + "nodeType": "ParameterList", + "parameters": [], + "src": "748:0:41" + }, + "scope": 19427, + "src": "702:89:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19428, + "src": "152:641:41" + } + ], + "src": "51:743:41" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV1Converter.sol", + "exportedSymbols": { + "TestLiquidityPoolV1Converter": [ + 19427 + ] + }, + "id": 19428, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19372, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:41" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "file": "../converter/types/liquidity-pool-v1/LiquidityPoolV1Converter.sol", + "id": 19373, + "nodeType": "ImportDirective", + "scope": 19428, + "sourceUnit": 16594, + "src": "75:75:41", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19374, + "name": "LiquidityPoolV1Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 16593, + "src": "193:24:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV1Converter_$16593", + "typeString": "contract LiquidityPoolV1Converter" + } + }, + "id": 19375, + "nodeType": "InheritanceSpecifier", + "src": "193:24:41" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 16593, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19427, + "linearizedBaseContracts": [ + 19427, + 16593, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "TestLiquidityPoolV1Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d18e81b3", + "id": 19377, + "mutability": "mutable", + "name": "currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19427, + "src": "224:26:41", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19391, + "nodeType": "Block", + "src": "464:7:41", + "statements": [] + }, + "documentation": null, + "id": 19392, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19386, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19379, + "src": "407:6:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + { + "argumentTypes": null, + "id": 19387, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19381, + "src": "415:9:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19388, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19383, + "src": "426:17:41", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 19389, + "modifierName": { + "argumentTypes": null, + "id": 19385, + "name": "LiquidityPoolV1Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16593, + "src": "382:24:41", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV1Converter_$16593_$", + "typeString": "type(contract LiquidityPoolV1Converter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "382:62:41" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19379, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "278:18:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + }, + "typeName": { + "contractScope": null, + "id": 19378, + "name": "ISmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21516, + "src": "278:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ISmartToken_$21516", + "typeString": "contract ISmartToken" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19381, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "306:27:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19380, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "306:17:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19383, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19392, + "src": "343:24:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19382, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "343:6:41", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "268:105:41" + }, + "returnParameters": { + "id": 19390, + "nodeType": "ParameterList", + "parameters": [], + "src": "464:0:41" + }, + "scope": 19427, + "src": "257:214:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19401, + "nodeType": "Block", + "src": "532:41:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19397, + "name": "etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14431, + "src": "542:10:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19398, + "name": "_etherToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19394, + "src": "555:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "src": "542:24:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "id": 19400, + "nodeType": "ExpressionStatement", + "src": "542:24:41" + } + ] + }, + "documentation": null, + "functionSelector": "6ad419a8", + "id": 19402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setEtherToken", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19394, + "mutability": "mutable", + "name": "_etherToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19402, + "src": "500:23:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + }, + "typeName": { + "contractScope": null, + "id": 19393, + "name": "IEtherToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21487, + "src": "500:11:41", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IEtherToken_$21487", + "typeString": "contract IEtherToken" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:25:41" + }, + "returnParameters": { + "id": 19396, + "nodeType": "ParameterList", + "parameters": [], + "src": "532:0:41" + }, + "scope": 19427, + "src": "477:96:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 16437 + ], + "body": { + "id": 19415, + "nodeType": "Block", + "src": "636:60:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19408, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "653:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19409, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "668:1:41", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "653:16:41", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 19412, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "686:3:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "653:36:41", + "trueExpression": { + "argumentTypes": null, + "id": 19411, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "672:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19407, + "id": 19414, + "nodeType": "Return", + "src": "646:43:41" + } + ] + }, + "documentation": null, + "id": 19416, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "609:8:41" + }, + "parameters": { + "id": 19403, + "nodeType": "ParameterList", + "parameters": [], + "src": "592:2:41" + }, + "returnParameters": { + "id": 19407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19406, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19416, + "src": "627:7:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "626:9:41" + }, + "scope": 19427, + "src": "579:117:41", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19425, + "nodeType": "Block", + "src": "748:43:41", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19421, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19377, + "src": "758:11:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19422, + "name": "_currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19418, + "src": "772:12:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:26:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19424, + "nodeType": "ExpressionStatement", + "src": "758:26:41" + } + ] + }, + "documentation": null, + "functionSelector": "3beb26c4", + "id": 19426, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19418, + "mutability": "mutable", + "name": "_currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19426, + "src": "719:20:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "719:7:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "718:22:41" + }, + "returnParameters": { + "id": 19420, + "nodeType": "ParameterList", + "parameters": [], + "src": "748:0:41" + }, + "scope": 19427, + "src": "702:89:41", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19428, + "src": "152:641:41" + } + ], + "src": "51:743:41" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.975Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "addLiquidity(address[],uint256[],uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller note that prior to version 28, you should use 'fund' instead", + "params": { + "_minReturn": "token minimum return-amount", + "_reserveAmounts": "amount of each reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "amount of pool tokens issued" + } + }, + "addLiquidityCost(address[],uint256,uint256)": { + "details": "given the amount of one of the reserve tokens to add liquidity of, returns the required amount of each one of the other reserve tokens since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)", + "params": { + "_reserveAmount": "amount of the relevant reserve token", + "_reserveTokenIndex": "index of the relevant reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the required amount of each one of the reserve tokens" + } + }, + "addLiquidityReturn(address,uint256)": { + "details": "given the amount of one of the reserve tokens to add liquidity of, returns the amount of pool tokens entitled for it since an empty pool can be funded with any list of non-zero input amounts, this function assumes that the pool is not empty (has already been funded)", + "params": { + "_reserveAmount": "amount of the reserve token", + "_reserveToken": "address of the reserve token" + }, + "returns": { + "_0": "the amount of pool tokens entitled" + } + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "converterType()": { + "details": "returns the converter type", + "returns": { + "_0": "see the converter types in the the main contract doc" + } + }, + "decimalLength(uint256)": { + "details": "returns the number of decimal digits in a given value", + "params": { + "_x": "value (assumed positive)" + }, + "returns": { + "_0": "the number of decimal digits in the given value" + } + }, + "fund(uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller for example, if the caller increases the supply by 10%, then it will cost an amount equal to 10% of each reserve token balance note that starting from version 28, you should use 'addLiquidity' instead", + "params": { + "_amount": "amount to increase the supply by (in the pool token)" + }, + "returns": { + "_0": "amount of pool tokens issued" + } + }, + "geometricMean(uint256[])": { + "details": "returns the average number of decimal digits in a given list of values", + "params": { + "_values": "list of values (each of which assumed positive)" + }, + "returns": { + "_0": "the average number of decimal digits in the given list of values" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "liquidate(uint256)": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool for example, if the holder sells 10% of the supply, then they will receive 10% of each reserve token balance in return note that starting from version 28, you should use 'removeLiquidity' instead", + "params": { + "_amount": "amount to liquidate (in the pool token)" + }, + "returns": { + "_0": "the amount of each reserve token granted for the given amount of pool tokens" + } + }, + "recentAverageRate(address)": { + "details": "returns the recent average rate of 1 `_token` in the other reserve token units note that the rate can only be queried for reserves in a standard pool", + "params": { + "_token": "token to get the rate for" + }, + "returns": { + "_0": "recent average rate between the reserves (numerator)", + "_1": "recent average rate between the reserves (denominator)" + } + }, + "removeLiquidity(uint256,address[],uint256[])": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool note that prior to version 28, you should use 'liquidate' instead", + "params": { + "_amount": "token amount", + "_reserveMinReturnAmounts": "minimum return-amount of each reserve token", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the amount of each reserve token granted for the given amount of pool tokens" + } + }, + "removeLiquidityReturn(uint256,address[])": { + "details": "returns the amount of each reserve token entitled for a given amount of pool tokens", + "params": { + "_amount": "amount of pool tokens", + "_reserveTokens": "address of each reserve token" + }, + "returns": { + "_0": "the amount of each reserve token entitled for the given amount of pool tokens" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "roundDiv(uint256,uint256)": { + "details": "returns the nearest integer to a given quotient", + "params": { + "_d": "quotient denominator", + "_n": "quotient numerator" + }, + "returns": { + "_0": "the nearest integer to the given quotient" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "targetAmountAndFee(address,address,uint256)": { + "details": "returns the expected target amount of converting one reserve to another along with the fee", + "params": { + "_amount": "amount of tokens received from the user", + "_sourceToken": "contract address of the source reserve token", + "_targetToken": "contract address of the target reserve token" + }, + "returns": { + "_0": "expected target amount", + "_1": "expected fee" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV2Converter.json b/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV2Converter.json new file mode 100644 index 00000000..74901fd7 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestLiquidityPoolV2Converter.json @@ -0,0 +1,4180 @@ +{ + "contractName": "TestLiquidityPoolV2Converter", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IPoolTokensContainer", + "name": "_token", + "type": "address" + }, + { + "internalType": "contract IContractRegistry", + "name": "_registry", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_maxConversionFee", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "contract IConverterAnchor", + "name": "_anchor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "_activated", + "type": "bool" + } + ], + "name": "Activation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_fromToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_toToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_return", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "_conversionFee", + "type": "int256" + } + ], + "name": "Conversion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "ConversionFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_newSupply", + "type": "uint256" + } + ], + "name": "LiquidityRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "_prevFee", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "_newFee", + "type": "uint32" + } + ], + "name": "OracleDeviationFeeUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token1", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20Token", + "name": "_token2", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateN", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_rateD", + "type": "uint256" + } + ], + "name": "TokenRateUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_primaryReserveToken", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_primaryReserveOracle", + "type": "address" + }, + { + "internalType": "contract IChainlinkPriceOracle", + "name": "_secondaryReserveOracle", + "type": "address" + } + ], + "name": "activate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "addLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "addReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "anchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "connectorTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "connectorTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_address", + "type": "address" + } + ], + "name": "connectors", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionWhitelist", + "outputs": [ + { + "internalType": "contract IWhitelist", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "conversionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_trader", + "type": "address" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + } + ], + "name": "convert", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "currentTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disableMaxStakedBalances", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "effectiveReserveWeights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "effectiveTokensRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalRate", + "outputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalRateUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_connectorToken", + "type": "address" + } + ], + "name": "getConnectorBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getReturn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hasETHReserve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isV28OrHigher", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + } + ], + "name": "liquidationLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxConversionFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxStakedBalanceEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "maxStakedBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onlyOwnerCanUpdateRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracleDeviationFee", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "poolToken", + "outputs": [ + { + "internalType": "contract ISmartToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevRegistry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceOracle", + "outputs": [ + { + "internalType": "contract IPriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primaryReserveToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IContractRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minReturn", + "type": "uint256" + } + ], + "name": "removeLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISmartToken", + "name": "_poolToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "removeLiquidityReturnAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveAmplifiedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveStakedBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reserveTokenCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "reserveTokens", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + } + ], + "name": "reserveWeight", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "name": "reserves", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "weight", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "deprecated1", + "type": "bool" + }, + { + "internalType": "bool", + "name": "deprecated2", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isSet", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "restoreRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_onlyOwnerCanUpdateRegistry", + "type": "bool" + } + ], + "name": "restrictRegistryUpdate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "secondaryReserveToken", + "outputs": [ + { + "internalType": "contract IERC20Token", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_conversionFee", + "type": "uint32" + } + ], + "name": "setConversionFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWhitelist", + "name": "_whitelist", + "type": "address" + } + ], + "name": "setConversionWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_reserve1MaxStakedBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reserve2MaxStakedBalance", + "type": "uint256" + } + ], + "name": "setMaxStakedBalances", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_oracleDeviationFee", + "type": "uint32" + } + ], + "name": "setOracleDeviationFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_balance", + "type": "uint256" + } + ], + "name": "setReserveStakedBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_sourceToken", + "type": "address" + }, + { + "internalType": "contract IERC20Token", + "name": "_targetToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "targetAmountAndFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferAnchorOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferTokenOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawFromAnchor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_externalRateUpdateTime", + "type": "uint256" + } + ], + "name": "setExternalRateUpdateTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_currentTime", + "type": "uint256" + } + ], + "name": "setTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_reserveToken", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_weight", + "type": "uint32" + } + ], + "name": "setReserveWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IPoolTokensContainer\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"_activated\",\"type\":\"bool\"}],\"name\":\"Activation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_fromToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_toToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_return\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"_conversionFee\",\"type\":\"int256\"}],\"name\":\"Conversion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"ConversionFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSupply\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_prevFee\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"_newFee\",\"type\":\"uint32\"}],\"name\":\"OracleDeviationFeeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token1\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20Token\",\"name\":\"_token2\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rateD\",\"type\":\"uint256\"}],\"name\":\"TokenRateUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_primaryReserveToken\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_primaryReserveOracle\",\"type\":\"address\"},{\"internalType\":\"contract IChainlinkPriceOracle\",\"name\":\"_secondaryReserveOracle\",\"type\":\"address\"}],\"name\":\"activate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"addReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"anchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"connectorTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"connectorTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"connectors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionWhitelist\",\"outputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conversionsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_trader\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"}],\"name\":\"convert\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableMaxStakedBalances\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"effectiveReserveWeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"effectiveTokensRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"d\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalRateUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_connectorToken\",\"type\":\"address\"}],\"name\":\"getConnectorBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getReturn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasETHReserve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isV28OrHigher\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"}],\"name\":\"liquidationLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxConversionFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxStakedBalanceEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxStakedBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onlyOwnerCanUpdateRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleDeviationFee\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"poolToken\",\"outputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prevRegistry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"primaryReserveToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract IContractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minReturn\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISmartToken\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityReturnAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveAmplifiedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveRatio\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveStakedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveTokenCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveTokens\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"}],\"name\":\"reserveWeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"reserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"weight\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"deprecated1\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"deprecated2\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isSet\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"restoreRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_onlyOwnerCanUpdateRegistry\",\"type\":\"bool\"}],\"name\":\"restrictRegistryUpdate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"secondaryReserveToken\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_conversionFee\",\"type\":\"uint32\"}],\"name\":\"setConversionFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWhitelist\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"setConversionWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalRateUpdateTime\",\"type\":\"uint256\"}],\"name\":\"setExternalRateUpdateTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_reserve1MaxStakedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_reserve2MaxStakedBalance\",\"type\":\"uint256\"}],\"name\":\"setMaxStakedBalances\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_oracleDeviationFee\",\"type\":\"uint32\"}],\"name\":\"setOracleDeviationFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_balance\",\"type\":\"uint256\"}],\"name\":\"setReserveStakedBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_reserveToken\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_weight\",\"type\":\"uint32\"}],\"name\":\"setReserveWeight\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_currentTime\",\"type\":\"uint256\"}],\"name\":\"setTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"targetAmountAndFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferAnchorOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferTokenOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromAnchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptAnchorOwnership()\":{\"details\":\"accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead\"},\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"acceptTokenOwnership()\":{\"details\":\"deprecated, backward compatibility\"},\"activate(address,address,address)\":{\"details\":\"sets the pool's primary reserve token / price oracles and activates the pool each oracle must be able to provide the rate for each reserve token note that the oracle must be whitelisted prior to the call can only be called by the owner while the pool is inactive\",\"params\":{\"_primaryReserveOracle\":\"address of a chainlink price oracle for the primary reserve token\",\"_primaryReserveToken\":\"address of the pool's primary reserve token\",\"_secondaryReserveOracle\":\"address of a chainlink price oracle for the secondary reserve token\"}},\"addLiquidity(address,uint256,uint256)\":{\"details\":\"increases the pool's liquidity and mints new shares in the pool to the caller\",\"params\":{\"_amount\":\"amount of liquidity to add\",\"_minReturn\":\"minimum return-amount of pool tokens\",\"_reserveToken\":\"address of the reserve token to add liquidity to\"},\"returns\":{\"_0\":\"amount of pool tokens minted\"}},\"addReserve(address,uint32)\":{\"details\":\"defines a new reserve token for the converter can only be called by the owner while the converter is inactive and 2 reserves aren't defined yet\",\"params\":{\"_token\":\"address of the reserve token\",\"_weight\":\"reserve weight, represented in ppm, 1-1000000\"}},\"connectorTokenCount()\":{\"details\":\"deprecated, backward compatibility\"},\"connectorTokens(uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"connectors(address)\":{\"details\":\"deprecated, backward compatibility\"},\"convert(address,address,uint256,address,address)\":{\"details\":\"converts a specific amount of source tokens to target tokens can only be called by the bancor network contract\",\"params\":{\"_amount\":\"amount of tokens to convert (in units of the source token)\",\"_beneficiary\":\"wallet to receive the conversion result\",\"_sourceToken\":\"source ERC20 token\",\"_targetToken\":\"target ERC20 token\",\"_trader\":\"address of the caller who executed the conversion\"},\"returns\":{\"_0\":\"amount of tokens received (in units of the target token)\"}},\"converterType()\":{\"details\":\"returns the converter type\",\"returns\":{\"_0\":\"see the converter types in the the main contract doc\"}},\"disableMaxStakedBalances()\":{\"details\":\"disables the max staked balance mechanism available as a temporary mechanism during the beta once disabled, it cannot be re-enabled can only be called by the owner\"},\"effectiveReserveWeights()\":{\"details\":\"returns the effective reserve tokens weights\",\"returns\":{\"_0\":\"reserve1 weight\",\"_1\":\"reserve2 weight\"}},\"effectiveTokensRate()\":{\"details\":\"returns the effective rate of 1 primary token in secondary tokens\",\"returns\":{\"_0\":\"rate of 1 primary token in secondary tokens (numerator)\",\"_1\":\"rate of 1 primary token in secondary tokens (denominator)\"}},\"getConnectorBalance(address)\":{\"details\":\"deprecated, backward compatibility\"},\"getReturn(address,address,uint256)\":{\"details\":\"deprecated, backward compatibility\"},\"hasETHReserve()\":{\"details\":\"checks whether or not the converter has an ETH reserve\",\"returns\":{\"_0\":\"true if the converter has an ETH reserve, false otherwise\"}},\"isActive()\":{\"details\":\"returns true if the converter is active, false otherwise\",\"returns\":{\"_0\":\"true if the converter is active, false otherwise\"}},\"isV28OrHigher()\":{\"details\":\"checks whether or not the converter version is 28 or higher\",\"returns\":{\"_0\":\"true, since the converter version is 28 or higher\"}},\"liquidationLimit(address)\":{\"details\":\"returns the maximum number of pool tokens that can currently be liquidated\",\"params\":{\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"liquidation limit\"}},\"poolToken(address)\":{\"details\":\"returns the pool token address by the reserve token address\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"pool token address\"}},\"removeLiquidity(address,uint256,uint256)\":{\"details\":\"decreases the pool's liquidity and burns the caller's shares in the pool\",\"params\":{\"_amount\":\"amount of pool tokens to burn\",\"_minReturn\":\"minimum return-amount of reserve tokens\",\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"amount of liquidity removed\"}},\"removeLiquidityReturnAndFee(address,uint256)\":{\"details\":\"calculates the amount of reserve tokens entitled for a given amount of pool tokens note that a fee is applied according to the equilibrium level of the primary reserve token\",\"params\":{\"_amount\":\"amount of pool tokens\",\"_poolToken\":\"address of the pool token\"},\"returns\":{\"_0\":\"amount after fee and fee, in reserve token units\"}},\"reserveAmplifiedBalance(address)\":{\"details\":\"returns the amplified balance of a given reserve token\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"amplified balance\"}},\"reserveBalance(address)\":{\"details\":\"returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve balance\"}},\"reserveStakedBalance(address)\":{\"details\":\"returns the staked balance of a given reserve token\",\"params\":{\"_reserveToken\":\"reserve token address\"},\"returns\":{\"_0\":\"staked balance\"}},\"reserveTokenCount()\":{\"details\":\"returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead\",\"returns\":{\"_0\":\"number of reserve tokens\"}},\"reserveWeight(address)\":{\"details\":\"returns the reserve's weight added in version 28\",\"params\":{\"_reserveToken\":\"reserve token contract address\"},\"returns\":{\"_0\":\"reserve weight\"}},\"restoreRegistry()\":{\"details\":\"restores the previous contract-registry\"},\"restrictRegistryUpdate(bool)\":{\"details\":\"restricts the permission to update the contract-registry\",\"params\":{\"_onlyOwnerCanUpdateRegistry\":\"indicates whether or not permission is restricted to owner only\"}},\"setConversionFee(uint32)\":{\"details\":\"updates the current conversion fee can only be called by the contract owner\",\"params\":{\"_conversionFee\":\"new conversion fee, represented in ppm\"}},\"setConversionWhitelist(address)\":{\"details\":\"allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract\",\"params\":{\"_whitelist\":\"address of a whitelist contract\"}},\"setMaxStakedBalances(uint256,uint256)\":{\"details\":\"sets the max staked balance for both reserves available as a temporary mechanism during the beta can only be called by the owner\",\"params\":{\"_reserve1MaxStakedBalance\":\"max staked balance for reserve 1\",\"_reserve2MaxStakedBalance\":\"max staked balance for reserve 2\"}},\"setOracleDeviationFee(uint32)\":{\"details\":\"updates the current oracle deviation fee can only be called by the contract owner\",\"params\":{\"_oracleDeviationFee\":\"new oracle deviation fee, represented in ppm\"}},\"setReserveStakedBalance(address,uint256)\":{\"details\":\"sets the reserve's staked balance can only be called by the upgrader contract while the upgrader is the owner\",\"params\":{\"_balance\":\"new reserve staked balance\",\"_reserveToken\":\"reserve token address\"}},\"targetAmountAndFee(address,address,uint256)\":{\"details\":\"returns the expected target amount of converting one reserve to another along with the fee\",\"params\":{\"_amount\":\"amount of tokens received from the user\",\"_sourceToken\":\"contract address of the source reserve token\",\"_targetToken\":\"contract address of the target reserve token\"},\"returns\":{\"_0\":\"expected target amount\",\"_1\":\"expected fee\"}},\"token()\":{\"details\":\"deprecated since version 28, backward compatibility - use only for earlier versions\"},\"transferAnchorOwnership(address)\":{\"details\":\"transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead\",\"params\":{\"_newOwner\":\"new token owner\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"transferTokenOwnership(address)\":{\"details\":\"deprecated, backward compatibility\"},\"updateRegistry()\":{\"details\":\"updates to the new contract-registry\"},\"upgrade()\":{\"details\":\"upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade\"},\"withdrawETH(address)\":{\"details\":\"withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve\",\"params\":{\"_to\":\"address to send the ETH to\"}},\"withdrawFromAnchor(address,address,uint256)\":{\"details\":\"withdraws tokens held by the anchor and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV2Converter.sol\":\"TestLiquidityPoolV2Converter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/ConverterBase.sol\":{\"keccak256\":\"0x242211f471f27635fa98bdeed238429942c55fc9a5e824c1a30cd88fad727f9b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f9769299a5e13c363d102c4c08b09e3a87ec053124dcc157be0a6448c13e3320\",\"dweb:/ipfs/QmUC2CaAr6emVkJN62xXBY83r1f7Hxj62UAavZsCSWcqUb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/LiquidityPoolConverter.sol\":{\"keccak256\":\"0x075a4ba13d871f8f55da9889651f875a1f7537b2c8ea7ad330499d148345fc17\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://34f5ed00855a9737349919242b0c7f1d531ad4e7caf3c9e5c14583c743224eaa\",\"dweb:/ipfs/QmRjiQLCLCEkrkXFmaYRtu597ezB42mHCmdN2RkF876ibE\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IBancorFormula.sol\":{\"keccak256\":\"0xf30c95034af4c4ec6e8a859e90cf7a0bada29a805ede76e04644107a7c677c4e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b48070d4abf9c4a08c39e6c494fa9efd7389aa7f8b61b283c9ba02062b1c59b6\",\"dweb:/ipfs/Qme6U7SpspFPzMH2mTyKsXCnJEAgg1vX6NNFzuykbVSY5R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterFactory.sol\":{\"keccak256\":\"0x40a8b6a5dd24f48b0c51c9f784c2e5df5afbadad9459873c25163f13f68c99dd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6ad87f96e9e812869d79396d3415f89fabd1f068861f1c5c92bac09898938070\",\"dweb:/ipfs/QmaHUVyRsjUrQNtWnRhSnfPXMbwnFgpNwZvL9BMC5Xxagb\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol\":{\"keccak256\":\"0xdd6e82cc0945131084abe0d5103cdf91326706658de33a94fd8fe3ff7b6b59b9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://53573685ad522fd72fea8f7ec09181fef4c48a12ce9366813500c5f1c1aa7155\",\"dweb:/ipfs/Qmdy3PpQy7rnAHpMScnWWaitDtvMDvXCf51wVzMW1R1hLu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2ConverterCustomFactory.sol\":{\"keccak256\":\"0x7fc843e5f1b0de5cc1248b4f12396a2dc42fc089f4af0b20ddb222cfca096f92\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2f042d21817d6cabc0296f90ed45730353ff1a057c797104518b3a33dc01261b\",\"dweb:/ipfs/QmNgXdNtY1f2Ggg8PbB1MZVS9am8YAmPdj5fD7LFvApqC4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/PoolTokensContainer.sol\":{\"keccak256\":\"0x79e583ec380c8982f74d4f707ae26ed96e1c90a6b54b4fc058ab2316656e0ddb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3c900b396fefda767db8b99d9ed10c9a22151279b0f8229098d28a08e75046da\",\"dweb:/ipfs/QmZBqgB1CnKpjM8Bv6HMrYtzdwu8wBmS3FzpWuvhyfGLwd\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/interfaces/IPoolTokensContainer.sol\":{\"keccak256\":\"0xb62b1efbd3188a2ef15fef6122f45278e1c354cadb2544cb600af28bda00f3cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://ce08db6aafa20ced1fbaed11d4413580901f525bb318c23dff7532c815b03e1e\",\"dweb:/ipfs/QmeoC4D4vJiPMW7TjTmtu3z8WAtBDQ4GNSTeJzZsDzA36c\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV2Converter.sol\":{\"keccak256\":\"0xe48bbd71868978e10ecc785df1b0ec6b652858add2ecb7e6c374977f809b649b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b8d8b24c155618998670fe9fdbecf491beb03536aa427983f3c62af2e4dd87c9\",\"dweb:/ipfs/QmSFDmBHkVqgc2HY2Y2b8Pke3fUEiar929RaJMMdJtApSw\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ContractRegistryClient.sol\":{\"keccak256\":\"0x74caf88eff1cb113ad8277df9ba7933a6f1e0deea8fd1855157def3be833b859\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://c7793c9f245736cd8413bc8c4b5c40b67949cbee32289a16d29c83cf59396ad6\",\"dweb:/ipfs/QmWony7b1buUrGnE32gjLAnSwkBYMrJ68vUcCwDMmp3MbJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/PriceOracle.sol\":{\"keccak256\":\"0x5d03fb3ec2ef50006712ad6fd47d14aed49c4d57971e8d918618093f690e6170\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8dae9bd9a95911008b10d316a1efaa6f05224bf37dec02ace44ef5a303aff3ee\",\"dweb:/ipfs/Qmeuv2c6R2KwFWganFF7US5s5TcYm1toGM2o4XkS1zGx4R\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Types.sol\":{\"keccak256\":\"0x1616bdc4668c6396eb8e302177249284a5406dc1dfa3c9ab2e83f6c3c180be36\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f4feb67f11147068d227366f8a13e4261ad1f927f0fd01d1e1764479ab2df8f5\",\"dweb:/ipfs/QmYV4TdmbL8pyeRi2w5ofUzTK3CEiwUZepia5JcuFgxb4x\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x39f4f7af694f7f24373901d8edd57245c6e59970cd1b35137ded4bbebe2155bb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://30d1011854960be9ab326844d4d97324084955593b2903bee969aba6b1b5f8e9\",\"dweb:/ipfs/QmeTQNZRDNrboKD3ikyMj3tNVHGsa1GqBuAXytJAhhK5Az\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x60806040526003805460ff60a81b19169055600880546001600160601b03191690556012805460ff191660011764ffffffff001916622710001790553480156200004857600080fd5b5060405162004ef338038062004ef3833981810160405260608110156200006e57600080fd5b5080516020820151604090920151600080546001600160a01b031916331790559091908282828282828282828180620000a78162000144565b50600280546001600160a01b039092166001600160a01b031992831681179091556003805490921617905582620000de8162000144565b81620000ea81620001a3565b5050600480546001600160a01b039094166001600160a01b031990941693909317909255506008805463ffffffff9092166401000000000263ffffffff60201b199092169190911790555062000202975050505050505050565b6001600160a01b038116620001a0576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b620f424063ffffffff82161115620001a0576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b614ce180620002126000396000f3fe6080604052600436106104135760003560e01c8063690d83201161021e578063d260529c11610123578063ddd9abbf116100ab578063ecbca55d1161007a578063ecbca55d14610efe578063f2fde38b14610f2e578063f64ccbfb14610f61578063fc0c546a14610f8b578063fd2d6c7c14610fa0576104a4565b8063ddd9abbf14610e34578063e38192e314610e64578063e8dc12ff14610ea3578063ec2240f514610ee9576104a4565b8063d66bd524116100f2578063d66bd52414610d71578063d895951214610da4578063db2830a414610dd7578063dc75eb9a14610dec578063dc8de37914610e01576104a4565b8063d260529c14610d1d578063d3fb73b414610d32578063d4ee1d9014610d47578063d55ec69714610d5c576104a4565b8063ab28b174116101a6578063bf7da6ba11610175578063bf7da6ba14610c7b578063c45d3d9214610cb4578063cdc91c6914610cc9578063d031370b14610cde578063d18e81b314610d08576104a4565b8063ab28b17414610bf9578063af94b8d814610c0e578063b4a176d314610c51578063bf75455814610c66576104a4565b80637b103999116101ed5780637b10399914610b725780638da5cb5b14610b8757806394c275ad14610b9c57806398a71dcb14610bb15780639b99a8e214610be4576104a4565b8063690d832014610ad65780636a49d2c414610b0957806371f52bf314610b4857806379ba509714610b5d576104a4565b80632fe8a6ad1161032457806354fd4d50116102ac57806359cd4eec1161027b57806359cd4eec146109d35780635e35359e14610a1257806361cd756e14610a5557806367b6d57c14610a6a57806369067d9514610a9d576104a4565b806354fd4d501461094457806355776b77146109595780635768adcf1461098b578063579cd3ca146109be576104a4565b80633beb26c4116102f35780633beb26c4146108765780633e8ff43f146108a057806346749468146108cc57806349d10b64146108fc5780634af80f0e14610911576104a4565b80632fe8a6ad146107f457806334d084b91461080957806338a5e0161461081e578063395900d414610833576104a4565b806316912f96116103a757806321e6b53d1161037657806321e6b53d1461073157806322f3e2d4146107645780632630c12f146107795780632bd3c1071461078e5780632bf0c985146107c1576104a4565b806316912f961461066357806319b64015146106785780631cfab290146106a25780631e1401f8146106d5576104a4565b80630c7d5cd8116103e35780630c7d5cd8146105745780630e53aae9146105a2578063119b90cd1461060957806312c2aca41461064e576104a4565b80625e319c146104a9578063024c7ec7146104ee5780630337e3fb1461051a5780630a55fb3d1461054b576104a4565b366104a457600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff166104a2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b3480156104b557600080fd5b506104dc600480360360208110156104cc57600080fd5b50356001600160a01b0316610fb5565b60408051918252519081900360200190f35b3480156104fa57600080fd5b506104a26004803603602081101561051157600080fd5b50351515610fde565b34801561052657600080fd5b5061052f611004565b604080516001600160a01b039092168252519081900360200190f35b34801561055757600080fd5b50610560611013565b604080519115158252519081900360200190f35b34801561058057600080fd5b5061058961101c565b6040805163ffffffff9092168252519081900360200190f35b3480156105ae57600080fd5b506105d5600480360360208110156105c557600080fd5b50356001600160a01b0316611028565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b34801561061557600080fd5b506104a26004803603606081101561062c57600080fd5b506001600160a01b0381358116916020810135821691604090910135166110c0565b34801561065a57600080fd5b50610560611669565b34801561066f57600080fd5b506104a26116af565b34801561068457600080fd5b5061052f6004803603602081101561069b57600080fd5b50356116c3565b3480156106ae57600080fd5b50610589600480360360208110156106c557600080fd5b50356001600160a01b03166116ed565b3480156106e157600080fd5b50610718600480360360608110156106f857600080fd5b506001600160a01b0381358116916020810135909116906040013561171f565b6040805192835260208301919091528051918290030190f35b34801561073d57600080fd5b506104a26004803603602081101561075457600080fd5b50356001600160a01b0316611739565b34801561077057600080fd5b5061056061174d565b34801561078557600080fd5b5061052f611779565b34801561079a57600080fd5b506104dc600480360360208110156107b157600080fd5b50356001600160a01b031661178f565b3480156107cd57600080fd5b506104dc600480360360208110156107e457600080fd5b50356001600160a01b03166117ab565b34801561080057600080fd5b50610560611876565b34801561081557600080fd5b50610589611886565b34801561082a57600080fd5b506104a2611897565b34801561083f57600080fd5b506104a26004803603606081101561085657600080fd5b506001600160a01b038135811691602081013590911690604001356118a9565b34801561088257600080fd5b506104a26004803603602081101561089957600080fd5b503561192f565b3480156108ac57600080fd5b506108b5611934565b6040805161ffff9092168252519081900360200190f35b3480156108d857600080fd5b506104a2600480360360408110156108ef57600080fd5b5080359060200135611939565b34801561090857600080fd5b506104a26119bb565b34801561091d57600080fd5b506104a26004803603602081101561093457600080fd5b50356001600160a01b0316611bc3565b34801561095057600080fd5b506108b5611bf8565b6104dc6004803603606081101561096f57600080fd5b506001600160a01b038135169060208101359060400135611bfd565b34801561099757600080fd5b5061052f600480360360208110156109ae57600080fd5b50356001600160a01b03166120ef565b3480156109ca57600080fd5b5061058961210d565b3480156109df57600080fd5b506104a2600480360360408110156109f657600080fd5b5080356001600160a01b0316906020013563ffffffff16612120565b348015610a1e57600080fd5b506104a260048036036060811015610a3557600080fd5b506001600160a01b038135811691602081013590911690604001356121dc565b348015610a6157600080fd5b5061052f61230d565b348015610a7657600080fd5b506104a260048036036020811015610a8d57600080fd5b50356001600160a01b031661231c565b348015610aa957600080fd5b5061071860048036036040811015610ac057600080fd5b506001600160a01b0381351690602001356123c8565b348015610ae257600080fd5b506104a260048036036020811015610af957600080fd5b50356001600160a01b0316612506565b348015610b1557600080fd5b506104a260048036036040811015610b2c57600080fd5b5080356001600160a01b0316906020013563ffffffff1661262d565b348015610b5457600080fd5b506108b561269f565b348015610b6957600080fd5b506104a26126a9565b348015610b7e57600080fd5b5061052f612760565b348015610b9357600080fd5b5061052f61276f565b348015610ba857600080fd5b5061058961277e565b348015610bbd57600080fd5b506104dc60048036036020811015610bd457600080fd5b50356001600160a01b0316612792565b348015610bf057600080fd5b506108b56127a4565b348015610c0557600080fd5b506107186127aa565b348015610c1a57600080fd5b5061071860048036036060811015610c3157600080fd5b506001600160a01b038135811691602081013590911690604001356127b3565b348015610c5d57600080fd5b506104a26128e9565b348015610c7257600080fd5b50610560612915565b348015610c8757600080fd5b506104a260048036036040811015610c9e57600080fd5b506001600160a01b03813516906020013561291a565b348015610cc057600080fd5b5061052f61296e565b348015610cd557600080fd5b506104a261297d565b348015610cea57600080fd5b5061052f60048036036020811015610d0157600080fd5b50356129e1565b348015610d1457600080fd5b506104dc612a08565b348015610d2957600080fd5b50610560612a0e565b348015610d3e57600080fd5b5061052f612a13565b348015610d5357600080fd5b5061052f612a22565b348015610d6857600080fd5b506104a2612a31565b348015610d7d57600080fd5b506105d560048036036020811015610d9457600080fd5b50356001600160a01b0316612b19565b348015610db057600080fd5b506104dc60048036036020811015610dc757600080fd5b50356001600160a01b0316612b5c565b348015610de357600080fd5b50610718612b6d565b348015610df857600080fd5b5061052f612b93565b348015610e0d57600080fd5b506104dc60048036036020811015610e2457600080fd5b50356001600160a01b0316612ba2565b348015610e4057600080fd5b506104a260048036036020811015610e5757600080fd5b503563ffffffff16612bcb565b348015610e7057600080fd5b506104dc60048036036060811015610e8757600080fd5b506001600160a01b038135169060208101359060400135612c9d565b6104dc600480360360a0811015610eb957600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612f92565b348015610ef557600080fd5b506107186131a2565b348015610f0a57600080fd5b506104a260048036036020811015610f2157600080fd5b503563ffffffff1661321d565b348015610f3a57600080fd5b506104a260048036036020811015610f5157600080fd5b50356001600160a01b0316613305565b348015610f6d57600080fd5b506104a260048036036020811015610f8457600080fd5b5035613383565b348015610f9757600080fd5b5061052f613388565b348015610fac57600080fd5b506104dc613397565b600081610fc18161339d565b50506001600160a01b03166000908152600b602052604090205490565b610fe661340a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000611038614c43565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b6110c861345d565b6110d061340a565b826110da8161339d565b826110e4816134a4565b826110ee816134a4565b846110f8816134f8565b84611102816134f8565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561114757600080fd5b505afa15801561115b573d6000803e3d6000fd5b505050506040513d602081101561117157600080fd5b50516001600160a01b0316146111c5576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b60006111f07f436861696e6c696e6b4f7261636c6557686974656c6973740000000000000000613549565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123f57600080fd5b505afa158015611253573d6000803e3d6000fd5b505050506040513d602081101561126957600080fd5b505180156112ec5750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112bf57600080fd5b505afa1580156112d3573d6000803e3d6000fd5b505050506040513d60208110156112e957600080fd5b50515b611332576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b61133a6135c7565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061136257fe5b6000918252602090912001546001600160a01b038a8116911614156113bf57600660018154811061138f57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790556113f9565b60066000815481106113cd57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006114176f436f6e766572746572466163746f727960801b613549565b6001600160a01b031663c977aed261142d611934565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d602081101561148f57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b1580156114fb57600080fd5b505af115801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff90921691909117905561155a613829565b8051600e5560200151600f5561156e6138e1565b601055600954600090611589906001600160a01b0316610fb5565b6009549091506000906115a4906001600160a01b0316612ba2565b600a549091506000906115bf906001600160a01b0316612ba2565b9050818314156115ea5760008311806115d85750600081115b156115e5576115e56138fb565b611613565b6000831180156115fa5750600082115b80156116065750600081115b15611613576116136138fb565b6004546001906001600160a01b031661162a611934565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6116b761340a565b6012805460ff19169055565b6000600682815481106116d257fe5b6000918252602090912001546001600160a01b031692915050565b6000816116f98161339d565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061172d8585856127b3565b91509150935093915050565b61174161340a565b61174a8161231c565b50565b6000611757613970565b80156117745750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b60008161179b8161339d565b6117a4836139ef565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117e757600080fd5b505afa1580156117fb573d6000803e3d6000fd5b505050506040513d602081101561181157600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061183c82612ba2565b6001600160a01b0383166000908152600b602052604090205490915061186c816118668487613a29565b90613a87565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b61189f61340a565b6118a761297d565b565b6118b161340a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561191257600080fd5b505af1158015611926573d6000803e3d6000fd5b50505050505050565b601355565b600290565b61194161340a565b8160116000600660008154811061195457fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120919091556006805483926011929091600190811061199257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119de5750600354600160a01b900460ff16155b611a23576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000611a416f436f6e7472616374526567697374727960801b613549565b6002549091506001600160a01b03808316911614801590611a6a57506001600160a01b03811615155b611ab2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b1457600080fd5b505afa158015611b28573d6000803e3d6000fd5b505050506040513d6020811015611b3e57600080fd5b50516001600160a01b03161415611b93576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611bcb61340a565b80611bd5816134a4565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611c07613ae6565b6003805460ff60a81b1916600160a81b179055611c22613b36565b83611c2c8161339d565b83611c3681613b7e565b83611c4081613b7e565b6001600160a01b038716600080516020614c8c83398151915214611c65573415611c69565b8534145b611cb4576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611cbc613bc4565b6001600160a01b038716600080516020614c8c8339815191521415611d5857600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611d1e9034613c04565b600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611e13576001600160a01b0388166000908152601160205260409020541580611dc257506001600160a01b038816600090815260116020526040902054611dbf8289613c51565b11155b611e13576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611e6457600080fd5b505afa158015611e78573d6000803e3d6000fd5b505050506040513d6020811015611e8e57600080fd5b505190506001600160a01b038a16600080516020614c8c83398151915214611ebc57611ebc8a33308c613c9a565b6001600160a01b038a16600090815260076020526040902054611edf908a613c51565b6001600160a01b038b16600090815260076020526040902055611f02838a613c51565b6001600160a01b038b166000908152600b6020526040812091909155831580611f29575081155b15611f35575088611f46565b611f43846118668c85613a29565b90505b88811015611f90576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611fef57600080fd5b505af1158015612003573d6000803e3d6000fd5b5050505061200f6138fb565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c6120468882613c51565b6120508787613c51565b60408051938452602084019290925282820152519081900360600190a36120818361207b8484613c51565b8d613e05565b6120d4600660008154811061209257fe5b600091825260209091200154600680546001600160a01b039092169160019081106120b957fe5b60009182526020822001546001600160a01b03169080613e65565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b8161212a8161339d565b6001600160a01b038381166000818152600760205260409020600101805463ffffffff191663ffffffff861617905560095490911614156121a057600a546001600160a01b03166000908152600760205260409020600101805463ffffffff1916620f424084900363ffffffff161790556121d7565b6009546001600160a01b03166000908152600760205260409020600101805463ffffffff1916620f424084900363ffffffff161790555b505050565b6121e4613ae6565b6003805460ff60a81b1916600160a81b1790556121ff61340a565b6000612224762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff16158061225e575061225c61174d565b155b8061227657506000546001600160a01b038281169116145b6122bb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6122c6848484613f38565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156122fa576122fa84613f69565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61232461340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61234881614041565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156123ac57600080fd5b505af11580156123c0573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561240657600080fd5b505afa15801561241a573d6000803e3d6000fd5b505050506040513d602081101561243057600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b90522054909150818510156124f7576009546001600160a01b03166000908152600b602052604081205461248b906014613a29565b6009549091506000906124a6906001600160a01b03166139ef565b90506000808284106124b95782846124bc565b83835b909250905060006124d1876118668c89613a29565b905060006124e3836118668487613a29565b99505088900396506124ff95505050505050565b925060009150505b9250929050565b61250e613ae6565b6003805460ff60a81b1916600160a81b17905561252961340a565b600080516020614c8c8339815191526125418161339d565b6000612566762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b905061257061174d565b158061258957506000546001600160a01b038281169116145b6125ce576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015612603573d6000803e3d6000fd5b5061261b600080516020614c8c833981519152613f69565b50506003805460ff60a81b1916905550565b61263561340a565b600261263f6127a4565b61ffff1610612691576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b61269b82826140a3565b5050565b60006117746127a4565b6001546001600160a01b031633146126fc576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b6000806127be613b36565b846127c88161339d565b846127d28161339d565b856001600160a01b0316876001600160a01b03161415612832576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60008061283d6138e1565b60105414156128765750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f42408190036128c5565b61287e614c71565b612886613829565b9050600080612894836142c5565b60095491935091506001600160a01b038d8116911614156128ba578194508093506128c1565b8094508193505b5050505b6000806128d58b8b86868d6143da565b919d919c50909a5050505050505050505050565b6128f161340a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61292261340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61294681614041565b826129508161339d565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016129876127a4565b61ffff16116129d9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6118a761450b565b600681815481106129ee57fe5b6000918252602090912001546001600160a01b0316905081565b60135481565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b612a3961340a565b6000612a5e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b6004549091506000906001600160a01b0316612a78611934565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ab181613305565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612af957600080fd5b505af1158015612b0d573d6000803e3d6000fd5b5050505061174a6126a9565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b6000612b6782612ba2565b92915050565b600080612b78614c71565b612b80613829565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612bae8161339d565b50506001600160a01b031660009081526007602052604090205490565b612bd361340a565b620f424063ffffffff82161115612c31576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612ca7613ae6565b6003805460ff60a81b1916600160a81b179055612cc2613b36565b83612ccc816145d2565b83612cd681613b7e565b83612ce081613b7e565b612ce8613bc4565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2357600080fd5b505afa158015612d37573d6000803e3d6000fd5b505050506040513d6020811015612d4d57600080fd5b505190506000612d5d89896123c8565b50905086811015612daa576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612e1857600080fd5b505af1158015612e2c573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612e53915083613c04565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612e849084613c04565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614c8c8339815191521415612eea57604051339084156108fc029085906000818181858888f19350505050158015612ee4573d6000803e3d6000fd5b50612ef5565b612ef5823385614637565b612efd6138fb565b6000612f09858c613c04565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612f658c8285613e05565b612f76600660008154811061209257fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612f9c613ae6565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612fc981614041565b856001600160a01b0316876001600160a01b03161415613029576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580613136575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561308957600080fd5b505afa15801561309d573d6000803e3d6000fd5b505050506040513d60208110156130b357600080fd5b50518015613136575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561310957600080fd5b505afa15801561311d573d6000803e3d6000fd5b505050506040513d602081101561313357600080fd5b50515b61317d576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b61318a8787878787614790565b6003805460ff60a81b19169055979650505050505050565b6000806131ad614c71565b6131b5613829565b90506000806131c3836142c5565b9150915060066000815481106131d557fe5b6000918252602090912001546009546001600160a01b039081169116141561320b5763ffffffff9182169450169150612b8f9050565b63ffffffff9081169450169150509091565b61322561340a565b60085463ffffffff6401000000009091048116908216111561328e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61330d61340a565b6000546001600160a01b0382811691161415613361576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b601055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661174a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146118a7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b61346561174d565b156118a7576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b03811630141561174a576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b03811661174a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561359557600080fd5b505afa1580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561361057600080fd5b505afa158015613624573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561364d57600080fd5b810190808051604051939291908464010000000082111561366d57600080fd5b90830190602082018581111561368257600080fd5b825186602082028301116401000000008211171561369f57600080fd5b82525081516020918201928201910280838360005b838110156136cc5781810151838201526020016136b4565b50505050919091016040525050825160065493945015929150600090505b81811015613822576000831561376857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561373557600080fd5b505af1158015613749573d6000803e3d6000fd5b505050506040513d602081101561375f57600080fd5b5051905061377f565b84828151811061377457fe5b602002602001015190505b80600c60006006858154811061379157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b0319169290911691909117905560068054839081106137df57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b031916929091169190911790556001016136ea565b5050505050565b613831614c71565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b15801561389357600080fd5b505afa1580156138a7573d6000803e3d6000fd5b505050506040513d60408110156138bd57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b6000601354600014156138f45742611774565b5060135490565b60408051808201909152600e548152600f54602082015261391b906142c5565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156139b457600080fd5b505afa1580156139c8573d6000803e3d6000fd5b505050506040513d60208110156139de57600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b909252822054612b679190613a23906013613a29565b90613c51565b600082613a3857506000612b67565b82820282848281613a4557fe5b04146117a4576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808211613ad2576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481613add57fe5b04949350505050565b600354600160a81b900460ff16156118a7576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613b3e61174d565b6118a7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b6000811161174a576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561269b57613bfc60068281548110613be257fe5b6000918252602090912001546001600160a01b0316613f69565b600101613bca565b600081831015613c4b576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156117a4576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613d1f5780518252601f199092019160209182019101613d00565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613d81576040519150601f19603f3d011682016040523d82523d6000602084013e613d86565b606091505b5091509150818015613db4575080511580613db45750808060200190516020811015613db157600080fd5b50515b6123c0576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613e70856139ef565b90506000613e7d856139ef565b905063ffffffff8416613eaf576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613ec35783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613f058463ffffffff808a1690613a2916565b613f188663ffffffff808a1690613a2916565b6040805192835260208301919091528051918290030190a3505050505050565b613f4061340a565b82613f4a816134f8565b82613f54816134f8565b83613f5e816134a4565b6123c0868686614637565b80613f738161339d565b6001600160a01b038216600080516020614c8c8339815191521415613fb2576001600160a01b038216600090815260076020526040902047905561269b565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613ff857600080fd5b505afa15801561400c573d6000803e3d6000fd5b505050506040513d602081101561402257600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b61404a81613549565b6001600160a01b0316336001600160a01b03161461174a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6140ab61340a565b6140b361345d565b816140bd816134f8565b826140c7816134a4565b826140d181614b3f565b6004546001600160a01b0386811691161480159061411257506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b614159576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f424003811690851611156141c1576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff6141cc6127a4565b61ffff161061421e576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b6020526040812054909182919082906142f0906139ef565b600a5490915060009061430b906001600160a01b03166139ef565b90506143266c42616e636f72466f726d756c6160981b613549565b6001600160a01b031663a11aa1b461433f856014613a29565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b15801561439a57600080fd5b505afa1580156143ae573d6000803e3d6000fd5b505050506040513d60408110156143c457600080fd5b5080516020909101519095509350505050915091565b6000806000806143e9896139ef565b905060006143f6896139ef565b905060006144136c42616e636f72466f726d756c6160981b613549565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b15801561448257600080fd5b505afa158015614496573d6000803e3d6000fd5b505050506040513d60208110156144ac57600080fd5b5051905060006144bb82614baf565b6012549091506000906144ed908390613a2390620f424090611866908890610100900463ffffffff90811690613a2916565b90506144f98382613c04565b9d919c509a5098505050505050505050565b61451361340a565b600061451d6127a4565b61ffff161161456f576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156145b257600080fd5b505af11580156145c6573d6000803e3d6000fd5b505050506118a7613bc4565b6001600160a01b038181166000908152600d60205260409020541661174a576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106146b45780518252601f199092019160209182019101614695565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614716576040519150601f19603f3d011682016040523d82523d6000602084013e61471b565b606091505b5091509150818015614749575080511580614749575080806020019051602081101561474657600080fd5b50515b613822576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b600061479a613b36565b856147a48161339d565b856147ae8161339d565b6147b66138e1565b60105410156147e6576147c76138e1565b6010556147d2613829565b8051600e5560200151600f556147e66138fb565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f42408290039080806148208d8d87878f6143da565b9250925092508260001415614875576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614c8c83398151915214156148e7578a34146148e2576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6149c5565b3415801561497f57508a61497c6148fd8f612ba2565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561494a57600080fd5b505afa15801561495e573d6000803e3d6000fd5b505050506040513d602081101561497457600080fd5b505190613c04565b10155b6149c5576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6149ce8d613f69565b6149e1836149db8e612ba2565b90613c04565b6001600160a01b038d16600090815260076020908152604080832093909355600b90522054614a109083613c51565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614c8c8339815191521415614a7d576040516001600160a01b038a169084156108fc029085906000818181858888f19350505050158015614a77573d6000803e3d6000fd5b50614a88565b614a888c8a85614637565b614a968d8d8c8e8786614bda565b614aa28d8d8787613e65565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b81529251931692614b2d92849283926318160ddd926004808201939291829003018186803b158015614afb57600080fd5b505afa158015614b0f573d6000803e3d6000fd5b505050506040513d6020811015614b2557600080fd5b50518f613e05565b50919c9b505050505050505050505050565b60008163ffffffff16118015614b5e5750620f424063ffffffff821611155b61174a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b600854600090612b6790620f424090611866908590600160401b900463ffffffff90811690613a2916565b600160ff1b8110614be757fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea264697066735822122018869570e7a407a21bc424dc9c3f79c1d3084a9f5d11b23a4e4da6b5bf7806cd64736f6c634300060c0033", + "deployedBytecode": "0x6080604052600436106104135760003560e01c8063690d83201161021e578063d260529c11610123578063ddd9abbf116100ab578063ecbca55d1161007a578063ecbca55d14610efe578063f2fde38b14610f2e578063f64ccbfb14610f61578063fc0c546a14610f8b578063fd2d6c7c14610fa0576104a4565b8063ddd9abbf14610e34578063e38192e314610e64578063e8dc12ff14610ea3578063ec2240f514610ee9576104a4565b8063d66bd524116100f2578063d66bd52414610d71578063d895951214610da4578063db2830a414610dd7578063dc75eb9a14610dec578063dc8de37914610e01576104a4565b8063d260529c14610d1d578063d3fb73b414610d32578063d4ee1d9014610d47578063d55ec69714610d5c576104a4565b8063ab28b174116101a6578063bf7da6ba11610175578063bf7da6ba14610c7b578063c45d3d9214610cb4578063cdc91c6914610cc9578063d031370b14610cde578063d18e81b314610d08576104a4565b8063ab28b17414610bf9578063af94b8d814610c0e578063b4a176d314610c51578063bf75455814610c66576104a4565b80637b103999116101ed5780637b10399914610b725780638da5cb5b14610b8757806394c275ad14610b9c57806398a71dcb14610bb15780639b99a8e214610be4576104a4565b8063690d832014610ad65780636a49d2c414610b0957806371f52bf314610b4857806379ba509714610b5d576104a4565b80632fe8a6ad1161032457806354fd4d50116102ac57806359cd4eec1161027b57806359cd4eec146109d35780635e35359e14610a1257806361cd756e14610a5557806367b6d57c14610a6a57806369067d9514610a9d576104a4565b806354fd4d501461094457806355776b77146109595780635768adcf1461098b578063579cd3ca146109be576104a4565b80633beb26c4116102f35780633beb26c4146108765780633e8ff43f146108a057806346749468146108cc57806349d10b64146108fc5780634af80f0e14610911576104a4565b80632fe8a6ad146107f457806334d084b91461080957806338a5e0161461081e578063395900d414610833576104a4565b806316912f96116103a757806321e6b53d1161037657806321e6b53d1461073157806322f3e2d4146107645780632630c12f146107795780632bd3c1071461078e5780632bf0c985146107c1576104a4565b806316912f961461066357806319b64015146106785780631cfab290146106a25780631e1401f8146106d5576104a4565b80630c7d5cd8116103e35780630c7d5cd8146105745780630e53aae9146105a2578063119b90cd1461060957806312c2aca41461064e576104a4565b80625e319c146104a9578063024c7ec7146104ee5780630337e3fb1461051a5780630a55fb3d1461054b576104a4565b366104a457600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff166104a2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b005b600080fd5b3480156104b557600080fd5b506104dc600480360360208110156104cc57600080fd5b50356001600160a01b0316610fb5565b60408051918252519081900360200190f35b3480156104fa57600080fd5b506104a26004803603602081101561051157600080fd5b50351515610fde565b34801561052657600080fd5b5061052f611004565b604080516001600160a01b039092168252519081900360200190f35b34801561055757600080fd5b50610560611013565b604080519115158252519081900360200190f35b34801561058057600080fd5b5061058961101c565b6040805163ffffffff9092168252519081900360200190f35b3480156105ae57600080fd5b506105d5600480360360208110156105c557600080fd5b50356001600160a01b0316611028565b6040805195865263ffffffff9094166020860152911515848401521515606084015215156080830152519081900360a00190f35b34801561061557600080fd5b506104a26004803603606081101561062c57600080fd5b506001600160a01b0381358116916020810135821691604090910135166110c0565b34801561065a57600080fd5b50610560611669565b34801561066f57600080fd5b506104a26116af565b34801561068457600080fd5b5061052f6004803603602081101561069b57600080fd5b50356116c3565b3480156106ae57600080fd5b50610589600480360360208110156106c557600080fd5b50356001600160a01b03166116ed565b3480156106e157600080fd5b50610718600480360360608110156106f857600080fd5b506001600160a01b0381358116916020810135909116906040013561171f565b6040805192835260208301919091528051918290030190f35b34801561073d57600080fd5b506104a26004803603602081101561075457600080fd5b50356001600160a01b0316611739565b34801561077057600080fd5b5061056061174d565b34801561078557600080fd5b5061052f611779565b34801561079a57600080fd5b506104dc600480360360208110156107b157600080fd5b50356001600160a01b031661178f565b3480156107cd57600080fd5b506104dc600480360360208110156107e457600080fd5b50356001600160a01b03166117ab565b34801561080057600080fd5b50610560611876565b34801561081557600080fd5b50610589611886565b34801561082a57600080fd5b506104a2611897565b34801561083f57600080fd5b506104a26004803603606081101561085657600080fd5b506001600160a01b038135811691602081013590911690604001356118a9565b34801561088257600080fd5b506104a26004803603602081101561089957600080fd5b503561192f565b3480156108ac57600080fd5b506108b5611934565b6040805161ffff9092168252519081900360200190f35b3480156108d857600080fd5b506104a2600480360360408110156108ef57600080fd5b5080359060200135611939565b34801561090857600080fd5b506104a26119bb565b34801561091d57600080fd5b506104a26004803603602081101561093457600080fd5b50356001600160a01b0316611bc3565b34801561095057600080fd5b506108b5611bf8565b6104dc6004803603606081101561096f57600080fd5b506001600160a01b038135169060208101359060400135611bfd565b34801561099757600080fd5b5061052f600480360360208110156109ae57600080fd5b50356001600160a01b03166120ef565b3480156109ca57600080fd5b5061058961210d565b3480156109df57600080fd5b506104a2600480360360408110156109f657600080fd5b5080356001600160a01b0316906020013563ffffffff16612120565b348015610a1e57600080fd5b506104a260048036036060811015610a3557600080fd5b506001600160a01b038135811691602081013590911690604001356121dc565b348015610a6157600080fd5b5061052f61230d565b348015610a7657600080fd5b506104a260048036036020811015610a8d57600080fd5b50356001600160a01b031661231c565b348015610aa957600080fd5b5061071860048036036040811015610ac057600080fd5b506001600160a01b0381351690602001356123c8565b348015610ae257600080fd5b506104a260048036036020811015610af957600080fd5b50356001600160a01b0316612506565b348015610b1557600080fd5b506104a260048036036040811015610b2c57600080fd5b5080356001600160a01b0316906020013563ffffffff1661262d565b348015610b5457600080fd5b506108b561269f565b348015610b6957600080fd5b506104a26126a9565b348015610b7e57600080fd5b5061052f612760565b348015610b9357600080fd5b5061052f61276f565b348015610ba857600080fd5b5061058961277e565b348015610bbd57600080fd5b506104dc60048036036020811015610bd457600080fd5b50356001600160a01b0316612792565b348015610bf057600080fd5b506108b56127a4565b348015610c0557600080fd5b506107186127aa565b348015610c1a57600080fd5b5061071860048036036060811015610c3157600080fd5b506001600160a01b038135811691602081013590911690604001356127b3565b348015610c5d57600080fd5b506104a26128e9565b348015610c7257600080fd5b50610560612915565b348015610c8757600080fd5b506104a260048036036040811015610c9e57600080fd5b506001600160a01b03813516906020013561291a565b348015610cc057600080fd5b5061052f61296e565b348015610cd557600080fd5b506104a261297d565b348015610cea57600080fd5b5061052f60048036036020811015610d0157600080fd5b50356129e1565b348015610d1457600080fd5b506104dc612a08565b348015610d2957600080fd5b50610560612a0e565b348015610d3e57600080fd5b5061052f612a13565b348015610d5357600080fd5b5061052f612a22565b348015610d6857600080fd5b506104a2612a31565b348015610d7d57600080fd5b506105d560048036036020811015610d9457600080fd5b50356001600160a01b0316612b19565b348015610db057600080fd5b506104dc60048036036020811015610dc757600080fd5b50356001600160a01b0316612b5c565b348015610de357600080fd5b50610718612b6d565b348015610df857600080fd5b5061052f612b93565b348015610e0d57600080fd5b506104dc60048036036020811015610e2457600080fd5b50356001600160a01b0316612ba2565b348015610e4057600080fd5b506104a260048036036020811015610e5757600080fd5b503563ffffffff16612bcb565b348015610e7057600080fd5b506104dc60048036036060811015610e8757600080fd5b506001600160a01b038135169060208101359060400135612c9d565b6104dc600480360360a0811015610eb957600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013582169160809091013516612f92565b348015610ef557600080fd5b506107186131a2565b348015610f0a57600080fd5b506104a260048036036020811015610f2157600080fd5b503563ffffffff1661321d565b348015610f3a57600080fd5b506104a260048036036020811015610f5157600080fd5b50356001600160a01b0316613305565b348015610f6d57600080fd5b506104a260048036036020811015610f8457600080fd5b5035613383565b348015610f9757600080fd5b5061052f613388565b348015610fac57600080fd5b506104dc613397565b600081610fc18161339d565b50506001600160a01b03166000908152600b602052604090205490565b610fe661340a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6009546001600160a01b031681565b60125460ff1681565b60085463ffffffff1681565b6000806000806000611038614c43565b505050506001600160a01b03929092166000908152600760209081526040808320815160a081018352815480825260019092015463ffffffff811694820185905260ff64010000000082048116151594830194909452650100000000008104841615156060830152600160301b90049092161515608090920182905295919450919250829190565b6110c861345d565b6110d061340a565b826110da8161339d565b826110e4816134a4565b826110ee816134a4565b846110f8816134f8565b84611102816134f8565b6004805460408051638da5cb5b60e01b8152905130936001600160a01b0390931692638da5cb5b92808201926020929091829003018186803b15801561114757600080fd5b505afa15801561115b573d6000803e3d6000fd5b505050506040513d602081101561117157600080fd5b50516001600160a01b0316146111c5576040805162461bcd60e51b815260206004820152601460248201527311549497d05390d213d497d393d517d3d5d3915160621b604482015290519081900360640190fd5b60006111f07f436861696e6c696e6b4f7261636c6557686974656c6973740000000000000000613549565b9050806001600160a01b0316633af32abf896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123f57600080fd5b505afa158015611253573d6000803e3d6000fd5b505050506040513d602081101561126957600080fd5b505180156112ec5750806001600160a01b0316633af32abf886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112bf57600080fd5b505afa1580156112d3573d6000803e3d6000fd5b505050506040513d60208110156112e957600080fd5b50515b611332576040805162461bcd60e51b81526020600482015260126024820152714552525f494e56414c49445f4f5241434c4560701b604482015290519081900360640190fd5b61133a6135c7565b600980546001600160a01b0319166001600160a01b038b161790556006805460009061136257fe5b6000918252602090912001546001600160a01b038a8116911614156113bf57600660018154811061138f57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790556113f9565b60066000815481106113cd57fe5b600091825260209091200154600a80546001600160a01b0319166001600160a01b039092169190911790555b60006114176f436f6e766572746572466163746f727960801b613549565b6001600160a01b031663c977aed261142d611934565b6040518263ffffffff1660e01b8152600401808261ffff16815260200191505060206040518083038186803b15801561146557600080fd5b505afa158015611479573d6000803e3d6000fd5b505050506040513d602081101561148f57600080fd5b5051600a5460408051630d93a22760e11b81526001600160a01b038e8116600483015292831660248201528c831660448201528b83166064820152905192935090831691631b27444e916084808201926020929091908290030181600087803b1580156114fb57600080fd5b505af115801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b5051600880546001600160a01b03909216600160601b026bffffffffffffffffffffffff90921691909117905561155a613829565b8051600e5560200151600f5561156e6138e1565b601055600954600090611589906001600160a01b0316610fb5565b6009549091506000906115a4906001600160a01b0316612ba2565b600a549091506000906115bf906001600160a01b0316612ba2565b9050818314156115ea5760008311806115d85750600081115b156115e5576115e56138fb565b611613565b6000831180156115fa5750600082115b80156116065750600081115b15611613576116136138fb565b6004546001906001600160a01b031661162a611934565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a450505050505050505050505050565b600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0f54600160301b900460ff1690565b6116b761340a565b6012805460ff19169055565b6000600682815481106116d257fe5b6000918252602090912001546001600160a01b031692915050565b6000816116f98161339d565b50506001600160a01b031660009081526007602052604090206001015463ffffffff1690565b60008061172d8585856127b3565b91509150935093915050565b61174161340a565b61174a8161231c565b50565b6000611757613970565b80156117745750600854600160601b90046001600160a01b031615155b905090565b600854600160601b90046001600160a01b031681565b60008161179b8161339d565b6117a4836139ef565b9392505050565b600080826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117e757600080fd5b505afa1580156117fb573d6000803e3d6000fd5b505050506040513d602081101561181157600080fd5b50516001600160a01b038085166000908152600d602052604081205492935091169061183c82612ba2565b6001600160a01b0383166000908152600b602052604090205490915061186c816118668487613a29565b90613a87565b9695505050505050565b600354600160a01b900460ff1681565b601254610100900463ffffffff1681565b61189f61340a565b6118a761297d565b565b6118b161340a565b6004805460408051632f1a9acf60e11b81526001600160a01b038781169482019490945285841660248201526044810185905290519290911691635e35359e9160648082019260009290919082900301818387803b15801561191257600080fd5b505af1158015611926573d6000803e3d6000fd5b50505050505050565b601355565b600290565b61194161340a565b8160116000600660008154811061195457fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120919091556006805483926011929091600190811061199257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020555050565b6000546001600160a01b03163314806119de5750600354600160a01b900460ff16155b611a23576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000611a416f436f6e7472616374526567697374727960801b613549565b6002549091506001600160a01b03808316911614801590611a6a57506001600160a01b03811615155b611ab2576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b1457600080fd5b505afa158015611b28573d6000803e3d6000fd5b505050506040513d6020811015611b3e57600080fd5b50516001600160a01b03161415611b93576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60028054600380546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b611bcb61340a565b80611bd5816134a4565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b602781565b6000611c07613ae6565b6003805460ff60a81b1916600160a81b179055611c22613b36565b83611c2c8161339d565b83611c3681613b7e565b83611c4081613b7e565b6001600160a01b038716600080516020614c8c83398151915214611c65573415611c69565b8534145b611cb4576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b611cbc613bc4565b6001600160a01b038716600080516020614c8c8339815191521415611d5857600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e54611d1e9034613c04565b600080516020614c8c83398151915260005260076020527fb2084a3e4595ccf007fb44245853374aaf0de960074375e8e0fb334712e94d0e555b6001600160a01b0387166000908152600b602052604090205460125460ff1615611e13576001600160a01b0388166000908152601160205260409020541580611dc257506001600160a01b038816600090815260116020526040902054611dbf8289613c51565b11155b611e13576040805162461bcd60e51b815260206004820152601e60248201527f4552525f4d41585f5354414b45445f42414c414e43455f524541434845440000604482015290519081900360640190fd5b6001600160a01b038089166000908152600c602090815260408083205481516318160ddd60e01b8152915194169384926318160ddd9260048082019391829003018186803b158015611e6457600080fd5b505afa158015611e78573d6000803e3d6000fd5b505050506040513d6020811015611e8e57600080fd5b505190506001600160a01b038a16600080516020614c8c83398151915214611ebc57611ebc8a33308c613c9a565b6001600160a01b038a16600090815260076020526040902054611edf908a613c51565b6001600160a01b038b16600090815260076020526040902055611f02838a613c51565b6001600160a01b038b166000908152600b6020526040812091909155831580611f29575081155b15611f35575088611f46565b611f43846118668c85613a29565b90505b88811015611f90576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6004805460408051636361ddf360e11b81526001600160a01b0387811694820194909452336024820152604481018590529051929091169163c6c3bbe69160648082019260009290919082900301818387803b158015611fef57600080fd5b505af1158015612003573d6000803e3d6000fd5b5050505061200f6138fb565b6001600160a01b038b16337f4a1a2a6176e9646d9e3157f7c2ab3c499f18337c0b0828cfb28e0a61de4a11f78c6120468882613c51565b6120508787613c51565b60408051938452602084019290925282820152519081900360600190a36120818361207b8484613c51565b8d613e05565b6120d4600660008154811061209257fe5b600091825260209091200154600680546001600160a01b039092169160019081106120b957fe5b60009182526020822001546001600160a01b03169080613e65565b6003805460ff60a81b191690559a9950505050505050505050565b6001600160a01b039081166000908152600c60205260409020541690565b600854600160401b900463ffffffff1681565b8161212a8161339d565b6001600160a01b038381166000818152600760205260409020600101805463ffffffff191663ffffffff861617905560095490911614156121a057600a546001600160a01b03166000908152600760205260409020600101805463ffffffff1916620f424084900363ffffffff161790556121d7565b6009546001600160a01b03166000908152600760205260409020600101805463ffffffff1916620f424084900363ffffffff161790555b505050565b6121e4613ae6565b6003805460ff60a81b1916600160a81b1790556121ff61340a565b6000612224762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b6001600160a01b038516600090815260076020526040902060010154909150600160301b900460ff16158061225e575061225c61174d565b155b8061227657506000546001600160a01b038281169116145b6122bb576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6122c6848484613f38565b6001600160a01b038416600090815260076020526040902060010154600160301b900460ff16156122fa576122fa84613f69565b50506003805460ff60a81b191690555050565b6003546001600160a01b031681565b61232461340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61234881614041565b600460009054906101000a90046001600160a01b03166001600160a01b031663f2fde38b836040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156123ac57600080fd5b505af11580156123c0573d6000803e3d6000fd5b505050505050565b6000806000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561240657600080fd5b505afa15801561241a573d6000803e3d6000fd5b505050506040513d602081101561243057600080fd5b50516001600160a01b038087166000908152600d60209081526040808320549093168252600b90522054909150818510156124f7576009546001600160a01b03166000908152600b602052604081205461248b906014613a29565b6009549091506000906124a6906001600160a01b03166139ef565b90506000808284106124b95782846124bc565b83835b909250905060006124d1876118668c89613a29565b905060006124e3836118668487613a29565b99505088900396506124ff95505050505050565b925060009150505b9250929050565b61250e613ae6565b6003805460ff60a81b1916600160a81b17905561252961340a565b600080516020614c8c8339815191526125418161339d565b6000612566762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b905061257061174d565b158061258957506000546001600160a01b038281169116145b6125ce576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6040516001600160a01b038416904780156108fc02916000818181858888f19350505050158015612603573d6000803e3d6000fd5b5061261b600080516020614c8c833981519152613f69565b50506003805460ff60a81b1916905550565b61263561340a565b600261263f6127a4565b61ffff1610612691576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b61269b82826140a3565b5050565b60006117746127a4565b6001546001600160a01b031633146126fc576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6000546001600160a01b031681565b600854640100000000900463ffffffff1681565b60116020526000908152604090205481565b60065490565b600e54600f5482565b6000806127be613b36565b846127c88161339d565b846127d28161339d565b856001600160a01b0316876001600160a01b03161415612832576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b60008061283d6138e1565b60105414156128765750506001600160a01b03871660009081526007602052604090206001015463ffffffff16620f42408190036128c5565b61287e614c71565b612886613829565b9050600080612894836142c5565b60095491935091506001600160a01b038d8116911614156128ba578194508093506128c1565b8094508193505b5050505b6000806128d58b8b86868d6143da565b919d919c50909a5050505050505050505050565b6128f161340a565b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b600181565b61292261340a565b762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b61294681614041565b826129508161339d565b50506001600160a01b039091166000908152600b6020526040902055565b6005546001600160a01b031681565b60016129876127a4565b61ffff16116129d9576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b6118a761450b565b600681815481106129ee57fe5b6000918252602090912001546001600160a01b0316905081565b60135481565b600190565b6004546001600160a01b031681565b6001546001600160a01b031681565b612a3961340a565b6000612a5e762130b731b7b921b7b73b32b93a32b92ab833b930b232b960491b613549565b6004549091506000906001600160a01b0316612a78611934565b61ffff167f6b08c2e2c9969e55a647a764db9b554d64dc42f1a704da11a6d5b129ad163f2c60405160405180910390a4612ab181613305565b6040805163487ac64b60e11b81526027600482015290516001600160a01b038316916390f58c9691602480830192600092919082900301818387803b158015612af957600080fd5b505af1158015612b0d573d6000803e3d6000fd5b5050505061174a6126a9565b6007602052600090815260409020805460019091015463ffffffff81169060ff6401000000008204811691650100000000008104821691600160301b9091041685565b6000612b6782612ba2565b92915050565b600080612b78614c71565b612b80613829565b80516020909101519093509150505b9091565b600a546001600160a01b031681565b600081612bae8161339d565b50506001600160a01b031660009081526007602052604090205490565b612bd361340a565b620f424063ffffffff82161115612c31576040805162461bcd60e51b815260206004820181905260248201527f4552525f494e56414c49445f4f5241434c455f444556494154494f4e5f464545604482015290519081900360640190fd5b6012546040805163ffffffff61010090930483168152918316602083015280517f4f6fed4838e1f48d74a10449b9152126aae795e67e8eba0fedacdeefdf19a8de9281900390910190a16012805463ffffffff9092166101000264ffffffff0019909216919091179055565b6000612ca7613ae6565b6003805460ff60a81b1916600160a81b179055612cc2613b36565b83612ccc816145d2565b83612cd681613b7e565b83612ce081613b7e565b612ce8613bc4565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2357600080fd5b505afa158015612d37573d6000803e3d6000fd5b505050506040513d6020811015612d4d57600080fd5b505190506000612d5d89896123c8565b50905086811015612daa576040805162461bcd60e51b81526020600482015260126024820152714552525f52455455524e5f544f4f5f4c4f5760701b604482015290519081900360640190fd5b6001600160a01b03808a166000818152600d602052604080822054600480548351633dae446f60e21b815291820195909552336024820152604481018e9052915190851694939093169263f6b911bc9260648084019391929182900301818387803b158015612e1857600080fd5b505af1158015612e2c573d6000803e3d6000fd5b5050506001600160a01b038216600090815260076020526040902054612e53915083613c04565b6001600160a01b038216600090815260076020908152604080832093909355600b905290812054612e849084613c04565b6001600160a01b0383166000818152600b60205260409020829055909150600080516020614c8c8339815191521415612eea57604051339084156108fc029085906000818181858888f19350505050158015612ee4573d6000803e3d6000fd5b50612ef5565b612ef5823385614637565b612efd6138fb565b6000612f09858c613c04565b604080518681526020810185905280820183905290519192506001600160a01b0385169133917fbc7d19d505c7ec4db83f3b51f19fb98c4c8a99922e7839d1ee608dfbee29501b919081900360600190a3612f658c8285613e05565b612f76600660008154811061209257fe5b50506003805460ff60a81b191690555098975050505050505050565b6000612f9c613ae6565b6003805460ff60a81b1916600160a81b1790556c42616e636f724e6574776f726b60981b612fc981614041565b856001600160a01b0316876001600160a01b03161415613029576040805162461bcd60e51b815260206004820152601660248201527511549497d4d0535157d4d3d55490d157d5105491d15560521b604482015290519081900360640190fd5b6005546001600160a01b03161580613136575060055460408051633af32abf60e01b81526001600160a01b03878116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561308957600080fd5b505afa15801561309d573d6000803e3d6000fd5b505050506040513d60208110156130b357600080fd5b50518015613136575060055460408051633af32abf60e01b81526001600160a01b03868116600483015291519190921691633af32abf916024808301926020929190829003018186803b15801561310957600080fd5b505afa15801561311d573d6000803e3d6000fd5b505050506040513d602081101561313357600080fd5b50515b61317d576040805162461bcd60e51b815260206004820152601360248201527211549497d393d517d5d2125511531254d51151606a1b604482015290519081900360640190fd5b61318a8787878787614790565b6003805460ff60a81b19169055979650505050505050565b6000806131ad614c71565b6131b5613829565b90506000806131c3836142c5565b9150915060066000815481106131d557fe5b6000918252602090912001546009546001600160a01b039081169116141561320b5763ffffffff9182169450169150612b8f9050565b63ffffffff9081169450169150509091565b61322561340a565b60085463ffffffff6401000000009091048116908216111561328e576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f434f4e56455253494f4e5f464545000000000000604482015290519081900360640190fd5b6008546040805163ffffffff600160401b90930483168152918316602083015280517f81cd2ffb37dd237c0e4e2a3de5265fcf9deb43d3e7801e80db9f1ccfba7ee6009281900390910190a16008805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b61330d61340a565b6000546001600160a01b0382811691161415613361576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b601055565b6004546001600160a01b031690565b60105481565b6001600160a01b038116600090815260076020526040902060010154600160301b900460ff1661174a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b6000546001600160a01b031633146118a7576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b61346561174d565b156118a7576040805162461bcd60e51b815260206004820152600a6024820152694552525f41435449564560b01b604482015290519081900360640190fd5b6001600160a01b03811630141561174a576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6001600160a01b03811661174a576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b60025460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b15801561359557600080fd5b505afa1580156135a9573d6000803e3d6000fd5b505050506040513d60208110156135bf57600080fd5b505192915050565b600480546040805163369f189f60e11b815290516001600160a01b03909216926060928492636d3e313e9281810192600092909190829003018186803b15801561361057600080fd5b505afa158015613624573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561364d57600080fd5b810190808051604051939291908464010000000082111561366d57600080fd5b90830190602082018581111561368257600080fd5b825186602082028301116401000000008211171561369f57600080fd5b82525081516020918201928201910280838360005b838110156136cc5781810151838201526020016136b4565b50505050919091016040525050825160065493945015929150600090505b81811015613822576000831561376857856001600160a01b0316639cbf9e366040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561373557600080fd5b505af1158015613749573d6000803e3d6000fd5b505050506040513d602081101561375f57600080fd5b5051905061377f565b84828151811061377457fe5b602002602001015190505b80600c60006006858154811061379157fe5b6000918252602080832091909101546001600160a01b039081168452908301939093526040909101902080546001600160a01b0319169290911691909117905560068054839081106137df57fe5b60009182526020808320909101546001600160a01b039384168352600d909152604090912080546001600160a01b031916929091169190911790556001016136ea565b5050505050565b613831614c71565b600854600954600a5460408051632ba0600160e21b81526001600160a01b039384166004820152918316602483015280516000948594600160601b909104169263ae818004926044808301939192829003018186803b15801561389357600080fd5b505afa1580156138a7573d6000803e3d6000fd5b505050506040513d60408110156138bd57600080fd5b50805160209182015160408051808201909152918252918101919091529250505090565b6000601354600014156138f45742611774565b5060135490565b60408051808201909152600e548152600f54602082015261391b906142c5565b6009546001600160a01b03908116600090815260076020526040808220600a54909316825290206001908101805463ffffffff94851663ffffffff199182161790915591018054939092169216919091179055565b6004805460408051638da5cb5b60e01b8152905160009330936001600160a01b031692638da5cb5b9281830192602092829003018186803b1580156139b457600080fd5b505afa1580156139c8573d6000803e3d6000fd5b505050506040513d60208110156139de57600080fd5b50516001600160a01b031614905090565b6001600160a01b038116600090815260076020908152604080832054600b909252822054612b679190613a23906013613a29565b90613c51565b600082613a3857506000612b67565b82820282848281613a4557fe5b04146117a4576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000808211613ad2576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b6000828481613add57fe5b04949350505050565b600354600160a81b900460ff16156118a7576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b613b3e61174d565b6118a7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f494e41435449564560a01b604482015290519081900360640190fd5b6000811161174a576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5a45524f5f56414c554560901b604482015290519081900360640190fd5b60065460005b8181101561269b57613bfc60068281548110613be257fe5b6000918252602090912001546001600160a01b0316613f69565b600101613bca565b600081831015613c4b576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156117a4576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613d1f5780518252601f199092019160209182019101613d00565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613d81576040519150601f19603f3d011682016040523d82523d6000602084013e613d86565b606091505b5091509150818015613db4575080511580613db45750808060200190516020811015613db157600080fd5b50515b6123c0576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b6001600160a01b038082166000818152600b6020908152604091829020548251908152908101869052815192938716927f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24929181900390910190a3505050565b6000613e70856139ef565b90506000613e7d856139ef565b905063ffffffff8416613eaf576001600160a01b03861660009081526007602052604090206001015463ffffffff1693505b63ffffffff8316613ec35783620f42400392505b6001600160a01b038086169087167f77f29993cf2c084e726f7e802da0719d6a0ade3e204badc7a3ffd57ecb768c24613f058463ffffffff808a1690613a2916565b613f188663ffffffff808a1690613a2916565b6040805192835260208301919091528051918290030190a3505050505050565b613f4061340a565b82613f4a816134f8565b82613f54816134f8565b83613f5e816134a4565b6123c0868686614637565b80613f738161339d565b6001600160a01b038216600080516020614c8c8339815191521415613fb2576001600160a01b038216600090815260076020526040902047905561269b565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015613ff857600080fd5b505afa15801561400c573d6000803e3d6000fd5b505050506040513d602081101561402257600080fd5b50516001600160a01b0383166000908152600760205260409020555050565b61404a81613549565b6001600160a01b0316336001600160a01b03161461174a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6140ab61340a565b6140b361345d565b816140bd816134f8565b826140c7816134a4565b826140d181614b3f565b6004546001600160a01b0386811691161480159061411257506001600160a01b038516600090815260076020526040902060010154600160301b900460ff16155b614159576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f5245534552564560681b604482015290519081900360640190fd5b60085463ffffffff908116620f424003811690851611156141c1576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b61ffff6141cc6127a4565b61ffff161061421e576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b5050506001600160a01b0390911660008181526007602052604081208181556001908101805466ff0000000000001963ffffffff80881663ffffffff199384161791909116600160301b179092556006805493840181559093527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b031916909317909255600880548084169094019092169216919091179055565b6009546001600160a01b03166000818152600b6020526040812054909182919082906142f0906139ef565b600a5490915060009061430b906001600160a01b03166139ef565b90506143266c42616e636f72466f726d756c6160981b613549565b6001600160a01b031663a11aa1b461433f856014613a29565b885160208a0151604080516001600160e01b031960e087901b1681526004810194909452602484018890526044840187905260648401929092526084830152805160a480840193829003018186803b15801561439a57600080fd5b505afa1580156143ae573d6000803e3d6000fd5b505050506040513d60408110156143c457600080fd5b5080516020909101519095509350505050915091565b6000806000806143e9896139ef565b905060006143f6896139ef565b905060006144136c42616e636f72466f726d756c6160981b613549565b6001600160a01b03166394491fab848b858c8c6040518663ffffffff1660e01b8152600401808681526020018563ffffffff1681526020018481526020018363ffffffff1681526020018281526020019550505050505060206040518083038186803b15801561448257600080fd5b505afa158015614496573d6000803e3d6000fd5b505050506040513d60208110156144ac57600080fd5b5051905060006144bb82614baf565b6012549091506000906144ed908390613a2390620f424090611866908890610100900463ffffffff90811690613a2916565b90506144f98382613c04565b9d919c509a5098505050505050505050565b61451361340a565b600061451d6127a4565b61ffff161161456f576040805162461bcd60e51b815260206004820152601960248201527811549497d253959053125117d49154d154959157d0d3d55395603a1b604482015290519081900360640190fd5b60048054604080516379ba509760e01b815290516001600160a01b03909216926379ba509792828201926000929082900301818387803b1580156145b257600080fd5b505af11580156145c6573d6000803e3d6000fd5b505050506118a7613bc4565b6001600160a01b038181166000908152600d60205260409020541661174a576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa827a7a62faa27a5a2a760511b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106146b45780518252601f199092019160209182019101614695565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614716576040519150601f19603f3d011682016040523d82523d6000602084013e61471b565b606091505b5091509150818015614749575080511580614749575080806020019051602081101561474657600080fd5b50515b613822576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b600061479a613b36565b856147a48161339d565b856147ae8161339d565b6147b66138e1565b60105410156147e6576147c76138e1565b6010556147d2613829565b8051600e5560200151600f556147e66138fb565b6001600160a01b03881660009081526007602052604081206001015463ffffffff1690620f42408290039080806148208d8d87878f6143da565b9250925092508260001415614875576040805162461bcd60e51b815260206004820152601660248201527511549497d6915493d7d5105491d15517d05353d5539560521b604482015290519081900360640190fd5b6001600160a01b038d16600080516020614c8c83398151915214156148e7578a34146148e2576040805162461bcd60e51b815260206004820152601760248201527608aa4a4be8aa890be829a9eaa9ca8be9a92a69a82a8869604b1b604482015290519081900360640190fd5b6149c5565b3415801561497f57508a61497c6148fd8f612ba2565b8f6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561494a57600080fd5b505afa15801561495e573d6000803e3d6000fd5b505050506040513d602081101561497457600080fd5b505190613c04565b10155b6149c5576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b6149ce8d613f69565b6149e1836149db8e612ba2565b90613c04565b6001600160a01b038d16600090815260076020908152604080832093909355600b90522054614a109083613c51565b6001600160a01b038d166000818152600b6020526040902091909155600080516020614c8c8339815191521415614a7d576040516001600160a01b038a169084156108fc029085906000818181858888f19350505050158015614a77573d6000803e3d6000fd5b50614a88565b614a888c8a85614637565b614a968d8d8c8e8786614bda565b614aa28d8d8787613e65565b6001600160a01b03808d166000908152600c60209081526040918290205482516318160ddd60e01b81529251931692614b2d92849283926318160ddd926004808201939291829003018186803b158015614afb57600080fd5b505afa158015614b0f573d6000803e3d6000fd5b505050506040513d6020811015614b2557600080fd5b50518f613e05565b50919c9b505050505050505050505050565b60008163ffffffff16118015614b5e5750620f424063ffffffff821611155b61174a576040805162461bcd60e51b815260206004820152601a60248201527f4552525f494e56414c49445f524553455256455f574549474854000000000000604482015290519081900360640190fd5b600854600090612b6790620f424090611866908590600160401b900463ffffffff90811690613a2916565b600160ff1b8110614be757fe5b604080518481526020810184905280820183905290516001600160a01b038087169288821692918a16917f276856b36cbc45526a0ba64f44611557a2a8b68662c5388e9fe6d72e86e1c8cb9181900360600190a4505050505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b60405180604001604052806000815260200160008152509056fe000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeea264697066735822122018869570e7a407a21bc424dc9c3f79c1d3084a9f5d11b23a4e4da6b5bf7806cd64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "152:1083:42:-:0;;;349:27:60;;;-1:-1:-1;;;;349:27:60;;;2899:30:8;;;-1:-1:-1;;;;;;3292:40:8;;;1938:42:28;;;-1:-1:-1;;1938:42:28;-1:-1:-1;1938:42:28;-1:-1:-1;;1989:40:28;;;;;257:181:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;257:181:42;;;;;;;;;;;619:5:58;:18;;-1:-1:-1;;;;;;619:18:58;627:10;619:18;;;257:181:42;;;;;;;;;;;;;;594:23:65;257:181:42;594:13:65;:23::i;:::-;-1:-1:-1;2122:8:57::1;:39:::0;;-1:-1:-1;;;;;2122:39:57;;::::1;-1:-1:-1::0;;;;;;2122:39:57;;::::1;::::0;::::1;::::0;;;2172:12:::1;:43:::0;;;;::::1;;::::0;;6069:7:8;594:23:65;6069:7:8;594:13:65;:23::i;:::-;6168:17:8;7294:35:::2;6168:17:::0;7294:19:::2;:35::i;:::-;-1:-1:-1::0;;6203:6:8::3;:16:::0;;-1:-1:-1;;;;;6203:16:8;;::::3;-1:-1:-1::0;;;;;;6203:16:8;;::::3;::::0;;;::::3;::::0;;;-1:-1:-1;6230:16:8::3;:36:::0;;::::3;::::0;;::::3;::::0;::::3;-1:-1:-1::0;;;;6230:36:8;;::::3;::::0;;;::::3;::::0;;-1:-1:-1;152:1083:42;;-1:-1:-1;;;;;;;;152:1083:42;692:128:65;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:128;:::o;7404:156:8:-;1846:7;7489:32;;;;;7481:71;;;;;-1:-1:-1;;;7481:71:8;;;;;;;;;;;;;;;;;;;;;;;;;;;152:1083:42;;;;;;;", + "deployedSourceMap": "152:1083:42:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8454:29:8;;:8;:29;;:35;;-1:-1:-1;;;8454:35:8;;;;8446:67;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;-1:-1:-1;;;8446:67:8;;;;;;;;;;;;;;;152:1083:42;;;;;7900:211:28;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7900:211:28;-1:-1:-1;;;;;7900:211:28;;:::i;:::-;;;;;;;;;;;;;;;;3655:224:57;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3655:224:57;;;;:::i;1029:38:28:-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1029:38:28;;;;;;;;;;;;;;1938:42;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2899:30:8;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22514:248;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22514:248:8;-1:-1:-1;;;;;22514:248:8;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4504:2671:28;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4504:2671:28;;;;;;;;;;;;;;;;;;;:::i;17176:113:8:-;;;;;;;;;;;;;:::i;9912:103:28:-;;;;;;;;;;;;;:::i;22836:145:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22836:145:8;;:::i;16300:204::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16300:204:8;-1:-1:-1;;;;;16300:204:8;;:::i;23471:208::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;23471:208:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;22136:130;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22136:130:8;-1:-1:-1;;;;;22136:130:8;;:::i;3729:136:28:-;;;;;;;;;;;;;:::i;931:31::-;;;;;;;;;;;;;:::i;8312:216::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8312:216:28;-1:-1:-1;;;;;8312:216:28;;:::i;10586:610::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10586:610:28;-1:-1:-1;;;;;10586:610:28;;:::i;1333:38:57:-;;;;;;;;;;;;;:::i;1989:40:28:-;;;;;;;;;;;;;:::i;22340:100:8:-;;;;;;;;;;;;;:::i;12220:157::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;12220:157:8;;;;;;;;;;;;;;;;;:::i;713:89:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;713:89:42;;:::i;3468:90:28:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;9409:273;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9409:273:28;;;;;;;:::i;2300:925:57:-;;;;;;;;;;;;;:::i;10268:202:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10268:202:8;-1:-1:-1;;;;;10268:202:8;;:::i;2343:35::-;;;;;;;;;;;;;:::i;18573:3356:28:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;18573:3356:28;;;;;;;;;;;;;:::i;10223:141::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10223:141:28;-1:-1:-1;;;;;10223:141:28;;:::i;3292:40:8:-;;;;;;;;;;;;;:::i;808:425:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;808:425:42;;-1:-1:-1;;;;;808:425:42;;;;;;;;:::i;13330:735:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13330:735:8;;;;;;;;;;;;;;;;;:::i;1243:37:57:-;;;;;;;;;;;;;:::i;11112:198:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11112:198:8;-1:-1:-1;;;;;11112:198:8;;:::i;24923:800:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24923:800:28;;;;;;;;:::i;9086:554:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9086:554:8;-1:-1:-1;;;;;9086:554:8;;:::i;11531:272:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11531:272:28;;-1:-1:-1;;;;;11531:272:28;;;;;;;;:::i;23055:114:8:-;;;;;;;;;;;;;:::i;1422:217:58:-;;;;;;;;;;;;;:::i;1154:33:57:-;;;;;;;;;;;;;:::i;219:29:58:-;;;;;;;;;;;;;:::i;3041:43:8:-;;;;;;;;;;;;;:::i;1874:57:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1874:57:28;-1:-1:-1;;;;;1874:57:28;;:::i;14882:112:8:-;;;;;;;;;;;;;:::i;1603:28:28:-;;;;;;;;;;;;;:::i;13271:1585::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;13271:1585:28;;;;;;;;;;;;;;;;;:::i;3304:137:57:-;;;;;;;;;;;;;:::i;3417:46:8:-;;;;;;;;;;;;;:::i;8810:248:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8810:248:28;;;;;;;;:::i;2473:46:8:-;;;;;;;;;;;;;:::i;2501:239:13:-;;;;;;;;;;;;;:::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2613:34:8;;:::i;224:26:42:-;;;;;;;;;;;;;:::i;9815:82:8:-;;;;;;;;;;;;;:::i;2387:39::-;;;;;;;;;;;;;:::i;255:23:58:-;;;;;;;;;;;;;:::i;14288:374:8:-;;;;;;;;;;;;;:::i;2754:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2754:48:8;-1:-1:-1;;;;;2754:48:8;;:::i;23243:154::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23243:154:8;-1:-1:-1;;;;;23243:154:8;;:::i;12065:168:28:-;;;;;;;;;;;;;:::i;1133:40::-;;;;;;;;;;;;;:::i;16773:225:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16773:225:8;-1:-1:-1;;;;;16773:225:8;;:::i;7395:309:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7395:309:28;;;;:::i;22287:2224::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;22287:2224:28;;;;;;;;;;;;;:::i;17872:782:8:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17872:782:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12392:444:28:-;;;;;;;;;;;;;:::i;12580:274:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12580:274:8;;;;:::i;1164:167:58:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:58;-1:-1:-1;;;;;1164:167:58;;:::i;444:140:42:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;444:140:42;;:::i;21965:97:8:-;;;;;;;;;;;;;:::i;1704:37:28:-;;;;;;;;;;;;;:::i;7900:211::-;8042:7;8009:13;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;8074:29:28::1;;::::0;;;:14:::1;:29;::::0;;;;;;7900:211::o;3655:224:57:-;726:12:58;:10;:12::i;:::-;3815:26:57::1;:56:::0;;;::::1;;-1:-1:-1::0;;;3815:56:57::1;-1:-1:-1::0;;;;3815:56:57;;::::1;::::0;;;::::1;::::0;;3655:224::o;1029:38:28:-;;;-1:-1:-1;;;;;1029:38:28;;:::o;1938:42::-;;;;;;:::o;2899:30:8:-;;;;;;:::o;22514:248::-;22586:7;22595:6;22603:4;22609;22615;22632:22;;:::i;:::-;-1:-1:-1;;;;;;;;;22657:18:8;;;;;;;;:8;:18;;;;;;;;22632:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22632:43:8;;;;;;;;;;;;;;;;;-1:-1:-1;22657:18:8;;-1:-1:-1;22657:18:8;;22632:43;22514:248::o;4504:2671:28:-;6615:11:8;:9;:11::i;:::-;726:12:58::1;:10;:12::i;:::-;4751:20:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;4798:21:28::3;948:18:65;957:8;948;:18::i;:::-;4847:23:28::4;948:18:65;957:8;948;:18::i;:::-;4903:21:28::5;594:23:65;608:8;594:13;:23::i;:::-;4957::28::6;594::65;608:8;594:13;:23::i;:::-;5045:6:28::7;::::0;;:14:::7;::::0;;-1:-1:-1;;;5045:14:28;;;;5071:4:::7;::::0;-1:-1:-1;;;;;5045:6:28;;::::7;::::0;:12:::7;::::0;:14;;::::7;::::0;::::7;::::0;;;;;;;;:6;:14;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5045:14:28;-1:-1:-1;;;;;5045:31:28::7;;5037:64;;;::::0;;-1:-1:-1;;;5037:64:28;;::::7;;::::0;::::7;::::0;::::7;::::0;;;;-1:-1:-1;;;5037:64:28;;;;;;;;;;;;;::::7;;5143:26;5183:37;5193:26;5183:9;:37::i;:::-;5143:78;;5240:15;-1:-1:-1::0;;;;;5240:29:28::7;;5278:21;5240:61;;;;;;;;;;;;;-1:-1:-1::0;;;;;5240:61:28::7;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5240:61:28;:145;::::7;;;;5322:15;-1:-1:-1::0;;;;;5322:29:28::7;;5360:23;5322:63;;;;;;;;;;;;;-1:-1:-1::0;;;;;5322:63:28::7;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;5322:63:28;5240:145:::7;5232:176;;;::::0;;-1:-1:-1;;;5232:176:28;;::::7;;::::0;::::7;::::0;::::7;::::0;;;;-1:-1:-1;;;5232:176:28;;;;;;;;;;;;;::::7;;5496:18;:16;:18::i;:::-;5583:19;:42:::0;;-1:-1:-1;;;;;;5583:42:28::7;-1:-1:-1::0;;;;;5583:42:28;::::7;;::::0;;5664:13:::7;:16:::0;;-1:-1:-1;;5664:16:28::7;;;;;::::0;;;::::7;::::0;;;::::7;::::0;-1:-1:-1;;;;;5640:40:28;;::::7;5664:16:::0;::::7;5640:40;5636:168;;;5719:13;5733:1;5719:16;;;;;;;;;::::0;;;::::7;::::0;;;::::7;::::0;5695:21:::7;:40:::0;;-1:-1:-1;;;;;;5695:40:28::7;-1:-1:-1::0;;;;;5719:16:28;;::::7;5695:40:::0;;;::::7;::::0;;5636:168:::7;;;5788:13;5802:1;5788:16;;;;;;;;;::::0;;;::::7;::::0;;;::::7;::::0;5764:21:::7;:40:::0;;-1:-1:-1;;;;;;5764:40:28::7;-1:-1:-1::0;;;;;5788:16:28;;::::7;5764:40:::0;;;::::7;::::0;;5636:168:::7;5892:51;6023:28;-1:-1:-1::0;;;6023:9:28::7;:28::i;:::-;-1:-1:-1::0;;;;;6005:63:28::7;;6069:15;:13;:15::i;:::-;6005:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;6005:80:28;6193:21:::7;::::0;6112:177:::7;::::0;;-1:-1:-1;;;6112:177:28;;-1:-1:-1;;;;;6112:177:28;;::::7;;::::0;::::7;::::0;6193:21;;::::7;6112:177:::0;;;;;;::::7;::::0;;;;;;::::7;::::0;;;;;;6005:80;;-1:-1:-1;6112:31:28;;::::7;::::0;::::7;::::0;:177;;;;;6005:80:::7;::::0;6112:177;;;;;;;;6193:21:::7;6112:31:::0;:177;::::7;;::::0;::::7;;;;::::0;::::7;;;;;;;;;;;;::::0;::::7;;;;;;;;;;;;;;;;;;;::::0;::::7;;-1:-1:-1::0;6112:177:28;6098:11:::7;:191:::0;;-1:-1:-1;;;;;6098:191:28;;::::7;-1:-1:-1::0;;;6098:191:28::7;::::0;;;::::7;::::0;;;::::7;::::0;;6317:22:::7;:20;:22::i;:::-;6302:37:::0;;:12:::7;:37:::0;::::7;;::::0;;;6375:6:::7;:4;:6::i;:::-;6350:22;:31:::0;6568:19:::7;::::0;6509:35:::7;::::0;6547:41:::7;::::0;-1:-1:-1;;;;;6568:19:28::7;6547:20;:41::i;:::-;6646:19;::::0;6509:79;;-1:-1:-1;6599:29:28::7;::::0;6631:35:::7;::::0;-1:-1:-1;;;;;6646:19:28::7;6631:14;:35::i;:::-;6726:21;::::0;6599:67;;-1:-1:-1;6677:31:28::7;::::0;6711:37:::7;::::0;-1:-1:-1;;;;;6726:21:28::7;6711:14;:37::i;:::-;6677:71;;6796:21;6765:27;:52;6761:348;;;6868:1;6838:27;:31;:62;;;;6899:1;6873:23;:27;6838:62;6834:114;;;6921:11;:9;:11::i;:::-;6761:348;;;7008:1;6978:27;:31;:60;;;;;7037:1;7013:21;:25;6978:60;:91;;;;;7068:1;7042:23;:27;6978:91;6974:135;;;7086:11;:9;:11::i;:::-;7154:6;::::0;7162:4:::7;::::0;-1:-1:-1;;;;;7154:6:28::7;7137:15;:13;:15::i;:::-;7126:41;;;;;;;;;;;;628:1:65;;;;;::::6;977::::5;::::4;6993::8::3;749::58::2;4504:2671:28::0;;;:::o;17176:113:8:-;-1:-1:-1;;;;;;;;;;;17222:4:8;17246:29;:8;:29;;:35;;-1:-1:-1;;;17246:35:8;;;;;17176:113::o;9912:103:28:-;726:12:58;:10;:12::i;:::-;9976:23:28::1;:31:::0;;-1:-1:-1;;9976:31:28::1;::::0;;9912:103::o;22836:145:8:-;22907:11;22938:27;22966:6;22938:35;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22938:35:8;;22836:145;-1:-1:-1;;22836:145:8:o;16300:204::-;16435:6;16402:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16466:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:30:::1;;::::0;::::1;;::::0;16300:204::o;23471:208::-;23580:7;23589;23616:55;23635:12;23649;23663:7;23616:18;:55::i;:::-;23609:62;;;;23471:208;;;;;;:::o;22136:130::-;726:12:58;:10;:12::i;:::-;22224:34:8::1;22248:9;22224:23;:34::i;:::-;22136:130:::0;:::o;3729:136:28:-;3779:4;3803:16;:14;:16::i;:::-;:54;;;;-1:-1:-1;3831:11:28;;-1:-1:-1;;;3831:11:28;;-1:-1:-1;;;;;3831:11:28;3823:34;;3803:54;3796:61;;3729:136;:::o;931:31::-;;;-1:-1:-1;;;931:31:28;;-1:-1:-1;;;;;931:31:28;;:::o;8312:216::-;8457:7;8424:13;6959:23:8;6973:8;6959:13;:23::i;:::-;8489:31:28::1;8506:13;8489:16;:31::i;:::-;8482:38:::0;8312:216;-1:-1:-1;;;8312:216:28:o;10586:610::-;10657:7;10715:23;10741:10;-1:-1:-1;;;;;10741:22:28;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10741:24:28;-1:-1:-1;;;;;10903:32:28;;;10876:24;10903:32;;;:20;10741:24;10903:32;;;;;10741:24;;-1:-1:-1;10903:32:28;;;10964:28;10903:32;10964:14;:28::i;:::-;-1:-1:-1;;;;;11027:28:28;;11003:21;11027:28;;;:14;:28;;;;;;10946:46;;-1:-1:-1;11141:47:28;11027:28;11141;10946:46;11153:15;11141:11;:28::i;:::-;:32;;:47::i;:::-;11134:54;10586:610;-1:-1:-1;;;;;;10586:610:28:o;1333:38:57:-;;;-1:-1:-1;;;1333:38:57;;;;;:::o;1989:40:28:-;;;;;;;;;:::o;22340:100:8:-;726:12:58;:10;:12::i;:::-;22409:23:8::1;:21;:23::i;:::-;22340:100::o:0;12220:157::-;726:12:58;:10;:12::i;:::-;12326:6:8::1;::::0;;:43:::1;::::0;;-1:-1:-1;;;12326:43:8;;-1:-1:-1;;;;;12326:43:8;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;:6;;;::::1;::::0;:21:::1;::::0;:43;;;;;:6:::1;::::0;:43;;;;;;;;:6;;:43;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;12220:157:::0;;;:::o;713:89:42:-;769:11;:26;713:89::o;3468:90:28:-;3549:1;3468:90;:::o;9409:273::-;726:12:58;:10;:12::i;:::-;9575:25:28::1;9537:17;:35;9555:13;9569:1;9555:16;;;;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;-1:-1:-1;;;;;9555:16:28::1;9537:35:::0;;;::::1;::::0;;;;;;;;:63;;;;9629:13:::1;:16:::0;;9649:25;;9611:17:::1;::::0;9555:16;;;;9629;::::1;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;-1:-1:-1;;;;;9629:16:28::1;9611:35:::0;;;::::1;::::0;;;;;;;;:63;-1:-1:-1;;9409:273:28:o;2300:925:57:-;2417:5;;-1:-1:-1;;;;;2417:5:57;2403:10;:19;;:50;;-1:-1:-1;2427:26:57;;-1:-1:-1;;;2427:26:57;;;;2426:27;2403:50;2395:80;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;-1:-1:-1;;;2395:80:57;;;;;;;;;;;;;;;2530:29;2580:28;-1:-1:-1;;;2580:9:57;:28::i;:::-;2721:8;;2530:79;;-1:-1:-1;;;;;;2706:23:57;;;2721:8;;2706:23;;;;:61;;-1:-1:-1;;;;;;2733:34:57;;;;2706:61;2698:94;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;-1:-1:-1;;;2698:94:57;;;;;;;;;;;;;;;2959:1;-1:-1:-1;;;;;2907:54:57;:11;-1:-1:-1;;;;;2907:21:57;;-1:-1:-1;;;2907:40:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2907:40:57;-1:-1:-1;;;;;2907:54:57;;;2899:87;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;-1:-1:-1;;;2899:87:57;;;;;;;;;;;;;;;3093:8;;;3078:12;:23;;-1:-1:-1;;;;;3093:8:57;;;-1:-1:-1;;;;;;3078:23:57;;;;;;;3195:22;;;;;;;;;;;2300:925::o;10268:202:8:-;726:12:58;:10;:12::i;:::-;10401:10:8::1;948:18:65;957:8;948;:18::i;:::-;-1:-1:-1::0;10430:19:8::2;:32:::0;;-1:-1:-1;;;;;;10430:32:8::2;-1:-1:-1::0;;;;;10430:32:8;;;::::2;::::0;;;::::2;::::0;;10268:202::o;2343:35::-;2376:2;2343:35;:::o;18573:3356:28:-;18853:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;18749:13:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;18789:7:28::3;252:24:65;269:6;252:16;:24::i;:::-;18823:10:28::4;252:24:65;269:6;252:16;:24::i;:::-;-1:-1:-1::0;;;;;18988:36:28;::::5;-1:-1:-1::0;;;;;;;;;;;18988:36:28::5;:76;;19050:9;:14:::0;18988:76:::5;;;19040:7;19027:9;:20;18988:76;18980:112;;;::::0;;-1:-1:-1;;;18980:112:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;18980:112:28;;;;;;;;;;;;;::::5;;19156:21;:19;:21::i;:::-;-1:-1:-1::0;;;;;19300:36:28;::::5;-1:-1:-1::0;;;;;;;;;;;19300:36:28::5;19296:161;;;-1:-1:-1::0;;;;;;;;;;;19393:29:28::5;::::0;:8:::5;:29;::::0;;:37;:52:::5;::::0;19435:9:::5;19393:41;:52::i;:::-;-1:-1:-1::0;;;;;;;;;;;19353:29:28::5;::::0;:8:::5;:29;::::0;;:92;19296:161:::5;-1:-1:-1::0;;;;;19577:29:28;::::5;19546:28;19577:29:::0;;;:14:::5;:29;::::0;;;;;19720:23:::5;::::0;::::5;;19716:209;;;-1:-1:-1::0;;;;;19768:32:28;::::5;;::::0;;;:17:::5;:32;::::0;;;;;:37;;:110:::5;;-1:-1:-1::0;;;;;;19846:32:28;::::5;;::::0;;;:17:::5;:32;::::0;;;;;19809:33:::5;:20:::0;19834:7;19809:24:::5;:33::i;:::-;:69;;19768:110;19760:153;;;::::0;;-1:-1:-1;;;19760:153:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;20042:35:28;;::::5;20011:28;20042:35:::0;;;:20:::5;:35;::::0;;;;;;;;20114:30;;-1:-1:-1;;;20114:30:28;;;;20042:35;::::5;::::0;;;20114:28:::5;::::0;:30:::5;::::0;;::::5;::::0;;;;;;;20042:35;20114:30;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;;;;;;;;::::0;::::5;;-1:-1:-1::0;20114:30:28;;-1:-1:-1;;;;;;20239:36:28;::::5;-1:-1:-1::0;;;;;;;;;;;20239:36:28::5;20235:122;;20290:67;20307:13;20322:10;20342:4;20349:7;20290:16;:67::i;:::-;-1:-1:-1::0;;;;;20458:23:28;::::5;;::::0;;;:8:::5;:23;::::0;;;;:31;:44:::5;::::0;20494:7;20458:35:::5;:44::i;:::-;-1:-1:-1::0;;;;;20424:23:28;::::5;;::::0;;;:8:::5;:23;::::0;;;;:78;20545:33:::5;:20:::0;20570:7;20545:24:::5;:33::i;:::-;-1:-1:-1::0;;;;;20513:29:28;::::5;;::::0;;;:14:::5;:29;::::0;;;;:65;;;;20840:25;;;:49:::5;;-1:-1:-1::0;20869:20:28;;20840:49:::5;20836:194;;;-1:-1:-1::0;20922:7:28;20836:194:::5;;;20976:54;21009:20:::0;20976:28:::5;:7:::0;20988:15;20976:11:::5;:28::i;:54::-;20958:72;;20836:194;21068:10;21049:15;:29;;21041:60;;;::::0;;-1:-1:-1;;;21041:60:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;21041:60:28;;;;;;;;;;;;;::::5;;21190:6;::::0;;21161:89:::5;::::0;;-1:-1:-1;;;21161:89:28;;-1:-1:-1;;;;;21161:89:28;;::::5;::::0;;::::5;::::0;;;;21222:10:::5;21161:89:::0;;;;;;;;;;;;21190:6;;;::::5;::::0;21161:42:::5;::::0;:89;;;;;21190:6:::5;::::0;21161:89;;;;;;;;21190:6;;21161:89;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;21312:11;:9;:11::i;:::-;-1:-1:-1::0;;;;;21389:123:28;::::5;21404:10;21389:123;21431:7:::0;21440:33:::5;:20:::0;21431:7;21440:24:::5;:33::i;:::-;21475:36;:15:::0;21495;21475:19:::5;:36::i;:::-;21389:123;::::0;;;;;::::5;::::0;::::5;::::0;;;;;;;;;;;;;;;;::::5;21589:103;21622:16:::0;21640:36:::5;:15:::0;21660;21640:19:::5;:36::i;:::-;21678:13;21589:32;:103::i;:::-;21764:70;21793:13;21807:1;21793:16;;;;;;;;;::::0;;;::::5;::::0;;;::::5;::::0;21811:13:::5;:16:::0;;-1:-1:-1;;;;;21793:16:28;;::::5;::::0;;;21811;::::5;;;;;;::::0;;;::::5;::::0;;::::5;::::0;-1:-1:-1;;;;;21811:16:28::5;::::0;;21764:28:::5;:70::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;21906:15:28;18573:3356;-1:-1:-1;;;;;;;;;;18573:3356:28:o;10223:141::-;-1:-1:-1;;;;;10321:35:28;;;10290:11;10321:35;;;:20;:35;;;;;;;;10223:141::o;3292:40:8:-;;;-1:-1:-1;;;3292:40:8;;;;;:::o;808:425:42:-;913:13;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;942:23:42;;::::1;;::::0;;;:8:::1;:23;::::0;;;;:30:::1;;:40:::0;;-1:-1:-1;;942:40:42::1;;::::0;::::1;;::::0;;1014:19:::1;::::0;;;::::1;997:36;993:234;;;1058:21;::::0;-1:-1:-1;;;;;1058:21:42::1;1049:31;::::0;;;:8:::1;:31;::::0;;;;1058:21;1049:38:::1;:65:::0;;-1:-1:-1;;1049:65:42::1;1846:7:8;1090:24:42::0;;::::1;1049:65;;;::::0;;993:234:::1;;;1162:19;::::0;-1:-1:-1;;;;;1162:19:42::1;1153:29;::::0;;;:8:::1;:29;::::0;;;;1162:19;1153:36:::1;:63:::0;;-1:-1:-1;;1153:63:42::1;1846:7:8;1192:24:42::0;;::::1;1153:63;;;::::0;;993:234:::1;808:425:::0;;;:::o;13330:735:8:-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;13517:25:8::2;13545:29;-1:-1:-1::0;;;13545:9:8::2;:29::i;:::-;-1:-1:-1::0;;;;;13765:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;:22:::2;;::::0;13517:57;;-1:-1:-1;;;;13765:22:8;::::2;;;13764:23;::::0;:38:::2;;;13792:10;:8;:10::i;:::-;13791:11;13764:38;:68;;;-1:-1:-1::0;13806:5:8::2;::::0;-1:-1:-1;;;;;13806:26:8;;::::2;:5:::0;::::2;:26;13764:68;13756:98;;;::::0;;-1:-1:-1;;;13756:98:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13756:98:8;;;;;;;;;;;;;::::2;;13865:42;13886:6;13894:3;13899:7;13865:20;:42::i;:::-;-1:-1:-1::0;;;;;13994:16:8;::::2;;::::0;;;:8:::2;:16;::::0;;;;:22:::2;;::::0;-1:-1:-1;;;13994:22:8;::::2;;;13990:67;;;14031:26;14050:6;14031:18;:26::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;;13330:735:8:o;1243:37:57:-;;;-1:-1:-1;;;;;1243:37:57;;:::o;11112:198:8:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;1633:13;1627:5;:20::i;:::-;11267:6:8::2;;;;;;;;;-1:-1:-1::0;;;;;11267:6:8::2;-1:-1:-1::0;;;;;11267:24:8::2;;11292:9;11267:35;;;;;;;;;;;;;-1:-1:-1::0;;;;;11267:35:8::2;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;749:1:58::1;11112:198:8::0;:::o;24923:800:28:-;25022:7;25031;25051:19;25073:10;-1:-1:-1;;;;;25073:22:28;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;25073:24:28;-1:-1:-1;;;;;25147:32:28;;;25108:21;25147:32;;;:20;25073:24;25147:32;;;;;;;;;;;25132:48;;:14;:48;;;;25073:24;;-1:-1:-1;25197:21:28;;;25193:487;;;25262:19;;-1:-1:-1;;;;;25262:19:28;25235:9;25247:35;;;:14;:35;;;;;;:61;;855:2;25247:39;:61::i;:::-;25352:19;;25235:73;;-1:-1:-1;25323:9:28;;25335:37;;-1:-1:-1;;;;;25352:19:28;25335:16;:37::i;:::-;25323:49;;25388:11;25401;25420:1;25416;:5;:23;;25434:1;25437;25416:23;;;25425:1;25428;25416:23;25387:52;;-1:-1:-1;25387:52:28;-1:-1:-1;25454:23:28;25480:43;25511:11;25480:26;:7;25492:13;25480:11;:26::i;:43::-;25454:69;-1:-1:-1;25538:22:28;25563:33;25592:3;25563:24;25454:69;25583:3;25563:19;:24::i;:33::-;25538:58;-1:-1:-1;;25635:32:28;;;;-1:-1:-1;25611:57:28;;-1:-1:-1;;;;;;25611:57:28;25193:487;25698:13;-1:-1:-1;25713:1:28;;-1:-1:-1;;24923:800:28;;;;;;:::o;9086:554:8:-;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;726:12:58::1;:10;:12::i;:::-;-1:-1:-1::0;;;;;;;;;;;6959:23:8::2;6973:8;6959:13;:23::i;:::-;9259:25:::3;9287:29;-1:-1:-1::0;;;9287:9:8::3;:29::i;:::-;9259:57;;9431:10;:8;:10::i;:::-;9430:11;:41;;;-1:-1:-1::0;9445:5:8::3;::::0;-1:-1:-1;;;;;9445:26:8;;::::3;:5:::0;::::3;:26;9430:41;9422:71;;;::::0;;-1:-1:-1;;;9422:71:8;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;9422:71:8;;;;;;;;;;;;;::::3;;9504:35;::::0;-1:-1:-1;;;;;9504:12:8;::::3;::::0;9517:21:::3;9504:35:::0;::::3;;;::::0;::::3;::::0;;;9517:21;9504:12;:35;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;9593:39;-1:-1:-1::0;;;;;;;;;;;9593:18:8::3;:39::i;:::-;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;9086:554:8:o;11531:272:28:-;726:12:58;:10;:12::i;:::-;11720:1:28::1;11698:19;:17;:19::i;:::-;:23;;;11690:61;;;::::0;;-1:-1:-1;;;11690:61:28;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11690:61:28;;;;;;;;;;;;;::::1;;11762:33;11779:6;11787:7;11762:16;:33::i;:::-;11531:272:::0;;:::o;23055:114:8:-;23116:6;23142:19;:17;:19::i;1422:217:58:-;1498:8;;-1:-1:-1;;;;;1498:8:58;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;-1:-1:-1;;;1476:52:58;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:58;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:58;;;-1:-1:-1;;;;;1591:8:58;;1583:16;;;;1610:21;;;1422:217::o;1154:33:57:-;;;-1:-1:-1;;;;;1154:33:57;;:::o;219:29:58:-;;;-1:-1:-1;;;;;219:29:58;;:::o;3041:43:8:-;;;;;;;;;:::o;1874:57:28:-;;;;;;;;;;;;;:::o;14882:112:8:-;14965:13;:20;14882:112;:::o;1603:28:28:-;;;;;;:::o;13271:1585::-;13522:7;13531;6356:9:8;:7;:9::i;:::-;13454:12:28::1;6959:23:8;6973:8;6959:13;:23::i;:::-;13490:12:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;13607:12:28::3;-1:-1:-1::0;;;;;13591:28:28::3;:12;-1:-1:-1::0;;;;;13591:28:28::3;;;13583:63;;;::::0;;-1:-1:-1;;;13583:63:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;13583:63:28;;;;;;;;;;;;;::::3;;13659:24;13694::::0;13876:6:::3;:4;:6::i;:::-;13850:22;;:32;13846:725;;;-1:-1:-1::0;;;;;;;13919:22:28;::::3;;::::0;;;:8:::3;:22;::::0;;;;:29:::3;;::::0;::::3;;1846:7:8;13983:34:28::0;;::::3;13846:725;;;14059:20;;:::i;:::-;14082:22;:20;:22::i;:::-;14059:45;;14120:27;14149:29:::0;14182::::3;14206:4;14182:23;:29::i;:::-;14248:19;::::0;14119:92;;-1:-1:-1;14119:92:28;-1:-1:-1;;;;;;14232:35:28;;::::3;14248:19:::0;::::3;14232:35;14228:332;;;14308:20;14288:40;;14367:22;14347:42;;14228:332;;;14463:22;14443:42;;14524:20;14504:40;;14228:332;13846:725;;;;14678:20;14702:11:::0;14717:94:::3;14737:12;14751;14765:17;14784;14803:7;14717:19;:94::i;:::-;14677:134:::0;;;;-1:-1:-1;13271:1585:28;;-1:-1:-1;;;;;;;;;;;13271:1585:28:o;3304:137:57:-;726:12:58;:10;:12::i;:::-;3421::57::1;::::0;3410:8:::1;:23:::0;;-1:-1:-1;;;;;;3410:23:57::1;-1:-1:-1::0;;;;;3421:12:57;;::::1;3410:23:::0;;;::::1;::::0;;3304:137::o;3417:46:8:-;3459:4;3417:46;:::o;8810:248:28:-;726:12:58;:10;:12::i;:::-;-1:-1:-1;;;1627:20:57::1;1633:13;1627:5;:20::i;:::-;8979:13:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;-1:-1:-1::0;;;;;;;9010:29:28;;::::3;;::::0;;;:14:::3;:29;::::0;;;;:40;8810:248::o;2473:46:8:-;;;-1:-1:-1;;;;;2473:46:8;;:::o;2501:239:13:-;2661:1;2639:19;:17;:19::i;:::-;:23;;;2631:61;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;-1:-1:-1;;;2631:61:13;;;;;;;;;;;;;;;2703:29;:27;:29::i;2613:34:8:-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2613:34:8;;-1:-1:-1;2613:34:8;:::o;224:26:42:-;;;;:::o;9815:82:8:-;9885:4;9815:82;:::o;2387:39::-;;;-1:-1:-1;;;;;2387:39:8;;:::o;255:23:58:-;;;-1:-1:-1;;;;;255:23:58;;:::o;14288:374:8:-;726:12:58;:10;:12::i;:::-;14335:36:8::1;14393:29;-1:-1:-1::0;;;14393:9:8::1;:29::i;:::-;14509:6;::::0;14335:88;;-1:-1:-1;14517:5:8::1;::::0;-1:-1:-1;;;;;14509:6:8::1;14492:15;:13;:15::i;:::-;14481:42;;;;;;;;;;;;14536:45;14562:17;14536;:45::i;:::-;14592:34;::::0;;-1:-1:-1;;;14592:34:8;;2376:2:::1;14592:34;::::0;::::1;::::0;;;-1:-1:-1;;;;;14592:25:8;::::1;::::0;::::1;::::0;:34;;;;;-1:-1:-1;;14592:34:8;;;;;;;-1:-1:-1;14592:25:8;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;14637:17;:15;:17::i;2754:48::-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2754:48:8;;;;;:::o;23243:154::-;23331:7;23358:31;23373:15;23358:14;:31::i;:::-;23351:38;23243:154;-1:-1:-1;;23243:154:8:o;12065:168:28:-;12117:7;12126;12146:20;;:::i;:::-;12169:22;:20;:22::i;:::-;12210:6;;12218;;;;;12210;;-1:-1:-1;12218:6:28;-1:-1:-1;;12065:168:28;;;:::o;1133:40::-;;;-1:-1:-1;;;;;1133:40:28;;:::o;16773:225:8:-;16927:7;16894:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;;;16959:23:8::1;;::::0;;;:8:::1;:23;::::0;;;;:31;;16773:225::o;7395:309:28:-;726:12:58;:10;:12::i;:::-;1846:7:8::1;7490:37:28;::::0;::::1;;;7482:82;;;::::0;;-1:-1:-1;;;7482:82:28;;::::1;;::::0;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;;;::::1;;7605:18;::::0;7580:65:::1;::::0;;7605:18:::1;;::::0;;::::1;::::0;::::1;7580:65:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;7656:18;:40:::0;;::::1;::::0;;::::1;;;-1:-1:-1::0;;7656:40:28;;::::1;::::0;;;::::1;::::0;;7395:309::o;22287:2224::-;22549:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;6356:9:8::1;:7;:9::i;:::-;22448:10:28::2;3055:25;3071:8;3055:15;:25::i;:::-;22485:7:::3;252:24:65;269:6;252:16;:24::i;:::-;22519:10:28::4;252:24:65;269:6;252:16;:24::i;:::-;22625:21:28::5;:19;:21::i;:::-;22732:25;22760:10;-1:-1:-1::0;;;;;22760:22:28::5;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;;;;;;;;;;;;;;;::::0;::::5;;-1:-1:-1::0;22760:24:28;;-1:-1:-1;22874:21:28::5;22901:48;22929:10:::0;22941:7;22901:27:::5;:48::i;:::-;22873:76;;;22985:10;22968:13;:27;;22960:58;;;::::0;;-1:-1:-1;;;22960:58:28;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;22960:58:28;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;23123:32:28;;::::5;23096:24;23123:32:::0;;;:20:::5;:32;::::0;;;;;;23239:6:::5;::::0;;23210:75;;-1:-1:-1;;;23210:75:28;;;;::::5;::::0;;;;23265:10:::5;23210:75:::0;;;;;;;;;;;;23123:32;;::::5;::::0;23239:6;;;::::5;::::0;23210:42:::5;::::0;:75;;;;;23096:24;;23210:75;;;;;;23096:24;23239:6;23210:75;::::5;;::::0;::::5;;;;::::0;::::5;;;;;;;;;;;;::::0;::::5;;;;;-1:-1:-1::0;;;;;;;;23385:22:28;::::5;;::::0;;;:8:::5;:22;::::0;;;;:30;:49:::5;::::0;-1:-1:-1;23420:13:28;23385:34:::5;:49::i;:::-;-1:-1:-1::0;;;;;23352:22:28;::::5;;::::0;;;:8:::5;:22;::::0;;;;;;;:82;;;;23472:14:::5;:28:::0;;;;;;:47:::5;::::0;23505:13;23472:32:::5;:47::i;:::-;-1:-1:-1::0;;;;;23530:28:28;::::5;;::::0;;;:14:::5;:28;::::0;;;;:47;;;23445:74;;-1:-1:-1;;;;;;;;;;;;23648:35:28::5;23644:170;;;23698:34;::::0;:10:::5;::::0;:34;::::5;;;::::0;23718:13;;23698:34:::5;::::0;;;23718:13;23698:10;:34;::::5;;;;;;;;;;;;;::::0;::::5;;;;;;23644:170;;;23761:53;23774:12;23788:10;23800:13;23761:12;:53::i;:::-;23876:11;:9;:11::i;:::-;23900:26;23929:30;:17:::0;23951:7;23929:21:::5;:30::i;:::-;24027:95;::::0;;;;;::::5;::::0;::::5;::::0;;;;;;;;;;;23900:59;;-1:-1:-1;;;;;;24027:95:28;::::5;::::0;24044:10:::5;::::0;24027:95:::5;::::0;;;;;;;;::::5;24199:78;24232:10;24244:18;24264:12;24199:32;:78::i;:::-;24349:70;24378:13;24392:1;24378:16;;;;;;;24349:70;-1:-1:-1::0;;639:6:60;:14;;-1:-1:-1;;;;639:14:60;;;-1:-1:-1;24490:13:28;22287:2224;-1:-1:-1;;;;;;;;22287:2224:28:o;17872:782:8:-;18123:7;580:12:60;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;;;603:13:60;-1:-1:-1;;;603:13:60;;;-1:-1:-1;;;1627:20:57::1;18089:14:8::0;1627:5:57::1;:20::i;:::-;18199:12:8::2;-1:-1:-1::0;;;;;18183:28:8::2;:12;-1:-1:-1::0;;;;;18183:28:8::2;;;18175:63;;;::::0;;-1:-1:-1;;;18175:63:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18175:63:8;;;;;;;;;;;;;::::2;;18366:19;::::0;-1:-1:-1;;;;;18366:19:8::2;18358:42:::0;;:158:::2;;-1:-1:-1::0;18422:19:8::2;::::0;:42:::2;::::0;;-1:-1:-1;;;18422:42:8;;-1:-1:-1;;;;;18422:42:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;:33:::2;::::0;:42;;;;;::::2;::::0;;;;;;;;:19;:42;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18422:42:8;:93;::::2;;;-1:-1:-1::0;18468:19:8::2;::::0;:47:::2;::::0;;-1:-1:-1;;;18468:47:8;;-1:-1:-1;;;;;18468:47:8;;::::2;;::::0;::::2;::::0;;;:19;;;::::2;::::0;:33:::2;::::0;:47;;;;;::::2;::::0;;;;;;;;:19;:47;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18468:47:8;18422:93:::2;18350:207;;;::::0;;-1:-1:-1;;;18350:207:8;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;18350:207:8;;;;;;;;;;;;;::::2;;18577:69;18587:12;18601;18615:7;18624;18633:12;18577:9;:69::i;:::-;639:6:60::0;:14;;-1:-1:-1;;;;639:14:60;;;18570:76:8;17872:782;-1:-1:-1;;;;;;;17872:782:8:o;12392:444:28:-;12448:7;12457;12477:20;;:::i;:::-;12500:22;:20;:22::i;:::-;12477:45;;12534:27;12563:29;12596;12620:4;12596:23;:29::i;:::-;12533:92;;;;12665:13;12679:1;12665:16;;;;;;;;;;;;;;;;;;12642:19;;-1:-1:-1;;;;;12642:19:28;;;12665:16;;12642:39;12638:125;;;12698:53;;;;;-1:-1:-1;12698:53:28;;-1:-1:-1;12698:53:28;;-1:-1:-1;12698:53:28;12638:125;12775:53;;;;;-1:-1:-1;12775:53:28;;-1:-1:-1;;12392:444:28;;:::o;12580:274:8:-;726:12:58;:10;:12::i;:::-;12692:16:8::1;::::0;::::1;::::0;;;::::1;::::0;::::1;12674:34:::0;;::::1;;;12666:73;;;::::0;;-1:-1:-1;;;12666:73:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;12775:13;::::0;12755:50:::1;::::0;;12775:13:::1;-1:-1:-1::0;;;12775:13:8;;::::1;::::0;::::1;12755:50:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;12816:13;:30:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;12816:30:8::1;-1:-1:-1::0;;12816:30:8;;::::1;::::0;;;::::1;::::0;;12580:274::o;1164:167:58:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:58;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:58;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:58;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:58::1;-1:-1:-1::0;;;;;1303:20:58;;;::::1;::::0;;;::::1;::::0;;1164:167::o;444:140:42:-;529:22;:48;444:140::o;21965:97:8:-;22048:6;;-1:-1:-1;;;;;22048:6:8;21965:97;:::o;1704:37:28:-;;;;:::o;7057:134:8:-;-1:-1:-1;;;;;7135:18:8;;;;;;:8;:18;;;;;:24;;;-1:-1:-1;;;7135:24:8;;;;7127:56;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;-1:-1:-1;;;7127:56:8;;;;;;;;;;;;;;813:104:58;882:5;;-1:-1:-1;;;;;882:5:58;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;-1:-1:-1;;;860:49:58;;;;;;;;;;;;;;6701:88:8;6756:10;:8;:10::i;:::-;6755:11;6747:34;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;-1:-1:-1;;;6747:34:8;;;;;;;;;;;;;;1041:126:65;-1:-1:-1;;;;;1110:25:65;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;-1:-1:-1;;;1102:57:65;;;;;;;;;;;;;;692:128;-1:-1:-1;;;;;766:22:65;;758:54;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;-1:-1:-1;;;758:54:65;;;;;;;;;;;;;;4077:133:57;4169:8;;:33;;;-1:-1:-1;;;4169:33:57;;;;;;;;;;4142:7;;-1:-1:-1;;;;;4169:8:57;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4169:33:57;;4077:133;-1:-1:-1;;4077:133:57:o;27794:815:28:-;27904:6;;;27957:22;;;-1:-1:-1;;;27957:22:28;;;;-1:-1:-1;;;;;27904:6:28;;;;27923:31;;27904:6;;27957:20;;:22;;;;27842:30;;27957:22;;;;;;;;27904:6;27957:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;27957:22:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27957:22:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;27957:22:28;;;;;;-1:-1:-1;;28010:17:28;;28068:13;:20;27923:56;;-1:-1:-1;28010:22:28;;28068:20;-1:-1:-1;27990:17:28;;-1:-1:-1;28099:503:28;28123:12;28119:1;:16;28099:503;;;28157:28;28204:12;28200:181;;;28256:9;-1:-1:-1;;;;;28256:21:28;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28256:23:28;;-1:-1:-1;28200:181:28;;;28352:10;28363:1;28352:13;;;;;;;;;;;;;;28333:32;;28200:181;28502:16;28461:20;:38;28482:13;28496:1;28482:16;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28482:16:28;;;28461:38;;;;;;;;;;;;;;;:57;;-1:-1:-1;;;;;;28461:57:28;;;;;;;;;;;28574:13;:16;;28588:1;;28574:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28533:38:28;;;;;:20;:38;;;;;;;:57;;-1:-1:-1;;;;;;28533:57:28;28574:16;;;;28533:57;;;;;;28574:16;28137:3;28099:503;;;;27794:815;;;;:::o;28737:263::-;28791:15;;:::i;:::-;28864:11;;28887:19;;28908:21;;28864:66;;;-1:-1:-1;;;28864:66:28;;-1:-1:-1;;;;;28887:19:28;;;28864:66;;;;28908:21;;;28864:66;;;;;;28820:19;;;;-1:-1:-1;;;28864:11:28;;;;;:22;;:66;;;;;;;;;;;;:11;:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28864:66:28;;;;;;;;28948:44;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28737:263:28;:::o;590:117:42:-;638:7;664:11;;679:1;664:16;;:36;;697:3;664:36;;;-1:-1:-1;683:11:42;;;590:117::o;29180:166:28:-;29301:37;;;;;;;;;29325:12;29301:37;;;;;;;;;;;:23;:37::i;:::-;29230:19;;-1:-1:-1;;;;;29230:19:28;;;29221:29;;;;:8;:29;;;;;;29268:21;;;;;29259:31;;;;29230:19;29259:38;;;29220:118;;;;;;-1:-1:-1;;29220:118:28;;;;;;;29221:36;;29220:118;;;;;;;;;;;;;;29180:166::o;10641:121:8:-;10723:6;;;:14;;;-1:-1:-1;;;10723:14:8;;;;10699:4;;10749;;-1:-1:-1;;;;;10723:6:8;;:12;;:14;;;;;;;;;;;:6;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10723:14:8;-1:-1:-1;;;;;10723:31:8;;;-1:-1:-1;10641:121:8;:::o;29615:207:28:-;-1:-1:-1;;;;;29782:23:28;;29691:7;29782:23;;;:8;:23;;;;;;;;:31;29718:14;:29;;;;;;:96;;29782:31;29718:59;;29752:24;29718:33;:59::i;:::-;:63;;:96::i;1149:250:61:-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:61;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;-1:-1:-1;;;1335:37:61;;;;;;;;;;;;;;1627:174;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;-1:-1:-1;;;1707:37:61;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:61:o;716:89:60:-;772:6;;-1:-1:-1;;;772:6:60;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;-1:-1:-1;;;763:34:60;;;;;;;;;;;;;;6440:87:8;6492:10;:8;:10::i;:::-;6484:35;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;-1:-1:-1;;;6484:35:8;;;;;;;;;;;;;;351:112:65;435:1;426:6;:10;418:37;;;;;-1:-1:-1;;;418:37:65;;;;;;;;;;;;-1:-1:-1;;;418:37:65;;;;;;;;;;;;;;20456:205:8;20530:13;:20;20507;20561:92;20585:12;20581:1;:16;20561:92;;;20617:36;20636:13;20650:1;20636:16;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20636:16:8;20617:18;:36::i;:::-;20599:3;;20561:92;;778:147:61;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;-1:-1:-1;;;858:34:61;;;;;;;;;;;;;;;-1:-1:-1;910:7:61;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;-1:-1:-1;;;496:32:61;;;;;;;;;;;;;;2190:348:62;2355:71;;;-1:-1:-1;;;;;2355:71:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:62;-1:-1:-1;;;2355:71:62;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:62;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:62;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:62;;;;;;;;;;;;;;;;;;;;;;;;;;;32258:242:28;-1:-1:-1;;;;;32401:91:28;;;32444:29;;;;:14;:29;;;;;;;;;;32401:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32258:242;;;:::o;31261:709::-;31443:21;31467:25;31484:7;31467:16;:25::i;:::-;31443:49;;31503:21;31527:25;31544:7;31527:16;:25::i;:::-;31503:49;-1:-1:-1;31608:18:28;;;31604:91;;-1:-1:-1;;;;;31659:17:28;;;;;;:8;:17;;;;;:24;;;;;;-1:-1:-1;31604:91:28;31751:18;;;31747:97;;31819:13;1846:7:8;31802:30:28;31786:46;;31747:97;-1:-1:-1;;;;;31861:101:28;;;;;;;31895:32;:13;:32;;;;;:17;:32;:::i;:::-;31929;:13;:32;;;;;:17;:32;:::i;:::-;31861:101;;;;;;;;;;;;;;;;;;;;;;31261:709;;;;;;:::o;1196:290:63:-;726:12:58;:10;:12::i;:::-;1370:6:63::1;594:23:65;608:8;594:13;:23::i;:::-;1401:3:63::2;594:23:65;608:8;594:13;:23::i;:::-;1423:3:63::3;948:18:65;957:8;948;:18::i;:::-;1444:34:63::4;1457:6;1465:3;1470:7;1444:12;:34::i;20061:322:8:-:0;20138:13;6959:23;6973:8;6959:13;:23::i;:::-;-1:-1:-1;;;;;20168:36:8;::::1;-1:-1:-1::0;;;;;;;;;;;20168:36:8::1;20164:211;;;-1:-1:-1::0;;;;;20219:23:8;::::1;;::::0;;;:8:::1;:23;::::0;;;;20253:21:::1;20219:55:::0;;20164:211:::1;;;20337:38;::::0;;-1:-1:-1;;;20337:38:8;;20369:4:::1;20337:38;::::0;::::1;::::0;;;-1:-1:-1;;;;;20337:23:8;::::1;::::0;::::1;::::0;:38;;;;;::::1;::::0;;;;;;;;:23;:38;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;20337:38:8;-1:-1:-1;;;;;20303:23:8;::::1;;::::0;;;:8:::1;20337:38;20303:23:::0;;;;:72;20061:322;;:::o;1722:139:57:-;1807:24;1817:13;1807:9;:24::i;:::-;-1:-1:-1;;;;;1793:38:57;:10;-1:-1:-1;;;;;1793:38:57;;1785:68;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;-1:-1:-1;;;1785:68:57;;;;;;;;;;;;;;15286:803:8;726:12:58;:10;:12::i;:::-;6615:11:8::1;:9;:11::i;:::-;15460:6:::2;594:23:65;608:8;594:13;:23::i;:::-;15494:6:8::3;948:18:65;957:8;948;:18::i;:::-;15531:7:8::4;7656:28;7676:7;7656:19;:28::i;:::-;15618:6:::5;::::0;-1:-1:-1;;;;;15591:34:8;;::::5;15618:6:::0;::::5;15591:34;::::0;::::5;::::0;:61:::5;;-1:-1:-1::0;;;;;;15630:16:8;::::5;;::::0;;;:8:::5;:16;::::0;;;;:22:::5;;::::0;-1:-1:-1;;;15630:22:8;::::5;;;15629:23;15591:61;15583:93;;;::::0;;-1:-1:-1;;;15583:93:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15583:93:8;;;;;;;;;;;;;::::5;;15723:12;::::0;::::5;::::0;;::::5;1846:7;15706:29;15695:40:::0;::::5;::::0;;::::5;;;15687:79;;;::::0;;-1:-1:-1;;;15687:79:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;::::5;::::0;;;;;;;;;;;;;::::5;;15785:32;:19;:17;:19::i;:::-;:32;;;15777:70;;;::::0;;-1:-1:-1;;;15777:70:8;;::::5;;::::0;::::5;::::0;::::5;::::0;;;;-1:-1:-1;;;15777:70:8;;;;;;;;;;;;;::::5;;-1:-1:-1::0;;;;;;;;15889:16:8;;::::5;15860:26;15889:16:::0;;;:8:::5;:16;::::0;;;;15916:22;;;15949:17:::5;::::0;;::::5;:27:::0;;-1:-1:-1;;15949:27:8::5;::::0;;::::5;-1:-1:-1::0;;15949:27:8;;::::5;;15987:23:::0;;;::::5;-1:-1:-1::0;;;15987:23:8::5;::::0;;;:16:::5;16021:26:::0;;;;::::5;::::0;;;;;;;;::::5;::::0;;-1:-1:-1;;;;;;16021:26:8::5;::::0;;::::5;::::0;;;16058:12:::5;:23:::0;;;;::::5;::::0;;::::5;::::0;;::::5;::::0;::::5;::::0;;;::::5;::::0;;15286:803::o;30126:703:28:-;30328:19;;-1:-1:-1;;;;;30328:19:28;30204:6;30313:35;;;:14;:35;;;;;;30204:6;;;;30313:35;30204:6;;30432:37;;:16;:37::i;:::-;30524:21;;30407:62;;-1:-1:-1;30480:24:28;;30507:39;;-1:-1:-1;;;;;30524:21:28;30507:16;:39::i;:::-;30480:66;;30613:25;-1:-1:-1;;;30613:9:28;:25::i;:::-;-1:-1:-1;;;;;30598:57:28;;30670:46;:20;855:2;30670:24;:46::i;:::-;30791:7;;30813;;;;30598:223;;;-1:-1:-1;;;;;;30598:223:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30598:223:28;;;;;;;;;-1:-1:-1;30598:223:28;-1:-1:-1;;;;30126:703:28;;;:::o;26457:1089::-;26694:7;26703;26712;26783:21;26807:30;26824:12;26807:16;:30::i;:::-;26783:54;;26848:21;26872:30;26889:12;26872:16;:30::i;:::-;26848:54;;26949:20;26987:25;-1:-1:-1;;;26987:9:28;:25::i;:::-;-1:-1:-1;;;;;26972:66:28;;27053:13;27081;27109;27137;27165:7;26972:211;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26972:211:28;;-1:-1:-1;27196:19:28;27218:26;26972:211;27218:12;:26::i;:::-;27291:18;;27196:48;;-1:-1:-1;27255:16:28;;27274:73;;27196:48;;27274:56;;1846:7:8;;27274:36:28;;:12;;27291:18;;;27274:56;27291:18;;;;27274:16;:36;:::i;:73::-;27255:92;-1:-1:-1;27488:26:28;:12;27255:92;27488:16;:26::i;:::-;27480:58;27516:11;;-1:-1:-1;27516:11:28;-1:-1:-1;26457:1089:28;-1:-1:-1;;;;;;;;;26457:1089:28:o;11633:276:8:-;726:12:58;:10;:12::i;:::-;11803:1:8::1;11781:19;:17;:19::i;:::-;:23;;;11773:61;;;::::0;;-1:-1:-1;;;11773:61:8;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11773:61:8;;;;;;;;;;;;;::::1;;11845:6;::::0;;:24:::1;::::0;;-1:-1:-1;;;11845:24:8;;;;-1:-1:-1;;;;;11845:6:8;;::::1;::::0;:22:::1;::::0;:24;;::::1;::::0;:6:::1;::::0;:24;;;;;;:6;;:24;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;11880:21;:19;:21::i;3155:168:28:-:0;-1:-1:-1;;;;;3243:30:28;;;3286:1;3243:30;;;:20;:30;;;;;;;3227:88;;;;;-1:-1:-1;;;3227:88:28;;;;;;;;;;;;-1:-1:-1;;;3227:88:28;;;;;;;;;;;;;;1485:312:62;1631:59;;;-1:-1:-1;;;;;1631:59:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:62;-1:-1:-1;;;1631:59:62;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:62;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:62;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;-1:-1:-1;;;1701:89:62;;;;;;;;;;;;;;15439:2741:28;15716:7;6356:9:8;:7;:9::i;:::-;15648:12:28::1;6959:23:8;6973:8;6959:13;:23::i;:::-;15684:12:28::2;6959:23:8;6973:8;6959:13;:23::i;:::-;15831:6:28::3;:4;:6::i;:::-;15806:22;;:31;15802:173;;;15879:6;:4;:6::i;:::-;15854:22;:31:::0;15915:22:::3;:20;:22::i;:::-;15900:37:::0;;:12:::3;:37:::0;::::3;;::::0;;;15952:11:::3;:9;:11::i;:::-;-1:-1:-1::0;;;;;16014:22:28;::::3;15987:24;16014:22:::0;;;:8:::3;:22;::::0;;;;:29:::3;;::::0;::::3;;::::0;1846:7:8::3;16081:34:28::0;;::::3;::::0;15987:24;;16234:94:::3;16023:12:::0;16268;16014:29;16081:34;16320:7;16234:19:::3;:94::i;:::-;16176:152;;;;;;16409:6;16419:1;16409:11;;16401:46;;;::::0;;-1:-1:-1;;;16401:46:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16401:46:28;;;;;;;;;;;;;::::3;;-1:-1:-1::0;;;;;16527:35:28;::::3;-1:-1:-1::0;;;;;;;;;;;16527:35:28::3;16523:270;;;16598:7;16585:9;:20;16577:56;;;::::0;;-1:-1:-1;;;16577:56:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16577:56:28;;;;;;;;;;;;;::::3;;16523:270;;;16670:9;:14:::0;:100;::::3;;;;16763:7;16688:71;16730:28;16745:12;16730:14;:28::i;:::-;16688:12;-1:-1:-1::0;;;;;16688:22:28::3;;16719:4;16688:37;;;;;;;;;;;;;-1:-1:-1::0;;;;;16688:37:28::3;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;16688:37:28;;:41:::3;:71::i;:::-;:82;;16670:100;16662:131;;;::::0;;-1:-1:-1;;;16662:131:28;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;16662:131:28;;;;;;;;;;;;;::::3;;16844:32;16863:12;16844:18;:32::i;:::-;16920:40;16953:6;16920:28;16935:12;16920:14;:28::i;:::-;:32:::0;::::3;:40::i;:::-;-1:-1:-1::0;;;;;16887:22:28;::::3;;::::0;;;:8:::3;:22;::::0;;;;;;;:73;;;;17062:14:::3;:28:::0;;;;:45:::3;::::0;17095:11;17062:32:::3;:45::i;:::-;-1:-1:-1::0;;;;;17031:28:28;::::3;;::::0;;;:14:::3;:28;::::0;;;;:76;;;;-1:-1:-1;;;;;;;;;;;17194:35:28::3;17190:187;;;17246:29;::::0;-1:-1:-1;;;;;17246:21:28;::::3;::::0;:29;::::3;;;::::0;17268:6;;17246:29:::3;::::0;;;17268:6;17246:21;:29;::::3;;;;;;;;;;;;;::::0;::::3;;;;;;17190:187;;;17317:48;17330:12;17344;17358:6;17317:12;:48::i;:::-;17431:87;17455:12;17469;17483:7;17492;17501:6;17509:8;17431:23;:87::i;:::-;17590:94;17619:12;17633;17647:17;17666;17590:28;:94::i;:::-;-1:-1:-1::0;;;;;17959:34:28;;::::3;17929:27;17959:34:::0;;;:20:::3;:34;::::0;;;;;;;;;18054:29;;-1:-1:-1;;;18054:29:28;;;;17959:34;::::3;::::0;18004:94:::3;::::0;17959:34;;;;18054:27:::3;::::0;:29:::3;::::0;;::::3;::::0;17959:34;18054:29;;;;;;17959:34;18054:29;::::3;;::::0;::::3;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;::::0;::::3;;-1:-1:-1::0;18054:29:28;18085:12;18004:32:::3;:94::i;:::-;-1:-1:-1::0;18166:6:28;;15439:2741;-1:-1:-1;;;;;;;;;;;;15439:2741:28:o;7759:157:8:-;7847:1;7837:7;:11;;;:40;;;;-1:-1:-1;1846:7:8;7852:25;;;;;7837:40;7829:79;;;;;-1:-1:-1;;;7829:79:8;;;;;;;;;;;;;;;;;;;;;;;;;;;19713:155;19826:13;;19781:7;;19808:52;;1846:7;;19808:32;;:13;;-1:-1:-1;;;19826:13:8;;19808:52;19826:13;;;;19808:17;:32;:::i;21084:758::-;-1:-1:-1;;;21705:10:8;:21;21698:29;;;;21743:91;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21743:91:8;;;;;;;;;;;;;;;;;;;;;21084:758;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol\";\n\ncontract TestLiquidityPoolV2Converter is LiquidityPoolV2Converter {\n uint256 public currentTime;\n\n constructor(IPoolTokensContainer _token, IContractRegistry _registry, uint32 _maxConversionFee)\n public LiquidityPoolV2Converter(_token, _registry, _maxConversionFee) {\n }\n\n function setExternalRateUpdateTime(uint256 _externalRateUpdateTime) public {\n externalRateUpdateTime = _externalRateUpdateTime;\n }\n\n function time() internal view override returns (uint256) {\n return currentTime != 0 ? currentTime : now;\n }\n\n function setTime(uint256 _currentTime) public {\n currentTime = _currentTime;\n }\n\n function setReserveWeight(IERC20Token _reserveToken, uint32 _weight)\n public\n validReserve(_reserveToken)\n {\n reserves[_reserveToken].weight = _weight;\n\n if (_reserveToken == primaryReserveToken) {\n reserves[secondaryReserveToken].weight = PPM_RESOLUTION - _weight;\n }\n else {\n reserves[primaryReserveToken].weight = PPM_RESOLUTION - _weight;\n }\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV2Converter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV2Converter.sol", + "exportedSymbols": { + "TestLiquidityPoolV2Converter": [ + 19526 + ] + }, + "id": 19527, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19429, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:42" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "file": "../converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "id": 19430, + "nodeType": "ImportDirective", + "scope": 19527, + "sourceUnit": 18368, + "src": "75:75:42", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19431, + "name": "LiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18367, + "src": "193:24:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + }, + "id": 19432, + "nodeType": "InheritanceSpecifier", + "src": "193:24:42" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 18367, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19526, + "linearizedBaseContracts": [ + 19526, + 18367, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "TestLiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d18e81b3", + "id": 19434, + "mutability": "mutable", + "name": "currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19526, + "src": "224:26:42", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19433, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19448, + "nodeType": "Block", + "src": "431:7:42", + "statements": [] + }, + "documentation": null, + "id": 19449, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19443, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19436, + "src": "393:6:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 19444, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19438, + "src": "401:9:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19445, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19440, + "src": "412:17:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 19446, + "modifierName": { + "argumentTypes": null, + "id": 19442, + "name": "LiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18367, + "src": "368:24:42", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV2Converter_$18367_$", + "typeString": "type(contract LiquidityPoolV2Converter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "368:62:42" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19436, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "269:27:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 19435, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "269:20:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19438, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "298:27:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19437, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "298:17:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19440, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "327:24:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19439, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "327:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "268:84:42" + }, + "returnParameters": { + "id": 19447, + "nodeType": "ParameterList", + "parameters": [], + "src": "431:0:42" + }, + "scope": 19526, + "src": "257:181:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19458, + "nodeType": "Block", + "src": "519:65:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19454, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "529:22:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19455, + "name": "_externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19451, + "src": "554:23:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "529:48:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19457, + "nodeType": "ExpressionStatement", + "src": "529:48:42" + } + ] + }, + "documentation": null, + "functionSelector": "f64ccbfb", + "id": 19459, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setExternalRateUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19451, + "mutability": "mutable", + "name": "_externalRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19459, + "src": "479:31:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "479:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "478:33:42" + }, + "returnParameters": { + "id": 19453, + "nodeType": "ParameterList", + "parameters": [], + "src": "519:0:42" + }, + "scope": 19526, + "src": "444:140:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 18366 + ], + "body": { + "id": 19472, + "nodeType": "Block", + "src": "647:60:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19465, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "664:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "679:1:42", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "664:16:42", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 19469, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "697:3:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "664:36:42", + "trueExpression": { + "argumentTypes": null, + "id": 19468, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "683:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19464, + "id": 19471, + "nodeType": "Return", + "src": "657:43:42" + } + ] + }, + "documentation": null, + "id": 19473, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19461, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "620:8:42" + }, + "parameters": { + "id": 19460, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:2:42" + }, + "returnParameters": { + "id": 19464, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19463, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19473, + "src": "638:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19462, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "638:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "637:9:42" + }, + "scope": 19526, + "src": "590:117:42", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19482, + "nodeType": "Block", + "src": "759:43:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19478, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "769:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19479, + "name": "_currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19475, + "src": "783:12:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "769:26:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19481, + "nodeType": "ExpressionStatement", + "src": "769:26:42" + } + ] + }, + "documentation": null, + "functionSelector": "3beb26c4", + "id": 19483, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19475, + "mutability": "mutable", + "name": "_currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19483, + "src": "730:20:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "730:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "729:22:42" + }, + "returnParameters": { + "id": 19477, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:42" + }, + "scope": 19526, + "src": "713:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19524, + "nodeType": "Block", + "src": "932:301:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19493, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "942:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19495, + "indexExpression": { + "argumentTypes": null, + "id": 19494, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "951:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "942:23:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19496, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "942:30:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19497, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "975:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "942:40:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19499, + "nodeType": "ExpressionStatement", + "src": "942:40:42" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 19502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19500, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "997:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 19501, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "1014:19:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "997:36:42", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 19522, + "nodeType": "Block", + "src": "1139:88:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19513, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "1153:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19515, + "indexExpression": { + "argumentTypes": null, + "id": 19514, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "1162:19:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1153:29:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "1153:36:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 19519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19517, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "1192:14:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 19518, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "1209:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1192:24:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1153:63:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19521, + "nodeType": "ExpressionStatement", + "src": "1153:63:42" + } + ] + }, + "id": 19523, + "nodeType": "IfStatement", + "src": "993:234:42", + "trueBody": { + "id": 19512, + "nodeType": "Block", + "src": "1035:90:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19503, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "1049:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19505, + "indexExpression": { + "argumentTypes": null, + "id": 19504, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "1058:21:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1049:31:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "1049:38:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 19509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19507, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "1090:14:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 19508, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "1107:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1090:24:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1049:65:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19511, + "nodeType": "ExpressionStatement", + "src": "1049:65:42" + } + ] + } + } + ] + }, + "documentation": null, + "functionSelector": "59cd4eec", + "id": 19525, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19490, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "913:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 19491, + "modifierName": { + "argumentTypes": null, + "id": 19489, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "900:12:42", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "900:27:42" + } + ], + "name": "setReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19488, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19485, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19525, + "src": "834:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19484, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "834:11:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19487, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19525, + "src": "861:14:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19486, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "861:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "833:43:42" + }, + "returnParameters": { + "id": 19492, + "nodeType": "ParameterList", + "parameters": [], + "src": "932:0:42" + }, + "scope": 19526, + "src": "808:425:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19527, + "src": "152:1083:42" + } + ], + "src": "51:1185:42" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestLiquidityPoolV2Converter.sol", + "exportedSymbols": { + "TestLiquidityPoolV2Converter": [ + 19526 + ] + }, + "id": 19527, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19429, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:42" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "file": "../converter/types/liquidity-pool-v2/LiquidityPoolV2Converter.sol", + "id": 19430, + "nodeType": "ImportDirective", + "scope": 19527, + "sourceUnit": 18368, + "src": "75:75:42", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19431, + "name": "LiquidityPoolV2Converter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18367, + "src": "193:24:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidityPoolV2Converter_$18367", + "typeString": "contract LiquidityPoolV2Converter" + } + }, + "id": 19432, + "nodeType": "InheritanceSpecifier", + "src": "193:24:42" + } + ], + "contractDependencies": [ + 10039, + 13077, + 13340, + 18367, + 22053, + 22152, + 22576, + 22860, + 22909, + 22995, + 23181, + 23241 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19526, + "linearizedBaseContracts": [ + 19526, + 18367, + 13077, + 10039, + 22576, + 22053, + 22909, + 22995, + 22152, + 22860, + 23241, + 13340, + 23181 + ], + "name": "TestLiquidityPoolV2Converter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d18e81b3", + "id": 19434, + "mutability": "mutable", + "name": "currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19526, + "src": "224:26:42", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19433, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "224:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19448, + "nodeType": "Block", + "src": "431:7:42", + "statements": [] + }, + "documentation": null, + "id": 19449, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19443, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19436, + "src": "393:6:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + { + "argumentTypes": null, + "id": 19444, + "name": "_registry", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19438, + "src": "401:9:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + { + "argumentTypes": null, + "id": 19445, + "name": "_maxConversionFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19440, + "src": "412:17:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + } + ], + "id": 19446, + "modifierName": { + "argumentTypes": null, + "id": 19442, + "name": "LiquidityPoolV2Converter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18367, + "src": "368:24:42", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_LiquidityPoolV2Converter_$18367_$", + "typeString": "type(contract LiquidityPoolV2Converter)" + } + }, + "nodeType": "ModifierInvocation", + "src": "368:62:42" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19436, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "269:27:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + }, + "typeName": { + "contractScope": null, + "id": 19435, + "name": "IPoolTokensContainer", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 18801, + "src": "269:20:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IPoolTokensContainer_$18801", + "typeString": "contract IPoolTokensContainer" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19438, + "mutability": "mutable", + "name": "_registry", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "298:27:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + }, + "typeName": { + "contractScope": null, + "id": 19437, + "name": "IContractRegistry", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 23165, + "src": "298:17:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IContractRegistry_$23165", + "typeString": "contract IContractRegistry" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19440, + "mutability": "mutable", + "name": "_maxConversionFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19449, + "src": "327:24:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19439, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "327:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "268:84:42" + }, + "returnParameters": { + "id": 19447, + "nodeType": "ParameterList", + "parameters": [], + "src": "431:0:42" + }, + "scope": 19526, + "src": "257:181:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19458, + "nodeType": "Block", + "src": "519:65:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19454, + "name": "externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16685, + "src": "529:22:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19455, + "name": "_externalRateUpdateTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19451, + "src": "554:23:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "529:48:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19457, + "nodeType": "ExpressionStatement", + "src": "529:48:42" + } + ] + }, + "documentation": null, + "functionSelector": "f64ccbfb", + "id": 19459, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setExternalRateUpdateTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19451, + "mutability": "mutable", + "name": "_externalRateUpdateTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19459, + "src": "479:31:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "479:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "478:33:42" + }, + "returnParameters": { + "id": 19453, + "nodeType": "ParameterList", + "parameters": [], + "src": "519:0:42" + }, + "scope": 19526, + "src": "444:140:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 18366 + ], + "body": { + "id": 19472, + "nodeType": "Block", + "src": "647:60:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19465, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "664:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19466, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "679:1:42", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "664:16:42", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 19469, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -17, + "src": "697:3:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "664:36:42", + "trueExpression": { + "argumentTypes": null, + "id": 19468, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "683:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19464, + "id": 19471, + "nodeType": "Return", + "src": "657:43:42" + } + ] + }, + "documentation": null, + "id": 19473, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "time", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 19461, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "620:8:42" + }, + "parameters": { + "id": 19460, + "nodeType": "ParameterList", + "parameters": [], + "src": "603:2:42" + }, + "returnParameters": { + "id": 19464, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19463, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19473, + "src": "638:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19462, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "638:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "637:9:42" + }, + "scope": 19526, + "src": "590:117:42", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19482, + "nodeType": "Block", + "src": "759:43:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19478, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19434, + "src": "769:11:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19479, + "name": "_currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19475, + "src": "783:12:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "769:26:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19481, + "nodeType": "ExpressionStatement", + "src": "769:26:42" + } + ] + }, + "documentation": null, + "functionSelector": "3beb26c4", + "id": 19483, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setTime", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19475, + "mutability": "mutable", + "name": "_currentTime", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19483, + "src": "730:20:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19474, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "730:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "729:22:42" + }, + "returnParameters": { + "id": 19477, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:42" + }, + "scope": 19526, + "src": "713:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19524, + "nodeType": "Block", + "src": "932:301:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19493, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "942:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19495, + "indexExpression": { + "argumentTypes": null, + "id": 19494, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "951:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "942:23:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19496, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "942:30:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19497, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "975:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "942:40:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19499, + "nodeType": "ExpressionStatement", + "src": "942:40:42" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "id": 19502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19500, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "997:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 19501, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "1014:19:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "src": "997:36:42", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 19522, + "nodeType": "Block", + "src": "1139:88:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19513, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "1153:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19515, + "indexExpression": { + "argumentTypes": null, + "id": 19514, + "name": "primaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16667, + "src": "1162:19:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1153:29:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "1153:36:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 19519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19517, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "1192:14:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 19518, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "1209:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1192:24:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1153:63:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19521, + "nodeType": "ExpressionStatement", + "src": "1153:63:42" + } + ] + }, + "id": 19523, + "nodeType": "IfStatement", + "src": "993:234:42", + "trueBody": { + "id": 19512, + "nodeType": "Block", + "src": "1035:90:42", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19503, + "name": "reserves", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9040, + "src": "1049:8:42", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20Token_$21461_$_t_struct$_Reserve_$9023_storage_$", + "typeString": "mapping(contract IERC20Token => struct ConverterBase.Reserve storage ref)" + } + }, + "id": 19505, + "indexExpression": { + "argumentTypes": null, + "id": 19504, + "name": "secondaryReserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 16669, + "src": "1058:21:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1049:31:42", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Reserve_$9023_storage", + "typeString": "struct ConverterBase.Reserve storage ref" + } + }, + "id": 19506, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "weight", + "nodeType": "MemberAccess", + "referencedDeclaration": 9016, + "src": "1049:38:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "id": 19509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19507, + "name": "PPM_RESOLUTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9007, + "src": "1090:14:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 19508, + "name": "_weight", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19487, + "src": "1107:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1090:24:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "src": "1049:65:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "id": 19511, + "nodeType": "ExpressionStatement", + "src": "1049:65:42" + } + ] + } + } + ] + }, + "documentation": null, + "functionSelector": "59cd4eec", + "id": 19525, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19490, + "name": "_reserveToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19485, + "src": "913:13:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + } + ], + "id": 19491, + "modifierName": { + "argumentTypes": null, + "id": 19489, + "name": "validReserve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9172, + "src": "900:12:42", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_contract$_IERC20Token_$21461_$", + "typeString": "modifier (contract IERC20Token)" + } + }, + "nodeType": "ModifierInvocation", + "src": "900:27:42" + } + ], + "name": "setReserveWeight", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19488, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19485, + "mutability": "mutable", + "name": "_reserveToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19525, + "src": "834:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19484, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21461, + "src": "834:11:42", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21461", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19487, + "mutability": "mutable", + "name": "_weight", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19525, + "src": "861:14:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 19486, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "861:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "833:43:42" + }, + "returnParameters": { + "id": 19492, + "nodeType": "ParameterList", + "parameters": [], + "src": "932:0:42" + }, + "scope": 19526, + "src": "808:425:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19527, + "src": "152:1083:42" + } + ], + "src": "51:1185:42" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-10T14:20:35.978Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptAnchorOwnership()": { + "details": "accepts ownership of the anchor after an ownership transfer also activates the converter can only be called by the contract owner note that prior to version 28, you should use 'acceptTokenOwnership' instead" + }, + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "acceptTokenOwnership()": { + "details": "deprecated, backward compatibility" + }, + "activate(address,address,address)": { + "details": "sets the pool's primary reserve token / price oracles and activates the pool each oracle must be able to provide the rate for each reserve token note that the oracle must be whitelisted prior to the call can only be called by the owner while the pool is inactive", + "params": { + "_primaryReserveOracle": "address of a chainlink price oracle for the primary reserve token", + "_primaryReserveToken": "address of the pool's primary reserve token", + "_secondaryReserveOracle": "address of a chainlink price oracle for the secondary reserve token" + } + }, + "addLiquidity(address,uint256,uint256)": { + "details": "increases the pool's liquidity and mints new shares in the pool to the caller", + "params": { + "_amount": "amount of liquidity to add", + "_minReturn": "minimum return-amount of pool tokens", + "_reserveToken": "address of the reserve token to add liquidity to" + }, + "returns": { + "_0": "amount of pool tokens minted" + } + }, + "addReserve(address,uint32)": { + "details": "defines a new reserve token for the converter can only be called by the owner while the converter is inactive and 2 reserves aren't defined yet", + "params": { + "_token": "address of the reserve token", + "_weight": "reserve weight, represented in ppm, 1-1000000" + } + }, + "connectorTokenCount()": { + "details": "deprecated, backward compatibility" + }, + "connectorTokens(uint256)": { + "details": "deprecated, backward compatibility" + }, + "connectors(address)": { + "details": "deprecated, backward compatibility" + }, + "convert(address,address,uint256,address,address)": { + "details": "converts a specific amount of source tokens to target tokens can only be called by the bancor network contract", + "params": { + "_amount": "amount of tokens to convert (in units of the source token)", + "_beneficiary": "wallet to receive the conversion result", + "_sourceToken": "source ERC20 token", + "_targetToken": "target ERC20 token", + "_trader": "address of the caller who executed the conversion" + }, + "returns": { + "_0": "amount of tokens received (in units of the target token)" + } + }, + "converterType()": { + "details": "returns the converter type", + "returns": { + "_0": "see the converter types in the the main contract doc" + } + }, + "disableMaxStakedBalances()": { + "details": "disables the max staked balance mechanism available as a temporary mechanism during the beta once disabled, it cannot be re-enabled can only be called by the owner" + }, + "effectiveReserveWeights()": { + "details": "returns the effective reserve tokens weights", + "returns": { + "_0": "reserve1 weight", + "_1": "reserve2 weight" + } + }, + "effectiveTokensRate()": { + "details": "returns the effective rate of 1 primary token in secondary tokens", + "returns": { + "_0": "rate of 1 primary token in secondary tokens (numerator)", + "_1": "rate of 1 primary token in secondary tokens (denominator)" + } + }, + "getConnectorBalance(address)": { + "details": "deprecated, backward compatibility" + }, + "getReturn(address,address,uint256)": { + "details": "deprecated, backward compatibility" + }, + "hasETHReserve()": { + "details": "checks whether or not the converter has an ETH reserve", + "returns": { + "_0": "true if the converter has an ETH reserve, false otherwise" + } + }, + "isActive()": { + "details": "returns true if the converter is active, false otherwise", + "returns": { + "_0": "true if the converter is active, false otherwise" + } + }, + "isV28OrHigher()": { + "details": "checks whether or not the converter version is 28 or higher", + "returns": { + "_0": "true, since the converter version is 28 or higher" + } + }, + "liquidationLimit(address)": { + "details": "returns the maximum number of pool tokens that can currently be liquidated", + "params": { + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "liquidation limit" + } + }, + "poolToken(address)": { + "details": "returns the pool token address by the reserve token address", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "pool token address" + } + }, + "removeLiquidity(address,uint256,uint256)": { + "details": "decreases the pool's liquidity and burns the caller's shares in the pool", + "params": { + "_amount": "amount of pool tokens to burn", + "_minReturn": "minimum return-amount of reserve tokens", + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "amount of liquidity removed" + } + }, + "removeLiquidityReturnAndFee(address,uint256)": { + "details": "calculates the amount of reserve tokens entitled for a given amount of pool tokens note that a fee is applied according to the equilibrium level of the primary reserve token", + "params": { + "_amount": "amount of pool tokens", + "_poolToken": "address of the pool token" + }, + "returns": { + "_0": "amount after fee and fee, in reserve token units" + } + }, + "reserveAmplifiedBalance(address)": { + "details": "returns the amplified balance of a given reserve token", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "amplified balance" + } + }, + "reserveBalance(address)": { + "details": "returns the reserve's balance note that prior to version 17, you should use 'getConnectorBalance' instead", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve balance" + } + }, + "reserveStakedBalance(address)": { + "details": "returns the staked balance of a given reserve token", + "params": { + "_reserveToken": "reserve token address" + }, + "returns": { + "_0": "staked balance" + } + }, + "reserveTokenCount()": { + "details": "returns the number of reserve tokens defined note that prior to version 17, you should use 'connectorTokenCount' instead", + "returns": { + "_0": "number of reserve tokens" + } + }, + "reserveWeight(address)": { + "details": "returns the reserve's weight added in version 28", + "params": { + "_reserveToken": "reserve token contract address" + }, + "returns": { + "_0": "reserve weight" + } + }, + "restoreRegistry()": { + "details": "restores the previous contract-registry" + }, + "restrictRegistryUpdate(bool)": { + "details": "restricts the permission to update the contract-registry", + "params": { + "_onlyOwnerCanUpdateRegistry": "indicates whether or not permission is restricted to owner only" + } + }, + "setConversionFee(uint32)": { + "details": "updates the current conversion fee can only be called by the contract owner", + "params": { + "_conversionFee": "new conversion fee, represented in ppm" + } + }, + "setConversionWhitelist(address)": { + "details": "allows the owner to update & enable the conversion whitelist contract address when set, only addresses that are whitelisted are actually allowed to use the converter note that the whitelist check is actually done by the BancorNetwork contract", + "params": { + "_whitelist": "address of a whitelist contract" + } + }, + "setMaxStakedBalances(uint256,uint256)": { + "details": "sets the max staked balance for both reserves available as a temporary mechanism during the beta can only be called by the owner", + "params": { + "_reserve1MaxStakedBalance": "max staked balance for reserve 1", + "_reserve2MaxStakedBalance": "max staked balance for reserve 2" + } + }, + "setOracleDeviationFee(uint32)": { + "details": "updates the current oracle deviation fee can only be called by the contract owner", + "params": { + "_oracleDeviationFee": "new oracle deviation fee, represented in ppm" + } + }, + "setReserveStakedBalance(address,uint256)": { + "details": "sets the reserve's staked balance can only be called by the upgrader contract while the upgrader is the owner", + "params": { + "_balance": "new reserve staked balance", + "_reserveToken": "reserve token address" + } + }, + "targetAmountAndFee(address,address,uint256)": { + "details": "returns the expected target amount of converting one reserve to another along with the fee", + "params": { + "_amount": "amount of tokens received from the user", + "_sourceToken": "contract address of the source reserve token", + "_targetToken": "contract address of the target reserve token" + }, + "returns": { + "_0": "expected target amount", + "_1": "expected fee" + } + }, + "token()": { + "details": "deprecated since version 28, backward compatibility - use only for earlier versions" + }, + "transferAnchorOwnership(address)": { + "details": "transfers the anchor ownership the new owner needs to accept the transfer can only be called by the converter upgrder while the upgrader is the owner note that prior to version 28, you should use 'transferAnchorOwnership' instead", + "params": { + "_newOwner": "new token owner" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "transferTokenOwnership(address)": { + "details": "deprecated, backward compatibility" + }, + "updateRegistry()": { + "details": "updates to the new contract-registry" + }, + "upgrade()": { + "details": "upgrades the converter to the latest version can only be called by the owner note that the owner needs to call acceptOwnership on the new converter after the upgrade" + }, + "withdrawETH(address)": { + "details": "withdraws ether can only be called by the owner if the converter is inactive or by upgrader contract can only be called after the upgrader contract has accepted the ownership of this contract can only be called if the converter has an ETH reserve", + "params": { + "_to": "address to send the ETH to" + } + }, + "withdrawFromAnchor(address,address,uint256)": { + "details": "withdraws tokens held by the anchor and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the converter and sends them to an account can only be called by the owner note that reserve tokens can only be withdrawn by the owner while the converter is inactive unless the owner is the converter upgrader contract", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestNonStandardToken.json b/apps/cic-eth/tests/testdata/bancor/TestNonStandardToken.json new file mode 100644 index 00000000..683ef12f --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestNonStandardToken.json @@ -0,0 +1,13558 @@ +{ + "contractName": "TestNonStandardToken", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + } + ], + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ok", + "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": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_ok", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"}],\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ok\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_ok\",\"type\":\"bool\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":\"TestNonStandardToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":{\"keccak256\":\"0x2dfc6b208775e73ee5c35e34fa0780f5439490a5114fc251ebf072b922a9a0a4\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://230c0e8d2dbe196eaad09c0f20a73eeee3a5155796ea677671082ed97944ba77\",\"dweb:/ipfs/QmXt9yQ24JkqGnXpo2b1CQ7R8igEnxfeR9bZdacmSgJyKi\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610a6e380380610a6e8339818101604052608081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020828101519282015160008181553381526001835292909220829055865192945090925085918591859185916101ca91600391870190610224565b5082516101de906004906020860190610224565b50506005805460ff191660ff92909216919091179055506102019050600161020a565b505050506102b7565b600580549115156101000261ff0019909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061026557805160ff1916838001178555610292565b82800160010185558215610292579182015b82811115610292578251825591602001919060010190610277565b5061029e9291506102a2565b5090565b5b8082111561029e57600081556001016102a3565b6107a8806102c66000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80635f76f6ab116100715780635f76f6ab146101c757806370a08231146101e657806395d89b411461020c578063a9059cbb14610214578063d909b40314610240578063dd62ed3e1461025c576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461015957806323b872dd14610173578063313ce567146101a9575b600080fd5b6100b661028a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b038135169060200135610318565b005b61016161033a565b60408051918252519081900360200190f35b6101576004803603606081101561018957600080fd5b506001600160a01b03813581169160208101359091169060400135610340565b6101b1610364565b6040805160ff9092168252519081900360200190f35b610157600480360360208110156101dd57600080fd5b5035151561036d565b610161600480360360208110156101fc57600080fd5b50356001600160a01b0316610387565b6100b6610399565b6101576004803603604081101561022a57600080fd5b506001600160a01b0381351690602001356103f4565b6102486103fe565b604080519115158252519081900360200190f35b6101616004803603604081101561027257600080fd5b506001600160a01b038135811691602001351661040c565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103105780601f106102e557610100808354040283529160200191610310565b820191906000526020600020905b8154815290600101906020018083116102f357829003601f168201915b505050505081565b6103228282610429565b600554610100900460ff1661033657600080fd5b5050565b60005481565b61034b8383836104cd565b600554610100900460ff1661035f57600080fd5b505050565b60055460ff1681565b600580549115156101000261ff0019909216919091179055565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103105780601f106102e557610100808354040283529160200191610310565b61032282826105d7565b600554610100900460ff1681565b600260209081526000928352604080842090915290825290205481565b8161043381610681565b81158061046157503360009081526002602090815260408083206001600160a01b0387168452909152902054155b61046a57600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b826104d781610681565b826104e181610681565b6001600160a01b038516600090815260026020908152604080832033845290915290205461050f90846106d5565b6001600160a01b03861660008181526002602090815260408083203384528252808320949094559181526001909152205461054a90846106d5565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546105799084610722565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b816105e181610681565b336000908152600160205260409020546105fb90836106d5565b33600090815260016020526040808220929092556001600160a01b038516815220546106279083610722565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b0381166106d2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60008183101561071c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b60008282018381101561076b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220b032979f9c11c7429368bd260eab8c432e5f81766669025243167ed155c09e6564736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80635f76f6ab116100715780635f76f6ab146101c757806370a08231146101e657806395d89b411461020c578063a9059cbb14610214578063d909b40314610240578063dd62ed3e1461025c576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461015957806323b872dd14610173578063313ce567146101a9575b600080fd5b6100b661028a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b038135169060200135610318565b005b61016161033a565b60408051918252519081900360200190f35b6101576004803603606081101561018957600080fd5b506001600160a01b03813581169160208101359091169060400135610340565b6101b1610364565b6040805160ff9092168252519081900360200190f35b610157600480360360208110156101dd57600080fd5b5035151561036d565b610161600480360360208110156101fc57600080fd5b50356001600160a01b0316610387565b6100b6610399565b6101576004803603604081101561022a57600080fd5b506001600160a01b0381351690602001356103f4565b6102486103fe565b604080519115158252519081900360200190f35b6101616004803603604081101561027257600080fd5b506001600160a01b038135811691602001351661040c565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103105780601f106102e557610100808354040283529160200191610310565b820191906000526020600020905b8154815290600101906020018083116102f357829003601f168201915b505050505081565b6103228282610429565b600554610100900460ff1661033657600080fd5b5050565b60005481565b61034b8383836104cd565b600554610100900460ff1661035f57600080fd5b505050565b60055460ff1681565b600580549115156101000261ff0019909216919091179055565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103105780601f106102e557610100808354040283529160200191610310565b61032282826105d7565b600554610100900460ff1681565b600260209081526000928352604080842090915290825290205481565b8161043381610681565b81158061046157503360009081526002602090815260408083206001600160a01b0387168452909152902054155b61046a57600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b826104d781610681565b826104e181610681565b6001600160a01b038516600090815260026020908152604080832033845290915290205461050f90846106d5565b6001600160a01b03861660008181526002602090815260408083203384528252808320949094559181526001909152205461054a90846106d5565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546105799084610722565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b816105e181610681565b336000908152600160205260409020546105fb90836106d5565b33600090815260016020526040808220929092556001600160a01b038516815220546106279083610722565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b0381166106d2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60008183101561071c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b60008282018381101561076b576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220b032979f9c11c7429368bd260eab8c432e5f81766669025243167ed155c09e6564736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "3643:738:46:-:0;;;3728:192;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3728:192:46;;;;;;;;;;-1:-1:-1;3728:192:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3728:192:46;;;;;;;;;;-1:-1:-1;3728:192:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3728:192:46;;;;;;;;;;;;;772:11;:21;;;813:10;803:21;;:9;:21;;;;;;:31;;;3564:12;;3728:192;;-1:-1:-1;3728:192:46;;-1:-1:-1;3858:5:46;;3865:7;;3728:192;;;;3564:12:::1;::::0;:4:::1;::::0;:12;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;3586:16:46;;::::1;::::0;:6:::1;::::0;:16:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;3612:8:46::1;:20:::0;;-1:-1:-1;;3612:20:46::1;;::::0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;3904:9:46::1;::::0;-1:-1:-1;;3904:3:46::1;:9::i;:::-;3728:192:::0;;;;3643:738;;3926:55;3966:2;:8;;;;;;;-1:-1:-1;;3966:8:46;;;;;;;;;3926:55::o;3643:738::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3643:738:46;;;-1:-1:-1;3643:738:46;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "3643:738:46:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3085:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3987:122;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3987:122:46;;;;;;;;:::i;:::-;;266:26;;;:::i;:::-;;;;;;;;;;;;;;;;4235:144;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4235:144:46;;;;;;;;;;;;;;;;;:::i;3135:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3926:55;;;;;;;;;;;;;;;;-1:-1:-1;3926:55:46;;;;:::i;298:45::-;;;;;;;;;;;;;;;;-1:-1:-1;298:45:46;-1:-1:-1;;;;;298:45:46;;:::i;3109:20::-;;;:::i;4115:114::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4115:114:46;;;;;;;;:::i;3707:14::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;349:66;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;349:66:46;;;;;;;;;;:::i;3085:18::-;;;;;;;;;;;;;;;-1:-1:-1;;3085:18:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3987:122::-;4055:26;4064:8;4074:6;4055:8;:26::i;:::-;4099:2;;;;;;;4091:11;;;;;;3987:122;;:::o;266:26::-;;;;:::o;4235:144::-;4318:33;4332:5;4339:3;4344:6;4318:13;:33::i;:::-;4369:2;;;;;;;4361:11;;;;;;4235:144;;;:::o;3135:21::-;;;;;;:::o;3926:55::-;3966:2;:8;;;;;;;-1:-1:-1;;3966:8:46;;;;;;;;;3926:55::o;298:45::-;;;;;;;;;;;;;:::o;3109:20::-;;;;;;;;;;;;;;;-1:-1:-1;;3109:20:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4115:114;4179:22;4189:3;4194:6;4179:9;:22::i;3707:14::-;;;;;;;;;:::o;349:66::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;2611:410::-;2701:8;594:23:64;608:8;594:13;:23::i;:::-;2858:11:46;;;:51:::1;;-1:-1:-1::0;2883:10:46::1;2873:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2873:31:46;::::1;::::0;;;;;;;;:36;2858:51:::1;2850:60;;;::::0;::::1;;2931:10;2921:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2921:31:46;::::1;::::0;;;;;;;;;;:40;;;2976:38;;;;;;;2921:31;;2931:10;2976:38:::1;::::0;;;;;;;;;::::1;2611:410:::0;;;:::o;1617:383::-;1722:5;594:23:64;608:8;594:13;:23::i;:::-;1750:3:46::1;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;1800:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1817:10:::2;1800:28:::0;;;;;;;;:40:::2;::::0;1833:6;1800:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;1769:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1786:10:::2;1769:28:::0;;;;;;;:71;;;;1869:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;1890:6;1869:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;1850:16:46;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;1924:14;;::::2;::::0;;;;:26:::2;::::0;1943:6;1924:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;1907:14:46;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;1965:28;;;;;;;1907:14;;1965:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;628:1:64::1;1617:383:46::0;;;;:::o;1057:270::-;1143:3;594:23:64;608:8;594:13;:23::i;:::-;1196:10:46::1;1186:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;1212:6;1186:25:::1;:33::i;:::-;1172:10;1162:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;1246:14:46;::::1;::::0;;;;:26:::1;::::0;1265:6;1246:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;1229:14:46;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;1287:33;;;;;;;1229:14;;1296:10:::1;::::0;1287:33:::1;::::0;;;;;;;;::::1;1057:270:::0;;;:::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;778:147:60:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:60:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/Utils.sol\";\nimport \"../utility/SafeMath.sol\";\n\n/**\n * ERC20 Non-Standard Token implementation\n*/\ncontract NonStandardToken is Utils {\n using SafeMath for uint256;\n\n uint256 public totalSupply;\n mapping (address => uint256) public balanceOf;\n mapping (address => mapping (address => uint256)) public allowance;\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _supply initial supply\n */\n constructor(uint256 _supply)\n internal\n {\n totalSupply = _supply;\n balanceOf[msg.sender] = _supply;\n }\n\n /**\n * @dev send coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _to target address\n * @param _value transfer amount\n */\n function _transfer(address _to, uint256 _value)\n internal\n validAddress(_to)\n {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n }\n\n /**\n * @dev an account/contract attempts to get the coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function _transferFrom(address _from, address _to, uint256 _value)\n internal\n validAddress(_from)\n validAddress(_to)\n {\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\n balanceOf[_from] = balanceOf[_from].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(_from, _to, _value);\n }\n\n /**\n * @dev allow another account/contract to spend some tokens on your behalf\n * throws on any error rather then return a false flag to minimize user errors\n *\n * also, to minimize the risk of the approve/transferFrom attack vector\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n *\n * @param _spender approved address\n * @param _value allowance amount\n */\n function _approve(address _spender, uint256 _value)\n internal\n validAddress(_spender)\n {\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\n require(_value == 0 || allowance[msg.sender][_spender] == 0);\n\n allowance[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n }\n}\n\ncontract NonStandardTokenDetailed is NonStandardToken {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _name token name\n * @param _symbol token symbol\n * @param _decimals decimal points\n * @param _supply initial supply\n */\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply)\n internal\n NonStandardToken(_supply)\n {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n\ncontract TestNonStandardToken is NonStandardTokenDetailed {\n bool public ok;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true);\n }\n\n function set(bool _ok) public {\n ok = _ok;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n require(ok);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n require(ok);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n require(ok);\n }\n}\n\ncontract TestNonStandardTokenWithoutDecimals is NonStandardToken {\n string public name;\n string public symbol;\n\n constructor(string memory _name, string memory _symbol, uint256 _supply) public\n NonStandardToken(_supply) {\n name = _name;\n symbol = _symbol;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n }\n}\n\ncontract TestStandardToken is NonStandardTokenDetailed {\n bool public ok;\n bool public ret;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true, true);\n }\n\n function set(bool _ok, bool _ret) public {\n ok = _ok;\n ret = _ret;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool) {\n _approve(_spender, _value);\n require(ok);\n return ret;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n _transfer(_to, _value);\n require(ok);\n return ret;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n _transferFrom(_from, _to, _value);\n require(ok);\n return ret;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.819Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestNonStandardTokenWithoutDecimals.json b/apps/cic-eth/tests/testdata/bancor/TestNonStandardTokenWithoutDecimals.json new file mode 100644 index 00000000..2522a833 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestNonStandardTokenWithoutDecimals.json @@ -0,0 +1,13514 @@ +{ + "contractName": "TestNonStandardTokenWithoutDecimals", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + } + ], + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "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": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"}],\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":\"TestNonStandardTokenWithoutDecimals\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":{\"keccak256\":\"0x2dfc6b208775e73ee5c35e34fa0780f5439490a5114fc251ebf072b922a9a0a4\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://230c0e8d2dbe196eaad09c0f20a73eeee3a5155796ea677671082ed97944ba77\",\"dweb:/ipfs/QmXt9yQ24JkqGnXpo2b1CQ7R8igEnxfeR9bZdacmSgJyKi\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516109503803806109508339818101604052606081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020918201516000818155338152600184529190912081905585519093506101bc92506003918601906101d9565b5081516101d09060049060208501906101d9565b5050505061026c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061021a57805160ff1916838001178555610247565b82800160010185558215610247579182015b8281111561024757825182559160200191906001019061022c565b50610253929150610257565b5090565b5b808211156102535760008155600101610258565b6106d58061027b6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a082311461018857806395d89b41146101ae578063a9059cbb146101b6578063dd62ed3e146101e257610088565b806306fdde031461008d578063095ea7b31461010a57806318160ddd1461013857806323b872dd14610152575b600080fd5b610095610210565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101366004803603604081101561012057600080fd5b506001600160a01b03813516906020013561029e565b005b6101406102ac565b60408051918252519081900360200190f35b6101366004803603606081101561016857600080fd5b506001600160a01b038135811691602081013590911690604001356102b2565b6101406004803603602081101561019e57600080fd5b50356001600160a01b03166102c2565b6100956102d4565b610136600480360360408110156101cc57600080fd5b506001600160a01b03813516906020013561032f565b610140600480360360408110156101f857600080fd5b506001600160a01b0381358116916020013516610339565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102965780601f1061026b57610100808354040283529160200191610296565b820191906000526020600020905b81548152906001019060200180831161027957829003601f168201915b505050505081565b6102a88282610356565b5050565b60005481565b6102bd8383836103fa565b505050565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102965780601f1061026b57610100808354040283529160200191610296565b6102a88282610504565b600260209081526000928352604080842090915290825290205481565b81610360816105ae565b81158061038e57503360009081526002602090815260408083206001600160a01b0387168452909152902054155b61039757600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b82610404816105ae565b8261040e816105ae565b6001600160a01b038516600090815260026020908152604080832033845290915290205461043c9084610602565b6001600160a01b0386166000818152600260209081526040808320338452825280832094909455918152600190915220546104779084610602565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546104a6908461064f565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b8161050e816105ae565b336000908152600160205260409020546105289083610602565b33600090815260016020526040808220929092556001600160a01b03851681522054610554908361064f565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b0381166105ff576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b600081831015610649576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082820183811015610698576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea264697066735822122075507f18c2b3d872da5ab534bbb88a31a3778d504870d71778e6738515703d5464736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a082311461018857806395d89b41146101ae578063a9059cbb146101b6578063dd62ed3e146101e257610088565b806306fdde031461008d578063095ea7b31461010a57806318160ddd1461013857806323b872dd14610152575b600080fd5b610095610210565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101366004803603604081101561012057600080fd5b506001600160a01b03813516906020013561029e565b005b6101406102ac565b60408051918252519081900360200190f35b6101366004803603606081101561016857600080fd5b506001600160a01b038135811691602081013590911690604001356102b2565b6101406004803603602081101561019e57600080fd5b50356001600160a01b03166102c2565b6100956102d4565b610136600480360360408110156101cc57600080fd5b506001600160a01b03813516906020013561032f565b610140600480360360408110156101f857600080fd5b506001600160a01b0381358116916020013516610339565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102965780601f1061026b57610100808354040283529160200191610296565b820191906000526020600020905b81548152906001019060200180831161027957829003601f168201915b505050505081565b6102a88282610356565b5050565b60005481565b6102bd8383836103fa565b505050565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102965780601f1061026b57610100808354040283529160200191610296565b6102a88282610504565b600260209081526000928352604080842090915290825290205481565b81610360816105ae565b81158061038e57503360009081526002602090815260408083206001600160a01b0387168452909152902054155b61039757600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b82610404816105ae565b8261040e816105ae565b6001600160a01b038516600090815260026020908152604080832033845290915290205461043c9084610602565b6001600160a01b0386166000818152600260209081526040808320338452825280832094909455918152600190915220546104779084610602565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546104a6908461064f565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b8161050e816105ae565b336000908152600160205260409020546105289083610602565b33600090815260016020526040808220929092556001600160a01b03851681522054610554908361064f565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b0381166105ff576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b600081831015610649576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082820183811015610698576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea264697066735822122075507f18c2b3d872da5ab534bbb88a31a3778d504870d71778e6738515703d5464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "4383:628:46:-:0;;;4505:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4505:169:46;;;;;;;;;;-1:-1:-1;4505:169:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4505:169:46;;;;;;;;;;-1:-1:-1;4505:169:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4505:169:46;;;;;;;;;772:11;:21;;;813:10;803:21;;:9;:21;;;;;;:31;;;4629:12;;4505:169;;-1:-1:-1;4629:12:46::1;::::0;-1:-1:-1;4629:4:46::1;::::0;:12;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;4651:16:46;;::::1;::::0;:6:::1;::::0;:16:::1;::::0;::::1;::::0;::::1;:::i;:::-;;4505:169:::0;;;4383:628;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4383:628:46;;;-1:-1:-1;4383:628:46;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "4383:628:46:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4454:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4680:101;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4680:101:46;;;;;;;;:::i;:::-;;266:26;;;:::i;:::-;;;;;;;;;;;;;;;;4886:123;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4886:123:46;;;;;;;;;;;;;;;;;:::i;298:45::-;;;;;;;;;;;;;;;;-1:-1:-1;298:45:46;-1:-1:-1;;;;;298:45:46;;:::i;4478:20::-;;;:::i;4787:93::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4787:93:46;;;;;;;;:::i;349:66::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;349:66:46;;;;;;;;;;:::i;4454:18::-;;;;;;;;;;;;;;;-1:-1:-1;;4454:18:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4680:101::-;4748:26;4757:8;4767:6;4748:8;:26::i;:::-;4680:101;;:::o;266:26::-;;;;:::o;4886:123::-;4969:33;4983:5;4990:3;4995:6;4969:13;:33::i;:::-;4886:123;;;:::o;298:45::-;;;;;;;;;;;;;:::o;4478:20::-;;;;;;;;;;;;;;;-1:-1:-1;;4478:20:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4787:93;4851:22;4861:3;4866:6;4851:9;:22::i;349:66::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;2611:410::-;2701:8;594:23:64;608:8;594:13;:23::i;:::-;2858:11:46;;;:51:::1;;-1:-1:-1::0;2883:10:46::1;2873:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2873:31:46;::::1;::::0;;;;;;;;:36;2858:51:::1;2850:60;;;::::0;::::1;;2931:10;2921:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2921:31:46;::::1;::::0;;;;;;;;;;:40;;;2976:38;;;;;;;2921:31;;2931:10;2976:38:::1;::::0;;;;;;;;;::::1;2611:410:::0;;;:::o;1617:383::-;1722:5;594:23:64;608:8;594:13;:23::i;:::-;1750:3:46::1;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;1800:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1817:10:::2;1800:28:::0;;;;;;;;:40:::2;::::0;1833:6;1800:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;1769:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1786:10:::2;1769:28:::0;;;;;;;:71;;;;1869:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;1890:6;1869:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;1850:16:46;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;1924:14;;::::2;::::0;;;;:26:::2;::::0;1943:6;1924:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;1907:14:46;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;1965:28;;;;;;;1907:14;;1965:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;628:1:64::1;1617:383:46::0;;;;:::o;1057:270::-;1143:3;594:23:64;608:8;594:13;:23::i;:::-;1196:10:46::1;1186:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;1212:6;1186:25:::1;:33::i;:::-;1172:10;1162:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;1246:14:46;::::1;::::0;;;;:26:::1;::::0;1265:6;1246:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;1229:14:46;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;1287:33;;;;;;;1229:14;;1296:10:::1;::::0;1287:33:::1;::::0;;;;;;;;::::1;1057:270:::0;;;:::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;778:147:60:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:60:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/Utils.sol\";\nimport \"../utility/SafeMath.sol\";\n\n/**\n * ERC20 Non-Standard Token implementation\n*/\ncontract NonStandardToken is Utils {\n using SafeMath for uint256;\n\n uint256 public totalSupply;\n mapping (address => uint256) public balanceOf;\n mapping (address => mapping (address => uint256)) public allowance;\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _supply initial supply\n */\n constructor(uint256 _supply)\n internal\n {\n totalSupply = _supply;\n balanceOf[msg.sender] = _supply;\n }\n\n /**\n * @dev send coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _to target address\n * @param _value transfer amount\n */\n function _transfer(address _to, uint256 _value)\n internal\n validAddress(_to)\n {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n }\n\n /**\n * @dev an account/contract attempts to get the coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function _transferFrom(address _from, address _to, uint256 _value)\n internal\n validAddress(_from)\n validAddress(_to)\n {\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\n balanceOf[_from] = balanceOf[_from].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(_from, _to, _value);\n }\n\n /**\n * @dev allow another account/contract to spend some tokens on your behalf\n * throws on any error rather then return a false flag to minimize user errors\n *\n * also, to minimize the risk of the approve/transferFrom attack vector\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n *\n * @param _spender approved address\n * @param _value allowance amount\n */\n function _approve(address _spender, uint256 _value)\n internal\n validAddress(_spender)\n {\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\n require(_value == 0 || allowance[msg.sender][_spender] == 0);\n\n allowance[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n }\n}\n\ncontract NonStandardTokenDetailed is NonStandardToken {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _name token name\n * @param _symbol token symbol\n * @param _decimals decimal points\n * @param _supply initial supply\n */\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply)\n internal\n NonStandardToken(_supply)\n {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n\ncontract TestNonStandardToken is NonStandardTokenDetailed {\n bool public ok;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true);\n }\n\n function set(bool _ok) public {\n ok = _ok;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n require(ok);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n require(ok);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n require(ok);\n }\n}\n\ncontract TestNonStandardTokenWithoutDecimals is NonStandardToken {\n string public name;\n string public symbol;\n\n constructor(string memory _name, string memory _symbol, uint256 _supply) public\n NonStandardToken(_supply) {\n name = _name;\n symbol = _symbol;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n }\n}\n\ncontract TestStandardToken is NonStandardTokenDetailed {\n bool public ok;\n bool public ret;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true, true);\n }\n\n function set(bool _ok, bool _ret) public {\n ok = _ok;\n ret = _ret;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool) {\n _approve(_spender, _value);\n require(ok);\n return ret;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n _transfer(_to, _value);\n require(ok);\n return ret;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n _transferFrom(_from, _to, _value);\n require(ok);\n return ret;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.822Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuard.json b/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuard.json new file mode 100644 index 00000000..72398d2a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuard.json @@ -0,0 +1,2725 @@ +{ + "contractName": "TestReentrancyGuard", + "abi": [ + { + "inputs": [], + "name": "calls", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protectedMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unprotectedMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"calls\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protectedMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unprotectedMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol\":\"TestReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol\":{\"keccak256\":\"0x10cc32288bb587945509a8d78bf7d96b999df3bfd631162acf07b8db00404c3e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://0eae14c3bc545882b4afdf7ef001c24b70781ed0216bdb559ec11218d4182e6c\",\"dweb:/ipfs/QmNpdpANj4EA2DgLHEmVH4FtKrQL91boCdEGSZ87coJLj4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]}},\"version\":1}", + "bytecode": "0x60806040526000805460ff1916905534801561001a57600080fd5b506101848061002a6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632d4d800c14610046578063305f72b714610050578063f86485d91461006a575b600080fd5b61004e610072565b005b61005861009b565b60408051918252519081900360200190f35b61004e6100a1565b61007a6100ab565b6000805460ff1916600117905561008f6100f4565b6000805460ff19169055565b60015481565b6100a96100f4565b565b60005460ff16156100a9576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60018054810190556040805163041d939960e11b81529051339163083b273291600480830192600092919082900301818387803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b5050505056fea2646970667358221220db5b491438fe4fee705ac2ae433f910b1a9796da0ae45353617780e40ca664a264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c80632d4d800c14610046578063305f72b714610050578063f86485d91461006a575b600080fd5b61004e610072565b005b61005861009b565b60408051918252519081900360200190f35b61004e6100a1565b61007a6100ab565b6000805460ff1916600117905561008f6100f4565b6000805460ff19169055565b60015481565b6100a96100f4565b565b60005460ff16156100a9576040805162461bcd60e51b815260206004820152600e60248201526d4552525f5245454e5452414e435960901b604482015290519081900360640190fd5b60018054810190556040805163041d939960e11b81529051339163083b273291600480830192600092919082900301818387803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b5050505056fea2646970667358221220db5b491438fe4fee705ac2ae433f910b1a9796da0ae45353617780e40ca664a264736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "942:331:43:-:0;;;371:5:59;349:27;;-1:-1:-1;;349:27:59;;;942:331:43;;;;;;;;;;;;;;;;", + "deployedSourceMap": "942:331:43:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1023:68;;;:::i;:::-;;996:20;;;:::i;:::-;;;;;;;;;;;;;;;;1097:60;;;:::i;1023:68::-;580:12:59;:10;:12::i;:::-;603:6;:13;;-1:-1:-1;;603:13:59;612:4;603:13;;;1079:5:43::1;:3;:5::i;:::-;648::59::0;639:14;;-1:-1:-1;;639:14:59;;;1023:68:43:o;996:20::-;;;;:::o;1097:60::-;1145:5;:3;:5::i;:::-;1097:60::o;716:89:59:-;772:6;;;;771:7;763:34;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;-1:-1:-1;;;763:34:59;;;;;;;;;;;;;;1163:108:43;1196:5;:7;;;;;;1214:50;;;-1:-1:-1;;;1214:50:43;;;;1242:10;;1214:48;;:50;;;;;1196:5;;1214:50;;;;;;;1196:5;1242:10;1214:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1163:108::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/ReentrancyGuard.sol\";\n\n\ncontract TestReentrancyGuardAttacker {\n TestReentrancyGuard public target;\n bool public reentrancy;\n bool public callProtectedMethod;\n bool public attacking;\n\n constructor(TestReentrancyGuard _target) public {\n target = _target;\n }\n\n function setReentrancy(bool _reentrancy) external {\n reentrancy = _reentrancy;\n }\n\n function setCallProtectedMethod(bool _callProtectedMethod) external {\n callProtectedMethod = _callProtectedMethod;\n }\n\n function run() public {\n callProtectedMethod ? target.protectedMethod() : target.unprotectedMethod();\n }\n\n function callback() external {\n if (!reentrancy) {\n return;\n }\n\n if (!attacking) {\n attacking = true;\n\n run();\n }\n\n attacking = false;\n }\n}\n\ncontract TestReentrancyGuard is ReentrancyGuard {\n uint256 public calls;\n\n function protectedMethod() external protected {\n run();\n }\n\n function unprotectedMethod() external {\n run();\n }\n\n function run() private {\n calls++;\n\n TestReentrancyGuardAttacker(msg.sender).callback();\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "exportedSymbols": { + "TestReentrancyGuard": [ + 19640 + ], + "TestReentrancyGuardAttacker": [ + 19605 + ] + }, + "id": 19641, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:43" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 19529, + "nodeType": "ImportDirective", + "scope": 19641, + "sourceUnit": 22243, + "src": "75:40:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19605, + "linearizedBaseContracts": [ + 19605 + ], + "name": "TestReentrancyGuardAttacker", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d4b83992", + "id": 19531, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "161:33:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19530, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "161:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e11f493e", + "id": 19533, + "mutability": "mutable", + "name": "reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "200:22:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19532, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "17846e39", + "id": 19535, + "mutability": "mutable", + "name": "callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "228:31:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19534, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "228:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3c0bbcd9", + "id": 19537, + "mutability": "mutable", + "name": "attacking", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "265:21:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "265:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19546, + "nodeType": "Block", + "src": "341:33:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19542, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "351:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19543, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19539, + "src": "360:7:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "src": "351:16:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19545, + "nodeType": "ExpressionStatement", + "src": "351:16:43" + } + ] + }, + "documentation": null, + "id": 19547, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19539, + "mutability": "mutable", + "name": "_target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19547, + "src": "305:27:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19538, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "305:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "304:29:43" + }, + "returnParameters": { + "id": 19541, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:0:43" + }, + "scope": 19605, + "src": "293:81:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19556, + "nodeType": "Block", + "src": "430:41:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19552, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "440:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19553, + "name": "_reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19549, + "src": "453:11:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "440:24:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19555, + "nodeType": "ExpressionStatement", + "src": "440:24:43" + } + ] + }, + "documentation": null, + "functionSelector": "322d5010", + "id": 19557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setReentrancy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19549, + "mutability": "mutable", + "name": "_reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19557, + "src": "403:16:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19548, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "403:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:18:43" + }, + "returnParameters": { + "id": 19551, + "nodeType": "ParameterList", + "parameters": [], + "src": "430:0:43" + }, + "scope": 19605, + "src": "380:91:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19566, + "nodeType": "Block", + "src": "545:59:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19562, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "555:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19563, + "name": "_callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19559, + "src": "577:20:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "555:42:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19565, + "nodeType": "ExpressionStatement", + "src": "555:42:43" + } + ] + }, + "documentation": null, + "functionSelector": "99563f10", + "id": 19567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setCallProtectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19559, + "mutability": "mutable", + "name": "_callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19567, + "src": "509:25:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "509:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:27:43" + }, + "returnParameters": { + "id": 19561, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:43" + }, + "scope": 19605, + "src": "477:127:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19579, + "nodeType": "Block", + "src": "632:92:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 19570, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "642:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19574, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "691:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unprotectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19625, + "src": "691:24:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "691:26:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "642:75:43", + "trueExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19571, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "664:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "protectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19618, + "src": "664:22:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "664:24:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19578, + "nodeType": "ExpressionStatement", + "src": "642:75:43" + } + ] + }, + "documentation": null, + "functionSelector": "c0406226", + "id": 19580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19568, + "nodeType": "ParameterList", + "parameters": [], + "src": "622:2:43" + }, + "returnParameters": { + "id": 19569, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:43" + }, + "scope": 19605, + "src": "610:114:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19603, + "nodeType": "Block", + "src": "759:179:43", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 19584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "773:11:43", + "subExpression": { + "argumentTypes": null, + "id": 19583, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "774:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19587, + "nodeType": "IfStatement", + "src": "769:48:43", + "trueBody": { + "id": 19586, + "nodeType": "Block", + "src": "786:31:43", + "statements": [ + { + "expression": null, + "functionReturnParameters": 19582, + "id": 19585, + "nodeType": "Return", + "src": "800:7:43" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 19589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "831:10:43", + "subExpression": { + "argumentTypes": null, + "id": 19588, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "832:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19598, + "nodeType": "IfStatement", + "src": "827:77:43", + "trueBody": { + "id": 19597, + "nodeType": "Block", + "src": "843:61:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19590, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "857:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "869:4:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "857:16:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19593, + "nodeType": "ExpressionStatement", + "src": "857:16:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19594, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19580, + "src": "888:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "888:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19596, + "nodeType": "ExpressionStatement", + "src": "888:5:43" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 19601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19599, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "914:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 19600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "926:5:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "914:17:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19602, + "nodeType": "ExpressionStatement", + "src": "914:17:43" + } + ] + }, + "documentation": null, + "functionSelector": "083b2732", + "id": 19604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "callback", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19581, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:2:43" + }, + "returnParameters": { + "id": 19582, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:43" + }, + "scope": 19605, + "src": "730:208:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19641, + "src": "118:822:43" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19606, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "974:15:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 19607, + "nodeType": "InheritanceSpecifier", + "src": "974:15:43" + } + ], + "contractDependencies": [ + 22242 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19640, + "linearizedBaseContracts": [ + 19640, + 22242 + ], + "name": "TestReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "305f72b7", + "id": 19609, + "mutability": "mutable", + "name": "calls", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19640, + "src": "996:20:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "996:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19617, + "nodeType": "Block", + "src": "1069:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19614, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1079:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19616, + "nodeType": "ExpressionStatement", + "src": "1079:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "2d4d800c", + "id": 19618, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 19612, + "modifierName": { + "argumentTypes": null, + "id": 19611, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "1059:9:43", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1059:9:43" + } + ], + "name": "protectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19610, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:2:43" + }, + "returnParameters": { + "id": 19613, + "nodeType": "ParameterList", + "parameters": [], + "src": "1069:0:43" + }, + "scope": 19640, + "src": "1023:68:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19624, + "nodeType": "Block", + "src": "1135:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19621, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1145:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1145:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19623, + "nodeType": "ExpressionStatement", + "src": "1145:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "f86485d9", + "id": 19625, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unprotectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19619, + "nodeType": "ParameterList", + "parameters": [], + "src": "1123:2:43" + }, + "returnParameters": { + "id": 19620, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:0:43" + }, + "scope": 19640, + "src": "1097:60:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19638, + "nodeType": "Block", + "src": "1186:85:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1196:7:43", + "subExpression": { + "argumentTypes": null, + "id": 19628, + "name": "calls", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19609, + "src": "1196:5:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19630, + "nodeType": "ExpressionStatement", + "src": "1196:7:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1242:3:43", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1242:10:43", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19631, + "name": "TestReentrancyGuardAttacker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19605, + "src": "1214:27:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TestReentrancyGuardAttacker_$19605_$", + "typeString": "type(contract TestReentrancyGuardAttacker)" + } + }, + "id": 19634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:39:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuardAttacker_$19605", + "typeString": "contract TestReentrancyGuardAttacker" + } + }, + "id": 19635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "callback", + "nodeType": "MemberAccess", + "referencedDeclaration": 19604, + "src": "1214:48:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:50:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19637, + "nodeType": "ExpressionStatement", + "src": "1214:50:43" + } + ] + }, + "documentation": null, + "id": 19639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19626, + "nodeType": "ParameterList", + "parameters": [], + "src": "1175:2:43" + }, + "returnParameters": { + "id": 19627, + "nodeType": "ParameterList", + "parameters": [], + "src": "1186:0:43" + }, + "scope": 19640, + "src": "1163:108:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 19641, + "src": "942:331:43" + } + ], + "src": "51:1223:43" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "exportedSymbols": { + "TestReentrancyGuard": [ + 19640 + ], + "TestReentrancyGuardAttacker": [ + 19605 + ] + }, + "id": 19641, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:43" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 19529, + "nodeType": "ImportDirective", + "scope": 19641, + "sourceUnit": 22243, + "src": "75:40:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19605, + "linearizedBaseContracts": [ + 19605 + ], + "name": "TestReentrancyGuardAttacker", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d4b83992", + "id": 19531, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "161:33:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19530, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "161:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e11f493e", + "id": 19533, + "mutability": "mutable", + "name": "reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "200:22:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19532, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "17846e39", + "id": 19535, + "mutability": "mutable", + "name": "callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "228:31:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19534, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "228:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3c0bbcd9", + "id": 19537, + "mutability": "mutable", + "name": "attacking", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "265:21:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "265:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19546, + "nodeType": "Block", + "src": "341:33:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19542, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "351:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19543, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19539, + "src": "360:7:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "src": "351:16:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19545, + "nodeType": "ExpressionStatement", + "src": "351:16:43" + } + ] + }, + "documentation": null, + "id": 19547, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19539, + "mutability": "mutable", + "name": "_target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19547, + "src": "305:27:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19538, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "305:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "304:29:43" + }, + "returnParameters": { + "id": 19541, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:0:43" + }, + "scope": 19605, + "src": "293:81:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19556, + "nodeType": "Block", + "src": "430:41:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19552, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "440:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19553, + "name": "_reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19549, + "src": "453:11:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "440:24:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19555, + "nodeType": "ExpressionStatement", + "src": "440:24:43" + } + ] + }, + "documentation": null, + "functionSelector": "322d5010", + "id": 19557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setReentrancy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19549, + "mutability": "mutable", + "name": "_reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19557, + "src": "403:16:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19548, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "403:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:18:43" + }, + "returnParameters": { + "id": 19551, + "nodeType": "ParameterList", + "parameters": [], + "src": "430:0:43" + }, + "scope": 19605, + "src": "380:91:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19566, + "nodeType": "Block", + "src": "545:59:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19562, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "555:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19563, + "name": "_callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19559, + "src": "577:20:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "555:42:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19565, + "nodeType": "ExpressionStatement", + "src": "555:42:43" + } + ] + }, + "documentation": null, + "functionSelector": "99563f10", + "id": 19567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setCallProtectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19559, + "mutability": "mutable", + "name": "_callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19567, + "src": "509:25:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "509:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:27:43" + }, + "returnParameters": { + "id": 19561, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:43" + }, + "scope": 19605, + "src": "477:127:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19579, + "nodeType": "Block", + "src": "632:92:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 19570, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "642:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19574, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "691:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unprotectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19625, + "src": "691:24:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "691:26:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "642:75:43", + "trueExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19571, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "664:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "protectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19618, + "src": "664:22:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "664:24:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19578, + "nodeType": "ExpressionStatement", + "src": "642:75:43" + } + ] + }, + "documentation": null, + "functionSelector": "c0406226", + "id": 19580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19568, + "nodeType": "ParameterList", + "parameters": [], + "src": "622:2:43" + }, + "returnParameters": { + "id": 19569, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:43" + }, + "scope": 19605, + "src": "610:114:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19603, + "nodeType": "Block", + "src": "759:179:43", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 19584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "773:11:43", + "subExpression": { + "argumentTypes": null, + "id": 19583, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "774:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19587, + "nodeType": "IfStatement", + "src": "769:48:43", + "trueBody": { + "id": 19586, + "nodeType": "Block", + "src": "786:31:43", + "statements": [ + { + "expression": null, + "functionReturnParameters": 19582, + "id": 19585, + "nodeType": "Return", + "src": "800:7:43" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 19589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "831:10:43", + "subExpression": { + "argumentTypes": null, + "id": 19588, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "832:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19598, + "nodeType": "IfStatement", + "src": "827:77:43", + "trueBody": { + "id": 19597, + "nodeType": "Block", + "src": "843:61:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19590, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "857:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "869:4:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "857:16:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19593, + "nodeType": "ExpressionStatement", + "src": "857:16:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19594, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19580, + "src": "888:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "888:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19596, + "nodeType": "ExpressionStatement", + "src": "888:5:43" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 19601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19599, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "914:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 19600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "926:5:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "914:17:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19602, + "nodeType": "ExpressionStatement", + "src": "914:17:43" + } + ] + }, + "documentation": null, + "functionSelector": "083b2732", + "id": 19604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "callback", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19581, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:2:43" + }, + "returnParameters": { + "id": 19582, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:43" + }, + "scope": 19605, + "src": "730:208:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19641, + "src": "118:822:43" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19606, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "974:15:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 19607, + "nodeType": "InheritanceSpecifier", + "src": "974:15:43" + } + ], + "contractDependencies": [ + 22242 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19640, + "linearizedBaseContracts": [ + 19640, + 22242 + ], + "name": "TestReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "305f72b7", + "id": 19609, + "mutability": "mutable", + "name": "calls", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19640, + "src": "996:20:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "996:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19617, + "nodeType": "Block", + "src": "1069:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19614, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1079:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19616, + "nodeType": "ExpressionStatement", + "src": "1079:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "2d4d800c", + "id": 19618, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 19612, + "modifierName": { + "argumentTypes": null, + "id": 19611, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "1059:9:43", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1059:9:43" + } + ], + "name": "protectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19610, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:2:43" + }, + "returnParameters": { + "id": 19613, + "nodeType": "ParameterList", + "parameters": [], + "src": "1069:0:43" + }, + "scope": 19640, + "src": "1023:68:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19624, + "nodeType": "Block", + "src": "1135:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19621, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1145:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1145:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19623, + "nodeType": "ExpressionStatement", + "src": "1145:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "f86485d9", + "id": 19625, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unprotectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19619, + "nodeType": "ParameterList", + "parameters": [], + "src": "1123:2:43" + }, + "returnParameters": { + "id": 19620, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:0:43" + }, + "scope": 19640, + "src": "1097:60:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19638, + "nodeType": "Block", + "src": "1186:85:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1196:7:43", + "subExpression": { + "argumentTypes": null, + "id": 19628, + "name": "calls", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19609, + "src": "1196:5:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19630, + "nodeType": "ExpressionStatement", + "src": "1196:7:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1242:3:43", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1242:10:43", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19631, + "name": "TestReentrancyGuardAttacker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19605, + "src": "1214:27:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TestReentrancyGuardAttacker_$19605_$", + "typeString": "type(contract TestReentrancyGuardAttacker)" + } + }, + "id": 19634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:39:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuardAttacker_$19605", + "typeString": "contract TestReentrancyGuardAttacker" + } + }, + "id": 19635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "callback", + "nodeType": "MemberAccess", + "referencedDeclaration": 19604, + "src": "1214:48:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:50:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19637, + "nodeType": "ExpressionStatement", + "src": "1214:50:43" + } + ] + }, + "documentation": null, + "id": 19639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19626, + "nodeType": "ParameterList", + "parameters": [], + "src": "1175:2:43" + }, + "returnParameters": { + "id": 19627, + "nodeType": "ParameterList", + "parameters": [], + "src": "1186:0:43" + }, + "scope": 19640, + "src": "1163:108:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 19641, + "src": "942:331:43" + } + ], + "src": "51:1223:43" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.810Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuardAttacker.json b/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuardAttacker.json new file mode 100644 index 00000000..5e2aabc0 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestReentrancyGuardAttacker.json @@ -0,0 +1,2801 @@ +{ + "contractName": "TestReentrancyGuardAttacker", + "abi": [ + { + "inputs": [ + { + "internalType": "contract TestReentrancyGuard", + "name": "_target", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "attacking", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "callProtectedMethod", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reentrancy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "target", + "outputs": [ + { + "internalType": "contract TestReentrancyGuard", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_reentrancy", + "type": "bool" + } + ], + "name": "setReentrancy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_callProtectedMethod", + "type": "bool" + } + ], + "name": "setCallProtectedMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "run", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "callback", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TestReentrancyGuard\",\"name\":\"_target\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"attacking\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"callProtectedMethod\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"callback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reentrancy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"run\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_callProtectedMethod\",\"type\":\"bool\"}],\"name\":\"setCallProtectedMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_reentrancy\",\"type\":\"bool\"}],\"name\":\"setReentrancy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"contract TestReentrancyGuard\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol\":\"TestReentrancyGuardAttacker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol\":{\"keccak256\":\"0x10cc32288bb587945509a8d78bf7d96b999df3bfd631162acf07b8db00404c3e\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://0eae14c3bc545882b4afdf7ef001c24b70781ed0216bdb559ec11218d4182e6c\",\"dweb:/ipfs/QmNpdpANj4EA2DgLHEmVH4FtKrQL91boCdEGSZ87coJLj4\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161035f38038061035f8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556102fa806100656000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806399563f101161005b57806399563f10146100da578063c0406226146100f9578063d4b8399214610101578063e11f493e1461012557610088565b8063083b27321461008d57806317846e3914610097578063322d5010146100b35780633c0bbcd9146100d2575b600080fd5b61009561012d565b005b61009f61017f565b604080519115158252519081900360200190f35b610095600480360360208110156100c957600080fd5b5035151561018f565b61009f6101ad565b610095600480360360208110156100f057600080fd5b503515156101bd565b6100956101db565b6101096102a5565b604080516001600160a01b039092168252519081900360200190f35b61009f6102b4565b600054600160a01b900460ff166101435761017d565b600054600160b01b900460ff1661016f576000805460ff60b01b1916600160b01b17905561016f6101db565b6000805460ff60b01b191690555b565b600054600160a81b900460ff1681565b60008054911515600160a01b0260ff60a01b19909216919091179055565b600054600160b01b900460ff1681565b60008054911515600160a81b0260ff60a81b19909216919091179055565b600054600160a81b900460ff1661024a57600080546040805163f86485d960e01b815290516001600160a01b039092169263f86485d99260048084019382900301818387803b15801561022d57600080fd5b505af1158015610241573d6000803e3d6000fd5b5050505061017d565b6000805460408051630b53600360e21b815290516001600160a01b0390921692632d4d800c9260048084019382900301818387803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b600054600160a01b900460ff168156fea26469706673582212208d7d98a2042522a18e2752b12a596016434ddc6a6041ef373551516b2e1dcc6464736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806399563f101161005b57806399563f10146100da578063c0406226146100f9578063d4b8399214610101578063e11f493e1461012557610088565b8063083b27321461008d57806317846e3914610097578063322d5010146100b35780633c0bbcd9146100d2575b600080fd5b61009561012d565b005b61009f61017f565b604080519115158252519081900360200190f35b610095600480360360208110156100c957600080fd5b5035151561018f565b61009f6101ad565b610095600480360360208110156100f057600080fd5b503515156101bd565b6100956101db565b6101096102a5565b604080516001600160a01b039092168252519081900360200190f35b61009f6102b4565b600054600160a01b900460ff166101435761017d565b600054600160b01b900460ff1661016f576000805460ff60b01b1916600160b01b17905561016f6101db565b6000805460ff60b01b191690555b565b600054600160a81b900460ff1681565b60008054911515600160a01b0260ff60a01b19909216919091179055565b600054600160b01b900460ff1681565b60008054911515600160a81b0260ff60a81b19909216919091179055565b600054600160a81b900460ff1661024a57600080546040805163f86485d960e01b815290516001600160a01b039092169263f86485d99260048084019382900301818387803b15801561022d57600080fd5b505af1158015610241573d6000803e3d6000fd5b5050505061017d565b6000805460408051630b53600360e21b815290516001600160a01b0390921692632d4d800c9260048084019382900301818387803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b600054600160a01b900460ff168156fea26469706673582212208d7d98a2042522a18e2752b12a596016434ddc6a6041ef373551516b2e1dcc6464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "118:822:43:-:0;;;293:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;293:81:43;351:6;:16;;-1:-1:-1;;;;;351:16:43;;;-1:-1:-1;;;;;;351:16:43;;;;;;;;;118:822;;;;;;", + "deployedSourceMap": "118:822:43:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;730:208;;;:::i;:::-;;228:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;380:91;;;;;;;;;;;;;;;;-1:-1:-1;380:91:43;;;;:::i;265:21::-;;;:::i;477:127::-;;;;;;;;;;;;;;;;-1:-1:-1;477:127:43;;;;:::i;610:114::-;;;:::i;161:33::-;;;:::i;:::-;;;;-1:-1:-1;;;;;161:33:43;;;;;;;;;;;;;;200:22;;;:::i;730:208::-;774:10;;-1:-1:-1;;;774:10:43;;;;769:48;;800:7;;769:48;832:9;;-1:-1:-1;;;832:9:43;;;;827:77;;857:9;:16;;-1:-1:-1;;;;857:16:43;-1:-1:-1;;;857:16:43;;;888:5;:3;:5::i;:::-;926;914:17;;-1:-1:-1;;;;914:17:43;;;730:208;:::o;228:31::-;;;-1:-1:-1;;;228:31:43;;;;;:::o;380:91::-;440:10;:24;;;;;-1:-1:-1;;;440:24:43;-1:-1:-1;;;;440:24:43;;;;;;;;;380:91::o;265:21::-;;;-1:-1:-1;;;265:21:43;;;;;:::o;477:127::-;555:19;:42;;;;;-1:-1:-1;;;555:42:43;-1:-1:-1;;;;555:42:43;;;;;;;;;477:127::o;610:114::-;642:19;;-1:-1:-1;;;642:19:43;;;;:75;;691:6;;;:26;;;-1:-1:-1;;;691:26:43;;;;-1:-1:-1;;;;;691:6:43;;;;:24;;:26;;;;;;;;;;:6;;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;642:75;;;664:6;;;:24;;;-1:-1:-1;;;664:24:43;;;;-1:-1:-1;;;;;664:6:43;;;;:22;;:24;;;;;;;;;;:6;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;610:114::o;161:33::-;;;-1:-1:-1;;;;;161:33:43;;:::o;200:22::-;;;-1:-1:-1;;;200:22:43;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/ReentrancyGuard.sol\";\n\n\ncontract TestReentrancyGuardAttacker {\n TestReentrancyGuard public target;\n bool public reentrancy;\n bool public callProtectedMethod;\n bool public attacking;\n\n constructor(TestReentrancyGuard _target) public {\n target = _target;\n }\n\n function setReentrancy(bool _reentrancy) external {\n reentrancy = _reentrancy;\n }\n\n function setCallProtectedMethod(bool _callProtectedMethod) external {\n callProtectedMethod = _callProtectedMethod;\n }\n\n function run() public {\n callProtectedMethod ? target.protectedMethod() : target.unprotectedMethod();\n }\n\n function callback() external {\n if (!reentrancy) {\n return;\n }\n\n if (!attacking) {\n attacking = true;\n\n run();\n }\n\n attacking = false;\n }\n}\n\ncontract TestReentrancyGuard is ReentrancyGuard {\n uint256 public calls;\n\n function protectedMethod() external protected {\n run();\n }\n\n function unprotectedMethod() external {\n run();\n }\n\n function run() private {\n calls++;\n\n TestReentrancyGuardAttacker(msg.sender).callback();\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "exportedSymbols": { + "TestReentrancyGuard": [ + 19640 + ], + "TestReentrancyGuardAttacker": [ + 19605 + ] + }, + "id": 19641, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:43" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 19529, + "nodeType": "ImportDirective", + "scope": 19641, + "sourceUnit": 22243, + "src": "75:40:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19605, + "linearizedBaseContracts": [ + 19605 + ], + "name": "TestReentrancyGuardAttacker", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d4b83992", + "id": 19531, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "161:33:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19530, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "161:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e11f493e", + "id": 19533, + "mutability": "mutable", + "name": "reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "200:22:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19532, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "17846e39", + "id": 19535, + "mutability": "mutable", + "name": "callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "228:31:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19534, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "228:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3c0bbcd9", + "id": 19537, + "mutability": "mutable", + "name": "attacking", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "265:21:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "265:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19546, + "nodeType": "Block", + "src": "341:33:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19542, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "351:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19543, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19539, + "src": "360:7:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "src": "351:16:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19545, + "nodeType": "ExpressionStatement", + "src": "351:16:43" + } + ] + }, + "documentation": null, + "id": 19547, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19539, + "mutability": "mutable", + "name": "_target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19547, + "src": "305:27:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19538, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "305:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "304:29:43" + }, + "returnParameters": { + "id": 19541, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:0:43" + }, + "scope": 19605, + "src": "293:81:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19556, + "nodeType": "Block", + "src": "430:41:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19552, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "440:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19553, + "name": "_reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19549, + "src": "453:11:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "440:24:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19555, + "nodeType": "ExpressionStatement", + "src": "440:24:43" + } + ] + }, + "documentation": null, + "functionSelector": "322d5010", + "id": 19557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setReentrancy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19549, + "mutability": "mutable", + "name": "_reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19557, + "src": "403:16:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19548, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "403:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:18:43" + }, + "returnParameters": { + "id": 19551, + "nodeType": "ParameterList", + "parameters": [], + "src": "430:0:43" + }, + "scope": 19605, + "src": "380:91:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19566, + "nodeType": "Block", + "src": "545:59:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19562, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "555:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19563, + "name": "_callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19559, + "src": "577:20:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "555:42:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19565, + "nodeType": "ExpressionStatement", + "src": "555:42:43" + } + ] + }, + "documentation": null, + "functionSelector": "99563f10", + "id": 19567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setCallProtectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19559, + "mutability": "mutable", + "name": "_callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19567, + "src": "509:25:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "509:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:27:43" + }, + "returnParameters": { + "id": 19561, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:43" + }, + "scope": 19605, + "src": "477:127:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19579, + "nodeType": "Block", + "src": "632:92:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 19570, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "642:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19574, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "691:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unprotectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19625, + "src": "691:24:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "691:26:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "642:75:43", + "trueExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19571, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "664:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "protectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19618, + "src": "664:22:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "664:24:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19578, + "nodeType": "ExpressionStatement", + "src": "642:75:43" + } + ] + }, + "documentation": null, + "functionSelector": "c0406226", + "id": 19580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19568, + "nodeType": "ParameterList", + "parameters": [], + "src": "622:2:43" + }, + "returnParameters": { + "id": 19569, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:43" + }, + "scope": 19605, + "src": "610:114:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19603, + "nodeType": "Block", + "src": "759:179:43", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 19584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "773:11:43", + "subExpression": { + "argumentTypes": null, + "id": 19583, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "774:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19587, + "nodeType": "IfStatement", + "src": "769:48:43", + "trueBody": { + "id": 19586, + "nodeType": "Block", + "src": "786:31:43", + "statements": [ + { + "expression": null, + "functionReturnParameters": 19582, + "id": 19585, + "nodeType": "Return", + "src": "800:7:43" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 19589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "831:10:43", + "subExpression": { + "argumentTypes": null, + "id": 19588, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "832:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19598, + "nodeType": "IfStatement", + "src": "827:77:43", + "trueBody": { + "id": 19597, + "nodeType": "Block", + "src": "843:61:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19590, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "857:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "869:4:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "857:16:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19593, + "nodeType": "ExpressionStatement", + "src": "857:16:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19594, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19580, + "src": "888:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "888:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19596, + "nodeType": "ExpressionStatement", + "src": "888:5:43" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 19601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19599, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "914:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 19600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "926:5:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "914:17:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19602, + "nodeType": "ExpressionStatement", + "src": "914:17:43" + } + ] + }, + "documentation": null, + "functionSelector": "083b2732", + "id": 19604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "callback", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19581, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:2:43" + }, + "returnParameters": { + "id": 19582, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:43" + }, + "scope": 19605, + "src": "730:208:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19641, + "src": "118:822:43" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19606, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "974:15:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 19607, + "nodeType": "InheritanceSpecifier", + "src": "974:15:43" + } + ], + "contractDependencies": [ + 22242 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19640, + "linearizedBaseContracts": [ + 19640, + 22242 + ], + "name": "TestReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "305f72b7", + "id": 19609, + "mutability": "mutable", + "name": "calls", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19640, + "src": "996:20:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "996:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19617, + "nodeType": "Block", + "src": "1069:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19614, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1079:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19616, + "nodeType": "ExpressionStatement", + "src": "1079:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "2d4d800c", + "id": 19618, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 19612, + "modifierName": { + "argumentTypes": null, + "id": 19611, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "1059:9:43", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1059:9:43" + } + ], + "name": "protectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19610, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:2:43" + }, + "returnParameters": { + "id": 19613, + "nodeType": "ParameterList", + "parameters": [], + "src": "1069:0:43" + }, + "scope": 19640, + "src": "1023:68:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19624, + "nodeType": "Block", + "src": "1135:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19621, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1145:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1145:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19623, + "nodeType": "ExpressionStatement", + "src": "1145:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "f86485d9", + "id": 19625, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unprotectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19619, + "nodeType": "ParameterList", + "parameters": [], + "src": "1123:2:43" + }, + "returnParameters": { + "id": 19620, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:0:43" + }, + "scope": 19640, + "src": "1097:60:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19638, + "nodeType": "Block", + "src": "1186:85:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1196:7:43", + "subExpression": { + "argumentTypes": null, + "id": 19628, + "name": "calls", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19609, + "src": "1196:5:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19630, + "nodeType": "ExpressionStatement", + "src": "1196:7:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1242:3:43", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1242:10:43", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19631, + "name": "TestReentrancyGuardAttacker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19605, + "src": "1214:27:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TestReentrancyGuardAttacker_$19605_$", + "typeString": "type(contract TestReentrancyGuardAttacker)" + } + }, + "id": 19634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:39:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuardAttacker_$19605", + "typeString": "contract TestReentrancyGuardAttacker" + } + }, + "id": 19635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "callback", + "nodeType": "MemberAccess", + "referencedDeclaration": 19604, + "src": "1214:48:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:50:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19637, + "nodeType": "ExpressionStatement", + "src": "1214:50:43" + } + ] + }, + "documentation": null, + "id": 19639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19626, + "nodeType": "ParameterList", + "parameters": [], + "src": "1175:2:43" + }, + "returnParameters": { + "id": 19627, + "nodeType": "ParameterList", + "parameters": [], + "src": "1186:0:43" + }, + "scope": 19640, + "src": "1163:108:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 19641, + "src": "942:331:43" + } + ], + "src": "51:1223:43" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestReentrancyGuard.sol", + "exportedSymbols": { + "TestReentrancyGuard": [ + 19640 + ], + "TestReentrancyGuardAttacker": [ + 19605 + ] + }, + "id": 19641, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:43" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol", + "file": "../utility/ReentrancyGuard.sol", + "id": 19529, + "nodeType": "ImportDirective", + "scope": 19641, + "sourceUnit": 22243, + "src": "75:40:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19605, + "linearizedBaseContracts": [ + 19605 + ], + "name": "TestReentrancyGuardAttacker", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d4b83992", + "id": 19531, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "161:33:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19530, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "161:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "e11f493e", + "id": 19533, + "mutability": "mutable", + "name": "reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "200:22:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19532, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "17846e39", + "id": 19535, + "mutability": "mutable", + "name": "callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "228:31:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19534, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "228:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3c0bbcd9", + "id": 19537, + "mutability": "mutable", + "name": "attacking", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19605, + "src": "265:21:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19536, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "265:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19546, + "nodeType": "Block", + "src": "341:33:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19542, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "351:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19543, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19539, + "src": "360:7:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "src": "351:16:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19545, + "nodeType": "ExpressionStatement", + "src": "351:16:43" + } + ] + }, + "documentation": null, + "id": 19547, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19539, + "mutability": "mutable", + "name": "_target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19547, + "src": "305:27:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + }, + "typeName": { + "contractScope": null, + "id": 19538, + "name": "TestReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19640, + "src": "305:19:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "304:29:43" + }, + "returnParameters": { + "id": 19541, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:0:43" + }, + "scope": 19605, + "src": "293:81:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19556, + "nodeType": "Block", + "src": "430:41:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19552, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "440:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19553, + "name": "_reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19549, + "src": "453:11:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "440:24:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19555, + "nodeType": "ExpressionStatement", + "src": "440:24:43" + } + ] + }, + "documentation": null, + "functionSelector": "322d5010", + "id": 19557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setReentrancy", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19549, + "mutability": "mutable", + "name": "_reentrancy", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19557, + "src": "403:16:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19548, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "403:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:18:43" + }, + "returnParameters": { + "id": 19551, + "nodeType": "ParameterList", + "parameters": [], + "src": "430:0:43" + }, + "scope": 19605, + "src": "380:91:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19566, + "nodeType": "Block", + "src": "545:59:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19562, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "555:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19563, + "name": "_callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19559, + "src": "577:20:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "555:42:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19565, + "nodeType": "ExpressionStatement", + "src": "555:42:43" + } + ] + }, + "documentation": null, + "functionSelector": "99563f10", + "id": 19567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setCallProtectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19559, + "mutability": "mutable", + "name": "_callProtectedMethod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19567, + "src": "509:25:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 19558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "509:4:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "508:27:43" + }, + "returnParameters": { + "id": 19561, + "nodeType": "ParameterList", + "parameters": [], + "src": "545:0:43" + }, + "scope": 19605, + "src": "477:127:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19579, + "nodeType": "Block", + "src": "632:92:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "id": 19570, + "name": "callProtectedMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19535, + "src": "642:19:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19574, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "691:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unprotectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19625, + "src": "691:24:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "691:26:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "642:75:43", + "trueExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 19571, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19531, + "src": "664:6:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuard_$19640", + "typeString": "contract TestReentrancyGuard" + } + }, + "id": 19572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "protectedMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 19618, + "src": "664:22:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "664:24:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19578, + "nodeType": "ExpressionStatement", + "src": "642:75:43" + } + ] + }, + "documentation": null, + "functionSelector": "c0406226", + "id": 19580, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19568, + "nodeType": "ParameterList", + "parameters": [], + "src": "622:2:43" + }, + "returnParameters": { + "id": 19569, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:43" + }, + "scope": 19605, + "src": "610:114:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19603, + "nodeType": "Block", + "src": "759:179:43", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 19584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "773:11:43", + "subExpression": { + "argumentTypes": null, + "id": 19583, + "name": "reentrancy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19533, + "src": "774:10:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19587, + "nodeType": "IfStatement", + "src": "769:48:43", + "trueBody": { + "id": 19586, + "nodeType": "Block", + "src": "786:31:43", + "statements": [ + { + "expression": null, + "functionReturnParameters": 19582, + "id": 19585, + "nodeType": "Return", + "src": "800:7:43" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "id": 19589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "831:10:43", + "subExpression": { + "argumentTypes": null, + "id": 19588, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "832:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 19598, + "nodeType": "IfStatement", + "src": "827:77:43", + "trueBody": { + "id": 19597, + "nodeType": "Block", + "src": "843:61:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19590, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "857:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 19591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "869:4:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "857:16:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19593, + "nodeType": "ExpressionStatement", + "src": "857:16:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19594, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19580, + "src": "888:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "888:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19596, + "nodeType": "ExpressionStatement", + "src": "888:5:43" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 19601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19599, + "name": "attacking", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19537, + "src": "914:9:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 19600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "926:5:43", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "914:17:43", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 19602, + "nodeType": "ExpressionStatement", + "src": "914:17:43" + } + ] + }, + "documentation": null, + "functionSelector": "083b2732", + "id": 19604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "callback", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19581, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:2:43" + }, + "returnParameters": { + "id": 19582, + "nodeType": "ParameterList", + "parameters": [], + "src": "759:0:43" + }, + "scope": 19605, + "src": "730:208:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 19641, + "src": "118:822:43" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19606, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22242, + "src": "974:15:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$22242", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 19607, + "nodeType": "InheritanceSpecifier", + "src": "974:15:43" + } + ], + "contractDependencies": [ + 22242 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19640, + "linearizedBaseContracts": [ + 19640, + 22242 + ], + "name": "TestReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "305f72b7", + "id": 19609, + "mutability": "mutable", + "name": "calls", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19640, + "src": "996:20:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "996:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 19617, + "nodeType": "Block", + "src": "1069:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19614, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1079:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19616, + "nodeType": "ExpressionStatement", + "src": "1079:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "2d4d800c", + "id": 19618, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 19612, + "modifierName": { + "argumentTypes": null, + "id": 19611, + "name": "protected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22231, + "src": "1059:9:43", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1059:9:43" + } + ], + "name": "protectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19610, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:2:43" + }, + "returnParameters": { + "id": 19613, + "nodeType": "ParameterList", + "parameters": [], + "src": "1069:0:43" + }, + "scope": 19640, + "src": "1023:68:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19624, + "nodeType": "Block", + "src": "1135:22:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 19621, + "name": "run", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19639, + "src": "1145:3:43", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 19622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1145:5:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19623, + "nodeType": "ExpressionStatement", + "src": "1145:5:43" + } + ] + }, + "documentation": null, + "functionSelector": "f86485d9", + "id": 19625, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unprotectedMethod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19619, + "nodeType": "ParameterList", + "parameters": [], + "src": "1123:2:43" + }, + "returnParameters": { + "id": 19620, + "nodeType": "ParameterList", + "parameters": [], + "src": "1135:0:43" + }, + "scope": 19640, + "src": "1097:60:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 19638, + "nodeType": "Block", + "src": "1186:85:43", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1196:7:43", + "subExpression": { + "argumentTypes": null, + "id": 19628, + "name": "calls", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19609, + "src": "1196:5:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19630, + "nodeType": "ExpressionStatement", + "src": "1196:7:43" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19632, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1242:3:43", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1242:10:43", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19631, + "name": "TestReentrancyGuardAttacker", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19605, + "src": "1214:27:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_TestReentrancyGuardAttacker_$19605_$", + "typeString": "type(contract TestReentrancyGuardAttacker)" + } + }, + "id": 19634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:39:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_TestReentrancyGuardAttacker_$19605", + "typeString": "contract TestReentrancyGuardAttacker" + } + }, + "id": 19635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "callback", + "nodeType": "MemberAccess", + "referencedDeclaration": 19604, + "src": "1214:48:43", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 19636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1214:50:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19637, + "nodeType": "ExpressionStatement", + "src": "1214:50:43" + } + ] + }, + "documentation": null, + "id": 19639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "run", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19626, + "nodeType": "ParameterList", + "parameters": [], + "src": "1175:2:43" + }, + "returnParameters": { + "id": 19627, + "nodeType": "ParameterList", + "parameters": [], + "src": "1186:0:43" + }, + "scope": 19640, + "src": "1163:108:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 19641, + "src": "942:331:43" + } + ], + "src": "51:1223:43" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.811Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestSafeMath.json b/apps/cic-eth/tests/testdata/bancor/TestSafeMath.json new file mode 100644 index 00000000..6035e262 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestSafeMath.json @@ -0,0 +1,1830 @@ +{ + "contractName": "TestSafeMath", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_y", + "type": "uint256" + } + ], + "name": "testSafeAdd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_y", + "type": "uint256" + } + ], + "name": "testSafeSub", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_y", + "type": "uint256" + } + ], + "name": "testSafeMul", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_x", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_y", + "type": "uint256" + } + ], + "name": "testSafeDiv", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_y\",\"type\":\"uint256\"}],\"name\":\"testSafeAdd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_y\",\"type\":\"uint256\"}],\"name\":\"testSafeDiv\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_y\",\"type\":\"uint256\"}],\"name\":\"testSafeMul\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_x\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_y\",\"type\":\"uint256\"}],\"name\":\"testSafeSub\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestSafeMath.sol\":\"TestSafeMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestSafeMath.sol\":{\"keccak256\":\"0x7d2c3f81e225672d7e64e760a5823368bf17695ff01257acd56cdf9366512359\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9d74b6749f41dfa4720070f8ec9635251719a5b06bfe365cd79dc8f7a0a64b2f\",\"dweb:/ipfs/QmWWEuWEgBGWqVyiJQEPBKQFEGJ1yHLWdkgFhvAdbsf9bx\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506102b1806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635e47381d146100515780639ee6ff7014610086578063de47864c146100a9578063ec0da330146100cc575b600080fd5b6100746004803603604081101561006757600080fd5b50803590602001356100ef565b60408051918252519081900360200190f35b6100746004803603604081101561009c57600080fd5b5080359060200135610104565b610074600480360360408110156100bf57600080fd5b5080359060200135610110565b610074600480360360408110156100e257600080fd5b508035906020013561011c565b60006100fb8383610128565b90505b92915050565b60006100fb8383610187565b60006100fb83836101e5565b60006100fb838361022e565b6000808211610173576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161017e57fe5b04949350505050565b600082610196575060006100fe565b828202828482816101a357fe5b04146100fb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000828201838110156100fb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610275576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b5090039056fea2646970667358221220ddcc0a2ad8d4e0d15448f392cd58786f67484ca55ebaadad5e6c1e05dc37ec8464736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80635e47381d146100515780639ee6ff7014610086578063de47864c146100a9578063ec0da330146100cc575b600080fd5b6100746004803603604081101561006757600080fd5b50803590602001356100ef565b60408051918252519081900360200190f35b6100746004803603604081101561009c57600080fd5b5080359060200135610104565b610074600480360360408110156100bf57600080fd5b5080359060200135610110565b610074600480360360408110156100e257600080fd5b508035906020013561011c565b60006100fb8383610128565b90505b92915050565b60006100fb8383610187565b60006100fb83836101e5565b60006100fb838361022e565b6000808211610173576040805162461bcd60e51b81526020600482015260126024820152714552525f4449564944455f42595f5a45524f60701b604482015290519081900360640190fd5b600082848161017e57fe5b04949350505050565b600082610196575060006100fe565b828202828482816101a357fe5b04146100fb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b6000828201838110156100fb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610275576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b5090039056fea2646970667358221220ddcc0a2ad8d4e0d15448f392cd58786f67484ca55ebaadad5e6c1e05dc37ec8464736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "175:517:44:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "175:517:44:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;581:109;;;;;;;;;;;;;;;;-1:-1:-1;581:109:44;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;466;;;;;;;;;;;;;;;;-1:-1:-1;466:109:44;;;;;;;:::i;236:::-;;;;;;;;;;;;;;;;-1:-1:-1;236:109:44;;;;;;;:::i;351:::-;;;;;;;;;;;;;;;;-1:-1:-1;351:109:44;;;;;;;:::i;581:::-;647:7;673:10;:2;680;673:6;:10::i;:::-;666:17;;581:109;;;;;:::o;466:::-;532:7;558:10;:2;565;558:6;:10::i;236:109::-;302:7;328:10;:2;335;328:6;:10::i;351:109::-;417:7;443:10;:2;450;443:6;:10::i;1627:174:60:-;1687:7;1720:1;1715:2;:6;1707:37;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;-1:-1:-1;;;1707:37:60;;;;;;;;;;;;;;;1755:9;1772:2;1767;:7;;;;;;;1627:174;-1:-1:-1;;;;1627:174:60:o;1149:250::-;1209:7;1262;1258:34;;-1:-1:-1;1291:1:60;1284:8;;1258:34;1317:7;;;1322:2;1317;:7;:2;1343:6;;;;;:12;1335:37;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;-1:-1:-1;;;1335:37:60;;;;;;;;;;;;;;386:169;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;778:147;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/SafeMath.sol\";\n\n/*\n Utils test helper that exposes the safe math functions\n*/\ncontract TestSafeMath {\n using SafeMath for uint256;\n\n function testSafeAdd(uint256 _x, uint256 _y) public pure returns (uint256) {\n return _x.add(_y);\n }\n\n function testSafeSub(uint256 _x, uint256 _y) public pure returns (uint256) {\n return _x.sub(_y);\n }\n\n function testSafeMul(uint256 _x, uint256 _y) public pure returns (uint256) {\n return _x.mul(_y);\n }\n\n function testSafeDiv(uint256 _x, uint256 _y) public pure returns (uint256) {\n return _x.div(_y);\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestSafeMath.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestSafeMath.sol", + "exportedSymbols": { + "TestSafeMath": [ + 19707 + ] + }, + "id": 19708, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19642, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:44" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19643, + "nodeType": "ImportDirective", + "scope": 19708, + "sourceUnit": 22355, + "src": "75:33:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19707, + "linearizedBaseContracts": [ + 19707 + ], + "name": "TestSafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19646, + "libraryName": { + "contractScope": null, + "id": 19644, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "209:8:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "203:27:44", + "typeName": { + "id": 19645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "222:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 19660, + "nodeType": "Block", + "src": "311:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19657, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19650, + "src": "335:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19655, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19648, + "src": "328:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "328:6:44", + "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": 19658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "328:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19654, + "id": 19659, + "nodeType": "Return", + "src": "321:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "de47864c", + "id": 19661, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeAdd", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19648, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "257:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19647, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "257:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19650, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "269:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "269:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:24:44" + }, + "returnParameters": { + "id": 19654, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19653, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "302:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19652, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "302:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "301:9:44" + }, + "scope": 19707, + "src": "236:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19675, + "nodeType": "Block", + "src": "426:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19672, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19665, + "src": "450:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19670, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19663, + "src": "443:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "443:6:44", + "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": 19673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "443:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19669, + "id": 19674, + "nodeType": "Return", + "src": "436:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "ec0da330", + "id": 19676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeSub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19663, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "372:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "372:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19665, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "384:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:24:44" + }, + "returnParameters": { + "id": 19669, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19668, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "417:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "417:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:9:44" + }, + "scope": 19707, + "src": "351:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19690, + "nodeType": "Block", + "src": "541:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19687, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19680, + "src": "565:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19685, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19678, + "src": "558:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "558:6:44", + "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": 19688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "558:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19684, + "id": 19689, + "nodeType": "Return", + "src": "551:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "9ee6ff70", + "id": 19691, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeMul", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19678, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "487:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "487:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19680, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "499:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "499:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "486:24:44" + }, + "returnParameters": { + "id": 19684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19683, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "532:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "532:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "531:9:44" + }, + "scope": 19707, + "src": "466:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19705, + "nodeType": "Block", + "src": "656:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19702, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19695, + "src": "680:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19700, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19693, + "src": "673:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "673:6:44", + "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": 19703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "673:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19699, + "id": 19704, + "nodeType": "Return", + "src": "666:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "5e47381d", + "id": 19706, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19693, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "602:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "602:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19695, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "614:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "614:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "601:24:44" + }, + "returnParameters": { + "id": 19699, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19698, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "647:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19697, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "647:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "646:9:44" + }, + "scope": 19707, + "src": "581:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19708, + "src": "175:517:44" + } + ], + "src": "51:642:44" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestSafeMath.sol", + "exportedSymbols": { + "TestSafeMath": [ + 19707 + ] + }, + "id": 19708, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19642, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:44" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19643, + "nodeType": "ImportDirective", + "scope": 19708, + "sourceUnit": 22355, + "src": "75:33:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19707, + "linearizedBaseContracts": [ + 19707 + ], + "name": "TestSafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19646, + "libraryName": { + "contractScope": null, + "id": 19644, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "209:8:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "203:27:44", + "typeName": { + "id": 19645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "222:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 19660, + "nodeType": "Block", + "src": "311:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19657, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19650, + "src": "335:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19655, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19648, + "src": "328:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "328:6:44", + "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": 19658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "328:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19654, + "id": 19659, + "nodeType": "Return", + "src": "321:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "de47864c", + "id": 19661, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeAdd", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19648, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "257:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19647, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "257:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19650, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "269:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19649, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "269:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:24:44" + }, + "returnParameters": { + "id": 19654, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19653, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19661, + "src": "302:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19652, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "302:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "301:9:44" + }, + "scope": 19707, + "src": "236:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19675, + "nodeType": "Block", + "src": "426:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19672, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19665, + "src": "450:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19670, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19663, + "src": "443:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "443:6:44", + "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": 19673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "443:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19669, + "id": 19674, + "nodeType": "Return", + "src": "436:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "ec0da330", + "id": 19676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeSub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19663, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "372:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "372:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19665, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "384:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:24:44" + }, + "returnParameters": { + "id": 19669, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19668, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19676, + "src": "417:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "417:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:9:44" + }, + "scope": 19707, + "src": "351:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19690, + "nodeType": "Block", + "src": "541:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19687, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19680, + "src": "565:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19685, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19678, + "src": "558:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 22327, + "src": "558:6:44", + "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": 19688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "558:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19684, + "id": 19689, + "nodeType": "Return", + "src": "551:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "9ee6ff70", + "id": 19691, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeMul", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19678, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "487:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "487:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19680, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "499:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "499:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "486:24:44" + }, + "returnParameters": { + "id": 19684, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19683, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19691, + "src": "532:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19682, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "532:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "531:9:44" + }, + "scope": 19707, + "src": "466:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19705, + "nodeType": "Block", + "src": "656:34:44", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19702, + "name": "_y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19695, + "src": "680:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 19700, + "name": "_x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19693, + "src": "673:2:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 22353, + "src": "673:6:44", + "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": 19703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "673:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 19699, + "id": 19704, + "nodeType": "Return", + "src": "666:17:44" + } + ] + }, + "documentation": null, + "functionSelector": "5e47381d", + "id": 19706, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeDiv", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19693, + "mutability": "mutable", + "name": "_x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "602:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "602:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19695, + "mutability": "mutable", + "name": "_y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "614:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "614:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "601:24:44" + }, + "returnParameters": { + "id": 19699, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19698, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19706, + "src": "647:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19697, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "647:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "646:9:44" + }, + "scope": 19707, + "src": "581:109:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19708, + "src": "175:517:44" + } + ], + "src": "51:642:44" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.812Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestStandardToken.json b/apps/cic-eth/tests/testdata/bancor/TestStandardToken.json new file mode 100644 index 00000000..37051358 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestStandardToken.json @@ -0,0 +1,13594 @@ +{ + "contractName": "TestStandardToken", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_supply", + "type": "uint256" + } + ], + "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": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ok", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ret", + "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": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_ok", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_ret", + "type": "bool" + } + ], + "name": "set", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_supply\",\"type\":\"uint256\"}],\"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\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ok\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ret\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_ok\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_ret\",\"type\":\"bool\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"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\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":\"TestStandardToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol\":{\"keccak256\":\"0x2dfc6b208775e73ee5c35e34fa0780f5439490a5114fc251ebf072b922a9a0a4\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://230c0e8d2dbe196eaad09c0f20a73eeee3a5155796ea677671082ed97944ba77\",\"dweb:/ipfs/QmXt9yQ24JkqGnXpo2b1CQ7R8igEnxfeR9bZdacmSgJyKi\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610ae1380380610ae18339818101604052608081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156100ff57600080fd5b90830190602082018581111561011457600080fd5b825164010000000081118282018810171561012e57600080fd5b82525081516020918201929091019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b5060409081526020828101519282015160008181553381526001835292909220829055865192945090925085918591859185916101ca91600391870190610237565b5082516101de906004906020860190610237565b50506005805460ff191660ff9290921691909117905550610202905060018061020b565b505050506102ca565b60058054911515620100000262ff0000199315156101000261ff00199093169290921792909216179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061027857805160ff19168380011785556102a5565b828001600101855582156102a5579182015b828111156102a557825182559160200191906001019061028a565b506102b19291506102b5565b5090565b5b808211156102b157600081556001016102b6565b610808806102d96000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a08231146101ec57806395d89b4114610212578063a9059cbb1461021a578063d909b40314610246578063dd62ed3e1461024e578063f907191a1461027c576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd146101765780631b08d96f1461019057806323b872dd14610198578063313ce567146101ce575b600080fd5b6100c16102a5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610333565b604080519115158252519081900360200190f35b61017e610366565b60408051918252519081900360200190f35b61016261036c565b610162600480360360608110156101ae57600080fd5b506001600160a01b0381358116916020810135909116906040013561037b565b6101d66103b0565b6040805160ff9092168252519081900360200190f35b61017e6004803603602081101561020257600080fd5b50356001600160a01b03166103b9565b6100c16103cb565b6101626004803603604081101561023057600080fd5b506001600160a01b038135169060200135610426565b610162610432565b61017e6004803603604081101561026457600080fd5b506001600160a01b0381358116916020013516610440565b6102a36004803603604081101561029257600080fd5b50803515159060200135151561045d565b005b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561032b5780601f106103005761010080835404028352916020019161032b565b820191906000526020600020905b81548152906001019060200180831161030e57829003601f168201915b505050505081565b600061033f8383610489565b600554610100900460ff1661035357600080fd5b505060055462010000900460ff16919050565b60005481565b60055462010000900460ff1681565b600061038884848461052d565b600554610100900460ff1661039c57600080fd5b505060055462010000900460ff1692915050565b60055460ff1681565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561032b5780601f106103005761010080835404028352916020019161032b565b600061033f8383610637565b600554610100900460ff1681565b600260209081526000928352604080842090915290825290205481565b60058054911515620100000262ff0000199315156101000261ff00199093169290921792909216179055565b81610493816106e1565b8115806104c157503360009081526002602090815260408083206001600160a01b0387168452909152902054155b6104ca57600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b82610537816106e1565b82610541816106e1565b6001600160a01b038516600090815260026020908152604080832033845290915290205461056f9084610735565b6001600160a01b0386166000818152600260209081526040808320338452825280832094909455918152600190915220546105aa9084610735565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546105d99084610782565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b81610641816106e1565b3360009081526001602052604090205461065b9083610735565b33600090815260016020526040808220929092556001600160a01b038516815220546106879083610782565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b038116610732576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60008183101561077c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107cb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220fc4488a5bbac023b1f278bab3efdfe23de5c690ae7e06c103fea7f6b48f8344c64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a08231146101ec57806395d89b4114610212578063a9059cbb1461021a578063d909b40314610246578063dd62ed3e1461024e578063f907191a1461027c576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd146101765780631b08d96f1461019057806323b872dd14610198578063313ce567146101ce575b600080fd5b6100c16102a5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610333565b604080519115158252519081900360200190f35b61017e610366565b60408051918252519081900360200190f35b61016261036c565b610162600480360360608110156101ae57600080fd5b506001600160a01b0381358116916020810135909116906040013561037b565b6101d66103b0565b6040805160ff9092168252519081900360200190f35b61017e6004803603602081101561020257600080fd5b50356001600160a01b03166103b9565b6100c16103cb565b6101626004803603604081101561023057600080fd5b506001600160a01b038135169060200135610426565b610162610432565b61017e6004803603604081101561026457600080fd5b506001600160a01b0381358116916020013516610440565b6102a36004803603604081101561029257600080fd5b50803515159060200135151561045d565b005b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561032b5780601f106103005761010080835404028352916020019161032b565b820191906000526020600020905b81548152906001019060200180831161030e57829003601f168201915b505050505081565b600061033f8383610489565b600554610100900460ff1661035357600080fd5b505060055462010000900460ff16919050565b60005481565b60055462010000900460ff1681565b600061038884848461052d565b600554610100900460ff1661039c57600080fd5b505060055462010000900460ff1692915050565b60055460ff1681565b60016020526000908152604090205481565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561032b5780601f106103005761010080835404028352916020019161032b565b600061033f8383610637565b600554610100900460ff1681565b600260209081526000928352604080842090915290825290205481565b60058054911515620100000262ff0000199315156101000261ff00199093169290921792909216179055565b81610493816106e1565b8115806104c157503360009081526002602090815260408083206001600160a01b0387168452909152902054155b6104ca57600080fd5b3360008181526002602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3505050565b82610537816106e1565b82610541816106e1565b6001600160a01b038516600090815260026020908152604080832033845290915290205461056f9084610735565b6001600160a01b0386166000818152600260209081526040808320338452825280832094909455918152600190915220546105aa9084610735565b6001600160a01b0380871660009081526001602052604080822093909355908616815220546105d99084610782565b6001600160a01b0380861660008181526001602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35050505050565b81610641816106e1565b3360009081526001602052604090205461065b9083610735565b33600090815260016020526040808220929092556001600160a01b038516815220546106879083610782565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050565b6001600160a01b038116610732576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b60008183101561077c576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b6000828201838110156107cb576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b939250505056fea2646970667358221220fc4488a5bbac023b1f278bab3efdfe23de5c690ae7e06c103fea7f6b48f8344c64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "5013:898:46:-:0;;;5116:198;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5116:198:46;;;;;;;;;;-1:-1:-1;5116:198:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5116:198:46;;;;;;;;;;-1:-1:-1;5116:198:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5116:198:46;;;;;;;;;;;;;772:11;:21;;;813:10;803:21;;:9;:21;;;;;;:31;;;3564:12;;5116:198;;-1:-1:-1;5116:198:46;;-1:-1:-1;5246:5:46;;5253:7;;5116:198;;;;3564:12:::1;::::0;:4:::1;::::0;:12;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;3586:16:46;;::::1;::::0;:6:::1;::::0;:16:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;3612:8:46::1;:20:::0;;-1:-1:-1;;3612:20:46::1;;::::0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;5292:15:46::1;::::0;-1:-1:-1;;;5292:3:46::1;:15::i;:::-;5116:198:::0;;;;5013:898;;5320:86;5371:2;:8;;5389:10;;;;;-1:-1:-1;;5371:8:46;;;;;-1:-1:-1;;5371:8:46;;;;;;;5389:10;;;;;;;5320:86::o;5013:898::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5013:898:46;;;-1:-1:-1;5013:898:46;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "5013:898:46:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3085:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5412:157;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5412:157:46;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;266:26;;;:::i;:::-;;;;;;;;;;;;;;;;5094:15;;;:::i;5730:179::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5730:179:46;;;;;;;;;;;;;;;;;:::i;3135:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;298:45;;;;;;;;;;;;;;;;-1:-1:-1;298:45:46;-1:-1:-1;;;;;298:45:46;;:::i;3109:20::-;;;:::i;5575:149::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5575:149:46;;;;;;;;:::i;5074:14::-;;;:::i;349:66::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;349:66:46;;;;;;;;;;:::i;5320:86::-;;;;;;;;;;;;;;;;-1:-1:-1;5320:86:46;;;;;;;;;;;:::i;:::-;;3085:18;;;;;;;;;;;;;;;-1:-1:-1;;3085:18:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5412:157::-;5479:4;5495:26;5504:8;5514:6;5495:8;:26::i;:::-;5539:2;;;;;;;5531:11;;;;;;-1:-1:-1;;5559:3:46;;;;;;;;5412:157;-1:-1:-1;5412:157:46:o;266:26::-;;;;:::o;5094:15::-;;;;;;;;;:::o;5730:179::-;5812:4;5828:33;5842:5;5849:3;5854:6;5828:13;:33::i;:::-;5879:2;;;;;;;5871:11;;;;;;-1:-1:-1;;5899:3:46;;;;;;;;5730:179;-1:-1:-1;;5730:179:46:o;3135:21::-;;;;;;:::o;298:45::-;;;;;;;;;;;;;:::o;3109:20::-;;;;;;;;;;;;;;;-1:-1:-1;;3109:20:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5575:149;5638:4;5654:22;5664:3;5669:6;5654:9;:22::i;5074:14::-;;;;;;;;;:::o;349:66::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;5320:86::-;5371:2;:8;;5389:10;;;;;-1:-1:-1;;5371:8:46;;;;;-1:-1:-1;;5371:8:46;;;;;;;5389:10;;;;;;;5320:86::o;2611:410::-;2701:8;594:23:64;608:8;594:13;:23::i;:::-;2858:11:46;;;:51:::1;;-1:-1:-1::0;2883:10:46::1;2873:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2873:31:46;::::1;::::0;;;;;;;;:36;2858:51:::1;2850:60;;;::::0;::::1;;2931:10;2921:21;::::0;;;:9:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;2921:31:46;::::1;::::0;;;;;;;;;;:40;;;2976:38;;;;;;;2921:31;;2931:10;2976:38:::1;::::0;;;;;;;;;::::1;2611:410:::0;;;:::o;1617:383::-;1722:5;594:23:64;608:8;594:13;:23::i;:::-;1750:3:46::1;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;1800:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1817:10:::2;1800:28:::0;;;;;;;;:40:::2;::::0;1833:6;1800:32:::2;:40::i;:::-;-1:-1:-1::0;;;;;1769:16:46;::::2;;::::0;;;:9:::2;:16;::::0;;;;;;;1786:10:::2;1769:28:::0;;;;;;;:71;;;;1869:16;;;:9:::2;:16:::0;;;;;:28:::2;::::0;1890:6;1869:20:::2;:28::i;:::-;-1:-1:-1::0;;;;;1850:16:46;;::::2;;::::0;;;:9:::2;:16;::::0;;;;;:47;;;;1924:14;;::::2;::::0;;;;:26:::2;::::0;1943:6;1924:18:::2;:26::i;:::-;-1:-1:-1::0;;;;;1907:14:46;;::::2;;::::0;;;:9:::2;:14;::::0;;;;;;;;:43;;;;1965:28;;;;;;;1907:14;;1965:28;;::::2;::::0;::::2;::::0;;;;;;;::::2;628:1:64::1;1617:383:46::0;;;;:::o;1057:270::-;1143:3;594:23:64;608:8;594:13;:23::i;:::-;1196:10:46::1;1186:21;::::0;;;:9:::1;:21;::::0;;;;;:33:::1;::::0;1212:6;1186:25:::1;:33::i;:::-;1172:10;1162:21;::::0;;;:9:::1;:21;::::0;;;;;:57;;;;-1:-1:-1;;;;;1246:14:46;::::1;::::0;;;;:26:::1;::::0;1265:6;1246:18:::1;:26::i;:::-;-1:-1:-1::0;;;;;1229:14:46;::::1;;::::0;;;:9:::1;:14;::::0;;;;;;;;:43;;;;1287:33;;;;;;;1229:14;;1296:10:::1;::::0;1287:33:::1;::::0;;;;;;;;::::1;1057:270:::0;;;:::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;778:147:60:-;838:7;872:2;866;:8;;858:34;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;-1:-1:-1;;;858:34:60;;;;;;;;;;;;;;;-1:-1:-1;910:7:60;;;778:147::o;386:169::-;446:7;478;;;504;;;;496:32;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;-1:-1:-1;;;496:32:60;;;;;;;;;;;;;;;546:1;386:169;-1:-1:-1;;;386:169:60:o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/Utils.sol\";\nimport \"../utility/SafeMath.sol\";\n\n/**\n * ERC20 Non-Standard Token implementation\n*/\ncontract NonStandardToken is Utils {\n using SafeMath for uint256;\n\n uint256 public totalSupply;\n mapping (address => uint256) public balanceOf;\n mapping (address => mapping (address => uint256)) public allowance;\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _supply initial supply\n */\n constructor(uint256 _supply)\n internal\n {\n totalSupply = _supply;\n balanceOf[msg.sender] = _supply;\n }\n\n /**\n * @dev send coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _to target address\n * @param _value transfer amount\n */\n function _transfer(address _to, uint256 _value)\n internal\n validAddress(_to)\n {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(msg.sender, _to, _value);\n }\n\n /**\n * @dev an account/contract attempts to get the coins\n * throws on any error rather then return a false flag to minimize user errors\n *\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function _transferFrom(address _from, address _to, uint256 _value)\n internal\n validAddress(_from)\n validAddress(_to)\n {\n allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);\n balanceOf[_from] = balanceOf[_from].sub(_value);\n balanceOf[_to] = balanceOf[_to].add(_value);\n emit Transfer(_from, _to, _value);\n }\n\n /**\n * @dev allow another account/contract to spend some tokens on your behalf\n * throws on any error rather then return a false flag to minimize user errors\n *\n * also, to minimize the risk of the approve/transferFrom attack vector\n * (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n * in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n *\n * @param _spender approved address\n * @param _value allowance amount\n */\n function _approve(address _spender, uint256 _value)\n internal\n validAddress(_spender)\n {\n // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal\n require(_value == 0 || allowance[msg.sender][_spender] == 0);\n\n allowance[msg.sender][_spender] = _value;\n emit Approval(msg.sender, _spender, _value);\n }\n}\n\ncontract NonStandardTokenDetailed is NonStandardToken {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n /**\n * @dev initializes a new NonStandardToken instance\n *\n * @param _name token name\n * @param _symbol token symbol\n * @param _decimals decimal points\n * @param _supply initial supply\n */\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply)\n internal\n NonStandardToken(_supply)\n {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n\ncontract TestNonStandardToken is NonStandardTokenDetailed {\n bool public ok;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true);\n }\n\n function set(bool _ok) public {\n ok = _ok;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n require(ok);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n require(ok);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n require(ok);\n }\n}\n\ncontract TestNonStandardTokenWithoutDecimals is NonStandardToken {\n string public name;\n string public symbol;\n\n constructor(string memory _name, string memory _symbol, uint256 _supply) public\n NonStandardToken(_supply) {\n name = _name;\n symbol = _symbol;\n }\n\n function approve(address _spender, uint256 _value) public {\n _approve(_spender, _value);\n }\n\n function transfer(address _to, uint256 _value) public {\n _transfer(_to, _value);\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public {\n _transferFrom(_from, _to, _value);\n }\n}\n\ncontract TestStandardToken is NonStandardTokenDetailed {\n bool public ok;\n bool public ret;\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public\n NonStandardTokenDetailed(_name, _symbol, _decimals, _supply) {\n set(true, true);\n }\n\n function set(bool _ok, bool _ret) public {\n ok = _ok;\n ret = _ret;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool) {\n _approve(_spender, _value);\n require(ok);\n return ret;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool) {\n _transfer(_to, _value);\n require(ok);\n return ret;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n _transferFrom(_from, _to, _value);\n require(ok);\n return ret;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokens.sol", + "exportedSymbols": { + "NonStandardToken": [ + 19969 + ], + "NonStandardTokenDetailed": [ + 20006 + ], + "TestNonStandardToken": [ + 20097 + ], + "TestNonStandardTokenWithoutDecimals": [ + 20167 + ], + "TestStandardToken": [ + 20279 + ] + }, + "id": 20280, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19766, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:46" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "../utility/Utils.sol", + "id": 19767, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22662, + "src": "75:30:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol", + "file": "../utility/SafeMath.sol", + "id": 19768, + "nodeType": "ImportDirective", + "scope": 20280, + "sourceUnit": 22355, + "src": "106:33:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19770, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "221:5:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 19771, + "nodeType": "InheritanceSpecifier", + "src": "221:5:46" + } + ], + "contractDependencies": [ + 22661 + ], + "contractKind": "contract", + "documentation": { + "id": 19769, + "nodeType": "StructuredDocumentation", + "src": "141:50:46", + "text": " ERC20 Non-Standard Token implementation" + }, + "fullyImplemented": true, + "id": 19969, + "linearizedBaseContracts": [ + 19969, + 22661 + ], + "name": "NonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19774, + "libraryName": { + "contractScope": null, + "id": 19772, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22354, + "src": "239:8:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$22354", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "233:27:46", + "typeName": { + "id": 19773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "252:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "functionSelector": "18160ddd", + "id": 19776, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "266:26:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "266:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "70a08231", + "id": 19780, + "mutability": "mutable", + "name": "balanceOf", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "298:45:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 19779, + "keyType": { + "id": 19777, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "307:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "298:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "318:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "dd62ed3e", + "id": 19786, + "mutability": "mutable", + "name": "allowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19969, + "src": "349:66:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 19785, + "keyType": { + "id": 19781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "349:49:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 19784, + "keyType": { + "id": 19782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "378:7:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "369:28:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 19783, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "389:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 19794, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 19793, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19788, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "437:21:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19787, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "437:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19790, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "460:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19789, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19792, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19794, + "src": "481:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19791, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "436:60:46" + }, + "src": "422:75:46" + }, + { + "anonymous": false, + "documentation": null, + "id": 19802, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 19801, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19796, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "517:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "517:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19798, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "541:24:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "541:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19800, + "indexed": false, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19802, + "src": "567:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "567:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "516:66:46" + }, + "src": "502:81:46" + }, + { + "body": { + "id": 19819, + "nodeType": "Block", + "src": "762:79:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19808, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19776, + "src": "772:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19809, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "786:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19811, + "nodeType": "ExpressionStatement", + "src": "772:21:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19812, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "803:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19815, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19813, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "813:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "813:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "803:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19816, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19805, + "src": "827:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "803:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19818, + "nodeType": "ExpressionStatement", + "src": "803:31:46" + } + ] + }, + "documentation": { + "id": 19803, + "nodeType": "StructuredDocumentation", + "src": "589:118:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _supply initial supply" + }, + "id": 19820, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19805, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19820, + "src": "724:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "724:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "723:17:46" + }, + "returnParameters": { + "id": 19807, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:46" + }, + "scope": 19969, + "src": "712:129:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19862, + "nodeType": "Block", + "src": "1152:175:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19831, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1162:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19834, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19832, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1172:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1172:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1162:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19840, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1212:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19835, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1186:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19838, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19836, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1196:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1196:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1186:21:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1186:25:46", + "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": 19841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1186:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1162:57:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19843, + "nodeType": "ExpressionStatement", + "src": "1162:57:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19844, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1229:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19846, + "indexExpression": { + "argumentTypes": null, + "id": 19845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1239:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1229:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19851, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1265:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19847, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1246:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19849, + "indexExpression": { + "argumentTypes": null, + "id": 19848, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1256:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1246:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1246:18:46", + "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": 19852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1246:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1229:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19854, + "nodeType": "ExpressionStatement", + "src": "1229:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1296:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1296:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1308:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19859, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19825, + "src": "1313:6:46", + "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": 19855, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1287:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1287:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19861, + "nodeType": "EmitStatement", + "src": "1282:38:46" + } + ] + }, + "documentation": { + "id": 19821, + "nodeType": "StructuredDocumentation", + "src": "847:205:46", + "text": " @dev send coins\n throws on any error rather then return a false flag to minimize user errors\n @param _to target address\n @param _value transfer amount" + }, + "id": 19863, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19828, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19823, + "src": "1143:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19829, + "modifierName": { + "argumentTypes": null, + "id": 19827, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1130:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1130:17:46" + } + ], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19823, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1076:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19822, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1076:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19825, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19863, + "src": "1089:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1089:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1075:29:46" + }, + "returnParameters": { + "id": 19830, + "nodeType": "ParameterList", + "parameters": [], + "src": "1152:0:46" + }, + "scope": 19969, + "src": "1057:270:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19924, + "nodeType": "Block", + "src": "1759:241:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19879, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1769:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19883, + "indexExpression": { + "argumentTypes": null, + "id": 19880, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1779:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1769:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19884, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1786:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1786:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1769:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19892, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1833:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19885, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "1800:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19887, + "indexExpression": { + "argumentTypes": null, + "id": 19886, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1810:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:16:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1817:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1817:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1800:28:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1800:32:46", + "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": 19893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1800:40:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1769:71:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19895, + "nodeType": "ExpressionStatement", + "src": "1769:71:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19896, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1850:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19898, + "indexExpression": { + "argumentTypes": null, + "id": 19897, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1860:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1850:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19903, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1890:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19899, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1869:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19901, + "indexExpression": { + "argumentTypes": null, + "id": 19900, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1879:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1869:16:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 22293, + "src": "1869:20:46", + "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": 19904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1869:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1850:47:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19906, + "nodeType": "ExpressionStatement", + "src": "1850:47:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19907, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1907:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19909, + "indexExpression": { + "argumentTypes": null, + "id": 19908, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1917:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1907:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19914, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1943:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19910, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19780, + "src": "1924:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19912, + "indexExpression": { + "argumentTypes": null, + "id": 19911, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1934:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1924:14:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 22271, + "src": "1924:18:46", + "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": 19915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1924:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1907:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19917, + "nodeType": "ExpressionStatement", + "src": "1907:43:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1974:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19920, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1981:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19921, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19870, + "src": "1986:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19918, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19794, + "src": "1965:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:28:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19923, + "nodeType": "EmitStatement", + "src": "1960:33:46" + } + ] + }, + "documentation": { + "id": 19864, + "nodeType": "StructuredDocumentation", + "src": "1333:279:46", + "text": " @dev an account/contract attempts to get the coins\n throws on any error rather then return a false flag to minimize user errors\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 19925, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19873, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19866, + "src": "1722:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19874, + "modifierName": { + "argumentTypes": null, + "id": 19872, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1709:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1709:19:46" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 19876, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19868, + "src": "1750:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19877, + "modifierName": { + "argumentTypes": null, + "id": 19875, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1737:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1737:17:46" + } + ], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19866, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1640:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1640:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19868, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1655:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19870, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19925, + "src": "1668:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1668:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1639:44:46" + }, + "returnParameters": { + "id": 19878, + "nodeType": "ParameterList", + "parameters": [], + "src": "1759:0:46" + }, + "scope": 19969, + "src": "1617:383:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 19967, + "nodeType": "Block", + "src": "2715:306:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 19948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 19937, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2858:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2868:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2858:11:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 19947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19940, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2873:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19943, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19941, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2883:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2883:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19945, + "indexExpression": { + "argumentTypes": null, + "id": 19944, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2895:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2873:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 19946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2908:1:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2873:36:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2858:51:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 19936, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2850:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 19949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2850:60:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19950, + "nodeType": "ExpressionStatement", + "src": "2850:60:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 19951, + "name": "allowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19786, + "src": "2921:9:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 19955, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19952, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2931:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:21:46", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 19956, + "indexExpression": { + "argumentTypes": null, + "id": 19954, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2943:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2921:31:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19957, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "2955:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2921:40:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 19959, + "nodeType": "ExpressionStatement", + "src": "2921:40:46" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2985:3:46", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 19962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2985:10:46", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 19963, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2997:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19964, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19930, + "src": "3007:6:46", + "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": 19960, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19802, + "src": "2976:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 19965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2976:38:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19966, + "nodeType": "EmitStatement", + "src": "2971:43:46" + } + ] + }, + "documentation": { + "id": 19926, + "nodeType": "StructuredDocumentation", + "src": "2006:600:46", + "text": " @dev allow another account/contract to spend some tokens on your behalf\n throws on any error rather then return a false flag to minimize user errors\n also, to minimize the risk of the approve/transferFrom attack vector\n (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice\n in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 19968, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19933, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19928, + "src": "2701:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 19934, + "modifierName": { + "argumentTypes": null, + "id": 19932, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "2688:12:46", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2688:22:46" + } + ], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19931, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19928, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2629:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2629:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19930, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19968, + "src": "2647:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19929, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2647:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2628:34:46" + }, + "returnParameters": { + "id": 19935, + "nodeType": "ParameterList", + "parameters": [], + "src": "2715:0:46" + }, + "scope": 19969, + "src": "2611:410:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "192:2831:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19970, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "3062:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 19971, + "nodeType": "InheritanceSpecifier", + "src": "3062:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20006, + "linearizedBaseContracts": [ + 20006, + 19969, + 22661 + ], + "name": "NonStandardTokenDetailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 19973, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3085:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3085:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 19975, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3109:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 19974, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3109:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "313ce567", + "id": 19977, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20006, + "src": "3135:21:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19976, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3135:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20004, + "nodeType": "Block", + "src": "3554:85:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 19994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19992, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19973, + "src": "3564:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19993, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19980, + "src": "3571:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3564:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19995, + "nodeType": "ExpressionStatement", + "src": "3564:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 19998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 19996, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19975, + "src": "3586:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 19997, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19982, + "src": "3595:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "3586:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 19999, + "nodeType": "ExpressionStatement", + "src": "3586:16:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20000, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19977, + "src": "3612:8:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20001, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19984, + "src": "3623:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3612:20:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 20003, + "nodeType": "ExpressionStatement", + "src": "3612:20:46" + } + ] + }, + "documentation": { + "id": 19978, + "nodeType": "StructuredDocumentation", + "src": "3163:241:46", + "text": " @dev initializes a new NonStandardToken instance\n @param _name token name\n @param _symbol token symbol\n @param _decimals decimal points\n @param _supply initial supply" + }, + "id": 20005, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 19989, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19986, + "src": "3541:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 19990, + "modifierName": { + "argumentTypes": null, + "id": 19988, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "3524:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3524:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19980, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3421:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19979, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3421:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19982, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3442:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 19981, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3442:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19984, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3465:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 19983, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3465:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19986, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20005, + "src": "3482:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3482:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3420:78:46" + }, + "returnParameters": { + "id": 19991, + "nodeType": "ParameterList", + "parameters": [], + "src": "3554:0:46" + }, + "scope": 20006, + "src": "3409:230:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 20280, + "src": "3025:616:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20007, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "3676:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20008, + "nodeType": "InheritanceSpecifier", + "src": "3676:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20097, + "linearizedBaseContracts": [ + 20097, + 20006, + 19969, + 22661 + ], + "name": "TestNonStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20010, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20097, + "src": "3707:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20009, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3707:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20031, + "nodeType": "Block", + "src": "3894:26:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3908:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20027, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20042, + "src": "3904:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$__$", + "typeString": "function (bool)" + } + }, + "id": 20029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:9:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20030, + "nodeType": "ExpressionStatement", + "src": "3904:9:46" + } + ] + }, + "documentation": null, + "id": 20032, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20021, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20012, + "src": "3858:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20022, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20014, + "src": "3865:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20023, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20016, + "src": "3874:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20024, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20018, + "src": "3885:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20025, + "modifierName": { + "argumentTypes": null, + "id": 20020, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "3833:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "3833:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20012, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3740:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20011, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3740:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20014, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3761:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20013, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3761:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20016, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3784:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20015, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3784:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20018, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20032, + "src": "3801:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20017, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3801:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3739:78:46" + }, + "returnParameters": { + "id": 20026, + "nodeType": "ParameterList", + "parameters": [], + "src": "3894:0:46" + }, + "scope": 20097, + "src": "3728:192:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20041, + "nodeType": "Block", + "src": "3956:25:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20037, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "3966:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20038, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20034, + "src": "3971:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3966:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20040, + "nodeType": "ExpressionStatement", + "src": "3966:8:46" + } + ] + }, + "documentation": null, + "functionSelector": "5f76f6ab", + "id": 20042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20034, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20042, + "src": "3939:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20033, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3939:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3938:10:46" + }, + "returnParameters": { + "id": 20036, + "nodeType": "ParameterList", + "parameters": [], + "src": "3956:0:46" + }, + "scope": 20097, + "src": "3926:55:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20058, + "nodeType": "Block", + "src": "4045:64:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20050, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20044, + "src": "4064:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20051, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20046, + "src": "4074:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20049, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4055:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4055:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20053, + "nodeType": "ExpressionStatement", + "src": "4055:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20055, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4099:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20054, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4091:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4091:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20057, + "nodeType": "ExpressionStatement", + "src": "4091:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20044, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4004:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20043, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4004:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20046, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20059, + "src": "4022:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4022:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4003:34:46" + }, + "returnParameters": { + "id": 20048, + "nodeType": "ParameterList", + "parameters": [], + "src": "4045:0:46" + }, + "scope": 20097, + "src": "3987:122:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20075, + "nodeType": "Block", + "src": "4169:60:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20067, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20061, + "src": "4189:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20068, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20063, + "src": "4194:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20066, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4179:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4179:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20070, + "nodeType": "ExpressionStatement", + "src": "4179:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20072, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4219:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20071, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4211:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4211:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20074, + "nodeType": "ExpressionStatement", + "src": "4211:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20061, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4133:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4133:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20063, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20076, + "src": "4146:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4146:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4132:29:46" + }, + "returnParameters": { + "id": 20065, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:0:46" + }, + "scope": 20097, + "src": "4115:114:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20095, + "nodeType": "Block", + "src": "4308:71:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20086, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20078, + "src": "4332:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20087, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20080, + "src": "4339:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20088, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20082, + "src": "4344:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20085, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4318:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20090, + "nodeType": "ExpressionStatement", + "src": "4318:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20092, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20010, + "src": "4369:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20091, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4361:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4361:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20094, + "nodeType": "ExpressionStatement", + "src": "4361:11:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20078, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4257:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20077, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4257:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20080, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4272:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20079, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20082, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20096, + "src": "4285:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4285:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4256:44:46" + }, + "returnParameters": { + "id": 20084, + "nodeType": "ParameterList", + "parameters": [], + "src": "4308:0:46" + }, + "scope": 20097, + "src": "4235:144:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "3643:738:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20098, + "name": "NonStandardToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 19969, + "src": "4431:16:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardToken_$19969", + "typeString": "contract NonStandardToken" + } + }, + "id": 20099, + "nodeType": "InheritanceSpecifier", + "src": "4431:16:46" + } + ], + "contractDependencies": [ + 19969, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20167, + "linearizedBaseContracts": [ + 20167, + 19969, + 22661 + ], + "name": "TestNonStandardTokenWithoutDecimals", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20101, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4454:18:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20100, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4454:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 20103, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20167, + "src": "4478:20:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20102, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4478:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20123, + "nodeType": "Block", + "src": "4619:55:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20115, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20101, + "src": "4629:4:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20116, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20105, + "src": "4636:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4629:12:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20118, + "nodeType": "ExpressionStatement", + "src": "4629:12:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20119, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20103, + "src": "4651:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20120, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20107, + "src": "4660:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "4651:16:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20122, + "nodeType": "ExpressionStatement", + "src": "4651:16:46" + } + ] + }, + "documentation": null, + "id": 20124, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20112, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20109, + "src": "4610:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20113, + "modifierName": { + "argumentTypes": null, + "id": 20111, + "name": "NonStandardToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19969, + "src": "4593:16:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardToken_$19969_$", + "typeString": "type(contract NonStandardToken)" + } + }, + "nodeType": "ModifierInvocation", + "src": "4593:25:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20105, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4517:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4517:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20107, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4538:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20106, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4538:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20109, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20124, + "src": "4561:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4561:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4516:61:46" + }, + "returnParameters": { + "id": 20114, + "nodeType": "ParameterList", + "parameters": [], + "src": "4619:0:46" + }, + "scope": 20167, + "src": "4505:169:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20136, + "nodeType": "Block", + "src": "4738:43:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20132, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20126, + "src": "4757:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20133, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20128, + "src": "4767:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20131, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "4748:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4748:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20135, + "nodeType": "ExpressionStatement", + "src": "4748:26:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20126, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4697:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4697:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20128, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20137, + "src": "4715:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4715:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4696:34:46" + }, + "returnParameters": { + "id": 20130, + "nodeType": "ParameterList", + "parameters": [], + "src": "4738:0:46" + }, + "scope": 20167, + "src": "4680:101:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20149, + "nodeType": "Block", + "src": "4841:39:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20145, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20139, + "src": "4861:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20146, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20141, + "src": "4866:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20144, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "4851:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4851:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20148, + "nodeType": "ExpressionStatement", + "src": "4851:22:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20142, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20139, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4805:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4805:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20141, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20150, + "src": "4818:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20140, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4818:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4804:29:46" + }, + "returnParameters": { + "id": 20143, + "nodeType": "ParameterList", + "parameters": [], + "src": "4841:0:46" + }, + "scope": 20167, + "src": "4787:93:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20165, + "nodeType": "Block", + "src": "4959:50:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20160, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20152, + "src": "4983:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20161, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20154, + "src": "4990:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20162, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20156, + "src": "4995:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20159, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "4969:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4969:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20164, + "nodeType": "ExpressionStatement", + "src": "4969:33:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20152, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4908:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4908:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20154, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4923:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20153, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4923:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20156, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20166, + "src": "4936:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20155, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4936:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4907:44:46" + }, + "returnParameters": { + "id": 20158, + "nodeType": "ParameterList", + "parameters": [], + "src": "4959:0:46" + }, + "scope": 20167, + "src": "4886:123:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "4383:628:46" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20168, + "name": "NonStandardTokenDetailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 20006, + "src": "5043:24:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_NonStandardTokenDetailed_$20006", + "typeString": "contract NonStandardTokenDetailed" + } + }, + "id": 20169, + "nodeType": "InheritanceSpecifier", + "src": "5043:24:46" + } + ], + "contractDependencies": [ + 19969, + 20006, + 22661 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20279, + "linearizedBaseContracts": [ + 20279, + 20006, + 19969, + 22661 + ], + "name": "TestStandardToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "d909b403", + "id": 20171, + "mutability": "mutable", + "name": "ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5074:14:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20170, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5074:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "1b08d96f", + "id": 20173, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20279, + "src": "5094:15:46", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5094:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20195, + "nodeType": "Block", + "src": "5282:32:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5296:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 20192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5302:4:46", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20190, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20212, + "src": "5292:3:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (bool,bool)" + } + }, + "id": 20193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5292:15:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20194, + "nodeType": "ExpressionStatement", + "src": "5292:15:46" + } + ] + }, + "documentation": null, + "id": 20196, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 20184, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20175, + "src": "5246:5:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20185, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20177, + "src": "5253:7:46", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20186, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20179, + "src": "5262:9:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 20187, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20181, + "src": "5273:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 20188, + "modifierName": { + "argumentTypes": null, + "id": 20183, + "name": "NonStandardTokenDetailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20006, + "src": "5221:24:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_NonStandardTokenDetailed_$20006_$", + "typeString": "type(contract NonStandardTokenDetailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5221:60:46" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20175, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5128:19:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20174, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5128:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20177, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5149:21:46", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5149:6:46", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20179, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5172:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20178, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5172:5:46", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20181, + "mutability": "mutable", + "name": "_supply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20196, + "src": "5189:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5189:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5127:78:46" + }, + "returnParameters": { + "id": 20189, + "nodeType": "ParameterList", + "parameters": [], + "src": "5282:0:46" + }, + "scope": 20279, + "src": "5116:198:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20211, + "nodeType": "Block", + "src": "5361:45:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20203, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5371:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20204, + "name": "_ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20198, + "src": "5376:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5371:8:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20206, + "nodeType": "ExpressionStatement", + "src": "5371:8:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20207, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5389:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20208, + "name": "_ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20200, + "src": "5395:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5389:10:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 20210, + "nodeType": "ExpressionStatement", + "src": "5389:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "f907191a", + "id": 20212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20201, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20198, + "mutability": "mutable", + "name": "_ok", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5333:8:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20197, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5333:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20200, + "mutability": "mutable", + "name": "_ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20212, + "src": "5343:9:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20199, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5343:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5332:21:46" + }, + "returnParameters": { + "id": 20202, + "nodeType": "ParameterList", + "parameters": [], + "src": "5361:0:46" + }, + "scope": 20279, + "src": "5320:86:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20232, + "nodeType": "Block", + "src": "5485:84:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20222, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20214, + "src": "5504:8:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20223, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20216, + "src": "5514:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20221, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19968, + "src": "5495:8:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5495:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20225, + "nodeType": "ExpressionStatement", + "src": "5495:26:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20227, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5539:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20226, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5531:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20229, + "nodeType": "ExpressionStatement", + "src": "5531:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20230, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5559:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20220, + "id": 20231, + "nodeType": "Return", + "src": "5552:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "095ea7b3", + "id": 20233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20214, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5429:16:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5429:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20216, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5447:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5447:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5428:34:46" + }, + "returnParameters": { + "id": 20220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20219, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20233, + "src": "5479:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20218, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5479:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5478:6:46" + }, + "scope": 20279, + "src": "5412:157:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20253, + "nodeType": "Block", + "src": "5644:80:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20243, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20235, + "src": "5664:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20244, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20237, + "src": "5669:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20242, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19863, + "src": "5654:9:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 20245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5654:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20246, + "nodeType": "ExpressionStatement", + "src": "5654:22:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20248, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5694:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20247, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5686:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5686:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20250, + "nodeType": "ExpressionStatement", + "src": "5686:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20251, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5714:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20241, + "id": 20252, + "nodeType": "Return", + "src": "5707:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "a9059cbb", + "id": 20254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20235, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5593:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5593:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20237, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5606:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20236, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5606:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5592:29:46" + }, + "returnParameters": { + "id": 20241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20240, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20254, + "src": "5638:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20239, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5638:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5637:6:46" + }, + "scope": 20279, + "src": "5575:149:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 20277, + "nodeType": "Block", + "src": "5818:91:46", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20266, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20256, + "src": "5842:5:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20267, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20258, + "src": "5849:3:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 20268, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20260, + "src": "5854:6:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 20265, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19925, + "src": "5828:13:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 20269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5828:33:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20270, + "nodeType": "ExpressionStatement", + "src": "5828:33:46" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20272, + "name": "ok", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20171, + "src": "5879:2:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5871:7:46", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 20273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5871:11:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20274, + "nodeType": "ExpressionStatement", + "src": "5871:11:46" + }, + { + "expression": { + "argumentTypes": null, + "id": 20275, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20173, + "src": "5899:3:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 20264, + "id": 20276, + "nodeType": "Return", + "src": "5892:10:46" + } + ] + }, + "documentation": null, + "functionSelector": "23b872dd", + "id": 20278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20256, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5752:13:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5752:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20258, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5767:11:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 20257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5767:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20260, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5780:14:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 20259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5780:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5751:44:46" + }, + "returnParameters": { + "id": 20264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20263, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20278, + "src": "5812:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 20262, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5812:4:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5811:6:46" + }, + "scope": 20279, + "src": "5730:179:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20280, + "src": "5013:898:46" + } + ], + "src": "51:5861:46" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.825Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestTokenHandler.json b/apps/cic-eth/tests/testdata/bancor/TestTokenHandler.json new file mode 100644 index 00000000..37e27988 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestTokenHandler.json @@ -0,0 +1,1618 @@ +{ + "contractName": "TestTokenHandler", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "testSafeApprove", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "testSafeTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "testSafeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"testSafeApprove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"testSafeTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"testSafeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokenHandler.sol\":\"TestTokenHandler\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokenHandler.sol\":{\"keccak256\":\"0x4e35a2b33cbfd77b99d3bc7b305ab1c2e8b9376bde420e6868a4afcce4d170de\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://db701b4872d9a479bee968de9c23834c65ccc93e8bec658b8f43be742b24bd46\",\"dweb:/ipfs/QmP2qRsWJ9GePi7t54vT9fGU5MqoRZhw3wjxsbj5B7Qie2\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061057e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063083153141461004657806375231e611461007e578063f705d961146100ba575b600080fd5b61007c6004803603606081101561005c57600080fd5b506001600160a01b038135811691602081013590911690604001356100f0565b005b61007c6004803603608081101561009457600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610100565b61007c600480360360608110156100d057600080fd5b506001600160a01b03813581169160208101359091169060400135610112565b6100fb83838361011d565b505050565b61010c8484848461027c565b50505050565b6100fb8383836103ef565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061019a5780518252601f19909201916020918201910161017b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101fc576040519150601f19603f3d011682016040523d82523d6000602084013e610201565b606091505b509150915081801561022f57508051158061022f575080806020019051602081101561022c57600080fd5b50515b610275576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106103015780518252601f1990920191602091820191016102e2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610363576040519150601f19603f3d011682016040523d82523d6000602084013e610368565b606091505b5091509150818015610396575080511580610396575080806020019051602081101561039357600080fd5b50515b6103e7576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061046c5780518252601f19909201916020918201910161044d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146104ce576040519150601f19603f3d011682016040523d82523d6000602084013e6104d3565b606091505b509150915081801561050157508051158061050157508080602001905160208110156104fe57600080fd5b50515b610275576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fdfea26469706673582212202752e04fcc869371a5a3f84357fb2825cd19fbcf60c3b110a50e915e6145b38b64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063083153141461004657806375231e611461007e578063f705d961146100ba575b600080fd5b61007c6004803603606081101561005c57600080fd5b506001600160a01b038135811691602081013590911690604001356100f0565b005b61007c6004803603608081101561009457600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610100565b61007c600480360360608110156100d057600080fd5b506001600160a01b03813581169160208101359091169060400135610112565b6100fb83838361011d565b505050565b61010c8484848461027c565b50505050565b6100fb8383836103ef565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061019a5780518252601f19909201916020918201910161017b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146101fc576040519150601f19603f3d011682016040523d82523d6000602084013e610201565b606091505b509150915081801561022f57508051158061022f575080806020019051602081101561022c57600080fd5b50515b610275576040805162461bcd60e51b815260206004820152601260248201527111549497d054141493d59157d1905253115160721b604482015290519081900360640190fd5b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106103015780518252601f1990920191602091820191016102e2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610363576040519150601f19603f3d011682016040523d82523d6000602084013e610368565b606091505b5091509150818015610396575080511580610396575080806020019051602081101561039357600080fd5b50515b6103e7576040805162461bcd60e51b815260206004820152601860248201527f4552525f5452414e534645525f46524f4d5f4641494c45440000000000000000604482015290519081900360640190fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061046c5780518252601f19909201916020918201910161044d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146104ce576040519150601f19603f3d011682016040523d82523d6000602084013e6104d3565b606091505b509150915081801561050157508051158061050157508080602001905160208110156104fe57600080fd5b50515b610275576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fdfea26469706673582212202752e04fcc869371a5a3f84357fb2825cd19fbcf60c3b110a50e915e6145b38b64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "183:496:45:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "183:496:45:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;231:140;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;231:140:45;;;;;;;;;;;;;;;;;:::i;:::-;;515:162;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;515:162:45;;;;;;;;;;;;;;;;;;;;;;:::i;377:132::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;377:132:45;;;;;;;;;;;;;;;;;:::i;231:140::-;327:37;339:6;347:8;357:6;327:11;:37::i;:::-;231:140;;;:::o;515:162::-;626:44;643:6;651:5;658:3;663:6;626:16;:44::i;:::-;515:162;;;;:::o;377:132::-;469:33;482:6;490:3;495:6;469:12;:33::i;815:320:61:-;966:63;;;-1:-1:-1;;;;;966:63:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;966:63:61;-1:-1:-1;;;966:63:61;;;945:85;;;;910:12;;924:17;;945:20;;;;966:63;945:85;;;966:63;945:85;;966:63;945:85;;;;;;;;;;-1:-1:-1;;945:85:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;909:121;;;;1048:7;:57;;;;-1:-1:-1;1060:11:61;;:16;;:44;;;1091:4;1080:24;;;;;;;;;;;;;;;-1:-1:-1;1080:24:61;1060:44;1040:88;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;-1:-1:-1;;;1040:88:61;;;;;;;;;;;;;;;815:320;;;;;:::o;2190:348::-;2355:71;;;-1:-1:-1;;;;;2355:71:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2355:71:61;-1:-1:-1;;;2355:71:61;;;2334:93;;;;2299:12;;2313:17;;2334:20;;;;2355:71;2334:93;;;2355:71;2334:93;;2355:71;2334:93;;;;;;;;;;-1:-1:-1;;2334:93:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:129;;;;2445:7;:57;;;;-1:-1:-1;2457:11:61;;:16;;:44;;;2488:4;2477:24;;;;;;;;;;;;;;;-1:-1:-1;2477:24:61;2457:44;2437:94;;;;;-1:-1:-1;;;2437:94:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;2190:348;;;;;;:::o;1485:312::-;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../utility/TokenHandler.sol\";\n\n/*\n Utils test helper that exposes the token handler functions\n*/\ncontract TestTokenHandler is TokenHandler {\n function testSafeApprove(IERC20Token _token, address _spender, uint256 _value) public {\n safeApprove(_token, _spender, _value);\n }\n\n function testSafeTransfer(IERC20Token _token, address _to, uint256 _value) public {\n safeTransfer(_token, _to, _value);\n }\n\n function testSafeTransferFrom(IERC20Token _token, address _from, address _to, uint256 _value) public {\n safeTransferFrom(_token, _from, _to, _value);\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokenHandler.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokenHandler.sol", + "exportedSymbols": { + "TestTokenHandler": [ + 19764 + ] + }, + "id": 19765, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19709, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:45" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 19710, + "nodeType": "ImportDirective", + "scope": 19765, + "sourceUnit": 22527, + "src": "75:37:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19711, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "212:12:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 19712, + "nodeType": "InheritanceSpecifier", + "src": "212:12:45" + } + ], + "contractDependencies": [ + 22526 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19764, + "linearizedBaseContracts": [ + 19764, + 22526 + ], + "name": "TestTokenHandler", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19727, + "nodeType": "Block", + "src": "317:54:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19722, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19714, + "src": "339:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19723, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19716, + "src": "347:8:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19724, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19718, + "src": "357:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19721, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "327:11:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 19725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:37:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19726, + "nodeType": "ExpressionStatement", + "src": "327:37:45" + } + ] + }, + "documentation": null, + "functionSelector": "08315314", + "id": 19728, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeApprove", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19714, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "256:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "256:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19716, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "276:16:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19718, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "294:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "294:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "255:54:45" + }, + "returnParameters": { + "id": 19720, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:45" + }, + "scope": 19764, + "src": "231:140:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19743, + "nodeType": "Block", + "src": "459:50:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19738, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19730, + "src": "482:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19739, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19732, + "src": "490:3:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19740, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19734, + "src": "495:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19737, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "469:12:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 19741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "469:33:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19742, + "nodeType": "ExpressionStatement", + "src": "469:33:45" + } + ] + }, + "documentation": null, + "functionSelector": "f705d961", + "id": 19744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19735, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19730, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "403:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19729, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "403:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19732, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "423:11:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19731, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19734, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "436:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "436:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:49:45" + }, + "returnParameters": { + "id": 19736, + "nodeType": "ParameterList", + "parameters": [], + "src": "459:0:45" + }, + "scope": 19764, + "src": "377:132:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19762, + "nodeType": "Block", + "src": "616:61:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19756, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19746, + "src": "643:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19757, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19748, + "src": "651:5:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19758, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19750, + "src": "658:3:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19759, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19752, + "src": "663:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19755, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "626:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 19760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "626:44:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19761, + "nodeType": "ExpressionStatement", + "src": "626:44:45" + } + ] + }, + "documentation": null, + "functionSelector": "75231e61", + "id": 19763, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19746, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "545:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19745, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "545:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19748, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "565:13:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "565:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19750, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "580:11:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "580:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19752, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "593:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19751, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "593:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "544:64:45" + }, + "returnParameters": { + "id": 19754, + "nodeType": "ParameterList", + "parameters": [], + "src": "616:0:45" + }, + "scope": 19764, + "src": "515:162:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19765, + "src": "183:496:45" + } + ], + "src": "51:629:45" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTokenHandler.sol", + "exportedSymbols": { + "TestTokenHandler": [ + 19764 + ] + }, + "id": 19765, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 19709, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:45" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "../utility/TokenHandler.sol", + "id": 19710, + "nodeType": "ImportDirective", + "scope": 19765, + "sourceUnit": 22527, + "src": "75:37:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 19711, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "212:12:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 19712, + "nodeType": "InheritanceSpecifier", + "src": "212:12:45" + } + ], + "contractDependencies": [ + 22526 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 19764, + "linearizedBaseContracts": [ + 19764, + 22526 + ], + "name": "TestTokenHandler", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 19727, + "nodeType": "Block", + "src": "317:54:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19722, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19714, + "src": "339:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19723, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19716, + "src": "347:8:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19724, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19718, + "src": "357:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19721, + "name": "safeApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22428, + "src": "327:11:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 19725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:37:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19726, + "nodeType": "ExpressionStatement", + "src": "327:37:45" + } + ] + }, + "documentation": null, + "functionSelector": "08315314", + "id": 19728, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeApprove", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19714, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "256:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19713, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "256:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19716, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "276:16:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19718, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19728, + "src": "294:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "294:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "255:54:45" + }, + "returnParameters": { + "id": 19720, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:45" + }, + "scope": 19764, + "src": "231:140:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19743, + "nodeType": "Block", + "src": "459:50:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19738, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19730, + "src": "482:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19739, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19732, + "src": "490:3:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19740, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19734, + "src": "495:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19737, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "469:12:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 19741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "469:33:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19742, + "nodeType": "ExpressionStatement", + "src": "469:33:45" + } + ] + }, + "documentation": null, + "functionSelector": "f705d961", + "id": 19744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19735, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19730, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "403:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19729, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "403:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19732, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "423:11:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19731, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19734, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19744, + "src": "436:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19733, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "436:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "402:49:45" + }, + "returnParameters": { + "id": 19736, + "nodeType": "ParameterList", + "parameters": [], + "src": "459:0:45" + }, + "scope": 19764, + "src": "377:132:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 19762, + "nodeType": "Block", + "src": "616:61:45", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 19756, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19746, + "src": "643:6:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 19757, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19748, + "src": "651:5:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19758, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19750, + "src": "658:3:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 19759, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19752, + "src": "663:6:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 19755, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22525, + "src": "626:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,address,uint256)" + } + }, + "id": 19760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "626:44:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 19761, + "nodeType": "ExpressionStatement", + "src": "626:44:45" + } + ] + }, + "documentation": null, + "functionSelector": "75231e61", + "id": 19763, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "testSafeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 19753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 19746, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "545:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 19745, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "545:11:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19748, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "565:13:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "565:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19750, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "580:11:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19749, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "580:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19752, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 19763, + "src": "593:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19751, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "593:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "544:64:45" + }, + "returnParameters": { + "id": 19754, + "nodeType": "ParameterList", + "parameters": [], + "src": "616:0:45" + }, + "scope": 19764, + "src": "515:162:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 19765, + "src": "183:496:45" + } + ], + "src": "51:629:45" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.813Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TestTypedConverterAnchorFactory.json b/apps/cic-eth/tests/testdata/bancor/TestTypedConverterAnchorFactory.json new file mode 100644 index 00000000..f7ec00c3 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TestTypedConverterAnchorFactory.json @@ -0,0 +1,1564 @@ +{ + "contractName": "TestTypedConverterAnchorFactory", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "converterType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "name": "createAnchor", + "outputs": [ + { + "internalType": "contract IConverterAnchor", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTypedConverterAnchorFactory.sol\":\"TestTypedConverterAnchorFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTypedConverterAnchorFactory.sol\":{\"keccak256\":\"0xbc80b2411ae7f044bfc3f279b174baa7f07ede0f733db65af5ac695a25fe4fbb\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://6df762fe387687c8e29951aa5ee30388d1483a492aa1cd2054d6733d559c5471\",\"dweb:/ipfs/Qmc131UfqU2MLEAVe7G7MCKwgtLD2EZr7sVsYWPhjTFBiu\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/ERC20Token.sol\":{\"keccak256\":\"0xf64a993754bb4afcdfda9e8fe377c2c8a198f23b39e954f5ee3f9f2825958ebd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ee0b7fd792a589b8321f1f13686fe5d5ae949288b124c1a57e2ad895c87e915\",\"dweb:/ipfs/QmTCRx2G6rJAhX9FyYkV4Gx69owVDYSkjNGNFrJGQ7Xnik\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol\":{\"keccak256\":\"0xf5036eb68eef5c9e8c8065c359e4a6f360a1ff1371129dc6a01ebcab29f4c034\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://99f904a959fa0c1237afc6e02342300be0e5eb2d9d96e9f8cd29dd2c52d1837b\",\"dweb:/ipfs/QmNxF79PB1fDsWDpCurH97mRVMgm56jACjf2KNj8syw4DG\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol\":{\"keccak256\":\"0x5cfc15e7a23a9872059b0cea4d2ae902c3fc074a39e1c645036ce38ad47881ec\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://890ee09d24de5778e34c4c27d1377d83d378e8f4a13fcb94d5102f61d4749cce\",\"dweb:/ipfs/QmT89f61fmsUN1BVdebKxUc5VU7sitiP33LNk7TTtF18oj\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/SafeMath.sol\":{\"keccak256\":\"0x1ab7391a19ca8a3ad2f3c4a1074e080d4d76dfdb834637bdd0c1e6b6acdf28af\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://d6d8c99621ca884b72da2d84eddfec8ec8c5533915691d6eec94a07adf445608\",\"dweb:/ipfs/QmaXr6DN7VbfxfMn3PsTy7SAMgZVVXbdeaw11BsAjVL2x1\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516118673803806118678339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825164010000000081118282018810171561008257600080fd5b82525081516020918201929091019080838360005b838110156100af578181015183820152602001610097565b50505050905090810190601f1680156100dc5780820380516001836020036101000a031916815260200191505b50604052505081516100f6915060009060208401906100fd565b5050610190565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061013e57805160ff191683800117855561016b565b8280016001018555821561016b579182015b8281111561016b578251825591602001919060010190610150565b5061017792915061017b565b5090565b5b80821115610177576000815560010161017c565b6116c88061019f6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806306fdde03146100465780633e8ff43f146100c3578063a9fd4a2a146100e2575b600080fd5b61004e610230565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb6102be565b6040805161ffff9092168252519081900360200190f35b610214600480360360608110156100f857600080fd5b81019060208101813564010000000081111561011357600080fd5b82018360208201111561012557600080fd5b8035906020019184600183028401116401000000008311171561014757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561019a57600080fd5b8201836020820111156101ac57600080fd5b803590602001918460018302840111640100000000831117156101ce57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506102c39050565b604080516001600160a01b039092168252519081900360200190f35b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102b65780601f1061028b576101008083540402835291602001916102b6565b820191906000526020600020905b81548152906001019060200180831161029957829003601f168201915b505050505081565b600890565b600080600084846040516102d690610452565b60ff8216604082015260608082528454600260001961010060018416150201909116049082018190528190602082019060808301908790801561035a5780601f1061032f5761010080835404028352916020019161035a565b820191906000526020600020905b81548152906001019060200180831161033d57829003601f168201915b5050838103825285518152855160209182019187019080838360005b8381101561038e578181015183820152602001610376565b50505050905090810190601f1680156103bb5780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f0801580156103df573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561043157600080fd5b505af1158015610445573d6000803e3d6000fd5b5092979650505050505050565b611233806104608339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a2646970667358221220a616103ee78c72bf2a1a1be83b506f8fc1c4917607a2d487af3fc851c37be73664736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806306fdde03146100465780633e8ff43f146100c3578063a9fd4a2a146100e2575b600080fd5b61004e610230565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100cb6102be565b6040805161ffff9092168252519081900360200190f35b610214600480360360608110156100f857600080fd5b81019060208101813564010000000081111561011357600080fd5b82018360208201111561012557600080fd5b8035906020019184600183028401116401000000008311171561014757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561019a57600080fd5b8201836020820111156101ac57600080fd5b803590602001918460018302840111640100000000831117156101ce57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506102c39050565b604080516001600160a01b039092168252519081900360200190f35b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102b65780601f1061028b576101008083540402835291602001916102b6565b820191906000526020600020905b81548152906001019060200180831161029957829003601f168201915b505050505081565b600890565b600080600084846040516102d690610452565b60ff8216604082015260608082528454600260001961010060018416150201909116049082018190528190602082019060808301908790801561035a5780601f1061032f5761010080835404028352916020019161035a565b820191906000526020600020905b81548152906001019060200180831161033d57829003601f168201915b5050838103825285518152855160209182019187019080838360005b8381101561038e578181015183820152602001610376565b50505050905090810190601f1680156103bb5780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f0801580156103df573d6000803e3d6000fd5b509050806001600160a01b031663f2fde38b336040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b15801561043157600080fd5b505af1158015610445573d6000803e3d6000fd5b5092979650505050505050565b611233806104608339019056fe60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200123338038062001233833981810160405260608110156200004457600080fd5b81019080805160405193929190846401000000008211156200006557600080fd5b9083019060208201858111156200007b57600080fd5b82516401000000008111828201881017156200009657600080fd5b82525081516020918201929091019080838360005b83811015620000c5578181015183820152602001620000ab565b50505050905090810190601f168015620000f35780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011757600080fd5b9083019060208201858111156200012d57600080fd5b82516401000000008111828201881017156200014857600080fd5b82525081516020918201929091019080838360005b83811015620001775781810151838201526020016200015d565b50505050905090810190601f168015620001a55780820380516001836020036101000a031916815260200191505b5060405260200151600080546001600160a01b031916331781558551919350859250849184919062000211576040805162461bcd60e51b815260206004820152601060248201526f4552525f494e56414c49445f4e414d4560801b604482015290519081900360640190fd5b60008351116200025d576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d4d6535093d360721b604482015290519081900360640190fd5b835162000272906002906020870190620002bf565b50825162000288906003906020860190620002bf565b506004805460ff191660ff9390931692909217909155600581905533600090815260066020526040902055506200035b9350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030257805160ff191683800117855562000332565b8280016001018555821562000332579182015b828111156200033257825182559160200191906001019062000315565b506200034092915062000344565b5090565b5b8082111562000340576000815560010162000345565b610ec8806200036b6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806379ba5097116100ad578063a9059cbb11610071578063a9059cbb14610379578063bef97c87146103a5578063d4ee1d90146103ad578063dd62ed3e146103b5578063f2fde38b146103e357610121565b806379ba5097146102ed578063867904b4146102f55780638da5cb5b1461032157806395d89b4114610345578063a24835d11461034d57610121565b806323b872dd116100f457806323b872dd1461021e578063313ce5671461025457806354fd4d50146102725780635e35359e1461029157806370a08231146102c757610121565b806306fdde0314610126578063095ea7b3146101a35780631608f18f146101e357806318160ddd14610204575b600080fd5b61012e610409565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610494565b604080519115158252519081900360200190f35b610202600480360360208110156101f957600080fd5b5035151561057c565b005b61020c610596565b60408051918252519081900360200190f35b6101cf6004803603606081101561023457600080fd5b506001600160a01b0381358116916020810135909116906040013561059c565b61025c6105b9565b6040805160ff9092168252519081900360200190f35b61027a6105c2565b6040805161ffff9092168252519081900360200190f35b610202600480360360608110156102a757600080fd5b506001600160a01b038135811691602081013590911690604001356105c7565b61020c600480360360208110156102dd57600080fd5b50356001600160a01b0316610600565b610202610612565b6102026004803603604081101561030b57600080fd5b506001600160a01b0381351690602001356106c9565b61032961079f565b604080516001600160a01b039092168252519081900360200190f35b61012e6107ae565b6102026004803603604081101561036357600080fd5b506001600160a01b038135169060200135610809565b6101cf6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356108c3565b6101cf6108de565b6103296108e7565b61020c600480360360408110156103cb57600080fd5b506001600160a01b03813581169160200135166108f6565b610202600480360360208110156103f957600080fd5b50356001600160a01b0316610913565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b6000826104a081610991565b8215806104ce57503360009081526007602090815260408083206001600160a01b0388168452909152902054155b610514576040805162461bcd60e51b815260206004820152601260248201527111549497d253959053125117d05353d5539560721b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6105846109e5565b6008805460ff19169115919091179055565b60055481565b60006105a6610a3a565b6105b1848484610a8a565b949350505050565b60045460ff1681565b600481565b6105cf6109e5565b826105d981610991565b826105e381610991565b836105ed81610b89565b6105f8868686610bdd565b505050505050565b60066020526000908152604090205481565b6001546001600160a01b03163314610665576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6106d16109e5565b816106db81610991565b826106e581610b89565b6005546106f29084610d3d565b6005556001600160a01b0384166000908152600660205260409020546107189084610d3d565b6001600160a01b03851660009081526006602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a16040805184815290516001600160a01b03861691600091600080516020610e738339815191529181900360200190a350505050565b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b6108116109e5565b6001600160a01b0382166000908152600660205260409020546108349082610d86565b6001600160a01b03831660009081526006602052604090205560055461085a9082610d86565b6005556040805182815290516000916001600160a01b03851691600080516020610e738339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b60006108cd610a3a565b6108d78383610dd3565b9392505050565b60085460ff1681565b6001546001600160a01b031681565b600760209081526000928352604080842090915290825290205481565b61091b6109e5565b6000546001600160a01b038281169116141561096f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166109e2576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6000546001600160a01b03163314610a38576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b60085460ff16610a38576040805162461bcd60e51b815260206004820152601660248201527511549497d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b600083610a9681610991565b83610aa081610991565b6001600160a01b0386166000908152600760209081526040808320338452909152902054610ace9085610d86565b6001600160a01b038716600081815260076020908152604080832033845282528083209490945591815260069091522054610b099085610d86565b6001600160a01b038088166000908152600660205260408082209390935590871681522054610b389085610d3d565b6001600160a01b0380871660008181526006602090815260409182902094909455805188815290519193928a1692600080516020610e7383398151915292918290030190a350600195945050505050565b6001600160a01b0381163014156109e2576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310610c5a5780518252601f199092019160209182019101610c3b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610cbc576040519150601f19603f3d011682016040523d82523d6000602084013e610cc1565b606091505b5091509150818015610cef575080511580610cef5750808060200190516020811015610cec57600080fd5b50515b610d36576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5050505050565b6000828201838110156108d7576040805162461bcd60e51b815260206004820152600c60248201526b4552525f4f564552464c4f5760a01b604482015290519081900360640190fd5b600081831015610dcd576040805162461bcd60e51b815260206004820152600d60248201526c4552525f554e444552464c4f5760981b604482015290519081900360640190fd5b50900390565b600082610ddf81610991565b33600090815260066020526040902054610df99084610d86565b33600090815260066020526040808220929092556001600160a01b03861681522054610e259084610d3d565b6001600160a01b038516600081815260066020908152604091829020939093558051868152905191923392600080516020610e738339815191529281900390910190a3506001939250505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d062eb319db2db22c11903c935b69a66b9513479c3c65c965f0b19eb73aa4f9464736f6c634300060c0033a2646970667358221220a616103ee78c72bf2a1a1be83b506f8fc1c4917607a2d487af3fc851c37be73664736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "232:562:47:-:0;;;336:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;336:69:47;;;;;;;;;;-1:-1:-1;336:69:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;336:69:47;;-1:-1:-1;;386:12:47;;;;-1:-1:-1;386:4:47;;:12;;;;;:::i;:::-;;336:69;232:562;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;232:562:47;;;-1:-1:-1;232:562:47;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "232:562:47:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;311:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;411:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;507:285;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;507:285:47;;;;;;;;-1:-1:-1;507:285:47;;-1:-1:-1;;507:285:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;507:285:47;;-1:-1:-1;;;507:285:47;;;;;-1:-1:-1;507:285:47;;-1:-1:-1;507:285:47:i;:::-;;;;-1:-1:-1;;;;;507:285:47;;;;;;;;;;;;;;311:18;;;;;;;;;;;;;;;-1:-1:-1;;311:18:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;411:90::-;493:1;411:90;:::o;507:285::-;622:16;650:23;691:4;697:7;706:9;676:40;;;;;:::i;:::-;;;;;;;;;;;;;;;-1:-1:-1;;676:40:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;676:40:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;650:66;;726:6;-1:-1:-1;;;;;726:24:47;;751:10;726:36;;;;;;;;;;;;;-1:-1:-1;;;;;726:36:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;779:6:47;;507:285;-1:-1:-1;;;;;;;507:285:47:o;-1:-1:-1:-;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../converter/interfaces/IConverterAnchor.sol\";\nimport \"../converter/interfaces/ITypedConverterAnchorFactory.sol\";\nimport \"../token/SmartToken.sol\";\n\ncontract TestTypedConverterAnchorFactory is ITypedConverterAnchorFactory {\n string public name;\n\n constructor(string memory _name) public {\n name = _name;\n }\n\n function converterType() external pure override returns (uint16) {\n return 8;\n }\n\n function createAnchor(string memory /*_name */, string memory _symbol, uint8 _decimals) external override returns (IConverterAnchor) {\n IConverterAnchor anchor = new SmartToken(name, _symbol, _decimals);\n anchor.transferOwnership(msg.sender);\n return anchor;\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTypedConverterAnchorFactory.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTypedConverterAnchorFactory.sol", + "exportedSymbols": { + "TestTypedConverterAnchorFactory": [ + 20339 + ] + }, + "id": 20340, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20281, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:47" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../converter/interfaces/IConverterAnchor.sol", + "id": 20282, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 13350, + "src": "75:54:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "../converter/interfaces/ITypedConverterAnchorFactory.sol", + "id": 20283, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 13681, + "src": "130:66:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../token/SmartToken.sol", + "id": 20284, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 21395, + "src": "197:33:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20285, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "276:28:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 20286, + "nodeType": "InheritanceSpecifier", + "src": "276:28:47" + } + ], + "contractDependencies": [ + 13680, + 21394 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20339, + "linearizedBaseContracts": [ + 20339, + 13680 + ], + "name": "TestTypedConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20288, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20339, + "src": "311:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20287, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "311:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20297, + "nodeType": "Block", + "src": "376:29:47", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20293, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20288, + "src": "386:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20294, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20290, + "src": "393:5:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "386:12:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20296, + "nodeType": "ExpressionStatement", + "src": "386:12:47" + } + ] + }, + "documentation": null, + "id": 20298, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20290, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20298, + "src": "348:19:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20289, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "348:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "347:21:47" + }, + "returnParameters": { + "id": 20292, + "nodeType": "ParameterList", + "parameters": [], + "src": "376:0:47" + }, + "scope": 20339, + "src": "336:69:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13668 + ], + "body": { + "id": 20306, + "nodeType": "Block", + "src": "476:25:47", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "38", + "id": 20304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "493:1:47", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "functionReturnParameters": 20303, + "id": 20305, + "nodeType": "Return", + "src": "486:8:47" + } + ] + }, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 20307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "450:8:47" + }, + "parameters": { + "id": 20299, + "nodeType": "ParameterList", + "parameters": [], + "src": "433:2:47" + }, + "returnParameters": { + "id": 20303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20302, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20307, + "src": "468:6:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 20301, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "468:6:47", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "467:8:47" + }, + "scope": 20339, + "src": "411:90:47", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13679 + ], + "body": { + "id": 20337, + "nodeType": "Block", + "src": "640:152:47", + "statements": [ + { + "assignments": [ + 20320 + ], + "declarations": [ + { + "constant": false, + "id": 20320, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20337, + "src": "650:23:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 20319, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "650:16:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 20327, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20323, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20288, + "src": "691:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 20324, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20311, + "src": "697:7:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20325, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20313, + "src": "706:9:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 20322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "676:14:47", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 20321, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "680:10:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 20326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "676:40:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "650:66:47" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20331, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "751:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "751:10:47", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 20328, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20320, + "src": "726:6:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 20330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "726:24:47", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 20333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:36:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20334, + "nodeType": "ExpressionStatement", + "src": "726:36:47" + }, + { + "expression": { + "argumentTypes": null, + "id": 20335, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20320, + "src": "779:6:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 20318, + "id": 20336, + "nodeType": "Return", + "src": "772:13:47" + } + ] + }, + "documentation": null, + "functionSelector": "a9fd4a2a", + "id": 20338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20315, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "604:8:47" + }, + "parameters": { + "id": 20314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20309, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "529:13:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20308, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "529:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20311, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "555:21:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20310, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "555:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20313, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "578:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20312, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "578:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "528:66:47" + }, + "returnParameters": { + "id": 20318, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20317, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "622:16:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 20316, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "622:16:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "621:18:47" + }, + "scope": 20339, + "src": "507:285:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 20340, + "src": "232:562:47" + } + ], + "src": "51:744:47" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/helpers/TestTypedConverterAnchorFactory.sol", + "exportedSymbols": { + "TestTypedConverterAnchorFactory": [ + 20339 + ] + }, + "id": 20340, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 20281, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:47" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol", + "file": "../converter/interfaces/IConverterAnchor.sol", + "id": 20282, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 13350, + "src": "75:54:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol", + "file": "../converter/interfaces/ITypedConverterAnchorFactory.sol", + "id": 20283, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 13681, + "src": "130:66:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/SmartToken.sol", + "file": "../token/SmartToken.sol", + "id": 20284, + "nodeType": "ImportDirective", + "scope": 20340, + "sourceUnit": 21395, + "src": "197:33:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 20285, + "name": "ITypedConverterAnchorFactory", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13680, + "src": "276:28:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITypedConverterAnchorFactory_$13680", + "typeString": "contract ITypedConverterAnchorFactory" + } + }, + "id": 20286, + "nodeType": "InheritanceSpecifier", + "src": "276:28:47" + } + ], + "contractDependencies": [ + 13680, + 21394 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 20339, + "linearizedBaseContracts": [ + 20339, + 13680 + ], + "name": "TestTypedConverterAnchorFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "06fdde03", + "id": 20288, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20339, + "src": "311:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 20287, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "311:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 20297, + "nodeType": "Block", + "src": "376:29:47", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 20295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 20293, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20288, + "src": "386:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 20294, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20290, + "src": "393:5:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "386:12:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 20296, + "nodeType": "ExpressionStatement", + "src": "386:12:47" + } + ] + }, + "documentation": null, + "id": 20298, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 20291, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20290, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20298, + "src": "348:19:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20289, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "348:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "347:21:47" + }, + "returnParameters": { + "id": 20292, + "nodeType": "ParameterList", + "parameters": [], + "src": "376:0:47" + }, + "scope": 20339, + "src": "336:69:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 13668 + ], + "body": { + "id": 20306, + "nodeType": "Block", + "src": "476:25:47", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "38", + "id": 20304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "493:1:47", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "functionReturnParameters": 20303, + "id": 20305, + "nodeType": "Return", + "src": "486:8:47" + } + ] + }, + "documentation": null, + "functionSelector": "3e8ff43f", + "id": 20307, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "converterType", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "450:8:47" + }, + "parameters": { + "id": 20299, + "nodeType": "ParameterList", + "parameters": [], + "src": "433:2:47" + }, + "returnParameters": { + "id": 20303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20302, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20307, + "src": "468:6:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 20301, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "468:6:47", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "467:8:47" + }, + "scope": 20339, + "src": "411:90:47", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 13679 + ], + "body": { + "id": 20337, + "nodeType": "Block", + "src": "640:152:47", + "statements": [ + { + "assignments": [ + 20320 + ], + "declarations": [ + { + "constant": false, + "id": 20320, + "mutability": "mutable", + "name": "anchor", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20337, + "src": "650:23:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 20319, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "650:16:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 20327, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 20323, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20288, + "src": "691:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 20324, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20311, + "src": "697:7:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 20325, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20313, + "src": "706:9:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 20322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "676:14:47", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_uint8_$returns$_t_contract$_SmartToken_$21394_$", + "typeString": "function (string memory,string memory,uint8) returns (contract SmartToken)" + }, + "typeName": { + "contractScope": null, + "id": 20321, + "name": "SmartToken", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21394, + "src": "680:10:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + } + }, + "id": 20326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "676:40:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_SmartToken_$21394", + "typeString": "contract SmartToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "650:66:47" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20331, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "751:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 20332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "751:10:47", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 20328, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20320, + "src": "726:6:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "id": 20330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 23178, + "src": "726:24:47", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 20333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:36:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 20334, + "nodeType": "ExpressionStatement", + "src": "726:36:47" + }, + { + "expression": { + "argumentTypes": null, + "id": 20335, + "name": "anchor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20320, + "src": "779:6:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "functionReturnParameters": 20318, + "id": 20336, + "nodeType": "Return", + "src": "772:13:47" + } + ] + }, + "documentation": null, + "functionSelector": "a9fd4a2a", + "id": 20338, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAnchor", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 20315, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "604:8:47" + }, + "parameters": { + "id": 20314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20309, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "529:13:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20308, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "529:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20311, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "555:21:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 20310, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "555:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 20313, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "578:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 20312, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "578:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "528:66:47" + }, + "returnParameters": { + "id": 20318, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20317, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 20338, + "src": "622:16:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + }, + "typeName": { + "contractScope": null, + "id": 20316, + "name": "IConverterAnchor", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13349, + "src": "622:16:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IConverterAnchor_$13349", + "typeString": "contract IConverterAnchor" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "621:18:47" + }, + "scope": 20339, + "src": "507:285:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 20340, + "src": "232:562:47" + } + ], + "src": "51:744:47" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-11-09T23:40:29.197Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TokenHandler.json b/apps/cic-eth/tests/testdata/bancor/TokenHandler.json new file mode 100644 index 00000000..f6c6a9af --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TokenHandler.json @@ -0,0 +1,5249 @@ +{ + "contractName": "TokenHandler", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":\"TokenHandler\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122043249e53cab8279fb6ffb75d00d6be49301a7de6016b03d5a2e4d84d7a2ea3a764736f6c634300060c0033", + "deployedBytecode": "0x6080604052600080fdfea264697066735822122043249e53cab8279fb6ffb75d00d6be49301a7de6016b03d5a2e4d84d7a2ea3a764736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "122:2418:61:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "122:2418:61:-:0;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../token/interfaces/IERC20Token.sol\";\n\ncontract TokenHandler {\n bytes4 private constant APPROVE_FUNC_SELECTOR = bytes4(keccak256(\"approve(address,uint256)\"));\n bytes4 private constant TRANSFER_FUNC_SELECTOR = bytes4(keccak256(\"transfer(address,uint256)\"));\n bytes4 private constant TRANSFER_FROM_FUNC_SELECTOR = bytes4(keccak256(\"transferFrom(address,address,uint256)\"));\n\n /**\n * @dev executes the ERC20 token's `approve` function and reverts upon failure\n * the main purpose of this function is to prevent a non standard ERC20 token\n * from failing silently\n *\n * @param _token ERC20 token address\n * @param _spender approved address\n * @param _value allowance amount\n */\n function safeApprove(IERC20Token _token, address _spender, uint256 _value) internal {\n (bool success, bytes memory data) = address(_token).call(abi.encodeWithSelector(APPROVE_FUNC_SELECTOR, _spender, _value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'ERR_APPROVE_FAILED');\n }\n\n /**\n * @dev executes the ERC20 token's `transfer` function and reverts upon failure\n * the main purpose of this function is to prevent a non standard ERC20 token\n * from failing silently\n *\n * @param _token ERC20 token address\n * @param _to target address\n * @param _value transfer amount\n */\n function safeTransfer(IERC20Token _token, address _to, uint256 _value) internal {\n (bool success, bytes memory data) = address(_token).call(abi.encodeWithSelector(TRANSFER_FUNC_SELECTOR, _to, _value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'ERR_TRANSFER_FAILED');\n }\n\n /**\n * @dev executes the ERC20 token's `transferFrom` function and reverts upon failure\n * the main purpose of this function is to prevent a non standard ERC20 token\n * from failing silently\n *\n * @param _token ERC20 token address\n * @param _from source address\n * @param _to target address\n * @param _value transfer amount\n */\n function safeTransferFrom(IERC20Token _token, address _from, address _to, uint256 _value) internal {\n (bool success, bytes memory data) = address(_token).call(abi.encodeWithSelector(TRANSFER_FROM_FUNC_SELECTOR, _from, _to, _value));\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'ERR_TRANSFER_FROM_FAILED');\n }\n}\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "exportedSymbols": { + "TokenHandler": [ + 22526 + ] + }, + "id": 22527, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22356, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:61" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../token/interfaces/IERC20Token.sol", + "id": 22357, + "nodeType": "ImportDirective", + "scope": 22527, + "sourceUnit": 21128, + "src": "75:45:61", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 22526, + "linearizedBaseContracts": [ + 22526 + ], + "name": "TokenHandler", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 22365, + "mutability": "constant", + "name": "APPROVE_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "150:93:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22358, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "150:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "617070726f766528616464726573732c75696e7432353629", + "id": 22362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "215:26:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba", + "typeString": "literal_string \"approve(address,uint256)\"" + }, + "value": "approve(address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba", + "typeString": "literal_string \"approve(address,uint256)\"" + } + ], + "id": 22361, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "205:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "205:37:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "198:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22359, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "198:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "198:45:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 22373, + "mutability": "constant", + "name": "TRANSFER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "249:95:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22366, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "249:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "7472616e7366657228616464726573732c75696e7432353629", + "id": 22370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "315:27:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b", + "typeString": "literal_string \"transfer(address,uint256)\"" + }, + "value": "transfer(address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b", + "typeString": "literal_string \"transfer(address,uint256)\"" + } + ], + "id": 22369, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "305:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "305:38:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "298:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22367, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "298:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "298:46:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 22381, + "mutability": "constant", + "name": "TRANSFER_FROM_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "350:112:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22374, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "350:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629", + "id": 22378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "421:39:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b", + "typeString": "literal_string \"transferFrom(address,address,uint256)\"" + }, + "value": "transferFrom(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b", + "typeString": "literal_string \"transferFrom(address,address,uint256)\"" + } + ], + "id": 22377, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "411:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "411:50:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "404:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22375, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "404:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "404:58:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 22427, + "nodeType": "Block", + "src": "899:236:61", + "statements": [ + { + "assignments": [ + 22392, + 22394 + ], + "declarations": [ + { + "constant": false, + "id": 22392, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22427, + "src": "910:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "910:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22394, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22427, + "src": "924:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22393, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "924:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22407, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22402, + "name": "APPROVE_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22365, + "src": "989:21:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22403, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22386, + "src": "1012:8:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22404, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22388, + "src": "1022:6:61", + "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": 22400, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "966:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "966:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "966:63:61", + "tryCall": false, + "typeDescriptions": { + "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": 22397, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22384, + "src": "953:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "945:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "945:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "945:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "945:20:61", + "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": 22406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "945:85:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "909:121:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22409, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22392, + "src": "1048:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22410, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22394, + "src": "1060:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1060:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1075:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1060:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22416, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22394, + "src": "1091:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1098:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22417, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1098:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22419, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1097:6:61", + "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": 22414, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1080:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1080:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1080:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1060:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22422, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1059:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1048:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f415050524f56455f4641494c4544", + "id": 22424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:20:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2db9d067bbe32151e43b44f8c67b0617282758d2c28da1e10a0a607f1e6ac14a", + "typeString": "literal_string \"ERR_APPROVE_FAILED\"" + }, + "value": "ERR_APPROVE_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2db9d067bbe32151e43b44f8c67b0617282758d2c28da1e10a0a607f1e6ac14a", + "typeString": "literal_string \"ERR_APPROVE_FAILED\"" + } + ], + "id": 22408, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1040:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1040:88:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22426, + "nodeType": "ExpressionStatement", + "src": "1040:88:61" + } + ] + }, + "documentation": { + "id": 22382, + "nodeType": "StructuredDocumentation", + "src": "469:341:61", + "text": " @dev executes the ERC20 token's `approve` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 22428, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22384, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "836:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22383, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "836:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22386, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "856:16:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "856:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22388, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "874:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "874:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:54:61" + }, + "returnParameters": { + "id": 22390, + "nodeType": "ParameterList", + "parameters": [], + "src": "899:0:61" + }, + "scope": 22526, + "src": "815:320:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22474, + "nodeType": "Block", + "src": "1565:232:61", + "statements": [ + { + "assignments": [ + 22439, + 22441 + ], + "declarations": [ + { + "constant": false, + "id": 22439, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22474, + "src": "1575:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22438, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1575:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22441, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22474, + "src": "1589:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22440, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1589:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22454, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22449, + "name": "TRANSFER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22373, + "src": "1654:22:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22450, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22433, + "src": "1678:3:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22451, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22435, + "src": "1683:6:61", + "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": 22447, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1631:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1631:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1631:59:61", + "tryCall": false, + "typeDescriptions": { + "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": 22444, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22431, + "src": "1618:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1610:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1610:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1610:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1610:20:61", + "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": 22453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1610:81:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1574:117:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22456, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22439, + "src": "1709:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22457, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22441, + "src": "1721:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1721:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1736:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1721:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22463, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22441, + "src": "1752:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1759:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1759:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22466, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1758:6:61", + "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": 22461, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1741:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1741:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1741:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1721:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22469, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1720:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1709:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e534645525f4641494c4544", + "id": 22471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1768:21:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c9252e500ac7052178e0516284a4bfdb9c18736079c4cc7803b8d1294a8fb98c", + "typeString": "literal_string \"ERR_TRANSFER_FAILED\"" + }, + "value": "ERR_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c9252e500ac7052178e0516284a4bfdb9c18736079c4cc7803b8d1294a8fb98c", + "typeString": "literal_string \"ERR_TRANSFER_FAILED\"" + } + ], + "id": 22455, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1701:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1701:89:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22473, + "nodeType": "ExpressionStatement", + "src": "1701:89:61" + } + ] + }, + "documentation": { + "id": 22429, + "nodeType": "StructuredDocumentation", + "src": "1141:339:61", + "text": " @dev executes the ERC20 token's `transfer` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _to target address\n @param _value transfer amount" + }, + "id": 22475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22431, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1507:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22430, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1507:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22433, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1527:11:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1527:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22435, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1540:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1540:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1506:49:61" + }, + "returnParameters": { + "id": 22437, + "nodeType": "ParameterList", + "parameters": [], + "src": "1565:0:61" + }, + "scope": 22526, + "src": "1485:312:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22524, + "nodeType": "Block", + "src": "2289:249:61", + "statements": [ + { + "assignments": [ + 22488, + 22490 + ], + "declarations": [ + { + "constant": false, + "id": 22488, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22524, + "src": "2299:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22487, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2299:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22490, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22524, + "src": "2313:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22489, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2313:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22504, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22498, + "name": "TRANSFER_FROM_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22381, + "src": "2378:27:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22499, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22480, + "src": "2407:5:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22500, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22482, + "src": "2414:3:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22501, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22484, + "src": "2419:6:61", + "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": 22496, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2355:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2355:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2355:71:61", + "tryCall": false, + "typeDescriptions": { + "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": 22493, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22478, + "src": "2342:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2334:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22491, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2334:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:20:61", + "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": 22503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:93:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2298:129:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22506, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22488, + "src": "2445:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22507, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22490, + "src": "2457:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2457:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2472:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2457:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22513, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22490, + "src": "2488:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2495:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2495:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22516, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2494:6:61", + "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": 22511, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2477:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22512, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2477:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2477:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2457:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22519, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2456:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2445:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e534645525f46524f4d5f4641494c4544", + "id": 22521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2504:26:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29636ff9911adbbcd58b0c1dc0748d2dd21c5759d7ab755d8ffa50cf291fa76c", + "typeString": "literal_string \"ERR_TRANSFER_FROM_FAILED\"" + }, + "value": "ERR_TRANSFER_FROM_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29636ff9911adbbcd58b0c1dc0748d2dd21c5759d7ab755d8ffa50cf291fa76c", + "typeString": "literal_string \"ERR_TRANSFER_FROM_FAILED\"" + } + ], + "id": 22505, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2437:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2437:94:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22523, + "nodeType": "ExpressionStatement", + "src": "2437:94:61" + } + ] + }, + "documentation": { + "id": 22476, + "nodeType": "StructuredDocumentation", + "src": "1803:382:61", + "text": " @dev executes the ERC20 token's `transferFrom` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 22525, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22478, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2216:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22477, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2216:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22480, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2236:13:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2236:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22482, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2251:11:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2251:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22484, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2264:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2264:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2215:64:61" + }, + "returnParameters": { + "id": 22486, + "nodeType": "ParameterList", + "parameters": [], + "src": "2289:0:61" + }, + "scope": 22526, + "src": "2190:348:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22527, + "src": "122:2418:61" + } + ], + "src": "51:2490:61" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "exportedSymbols": { + "TokenHandler": [ + 22526 + ] + }, + "id": 22527, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22356, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "51:23:61" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../token/interfaces/IERC20Token.sol", + "id": 22357, + "nodeType": "ImportDirective", + "scope": 22527, + "sourceUnit": 21128, + "src": "75:45:61", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 22526, + "linearizedBaseContracts": [ + 22526 + ], + "name": "TokenHandler", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 22365, + "mutability": "constant", + "name": "APPROVE_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "150:93:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22358, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "150:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "617070726f766528616464726573732c75696e7432353629", + "id": 22362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "215:26:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba", + "typeString": "literal_string \"approve(address,uint256)\"" + }, + "value": "approve(address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba", + "typeString": "literal_string \"approve(address,uint256)\"" + } + ], + "id": 22361, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "205:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "205:37:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "198:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22359, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "198:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "198:45:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 22373, + "mutability": "constant", + "name": "TRANSFER_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "249:95:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22366, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "249:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "7472616e7366657228616464726573732c75696e7432353629", + "id": 22370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "315:27:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b", + "typeString": "literal_string \"transfer(address,uint256)\"" + }, + "value": "transfer(address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b", + "typeString": "literal_string \"transfer(address,uint256)\"" + } + ], + "id": 22369, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "305:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "305:38:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "298:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22367, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "298:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "298:46:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 22381, + "mutability": "constant", + "name": "TRANSFER_FROM_FUNC_SELECTOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22526, + "src": "350:112:61", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 22374, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "350:6:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629", + "id": 22378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "421:39:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b", + "typeString": "literal_string \"transferFrom(address,address,uint256)\"" + }, + "value": "transferFrom(address,address,uint256)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b", + "typeString": "literal_string \"transferFrom(address,address,uint256)\"" + } + ], + "id": 22377, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "411:9:61", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 22379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "411:50:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 22376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "404:6:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes4_$", + "typeString": "type(bytes4)" + }, + "typeName": { + "id": 22375, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "404:6:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "404:58:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "private" + }, + { + "body": { + "id": 22427, + "nodeType": "Block", + "src": "899:236:61", + "statements": [ + { + "assignments": [ + 22392, + 22394 + ], + "declarations": [ + { + "constant": false, + "id": 22392, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22427, + "src": "910:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22391, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "910:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22394, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22427, + "src": "924:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22393, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "924:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22407, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22402, + "name": "APPROVE_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22365, + "src": "989:21:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22403, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22386, + "src": "1012:8:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22404, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22388, + "src": "1022:6:61", + "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": 22400, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "966:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "966:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "966:63:61", + "tryCall": false, + "typeDescriptions": { + "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": 22397, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22384, + "src": "953:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "945:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "945:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "945:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "945:20:61", + "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": 22406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "945:85:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "909:121:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22409, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22392, + "src": "1048:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22410, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22394, + "src": "1060:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1060:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1075:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1060:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22416, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22394, + "src": "1091:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1098:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22417, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1098:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22419, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1097:6:61", + "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": 22414, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1080:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1080:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1080:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1060:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22422, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1059:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1048:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f415050524f56455f4641494c4544", + "id": 22424, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1107:20:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2db9d067bbe32151e43b44f8c67b0617282758d2c28da1e10a0a607f1e6ac14a", + "typeString": "literal_string \"ERR_APPROVE_FAILED\"" + }, + "value": "ERR_APPROVE_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2db9d067bbe32151e43b44f8c67b0617282758d2c28da1e10a0a607f1e6ac14a", + "typeString": "literal_string \"ERR_APPROVE_FAILED\"" + } + ], + "id": 22408, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1040:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1040:88:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22426, + "nodeType": "ExpressionStatement", + "src": "1040:88:61" + } + ] + }, + "documentation": { + "id": 22382, + "nodeType": "StructuredDocumentation", + "src": "469:341:61", + "text": " @dev executes the ERC20 token's `approve` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _spender approved address\n @param _value allowance amount" + }, + "id": 22428, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22384, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "836:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22383, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "836:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22386, + "mutability": "mutable", + "name": "_spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "856:16:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "856:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22388, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22428, + "src": "874:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "874:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:54:61" + }, + "returnParameters": { + "id": 22390, + "nodeType": "ParameterList", + "parameters": [], + "src": "899:0:61" + }, + "scope": 22526, + "src": "815:320:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22474, + "nodeType": "Block", + "src": "1565:232:61", + "statements": [ + { + "assignments": [ + 22439, + 22441 + ], + "declarations": [ + { + "constant": false, + "id": 22439, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22474, + "src": "1575:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22438, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1575:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22441, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22474, + "src": "1589:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22440, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1589:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22454, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22449, + "name": "TRANSFER_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22373, + "src": "1654:22:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22450, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22433, + "src": "1678:3:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22451, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22435, + "src": "1683:6:61", + "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": 22447, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1631:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1631:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1631:59:61", + "tryCall": false, + "typeDescriptions": { + "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": 22444, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22431, + "src": "1618:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1610:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22442, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1610:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1610:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1610:20:61", + "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": 22453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1610:81:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1574:117:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22456, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22439, + "src": "1709:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22457, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22441, + "src": "1721:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1721:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1736:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1721:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22463, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22441, + "src": "1752:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1759:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1759:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22466, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1758:6:61", + "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": 22461, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1741:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1741:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1741:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1721:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22469, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1720:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1709:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e534645525f4641494c4544", + "id": 22471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1768:21:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c9252e500ac7052178e0516284a4bfdb9c18736079c4cc7803b8d1294a8fb98c", + "typeString": "literal_string \"ERR_TRANSFER_FAILED\"" + }, + "value": "ERR_TRANSFER_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c9252e500ac7052178e0516284a4bfdb9c18736079c4cc7803b8d1294a8fb98c", + "typeString": "literal_string \"ERR_TRANSFER_FAILED\"" + } + ], + "id": 22455, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1701:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1701:89:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22473, + "nodeType": "ExpressionStatement", + "src": "1701:89:61" + } + ] + }, + "documentation": { + "id": 22429, + "nodeType": "StructuredDocumentation", + "src": "1141:339:61", + "text": " @dev executes the ERC20 token's `transfer` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _to target address\n @param _value transfer amount" + }, + "id": 22475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22431, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1507:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22430, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1507:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22433, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1527:11:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1527:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22435, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22475, + "src": "1540:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22434, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1540:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1506:49:61" + }, + "returnParameters": { + "id": 22437, + "nodeType": "ParameterList", + "parameters": [], + "src": "1565:0:61" + }, + "scope": 22526, + "src": "1485:312:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22524, + "nodeType": "Block", + "src": "2289:249:61", + "statements": [ + { + "assignments": [ + 22488, + 22490 + ], + "declarations": [ + { + "constant": false, + "id": 22488, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22524, + "src": "2299:12:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22487, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2299:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22490, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22524, + "src": "2313:17:61", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 22489, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2313:5:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22504, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22498, + "name": "TRANSFER_FROM_FUNC_SELECTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22381, + "src": "2378:27:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 22499, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22480, + "src": "2407:5:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22500, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22482, + "src": "2414:3:61", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22501, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22484, + "src": "2419:6:61", + "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": 22496, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2355:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22497, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2355:22:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 22502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2355:71:61", + "tryCall": false, + "typeDescriptions": { + "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": 22493, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22478, + "src": "2342:6:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2334:7:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22491, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2334:7:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:15:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:20:61", + "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": 22503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:93:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2298:129:61" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22506, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22488, + "src": "2445:7:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 22518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22507, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22490, + "src": "2457:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 22508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2457:11:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22509, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2472:1:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2457:16:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22513, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22490, + "src": "2488:4:61", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 22515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2495:4:61", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 22514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2495:4:61", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 22516, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2494:6:61", + "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": 22511, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2477:3:61", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 22512, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2477:10:61", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 22517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2477:24:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2457:44:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 22519, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2456:46:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2445:57:61", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5452414e534645525f46524f4d5f4641494c4544", + "id": 22521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2504:26:61", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_29636ff9911adbbcd58b0c1dc0748d2dd21c5759d7ab755d8ffa50cf291fa76c", + "typeString": "literal_string \"ERR_TRANSFER_FROM_FAILED\"" + }, + "value": "ERR_TRANSFER_FROM_FAILED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_29636ff9911adbbcd58b0c1dc0748d2dd21c5759d7ab755d8ffa50cf291fa76c", + "typeString": "literal_string \"ERR_TRANSFER_FROM_FAILED\"" + } + ], + "id": 22505, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2437:7:61", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2437:94:61", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22523, + "nodeType": "ExpressionStatement", + "src": "2437:94:61" + } + ] + }, + "documentation": { + "id": 22476, + "nodeType": "StructuredDocumentation", + "src": "1803:382:61", + "text": " @dev executes the ERC20 token's `transferFrom` function and reverts upon failure\n the main purpose of this function is to prevent a non standard ERC20 token\n from failing silently\n @param _token ERC20 token address\n @param _from source address\n @param _to target address\n @param _value transfer amount" + }, + "id": 22525, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22485, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22478, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2216:18:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22477, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "2216:11:61", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22480, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2236:13:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2236:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22482, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2251:11:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2251:7:61", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22484, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22525, + "src": "2264:14:61", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22483, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2264:7:61", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2215:64:61" + }, + "returnParameters": { + "id": 22486, + "nodeType": "ParameterList", + "parameters": [], + "src": "2289:0:61" + }, + "scope": 22526, + "src": "2190:348:61", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22527, + "src": "122:2418:61" + } + ], + "src": "51:2490:61" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.845Z", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/TokenHolder.json b/apps/cic-eth/tests/testdata/bancor/TokenHolder.json new file mode 100644 index 00000000..bde64dff --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/TokenHolder.json @@ -0,0 +1,1293 @@ +{ + "contractName": "TokenHolder", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Token", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. Note that we use the non standard ERC-20 interface which has no return value for transfer in order to support both non standard as well as standard token contracts. see https://github.com/ethereum/solidity/issues/4116\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}},\"withdrawTokens(address,address,uint256)\":{\"details\":\"withdraws tokens held by the contract and sends them to an account can only be called by the owner\",\"params\":{\"_amount\":\"amount to withdraw\",\"_to\":\"account to receive the new amount\",\"_token\":\"ERC20 token contract address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":\"TokenHolder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol\":{\"keccak256\":\"0xf65b87e3bf3343e368da67878c19d1a043a1025b10e9053d3562b53b4aa447fe\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b85c5d96642c14c53b8d5062eecd4d27d3bdb457d1d0f130900763a75a512eb7\",\"dweb:/ipfs/QmUHtbqC1khqnRZXYn11Aykus4m5e9MVNUWqorxhpr5ipJ\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol\":{\"keccak256\":\"0xac6bc102eff6c1bb8c1bb4466eab50322c7c101e2e33d577dd3035f106627577\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9fdbda2d4509260ca3dd43654bdaea07ef18a5e04213ff16e38e3b4abad78a5f\",\"dweb:/ipfs/QmPb69rzX1DwDeEhhfzqQNS3U2bfGcFjXNaV5ffHsZHzfP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561050d806100326000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80635e35359e1461005c57806379ba5097146100945780638da5cb5b1461009c578063d4ee1d90146100c0578063f2fde38b146100c8575b600080fd5b6100926004803603606081101561007257600080fd5b506001600160a01b038135811691602081013590911690604001356100ee565b005b610092610127565b6100a46101de565b604080516001600160a01b039092168252519081900360200190f35b6100a46101ed565b610092600480360360208110156100de57600080fd5b50356001600160a01b03166101fc565b6100f661027a565b82610100816102cf565b8261010a816102cf565b8361011481610323565b61011f868686610377565b505050505050565b6001546001600160a01b0316331461017a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61020461027a565b6000546001600160a01b0382811691161415610258576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102cd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116610320576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415610320576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106103f45780518252601f1990920191602091820191016103d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610456576040519150601f19603f3d011682016040523d82523d6000602084013e61045b565b606091505b5091509150818015610489575080511580610489575080806020019051602081101561048657600080fd5b50515b6104d0576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505050505056fea2646970667358221220f7416415e0c8fb660caa2dddf34ea5232522a81a698089d61182fbcd82d0782f64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c80635e35359e1461005c57806379ba5097146100945780638da5cb5b1461009c578063d4ee1d90146100c0578063f2fde38b146100c8575b600080fd5b6100926004803603606081101561007257600080fd5b506001600160a01b038135811691602081013590911690604001356100ee565b005b610092610127565b6100a46101de565b604080516001600160a01b039092168252519081900360200190f35b6100a46101ed565b610092600480360360208110156100de57600080fd5b50356001600160a01b03166101fc565b6100f661027a565b82610100816102cf565b8261010a816102cf565b8361011481610323565b61011f868686610377565b505050505050565b6001546001600160a01b0316331461017a576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6001546001600160a01b031681565b61020461027a565b6000546001600160a01b0382811691161415610258576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102cd576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b038116610320576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b038116301415610320576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106103f45780518252601f1990920191602091820191016103d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610456576040519150601f19603f3d011682016040523d82523d6000602084013e61045b565b606091505b5091509150818015610489575080511580610489575080806020019051602081101561048657600080fd5b50515b6104d0576040805162461bcd60e51b815260206004820152601360248201527211549497d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505050505056fea2646970667358221220f7416415e0c8fb660caa2dddf34ea5232522a81a698089d61182fbcd82d0782f64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "819:670:62:-:0;;;;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;819:670:62;;;;;;", + "deployedSourceMap": "819:670:62:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1196:290;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1196:290:62;;;;;;;;;;;;;;;;;:::i;:::-;;1422:217:57;;;:::i;219:29::-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;255:23;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1196:290:62:-;726:12:57;:10;:12::i;:::-;1370:6:62::1;594:23:64;608:8;594:13;:23::i;:::-;1401:3:62::2;594:23:64;608:8;594:13;:23::i;:::-;1423:3:62::3;948:18:64;957:8;948;:18::i;:::-;1444:34:62::4;1457:6;1465:3;1470:7;1444:12;:34::i;:::-;628:1:64::3;::::2;749::57::1;1196:290:62::0;;;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;255:23::-;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;;;692:128;:::o;1041:126::-;-1:-1:-1;;;;;1110:25:64;;1130:4;1110:25;;1102:57;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;-1:-1:-1;;;1102:57:64;;;;;;;;;;;;;;1485:312:61;1631:59;;;-1:-1:-1;;;;;1631:59:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1631:59:61;-1:-1:-1;;;1631:59:61;;;1610:81;;;;1575:12;;1589:17;;1610:20;;;;1631:59;1610:81;;;1631:59;1610:81;;1631:59;1610:81;;;;;;;;;;-1:-1:-1;;1610:81:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1574:117;;;;1709:7;:57;;;;-1:-1:-1;1721:11:61;;:16;;:44;;;1752:4;1741:24;;;;;;;;;;;;;;;-1:-1:-1;1741:24:61;1721:44;1701:89;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;-1:-1:-1;;;1701:89:61;;;;;;;;;;;;;;;1485:312;;;;;:::o", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./TokenHandler.sol\";\r\nimport \"./interfaces/ITokenHolder.sol\";\r\nimport \"../token/interfaces/IERC20Token.sol\";\r\n\r\n/**\r\n * @dev We consider every contract to be a 'token holder' since it's currently not possible\r\n * for a contract to deny receiving tokens.\r\n *\r\n * The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\r\n * the owner to send tokens that were sent to the contract by mistake back to their sender.\r\n *\r\n * Note that we use the non standard ERC-20 interface which has no return value for transfer\r\n * in order to support both non standard as well as standard token contracts.\r\n * see https://github.com/ethereum/solidity/issues/4116\r\n*/\r\ncontract TokenHolder is ITokenHolder, TokenHandler, Owned, Utils {\r\n /**\r\n * @dev withdraws tokens held by the contract and sends them to an account\r\n * can only be called by the owner\r\n *\r\n * @param _token ERC20 token contract address\r\n * @param _to account to receive the new amount\r\n * @param _amount amount to withdraw\r\n */\r\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount)\r\n public\r\n virtual\r\n override\r\n ownerOnly\r\n validAddress(address(_token))\r\n validAddress(_to)\r\n notThis(_to)\r\n {\r\n safeTransfer(_token, _to, _amount);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "exportedSymbols": { + "TokenHolder": [ + 22575 + ] + }, + "id": 22576, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:62" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 22529, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 21819, + "src": "77:21:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 22530, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22662, + "src": "100:21:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "./TokenHandler.sol", + "id": 22531, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22527, + "src": "123:28:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "file": "./interfaces/ITokenHolder.sol", + "id": 22532, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22908, + "src": "153:39:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../token/interfaces/IERC20Token.sol", + "id": 22533, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 21128, + "src": "194:45:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22535, + "name": "ITokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22907, + "src": "843:12:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITokenHolder_$22907", + "typeString": "contract ITokenHolder" + } + }, + "id": 22536, + "nodeType": "InheritanceSpecifier", + "src": "843:12:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22537, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "857:12:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 22538, + "nodeType": "InheritanceSpecifier", + "src": "857:12:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22539, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "871:5:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 22540, + "nodeType": "InheritanceSpecifier", + "src": "871:5:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22541, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "878:5:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 22542, + "nodeType": "InheritanceSpecifier", + "src": "878:5:62" + } + ], + "contractDependencies": [ + 21818, + 22526, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 22534, + "nodeType": "StructuredDocumentation", + "src": "243:574:62", + "text": " @dev We consider every contract to be a 'token holder' since it's currently not possible\n for a contract to deny receiving tokens.\n The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\n the owner to send tokens that were sent to the contract by mistake back to their sender.\n Note that we use the non standard ERC-20 interface which has no return value for transfer\n in order to support both non standard as well as standard token contracts.\n see https://github.com/ethereum/solidity/issues/4116" + }, + "fullyImplemented": true, + "id": 22575, + "linearizedBaseContracts": [ + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 22906 + ], + "body": { + "id": 22573, + "nodeType": "Block", + "src": "1433:53:62", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22568, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22545, + "src": "1457:6:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22569, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1465:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22570, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22549, + "src": "1470:7:62", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 22567, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "1444:12:62", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 22571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:34:62", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22572, + "nodeType": "ExpressionStatement", + "src": "1444:34:62" + } + ] + }, + "documentation": { + "id": 22543, + "nodeType": "StructuredDocumentation", + "src": "891:299:62", + "text": " @dev withdraws tokens held by the contract and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "5e35359e", + "id": 22574, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22553, + "modifierName": { + "argumentTypes": null, + "id": 22552, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1330:9:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1330:9:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22557, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22545, + "src": "1370:6:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1362:7:62", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1362:7:62", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1362:15:62", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22559, + "modifierName": { + "argumentTypes": null, + "id": 22554, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1349:12:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1349:29:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22561, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1401:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22562, + "modifierName": { + "argumentTypes": null, + "id": 22560, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1388:12:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1388:17:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22564, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1423:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22565, + "modifierName": { + "argumentTypes": null, + "id": 22563, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "1415:7:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1415:12:62" + } + ], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22551, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1312:8:62" + }, + "parameters": { + "id": 22550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22545, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1220:18:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22544, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1220:11:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22547, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1240:11:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22546, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1240:7:62", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22549, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1253:15:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1253:7:62", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1219:50:62" + }, + "returnParameters": { + "id": 22566, + "nodeType": "ParameterList", + "parameters": [], + "src": "1433:0:62" + }, + "scope": 22575, + "src": "1196:290:62", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 22576, + "src": "819:670:62" + } + ], + "src": "52:1439:62" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHolder.sol", + "exportedSymbols": { + "TokenHolder": [ + 22575 + ] + }, + "id": 22576, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22528, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:62" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 22529, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 21819, + "src": "77:21:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 22530, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22662, + "src": "100:21:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/TokenHandler.sol", + "file": "./TokenHandler.sol", + "id": 22531, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22527, + "src": "123:28:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol", + "file": "./interfaces/ITokenHolder.sol", + "id": 22532, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 22908, + "src": "153:39:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol", + "file": "../token/interfaces/IERC20Token.sol", + "id": 22533, + "nodeType": "ImportDirective", + "scope": 22576, + "sourceUnit": 21128, + "src": "194:45:62", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22535, + "name": "ITokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22907, + "src": "843:12:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ITokenHolder_$22907", + "typeString": "contract ITokenHolder" + } + }, + "id": 22536, + "nodeType": "InheritanceSpecifier", + "src": "843:12:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22537, + "name": "TokenHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22526, + "src": "857:12:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_TokenHandler_$22526", + "typeString": "contract TokenHandler" + } + }, + "id": 22538, + "nodeType": "InheritanceSpecifier", + "src": "857:12:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22539, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "871:5:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 22540, + "nodeType": "InheritanceSpecifier", + "src": "871:5:62" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22541, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "878:5:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 22542, + "nodeType": "InheritanceSpecifier", + "src": "878:5:62" + } + ], + "contractDependencies": [ + 21818, + 22526, + 22661, + 22847, + 22907 + ], + "contractKind": "contract", + "documentation": { + "id": 22534, + "nodeType": "StructuredDocumentation", + "src": "243:574:62", + "text": " @dev We consider every contract to be a 'token holder' since it's currently not possible\n for a contract to deny receiving tokens.\n The TokenHolder's contract sole purpose is to provide a safety mechanism that allows\n the owner to send tokens that were sent to the contract by mistake back to their sender.\n Note that we use the non standard ERC-20 interface which has no return value for transfer\n in order to support both non standard as well as standard token contracts.\n see https://github.com/ethereum/solidity/issues/4116" + }, + "fullyImplemented": true, + "id": 22575, + "linearizedBaseContracts": [ + 22575, + 22661, + 21818, + 22526, + 22907, + 22847 + ], + "name": "TokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 22906 + ], + "body": { + "id": 22573, + "nodeType": "Block", + "src": "1433:53:62", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22568, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22545, + "src": "1457:6:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + { + "argumentTypes": null, + "id": 22569, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1465:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 22570, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22549, + "src": "1470:7:62", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 22567, + "name": "safeTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22475, + "src": "1444:12:62", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20Token_$21127_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20Token,address,uint256)" + } + }, + "id": 22571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:34:62", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22572, + "nodeType": "ExpressionStatement", + "src": "1444:34:62" + } + ] + }, + "documentation": { + "id": 22543, + "nodeType": "StructuredDocumentation", + "src": "891:299:62", + "text": " @dev withdraws tokens held by the contract and sends them to an account\n can only be called by the owner\n @param _token ERC20 token contract address\n @param _to account to receive the new amount\n @param _amount amount to withdraw" + }, + "functionSelector": "5e35359e", + "id": 22574, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22553, + "modifierName": { + "argumentTypes": null, + "id": 22552, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1330:9:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1330:9:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22557, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22545, + "src": "1370:6:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + ], + "id": 22556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1362:7:62", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22555, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1362:7:62", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1362:15:62", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22559, + "modifierName": { + "argumentTypes": null, + "id": 22554, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1349:12:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1349:29:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22561, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1401:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22562, + "modifierName": { + "argumentTypes": null, + "id": 22560, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1388:12:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1388:17:62" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22564, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22547, + "src": "1423:3:62", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22565, + "modifierName": { + "argumentTypes": null, + "id": 22563, + "name": "notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22644, + "src": "1415:7:62", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1415:12:62" + } + ], + "name": "withdrawTokens", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22551, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1312:8:62" + }, + "parameters": { + "id": 22550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22545, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1220:18:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + }, + "typeName": { + "contractScope": null, + "id": 22544, + "name": "IERC20Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21127, + "src": "1220:11:62", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20Token_$21127", + "typeString": "contract IERC20Token" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22547, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1240:11:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22546, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1240:7:62", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 22549, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22574, + "src": "1253:15:62", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22548, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1253:7:62", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1219:50:62" + }, + "returnParameters": { + "id": 22566, + "nodeType": "ParameterList", + "parameters": [], + "src": "1433:0:62" + }, + "scope": 22575, + "src": "1196:290:62", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 22576, + "src": "819:670:62" + } + ], + "src": "52:1439:62" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.847Z", + "devdoc": { + "details": "We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. Note that we use the non standard ERC-20 interface which has no return value for transfer in order to support both non standard as well as standard token contracts. see https://github.com/ethereum/solidity/issues/4116", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + }, + "withdrawTokens(address,address,uint256)": { + "details": "withdraws tokens held by the contract and sends them to an account can only be called by the owner", + "params": { + "_amount": "amount to withdraw", + "_to": "account to receive the new amount", + "_token": "ERC20 token contract address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/Utils.json b/apps/cic-eth/tests/testdata/bancor/Utils.json new file mode 100644 index 00000000..3981e2f0 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/Utils.json @@ -0,0 +1,2066 @@ +{ + "contractName": "Utils", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Utilities & Common Modifiers\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":\"Utils\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122072beacb2f236921456c94ed3f088875bd1c58ecb350ecaefd7afc6aed233995164736f6c634300060c0033", + "deployedBytecode": "0x6080604052600080fdfea264697066735822122072beacb2f236921456c94ed3f088875bd1c58ecb350ecaefd7afc6aed233995164736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "127:1043:64:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "127:1043:64:-:0;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @dev Utilities & Common Modifiers\r\n*/\r\ncontract Utils {\r\n // verifies that a value is greater than zero\r\n modifier greaterThanZero(uint256 _value) {\r\n _greaterThanZero(_value);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _greaterThanZero(uint256 _value) internal pure {\r\n require(_value > 0, \"ERR_ZERO_VALUE\");\r\n }\r\n\r\n // validates an address - currently only checks that it isn't null\r\n modifier validAddress(address _address) {\r\n _validAddress(_address);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _validAddress(address _address) internal pure {\r\n require(_address != address(0), \"ERR_INVALID_ADDRESS\");\r\n }\r\n\r\n // verifies that the address is different than this contract address\r\n modifier notThis(address _address) {\r\n _notThis(_address);\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _notThis(address _address) internal view {\r\n require(_address != address(this), \"ERR_ADDRESS_IS_SELF\");\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "exportedSymbols": { + "Utils": [ + 22661 + ] + }, + "id": 22662, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22584, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:64" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 22585, + "nodeType": "StructuredDocumentation", + "src": "79:46:64", + "text": " @dev Utilities & Common Modifiers" + }, + "fullyImplemented": true, + "id": 22661, + "linearizedBaseContracts": [ + 22661 + ], + "name": "Utils", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 22594, + "nodeType": "Block", + "src": "241:55:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22590, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22587, + "src": "269:6:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 22589, + "name": "_greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22608, + "src": "252:16:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 22591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "252:24:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22592, + "nodeType": "ExpressionStatement", + "src": "252:24:64" + }, + { + "id": 22593, + "nodeType": "PlaceholderStatement", + "src": "287:1:64" + } + ] + }, + "documentation": null, + "id": 22595, + "name": "greaterThanZero", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22587, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22595, + "src": "225:14:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22586, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "225:7:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "224:16:64" + }, + "src": "200:96:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22607, + "nodeType": "Block", + "src": "407:56:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22601, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22597, + "src": "426:6:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "435:1:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "426:10:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f56414c5545", + "id": 22604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "438:16:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d867a5fb86a4ba31dbc28b32cea703c5633c272ff1c7db7eff591a6c9397723", + "typeString": "literal_string \"ERR_ZERO_VALUE\"" + }, + "value": "ERR_ZERO_VALUE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d867a5fb86a4ba31dbc28b32cea703c5633c272ff1c7db7eff591a6c9397723", + "typeString": "literal_string \"ERR_ZERO_VALUE\"" + } + ], + "id": 22600, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "418:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "418:37:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22606, + "nodeType": "ExpressionStatement", + "src": "418:37:64" + } + ] + }, + "documentation": null, + "id": 22608, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_greaterThanZero", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22597, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22608, + "src": "377:14:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "377:7:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "376:16:64" + }, + "returnParameters": { + "id": 22599, + "nodeType": "ParameterList", + "parameters": [], + "src": "407:0:64" + }, + "scope": 22661, + "src": "351:112:64", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22617, + "nodeType": "Block", + "src": "583:54:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22613, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22610, + "src": "608:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22612, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "594:13:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 22614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "594:23:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22615, + "nodeType": "ExpressionStatement", + "src": "594:23:64" + }, + { + "id": 22616, + "nodeType": "PlaceholderStatement", + "src": "628:1:64" + } + ] + }, + "documentation": null, + "id": 22618, + "name": "validAddress", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22610, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22618, + "src": "565:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22609, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "565:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "564:18:64" + }, + "src": "543:94:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22633, + "nodeType": "Block", + "src": "747:73:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22624, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22620, + "src": "766:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "786:1:64", + "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": 22626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "778:7:64", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22625, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "778:7:64", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "778:10:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "766:22:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f41444452455353", + "id": 22630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "790:21:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a7d3f5b8fcfdb9260fb71cc6af515e9b07a68a1202d1cb2f5a3f8f30449ddc07", + "typeString": "literal_string \"ERR_INVALID_ADDRESS\"" + }, + "value": "ERR_INVALID_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a7d3f5b8fcfdb9260fb71cc6af515e9b07a68a1202d1cb2f5a3f8f30449ddc07", + "typeString": "literal_string \"ERR_INVALID_ADDRESS\"" + } + ], + "id": 22623, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "758:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "758:54:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22632, + "nodeType": "ExpressionStatement", + "src": "758:54:64" + } + ] + }, + "documentation": null, + "id": 22634, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22620, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22634, + "src": "715:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "714:18:64" + }, + "returnParameters": { + "id": 22622, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:0:64" + }, + "scope": 22661, + "src": "692:128:64", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22643, + "nodeType": "Block", + "src": "937:49:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22639, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22636, + "src": "957:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22638, + "name": "_notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22660, + "src": "948:8:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 22640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "948:18:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22641, + "nodeType": "ExpressionStatement", + "src": "948:18:64" + }, + { + "id": 22642, + "nodeType": "PlaceholderStatement", + "src": "977:1:64" + } + ] + }, + "documentation": null, + "id": 22644, + "name": "notThis", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22636, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22644, + "src": "919:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22635, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "919:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "918:18:64" + }, + "src": "902:84:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22659, + "nodeType": "Block", + "src": "1091:76:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22650, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22646, + "src": "1110:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1130:4:64", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + ], + "id": 22652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1122:7:64", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1122:7:64", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1122:13:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1110:25:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414444524553535f49535f53454c46", + "id": 22656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1137:21:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6038575e9704a3ea491558fda267e4bebfff2c5aa46f54a3ab71ebfebd80861", + "typeString": "literal_string \"ERR_ADDRESS_IS_SELF\"" + }, + "value": "ERR_ADDRESS_IS_SELF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6038575e9704a3ea491558fda267e4bebfff2c5aa46f54a3ab71ebfebd80861", + "typeString": "literal_string \"ERR_ADDRESS_IS_SELF\"" + } + ], + "id": 22649, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1102:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1102:57:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22658, + "nodeType": "ExpressionStatement", + "src": "1102:57:64" + } + ] + }, + "documentation": null, + "id": 22660, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_notThis", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22646, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22660, + "src": "1059:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1058:18:64" + }, + "returnParameters": { + "id": 22648, + "nodeType": "ParameterList", + "parameters": [], + "src": "1091:0:64" + }, + "scope": 22661, + "src": "1041:126:64", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22662, + "src": "127:1043:64" + } + ], + "src": "52:1120:64" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "exportedSymbols": { + "Utils": [ + 22661 + ] + }, + "id": 22662, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22584, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:64" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 22585, + "nodeType": "StructuredDocumentation", + "src": "79:46:64", + "text": " @dev Utilities & Common Modifiers" + }, + "fullyImplemented": true, + "id": 22661, + "linearizedBaseContracts": [ + 22661 + ], + "name": "Utils", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 22594, + "nodeType": "Block", + "src": "241:55:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22590, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22587, + "src": "269:6:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 22589, + "name": "_greaterThanZero", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22608, + "src": "252:16:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 22591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "252:24:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22592, + "nodeType": "ExpressionStatement", + "src": "252:24:64" + }, + { + "id": 22593, + "nodeType": "PlaceholderStatement", + "src": "287:1:64" + } + ] + }, + "documentation": null, + "id": 22595, + "name": "greaterThanZero", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22587, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22595, + "src": "225:14:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22586, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "225:7:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "224:16:64" + }, + "src": "200:96:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22607, + "nodeType": "Block", + "src": "407:56:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22601, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22597, + "src": "426:6:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 22602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "435:1:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "426:10:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f5a45524f5f56414c5545", + "id": 22604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "438:16:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6d867a5fb86a4ba31dbc28b32cea703c5633c272ff1c7db7eff591a6c9397723", + "typeString": "literal_string \"ERR_ZERO_VALUE\"" + }, + "value": "ERR_ZERO_VALUE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6d867a5fb86a4ba31dbc28b32cea703c5633c272ff1c7db7eff591a6c9397723", + "typeString": "literal_string \"ERR_ZERO_VALUE\"" + } + ], + "id": 22600, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "418:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "418:37:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22606, + "nodeType": "ExpressionStatement", + "src": "418:37:64" + } + ] + }, + "documentation": null, + "id": 22608, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_greaterThanZero", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22598, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22597, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22608, + "src": "377:14:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "377:7:64", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "376:16:64" + }, + "returnParameters": { + "id": 22599, + "nodeType": "ParameterList", + "parameters": [], + "src": "407:0:64" + }, + "scope": 22661, + "src": "351:112:64", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22617, + "nodeType": "Block", + "src": "583:54:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22613, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22610, + "src": "608:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22612, + "name": "_validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22634, + "src": "594:13:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 22614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "594:23:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22615, + "nodeType": "ExpressionStatement", + "src": "594:23:64" + }, + { + "id": 22616, + "nodeType": "PlaceholderStatement", + "src": "628:1:64" + } + ] + }, + "documentation": null, + "id": 22618, + "name": "validAddress", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22610, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22618, + "src": "565:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22609, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "565:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "564:18:64" + }, + "src": "543:94:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22633, + "nodeType": "Block", + "src": "747:73:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22624, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22620, + "src": "766:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 22627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "786:1:64", + "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": 22626, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "778:7:64", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22625, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "778:7:64", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22628, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "778:10:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "766:22:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f494e56414c49445f41444452455353", + "id": 22630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "790:21:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a7d3f5b8fcfdb9260fb71cc6af515e9b07a68a1202d1cb2f5a3f8f30449ddc07", + "typeString": "literal_string \"ERR_INVALID_ADDRESS\"" + }, + "value": "ERR_INVALID_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a7d3f5b8fcfdb9260fb71cc6af515e9b07a68a1202d1cb2f5a3f8f30449ddc07", + "typeString": "literal_string \"ERR_INVALID_ADDRESS\"" + } + ], + "id": 22623, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "758:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "758:54:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22632, + "nodeType": "ExpressionStatement", + "src": "758:54:64" + } + ] + }, + "documentation": null, + "id": 22634, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22620, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22634, + "src": "715:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22619, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "714:18:64" + }, + "returnParameters": { + "id": 22622, + "nodeType": "ParameterList", + "parameters": [], + "src": "747:0:64" + }, + "scope": 22661, + "src": "692:128:64", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22643, + "nodeType": "Block", + "src": "937:49:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22639, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22636, + "src": "957:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22638, + "name": "_notThis", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22660, + "src": "948:8:64", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 22640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "948:18:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22641, + "nodeType": "ExpressionStatement", + "src": "948:18:64" + }, + { + "id": 22642, + "nodeType": "PlaceholderStatement", + "src": "977:1:64" + } + ] + }, + "documentation": null, + "id": 22644, + "name": "notThis", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 22637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22636, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22644, + "src": "919:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22635, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "919:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "918:18:64" + }, + "src": "902:84:64", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 22659, + "nodeType": "Block", + "src": "1091:76:64", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22650, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22646, + "src": "1110:8:64", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1130:4:64", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + ], + "id": 22652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1122:7:64", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 22651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1122:7:64", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 22654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1122:13:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1110:25:64", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f414444524553535f49535f53454c46", + "id": 22656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1137:21:64", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d6038575e9704a3ea491558fda267e4bebfff2c5aa46f54a3ab71ebfebd80861", + "typeString": "literal_string \"ERR_ADDRESS_IS_SELF\"" + }, + "value": "ERR_ADDRESS_IS_SELF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d6038575e9704a3ea491558fda267e4bebfff2c5aa46f54a3ab71ebfebd80861", + "typeString": "literal_string \"ERR_ADDRESS_IS_SELF\"" + } + ], + "id": 22649, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1102:7:64", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 22657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1102:57:64", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22658, + "nodeType": "ExpressionStatement", + "src": "1102:57:64" + } + ] + }, + "documentation": null, + "id": 22660, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_notThis", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22646, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22660, + "src": "1059:16:64", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:64", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1058:18:64" + }, + "returnParameters": { + "id": 22648, + "nodeType": "ParameterList", + "parameters": [], + "src": "1091:0:64" + }, + "scope": 22661, + "src": "1041:126:64", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 22662, + "src": "127:1043:64" + } + ], + "src": "52:1120:64" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.848Z", + "devdoc": { + "details": "Utilities & Common Modifiers", + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/Whitelist.json b/apps/cic-eth/tests/testdata/bancor/Whitelist.json new file mode 100644 index 00000000..3280b52a --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/Whitelist.json @@ -0,0 +1,3640 @@ +{ + "contractName": "Whitelist", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "AddressAddition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "AddressRemoval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isWhitelisted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "addAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_addresses", + "type": "address[]" + } + ], + "name": "addAddresses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "removeAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_addresses", + "type": "address[]" + } + ], + "name": "removeAddresses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"AddressAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"AddressRemoval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"addAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"removeAddresses\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The contract manages a list of whitelisted addresses\",\"events\":{\"AddressAddition(address)\":{\"details\":\"triggered when an address is added to the whitelist\",\"params\":{\"_address\":\"address that's added from the whitelist\"}},\"AddressRemoval(address)\":{\"details\":\"triggered when an address is removed from the whitelist\",\"params\":{\"_address\":\"address that's removed from the whitelist\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"addAddress(address)\":{\"details\":\"adds a given address to the whitelist\",\"params\":{\"_address\":\"address to add\"}},\"addAddresses(address[])\":{\"details\":\"adds a list of addresses to the whitelist\",\"params\":{\"_addresses\":\"addresses to add\"}},\"isWhitelisted(address)\":{\"details\":\"returns true if a given address is whitelisted, false if not\",\"params\":{\"_address\":\"address to check\"},\"returns\":{\"_0\":\"true if the address is whitelisted, false if not\"}},\"removeAddress(address)\":{\"details\":\"removes a given address from the whitelist\",\"params\":{\"_address\":\"address to remove\"}},\"removeAddresses(address[])\":{\"details\":\"removes a list of addresses from the whitelist\",\"params\":{\"_addresses\":\"addresses to remove\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol\":\"Whitelist\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol\":{\"keccak256\":\"0x073efa69fcd6b5e60f841b28b366d63b62ff48ab12a06ce3f5a7f41afd6ce885\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e8b8ecb2d29197ca77f0ed98f728ace54e6edcfdf5cd1194ae22701607eaf608\",\"dweb:/ipfs/QmcsR6Q35Hurh3TrPkYAboicz9bQQoGCWmZLzUCDyhotH8\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol\":{\"keccak256\":\"0xba07ed618d7d1da7540eaff62c062b9b5b926eb55868d618cb5e2b6f983247a7\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://e7bff23c1d0c7965466d2dca4d3deadae7aea58cc4ac0ddcb9f5cd818d1b74ba\",\"dweb:/ipfs/QmQ4gX1jhoRs4ZmBf4Sn3BqL9LZjewpTPhSPMGjZzuqouy\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561066d806100326000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101c35780638da5cb5b146101cb578063a84eb999146101ef578063d4ee1d9014610292578063f2fde38b1461029a57610093565b80633628731c1461009857806338eada1c1461013d5780633af32abf146101635780634ba79dfe1461019d575b600080fd5b61013b600480360360208110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460208302840111640100000000831117156100fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506102c0945050505050565b005b61013b6004803603602081101561015357600080fd5b50356001600160a01b03166102f4565b6101896004803603602081101561017957600080fd5b50356001600160a01b0316610379565b604080519115158252519081900360200190f35b61013b600480360360208110156101b357600080fd5b50356001600160a01b0316610397565b61013b61040e565b6101d36104c5565b604080516001600160a01b039092168252519081900360200190f35b61013b6004803603602081101561020557600080fd5b81019060208101813564010000000081111561022057600080fd5b82018360208201111561023257600080fd5b8035906020019184602083028401116401000000008311171561025457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104d4945050505050565b6101d3610504565b61013b600480360360208110156102b057600080fd5b50356001600160a01b0316610513565b60005b81518110156102f0576102e88282815181106102db57fe5b60200260200101516102f4565b6001016102c3565b5050565b6102fc610591565b80610306816105e6565b6001600160a01b03821660009081526002602052604090205460ff161561032c576102f0565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517f2c51f80053e9ee7518567e43b2f8e8b48f50cf10daede6d11893df9ad49e4a8a9190a25050565b6001600160a01b031660009081526002602052604090205460ff1690565b61039f610591565b6001600160a01b03811660009081526002602052604090205460ff166103c45761040b565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f7ec2df28665f8610f9b1d2f74faae35dbc6bd58684a1194a6dfc31584953f03b9190a25b50565b6001546001600160a01b03163314610461576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b60005b81518110156102f0576104fc8282815181106104ef57fe5b6020026020010151610397565b6001016104d7565b6001546001600160a01b031681565b61051b610591565b6000546001600160a01b038281169116141561056f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811661040b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fdfea2646970667358221220b0845cd6fb1ceffdba4a24a7fc8e6e80553d4243de97e809d5076294dccef79264736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806379ba50971161006657806379ba5097146101c35780638da5cb5b146101cb578063a84eb999146101ef578063d4ee1d9014610292578063f2fde38b1461029a57610093565b80633628731c1461009857806338eada1c1461013d5780633af32abf146101635780634ba79dfe1461019d575b600080fd5b61013b600480360360208110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460208302840111640100000000831117156100fd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506102c0945050505050565b005b61013b6004803603602081101561015357600080fd5b50356001600160a01b03166102f4565b6101896004803603602081101561017957600080fd5b50356001600160a01b0316610379565b604080519115158252519081900360200190f35b61013b600480360360208110156101b357600080fd5b50356001600160a01b0316610397565b61013b61040e565b6101d36104c5565b604080516001600160a01b039092168252519081900360200190f35b61013b6004803603602081101561020557600080fd5b81019060208101813564010000000081111561022057600080fd5b82018360208201111561023257600080fd5b8035906020019184602083028401116401000000008311171561025457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506104d4945050505050565b6101d3610504565b61013b600480360360208110156102b057600080fd5b50356001600160a01b0316610513565b60005b81518110156102f0576102e88282815181106102db57fe5b60200260200101516102f4565b6001016102c3565b5050565b6102fc610591565b80610306816105e6565b6001600160a01b03821660009081526002602052604090205460ff161561032c576102f0565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517f2c51f80053e9ee7518567e43b2f8e8b48f50cf10daede6d11893df9ad49e4a8a9190a25050565b6001600160a01b031660009081526002602052604090205460ff1690565b61039f610591565b6001600160a01b03811660009081526002602052604090205460ff166103c45761040b565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f7ec2df28665f8610f9b1d2f74faae35dbc6bd58684a1194a6dfc31584953f03b9190a25b50565b6001546001600160a01b03163314610461576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b60005b81518110156102f0576104fc8282815181106104ef57fe5b6020026020010151610397565b6001016104d7565b6001546001600160a01b031681565b61051b610591565b6000546001600160a01b038281169116141561056f576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146105e4576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6001600160a01b03811661040b576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fdfea2646970667358221220b0845cd6fb1ceffdba4a24a7fc8e6e80553d4243de97e809d5076294dccef79264736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "236:2326:65:-:0;;;;;;;;;;;;-1:-1:-1;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;236:2326:65;;;;;;", + "deployedSourceMap": "236:2326:65:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1674:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1674:176:65;;-1:-1:-1;1674:176:65;;-1:-1:-1;;;;;1674:176:65:i;:::-;;1239:301;;;;;;;;;;;;;;;;-1:-1:-1;1239:301:65;-1:-1:-1;;;;;1239:301:65;;:::i;991:122::-;;;;;;;;;;;;;;;;-1:-1:-1;991:122:65;-1:-1:-1;;;;;991:122:65;;:::i;:::-;;;;;;;;;;;;;;;;;;1984:251;;;;;;;;;;;;;;;;-1:-1:-1;1984:251:65;-1:-1:-1;;;;;1984:251:65;;:::i;1422:217:57:-;;;:::i;219:29::-;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;2377:182:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2377:182:65;;-1:-1:-1;2377:182:65;;-1:-1:-1;;;;;2377:182:65:i;255:23:57:-;;;:::i;1164:167::-;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1674:176:65:-;1748:9;1743:100;1767:10;:17;1763:1;:21;1743:100;;;1806:25;1817:10;1828:1;1817:13;;;;;;;;;;;;;;1806:10;:25::i;:::-;1786:3;;1743:100;;;;1674:176;:::o;1239:301::-;726:12:57;:10;:12::i;:::-;1318:8:65::1;594:23:64;608:8;594:13;:23::i;:::-;-1:-1:-1::0;;;;;1364:19:65;::::2;;::::0;;;:9:::2;:19;::::0;;;;;::::2;;1360:93;;;1446:7;;1360:93;-1:-1:-1::0;;;;;1465:19:65;::::2;;::::0;;;:9:::2;:19;::::0;;;;;:26;;-1:-1:-1;;1465:26:65::2;1487:4;1465:26;::::0;;1507:25;::::2;::::0;1465:19;1507:25:::2;749:1:57::1;1239:301:65::0;:::o;991:122::-;-1:-1:-1;;;;;1086:19:65;1062:4;1086:19;;;:9;:19;;;;;;;;;991:122::o;1984:251::-;726:12:57;:10;:12::i;:::-;-1:-1:-1;;;;;2058:19:65;::::1;;::::0;;;:9:::1;:19;::::0;;;;;::::1;;2053:95;;2141:7;;2053:95;-1:-1:-1::0;;;;;2160:19:65;::::1;2182:5;2160:19:::0;;;:9:::1;:19;::::0;;;;;:27;;-1:-1:-1;;2160:27:65::1;::::0;;2203:24;::::1;::::0;2182:5;2203:24:::1;749:1:57;1984:251:65::0;:::o;1422:217:57:-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;2377:182:65:-;2454:9;2449:103;2473:10;:17;2469:1;:21;2449:103;;;2512:28;2526:10;2537:1;2526:13;;;;;;;;;;;;;;2512;:28::i;:::-;2492:3;;2449:103;;255:23:57;;;-1:-1:-1;;;;;255:23:57;;:::o;1164:167::-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;692:128:64:-;-1:-1:-1;;;;;766:22:64;;758:54;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;-1:-1:-1;;;758:54:64;;;;;;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"./Owned.sol\";\r\nimport \"./Utils.sol\";\r\nimport \"./interfaces/IWhitelist.sol\";\r\n\r\n/**\r\n * @dev The contract manages a list of whitelisted addresses\r\n*/\r\ncontract Whitelist is IWhitelist, Owned, Utils {\r\n mapping (address => bool) private whitelist;\r\n\r\n /**\r\n * @dev triggered when an address is added to the whitelist\r\n *\r\n * @param _address address that's added from the whitelist\r\n */\r\n event AddressAddition(address indexed _address);\r\n\r\n /**\r\n * @dev triggered when an address is removed from the whitelist\r\n *\r\n * @param _address address that's removed from the whitelist\r\n */\r\n event AddressRemoval(address indexed _address);\r\n\r\n /**\r\n * @dev returns true if a given address is whitelisted, false if not\r\n *\r\n * @param _address address to check\r\n *\r\n * @return true if the address is whitelisted, false if not\r\n */\r\n function isWhitelisted(address _address) public view override returns (bool) {\r\n return whitelist[_address];\r\n }\r\n\r\n /**\r\n * @dev adds a given address to the whitelist\r\n *\r\n * @param _address address to add\r\n */\r\n function addAddress(address _address)\r\n ownerOnly\r\n validAddress(_address)\r\n public\r\n {\r\n if (whitelist[_address]) // checks if the address is already whitelisted\r\n return;\r\n\r\n whitelist[_address] = true;\r\n emit AddressAddition(_address);\r\n }\r\n\r\n /**\r\n * @dev adds a list of addresses to the whitelist\r\n *\r\n * @param _addresses addresses to add\r\n */\r\n function addAddresses(address[] memory _addresses) public {\r\n for (uint256 i = 0; i < _addresses.length; i++) {\r\n addAddress(_addresses[i]);\r\n }\r\n }\r\n\r\n /**\r\n * @dev removes a given address from the whitelist\r\n *\r\n * @param _address address to remove\r\n */\r\n function removeAddress(address _address) ownerOnly public {\r\n if (!whitelist[_address]) // checks if the address is actually whitelisted\r\n return;\r\n\r\n whitelist[_address] = false;\r\n emit AddressRemoval(_address);\r\n }\r\n\r\n /**\r\n * @dev removes a list of addresses from the whitelist\r\n *\r\n * @param _addresses addresses to remove\r\n */\r\n function removeAddresses(address[] memory _addresses) public {\r\n for (uint256 i = 0; i < _addresses.length; i++) {\r\n removeAddress(_addresses[i]);\r\n }\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol", + "exportedSymbols": { + "Whitelist": [ + 22808 + ] + }, + "id": 22809, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22663, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:65" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 22664, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 21819, + "src": "77:21:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 22665, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 22662, + "src": "100:21:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "./interfaces/IWhitelist.sol", + "id": 22666, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 22918, + "src": "123:37:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22668, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "258:10:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 22669, + "nodeType": "InheritanceSpecifier", + "src": "258:10:65" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22670, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "270:5:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 22671, + "nodeType": "InheritanceSpecifier", + "src": "270:5:65" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22672, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "277:5:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 22673, + "nodeType": "InheritanceSpecifier", + "src": "277:5:65" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22847, + 22917 + ], + "contractKind": "contract", + "documentation": { + "id": 22667, + "nodeType": "StructuredDocumentation", + "src": "164:70:65", + "text": " @dev The contract manages a list of whitelisted addresses" + }, + "fullyImplemented": true, + "id": 22808, + "linearizedBaseContracts": [ + 22808, + 22661, + 21818, + 22847, + 22917 + ], + "name": "Whitelist", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 22677, + "mutability": "mutable", + "name": "whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22808, + "src": "290:43:65", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 22676, + "keyType": { + "id": 22674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "299:7:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "290:25:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 22675, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "310:4:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "anonymous": false, + "documentation": { + "id": 22678, + "nodeType": "StructuredDocumentation", + "src": "342:151:65", + "text": " @dev triggered when an address is added to the whitelist\n @param _address address that's added from the whitelist" + }, + "id": 22682, + "name": "AddressAddition", + "nodeType": "EventDefinition", + "parameters": { + "id": 22681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22680, + "indexed": true, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22682, + "src": "521:24:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "521:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "520:26:65" + }, + "src": "499:48:65" + }, + { + "anonymous": false, + "documentation": { + "id": 22683, + "nodeType": "StructuredDocumentation", + "src": "555:157:65", + "text": " @dev triggered when an address is removed from the whitelist\n @param _address address that's removed from the whitelist" + }, + "id": 22687, + "name": "AddressRemoval", + "nodeType": "EventDefinition", + "parameters": { + "id": 22686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22685, + "indexed": true, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22687, + "src": "739:24:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22684, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "738:26:65" + }, + "src": "718:47:65" + }, + { + "baseFunctions": [ + 22916 + ], + "body": { + "id": 22700, + "nodeType": "Block", + "src": "1068:45:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22696, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1086:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22698, + "indexExpression": { + "argumentTypes": null, + "id": 22697, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22690, + "src": "1096:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1086:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 22695, + "id": 22699, + "nodeType": "Return", + "src": "1079:26:65" + } + ] + }, + "documentation": { + "id": 22688, + "nodeType": "StructuredDocumentation", + "src": "773:212:65", + "text": " @dev returns true if a given address is whitelisted, false if not\n @param _address address to check\n @return true if the address is whitelisted, false if not" + }, + "functionSelector": "3af32abf", + "id": 22701, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22692, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1044:8:65" + }, + "parameters": { + "id": 22691, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22690, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22701, + "src": "1014:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1014:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1013:18:65" + }, + "returnParameters": { + "id": 22695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22694, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22701, + "src": "1062:4:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22693, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1062:4:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1061:6:65" + }, + "scope": 22808, + "src": "991:122:65", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22727, + "nodeType": "Block", + "src": "1349:191:65", + "statements": [ + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22712, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1364:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22714, + "indexExpression": { + "argumentTypes": null, + "id": 22713, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1374:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1364:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22716, + "nodeType": "IfStatement", + "src": "1360:93:65", + "trueBody": { + "expression": null, + "functionReturnParameters": 22711, + "id": 22715, + "nodeType": "Return", + "src": "1446:7:65" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 22721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22717, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1465:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22719, + "indexExpression": { + "argumentTypes": null, + "id": 22718, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1475:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1465:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 22720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1487:4:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1465:26:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22722, + "nodeType": "ExpressionStatement", + "src": "1465:26:65" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22724, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1523:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22723, + "name": "AddressAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22682, + "src": "1507:15:65", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1507:25:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22726, + "nodeType": "EmitStatement", + "src": "1502:30:65" + } + ] + }, + "documentation": { + "id": 22702, + "nodeType": "StructuredDocumentation", + "src": "1121:112:65", + "text": " @dev adds a given address to the whitelist\n @param _address address to add" + }, + "functionSelector": "38eada1c", + "id": 22728, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22707, + "modifierName": { + "argumentTypes": null, + "id": 22706, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1286:9:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1286:9:65" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22709, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1318:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22710, + "modifierName": { + "argumentTypes": null, + "id": 22708, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1305:12:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1305:22:65" + } + ], + "name": "addAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22704, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22728, + "src": "1259:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1259:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1258:18:65" + }, + "returnParameters": { + "id": 22711, + "nodeType": "ParameterList", + "parameters": [], + "src": "1349:0:65" + }, + "scope": 22808, + "src": "1239:301:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22754, + "nodeType": "Block", + "src": "1732:118:65", + "statements": [ + { + "body": { + "id": 22752, + "nodeType": "Block", + "src": "1791:52:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22747, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22732, + "src": "1817:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22749, + "indexExpression": { + "argumentTypes": null, + "id": 22748, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1828:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1817:13:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22746, + "name": "addAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22728, + "src": "1806:10:65", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1806:25:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22751, + "nodeType": "ExpressionStatement", + "src": "1806:25:65" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22739, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1763:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22740, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22732, + "src": "1767:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1767:17:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1763:21:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22753, + "initializationExpression": { + "assignments": [ + 22736 + ], + "declarations": [ + { + "constant": false, + "id": 22736, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22753, + "src": "1748:9:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1748:7:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22738, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 22737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1760:1:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1748:13:65" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 22744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1786:3:65", + "subExpression": { + "argumentTypes": null, + "id": 22743, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1786:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22745, + "nodeType": "ExpressionStatement", + "src": "1786:3:65" + }, + "nodeType": "ForStatement", + "src": "1743:100:65" + } + ] + }, + "documentation": { + "id": 22729, + "nodeType": "StructuredDocumentation", + "src": "1548:120:65", + "text": " @dev adds a list of addresses to the whitelist\n @param _addresses addresses to add" + }, + "functionSelector": "3628731c", + "id": 22755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22732, + "mutability": "mutable", + "name": "_addresses", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22755, + "src": "1696:27:65", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 22730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1696:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22731, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1696:9:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1695:29:65" + }, + "returnParameters": { + "id": 22734, + "nodeType": "ParameterList", + "parameters": [], + "src": "1732:0:65" + }, + "scope": 22808, + "src": "1674:176:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22779, + "nodeType": "Block", + "src": "2042:193:65", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 22766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2057:20:65", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22763, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "2058:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22765, + "indexExpression": { + "argumentTypes": null, + "id": 22764, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2068:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2058:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22768, + "nodeType": "IfStatement", + "src": "2053:95:65", + "trueBody": { + "expression": null, + "functionReturnParameters": 22762, + "id": 22767, + "nodeType": "Return", + "src": "2141:7:65" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 22773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22769, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "2160:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22771, + "indexExpression": { + "argumentTypes": null, + "id": 22770, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2170:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2160:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:5:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2160:27:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22774, + "nodeType": "ExpressionStatement", + "src": "2160:27:65" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22776, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2218:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22775, + "name": "AddressRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22687, + "src": "2203:14:65", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2203:24:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22778, + "nodeType": "EmitStatement", + "src": "2198:29:65" + } + ] + }, + "documentation": { + "id": 22756, + "nodeType": "StructuredDocumentation", + "src": "1858:120:65", + "text": " @dev removes a given address from the whitelist\n @param _address address to remove" + }, + "functionSelector": "4ba79dfe", + "id": 22780, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22761, + "modifierName": { + "argumentTypes": null, + "id": 22760, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2025:9:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2025:9:65" + } + ], + "name": "removeAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22758, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22780, + "src": "2007:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2007:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2006:18:65" + }, + "returnParameters": { + "id": 22762, + "nodeType": "ParameterList", + "parameters": [], + "src": "2042:0:65" + }, + "scope": 22808, + "src": "1984:251:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22806, + "nodeType": "Block", + "src": "2438:121:65", + "statements": [ + { + "body": { + "id": 22804, + "nodeType": "Block", + "src": "2497:55:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22799, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22784, + "src": "2526:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22801, + "indexExpression": { + "argumentTypes": null, + "id": 22800, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2537:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2526:13:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22798, + "name": "removeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22780, + "src": "2512:13:65", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2512:28:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22803, + "nodeType": "ExpressionStatement", + "src": "2512:28:65" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22791, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2469:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22792, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22784, + "src": "2473:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2473:17:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2469:21:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22805, + "initializationExpression": { + "assignments": [ + 22788 + ], + "declarations": [ + { + "constant": false, + "id": 22788, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22805, + "src": "2454:9:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22787, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2454:7:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22790, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 22789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2466:1:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2454:13:65" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 22796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2492:3:65", + "subExpression": { + "argumentTypes": null, + "id": 22795, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2492:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22797, + "nodeType": "ExpressionStatement", + "src": "2492:3:65" + }, + "nodeType": "ForStatement", + "src": "2449:103:65" + } + ] + }, + "documentation": { + "id": 22781, + "nodeType": "StructuredDocumentation", + "src": "2243:128:65", + "text": " @dev removes a list of addresses from the whitelist\n @param _addresses addresses to remove" + }, + "functionSelector": "a84eb999", + "id": 22807, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22784, + "mutability": "mutable", + "name": "_addresses", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22807, + "src": "2402:27:65", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 22782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2402:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22783, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2402:9:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2401:29:65" + }, + "returnParameters": { + "id": 22786, + "nodeType": "ParameterList", + "parameters": [], + "src": "2438:0:65" + }, + "scope": 22808, + "src": "2377:182:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 22809, + "src": "236:2326:65" + } + ], + "src": "52:2512:65" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Whitelist.sol", + "exportedSymbols": { + "Whitelist": [ + 22808 + ] + }, + "id": 22809, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22663, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:65" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "./Owned.sol", + "id": 22664, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 21819, + "src": "77:21:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Utils.sol", + "file": "./Utils.sol", + "id": 22665, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 22662, + "src": "100:21:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol", + "file": "./interfaces/IWhitelist.sol", + "id": 22666, + "nodeType": "ImportDirective", + "scope": 22809, + "sourceUnit": 22918, + "src": "123:37:65", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22668, + "name": "IWhitelist", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22917, + "src": "258:10:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IWhitelist_$22917", + "typeString": "contract IWhitelist" + } + }, + "id": 22669, + "nodeType": "InheritanceSpecifier", + "src": "258:10:65" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22670, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "270:5:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 22671, + "nodeType": "InheritanceSpecifier", + "src": "270:5:65" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 22672, + "name": "Utils", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 22661, + "src": "277:5:65", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Utils_$22661", + "typeString": "contract Utils" + } + }, + "id": 22673, + "nodeType": "InheritanceSpecifier", + "src": "277:5:65" + } + ], + "contractDependencies": [ + 21818, + 22661, + 22847, + 22917 + ], + "contractKind": "contract", + "documentation": { + "id": 22667, + "nodeType": "StructuredDocumentation", + "src": "164:70:65", + "text": " @dev The contract manages a list of whitelisted addresses" + }, + "fullyImplemented": true, + "id": 22808, + "linearizedBaseContracts": [ + 22808, + 22661, + 21818, + 22847, + 22917 + ], + "name": "Whitelist", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 22677, + "mutability": "mutable", + "name": "whitelist", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22808, + "src": "290:43:65", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 22676, + "keyType": { + "id": 22674, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "299:7:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "290:25:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 22675, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "310:4:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "anonymous": false, + "documentation": { + "id": 22678, + "nodeType": "StructuredDocumentation", + "src": "342:151:65", + "text": " @dev triggered when an address is added to the whitelist\n @param _address address that's added from the whitelist" + }, + "id": 22682, + "name": "AddressAddition", + "nodeType": "EventDefinition", + "parameters": { + "id": 22681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22680, + "indexed": true, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22682, + "src": "521:24:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22679, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "521:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "520:26:65" + }, + "src": "499:48:65" + }, + { + "anonymous": false, + "documentation": { + "id": 22683, + "nodeType": "StructuredDocumentation", + "src": "555:157:65", + "text": " @dev triggered when an address is removed from the whitelist\n @param _address address that's removed from the whitelist" + }, + "id": 22687, + "name": "AddressRemoval", + "nodeType": "EventDefinition", + "parameters": { + "id": 22686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22685, + "indexed": true, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22687, + "src": "739:24:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22684, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "739:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "738:26:65" + }, + "src": "718:47:65" + }, + { + "baseFunctions": [ + 22916 + ], + "body": { + "id": 22700, + "nodeType": "Block", + "src": "1068:45:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22696, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1086:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22698, + "indexExpression": { + "argumentTypes": null, + "id": 22697, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22690, + "src": "1096:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1086:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 22695, + "id": 22699, + "nodeType": "Return", + "src": "1079:26:65" + } + ] + }, + "documentation": { + "id": 22688, + "nodeType": "StructuredDocumentation", + "src": "773:212:65", + "text": " @dev returns true if a given address is whitelisted, false if not\n @param _address address to check\n @return true if the address is whitelisted, false if not" + }, + "functionSelector": "3af32abf", + "id": 22701, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isWhitelisted", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 22692, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1044:8:65" + }, + "parameters": { + "id": 22691, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22690, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22701, + "src": "1014:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1014:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1013:18:65" + }, + "returnParameters": { + "id": 22695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22694, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22701, + "src": "1062:4:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 22693, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1062:4:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1061:6:65" + }, + "scope": 22808, + "src": "991:122:65", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22727, + "nodeType": "Block", + "src": "1349:191:65", + "statements": [ + { + "condition": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22712, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1364:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22714, + "indexExpression": { + "argumentTypes": null, + "id": 22713, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1374:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1364:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22716, + "nodeType": "IfStatement", + "src": "1360:93:65", + "trueBody": { + "expression": null, + "functionReturnParameters": 22711, + "id": 22715, + "nodeType": "Return", + "src": "1446:7:65" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 22721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22717, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "1465:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22719, + "indexExpression": { + "argumentTypes": null, + "id": 22718, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1475:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1465:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 22720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1487:4:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1465:26:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22722, + "nodeType": "ExpressionStatement", + "src": "1465:26:65" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22724, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1523:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22723, + "name": "AddressAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22682, + "src": "1507:15:65", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1507:25:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22726, + "nodeType": "EmitStatement", + "src": "1502:30:65" + } + ] + }, + "documentation": { + "id": 22702, + "nodeType": "StructuredDocumentation", + "src": "1121:112:65", + "text": " @dev adds a given address to the whitelist\n @param _address address to add" + }, + "functionSelector": "38eada1c", + "id": 22728, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22707, + "modifierName": { + "argumentTypes": null, + "id": 22706, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "1286:9:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1286:9:65" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 22709, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22704, + "src": "1318:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 22710, + "modifierName": { + "argumentTypes": null, + "id": 22708, + "name": "validAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22618, + "src": "1305:12:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1305:22:65" + } + ], + "name": "addAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22705, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22704, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22728, + "src": "1259:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1259:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1258:18:65" + }, + "returnParameters": { + "id": 22711, + "nodeType": "ParameterList", + "parameters": [], + "src": "1349:0:65" + }, + "scope": 22808, + "src": "1239:301:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22754, + "nodeType": "Block", + "src": "1732:118:65", + "statements": [ + { + "body": { + "id": 22752, + "nodeType": "Block", + "src": "1791:52:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22747, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22732, + "src": "1817:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22749, + "indexExpression": { + "argumentTypes": null, + "id": 22748, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1828:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1817:13:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22746, + "name": "addAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22728, + "src": "1806:10:65", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1806:25:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22751, + "nodeType": "ExpressionStatement", + "src": "1806:25:65" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22739, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1763:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22740, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22732, + "src": "1767:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1767:17:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1763:21:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22753, + "initializationExpression": { + "assignments": [ + 22736 + ], + "declarations": [ + { + "constant": false, + "id": 22736, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22753, + "src": "1748:9:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1748:7:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22738, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 22737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1760:1:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1748:13:65" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 22744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1786:3:65", + "subExpression": { + "argumentTypes": null, + "id": 22743, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22736, + "src": "1786:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22745, + "nodeType": "ExpressionStatement", + "src": "1786:3:65" + }, + "nodeType": "ForStatement", + "src": "1743:100:65" + } + ] + }, + "documentation": { + "id": 22729, + "nodeType": "StructuredDocumentation", + "src": "1548:120:65", + "text": " @dev adds a list of addresses to the whitelist\n @param _addresses addresses to add" + }, + "functionSelector": "3628731c", + "id": 22755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "addAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22732, + "mutability": "mutable", + "name": "_addresses", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22755, + "src": "1696:27:65", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 22730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1696:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22731, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1696:9:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1695:29:65" + }, + "returnParameters": { + "id": 22734, + "nodeType": "ParameterList", + "parameters": [], + "src": "1732:0:65" + }, + "scope": 22808, + "src": "1674:176:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22779, + "nodeType": "Block", + "src": "2042:193:65", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 22766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2057:20:65", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22763, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "2058:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22765, + "indexExpression": { + "argumentTypes": null, + "id": 22764, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2068:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2058:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 22768, + "nodeType": "IfStatement", + "src": "2053:95:65", + "trueBody": { + "expression": null, + "functionReturnParameters": 22762, + "id": 22767, + "nodeType": "Return", + "src": "2141:7:65" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 22773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22769, + "name": "whitelist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22677, + "src": "2160:9:65", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 22771, + "indexExpression": { + "argumentTypes": null, + "id": 22770, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2170:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2160:19:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 22772, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:5:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2160:27:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22774, + "nodeType": "ExpressionStatement", + "src": "2160:27:65" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 22776, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22758, + "src": "2218:8:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22775, + "name": "AddressRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22687, + "src": "2203:14:65", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2203:24:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22778, + "nodeType": "EmitStatement", + "src": "2198:29:65" + } + ] + }, + "documentation": { + "id": 22756, + "nodeType": "StructuredDocumentation", + "src": "1858:120:65", + "text": " @dev removes a given address from the whitelist\n @param _address address to remove" + }, + "functionSelector": "4ba79dfe", + "id": 22780, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 22761, + "modifierName": { + "argumentTypes": null, + "id": 22760, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "2025:9:65", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2025:9:65" + } + ], + "name": "removeAddress", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22758, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22780, + "src": "2007:16:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 22757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2007:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2006:18:65" + }, + "returnParameters": { + "id": 22762, + "nodeType": "ParameterList", + "parameters": [], + "src": "2042:0:65" + }, + "scope": 22808, + "src": "1984:251:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 22806, + "nodeType": "Block", + "src": "2438:121:65", + "statements": [ + { + "body": { + "id": 22804, + "nodeType": "Block", + "src": "2497:55:65", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 22799, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22784, + "src": "2526:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22801, + "indexExpression": { + "argumentTypes": null, + "id": 22800, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2537:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2526:13:65", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 22798, + "name": "removeAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22780, + "src": "2512:13:65", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 22802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2512:28:65", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22803, + "nodeType": "ExpressionStatement", + "src": "2512:28:65" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 22794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 22791, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2469:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 22792, + "name": "_addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22784, + "src": "2473:10:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 22793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2473:17:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2469:21:65", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 22805, + "initializationExpression": { + "assignments": [ + 22788 + ], + "declarations": [ + { + "constant": false, + "id": 22788, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22805, + "src": "2454:9:65", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 22787, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2454:7:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 22790, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 22789, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2466:1:65", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2454:13:65" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 22796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2492:3:65", + "subExpression": { + "argumentTypes": null, + "id": 22795, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22788, + "src": "2492:1:65", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 22797, + "nodeType": "ExpressionStatement", + "src": "2492:3:65" + }, + "nodeType": "ForStatement", + "src": "2449:103:65" + } + ] + }, + "documentation": { + "id": 22781, + "nodeType": "StructuredDocumentation", + "src": "2243:128:65", + "text": " @dev removes a list of addresses from the whitelist\n @param _addresses addresses to remove" + }, + "functionSelector": "a84eb999", + "id": 22807, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeAddresses", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 22785, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22784, + "mutability": "mutable", + "name": "_addresses", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 22807, + "src": "2402:27:65", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 22782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2402:7:65", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 22783, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2402:9:65", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2401:29:65" + }, + "returnParameters": { + "id": 22786, + "nodeType": "ParameterList", + "parameters": [], + "src": "2438:0:65" + }, + "scope": 22808, + "src": "2377:182:65", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 22809, + "src": "236:2326:65" + } + ], + "src": "52:2512:65" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.848Z", + "devdoc": { + "details": "The contract manages a list of whitelisted addresses", + "events": { + "AddressAddition(address)": { + "details": "triggered when an address is added to the whitelist", + "params": { + "_address": "address that's added from the whitelist" + } + }, + "AddressRemoval(address)": { + "details": "triggered when an address is removed from the whitelist", + "params": { + "_address": "address that's removed from the whitelist" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "addAddress(address)": { + "details": "adds a given address to the whitelist", + "params": { + "_address": "address to add" + } + }, + "addAddresses(address[])": { + "details": "adds a list of addresses to the whitelist", + "params": { + "_addresses": "addresses to add" + } + }, + "isWhitelisted(address)": { + "details": "returns true if a given address is whitelisted, false if not", + "params": { + "_address": "address to check" + }, + "returns": { + "_0": "true if the address is whitelisted, false if not" + } + }, + "removeAddress(address)": { + "details": "removes a given address from the whitelist", + "params": { + "_address": "address to remove" + } + }, + "removeAddresses(address[])": { + "details": "removes a list of addresses from the whitelist", + "params": { + "_addresses": "addresses to remove" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/testdata/bancor/XTransferRerouter.json b/apps/cic-eth/tests/testdata/bancor/XTransferRerouter.json new file mode 100644 index 00000000..7fb74551 --- /dev/null +++ b/apps/cic-eth/tests/testdata/bancor/XTransferRerouter.json @@ -0,0 +1,1948 @@ +{ + "contractName": "XTransferRerouter", + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "_reroutingEnabled", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_prevOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "OwnerUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_txId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_toBlockchain", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + } + ], + "name": "TxReroute", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reroutingEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_enable", + "type": "bool" + } + ], + "name": "enableRerouting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_txId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_blockchain", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_to", + "type": "bytes32" + } + ], + "name": "rerouteTx", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_reroutingEnabled\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_prevOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnerUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"}],\"name\":\"TxReroute\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_enable\",\"type\":\"bool\"}],\"name\":\"enableRerouting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_txId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_blockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"}],\"name\":\"rerouteTx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reroutingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"used by a new owner to accept an ownership transfer\"},\"constructor\":{\"details\":\"initializes a new XTransferRerouter instance\",\"params\":{\"_reroutingEnabled\":\"intializes transactions routing to enabled/disabled\"}},\"enableRerouting(bool)\":{\"details\":\"allows the owner to disable/enable rerouting\",\"params\":{\"_enable\":\"true to enable, false to disable\"}},\"rerouteTx(uint256,bytes32,bytes32)\":{\"details\":\"allows a user to reroute a transaction to a new blockchain/target address\",\"params\":{\"_blockchain\":\"the new blockchain name\",\"_to\":\"the new target address/account\",\"_txId\":\"the original transaction id\"}},\"transferOwnership(address)\":{\"details\":\"allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner\",\"params\":{\"_newOwner\":\"new contract owner\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol\":\"XTransferRerouter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol\":{\"keccak256\":\"0xe1015787e35567d8a83b948882f8aec6d9f9644686697ddc140bd1884dcc7e8d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8628d252dab643cede8df32cbf28a9ae677a6f391f209098ae3f56b310f5141c\",\"dweb:/ipfs/QmdvQaVbhe77mWpFdi8XgA8uTempNNuWatBPASg1PgyfpC\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol\":{\"keccak256\":\"0x6ef69d9dcc80a8a36d5eb37783375cd5e4831c6d20c723fa6f6b6a06c0aeb53d\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5a5d087e2c5b47739615ef22e1f29749de44b43c9a37cfae32b3dfc498a258c4\",\"dweb:/ipfs/Qmd1mXKEQbmBxqHk326LGVzNoayXsam8gZNecknnYpBnyh\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161045c38038061045c8339818101604052602081101561003357600080fd5b5051600080546001600160a01b0319163317905560018054911515600160a01b0260ff60a01b199092169190911790556103ea806100726000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063d4ee1d901161005b578063d4ee1d90146100cf578063e3db16f7146100d7578063edd63c3514610100578063f2fde38b1461011c5761007d565b806379ba5097146100825780638da5cb5b1461008c578063a3ebe71c146100b0575b600080fd5b61008a610142565b005b6100946101f9565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360208110156100c657600080fd5b50351515610208565b61009461022e565b61008a600480360360608110156100ed57600080fd5b508035906020810135906040013561023d565b610108610284565b604080519115158252519081900360200190f35b61008a6004803603602081101561013257600080fd5b50356001600160a01b0316610294565b6001546001600160a01b03163314610195576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b610210610312565b60018054911515600160a01b0260ff60a01b19909216919091179055565b6001546001600160a01b031681565b610245610367565b6040805183815260208101839052815185927fb5c80f971fb729e469ffa874c60425659ce82cb4adcfba9731af35ef87b6e619928290030190a2505050565b600154600160a01b900460ff1681565b61029c610312565b6000546001600160a01b03828116911614156102f0576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610365576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b600154600160a01b900460ff16610365576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fdfea2646970667358221220bafe2fbc8a50577c276042361df9106b17a0c85a7c9d3ed188a92800e53cd7cd64736f6c634300060c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063d4ee1d901161005b578063d4ee1d90146100cf578063e3db16f7146100d7578063edd63c3514610100578063f2fde38b1461011c5761007d565b806379ba5097146100825780638da5cb5b1461008c578063a3ebe71c146100b0575b600080fd5b61008a610142565b005b6100946101f9565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360208110156100c657600080fd5b50351515610208565b61009461022e565b61008a600480360360608110156100ed57600080fd5b508035906020810135906040013561023d565b610108610284565b604080519115158252519081900360200190f35b61008a6004803603602081101561013257600080fd5b50356001600160a01b0316610294565b6001546001600160a01b03163314610195576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b610210610312565b60018054911515600160a01b0260ff60a01b19909216919091179055565b6001546001600160a01b031681565b610245610367565b6040805183815260208101839052815185927fb5c80f971fb729e469ffa874c60425659ce82cb4adcfba9731af35ef87b6e619928290030190a2505050565b600154600160a01b900460ff1681565b61029c610312565b6000546001600160a01b03828116911614156102f0576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610365576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b600154600160a01b900460ff16610365576040805162461bcd60e51b815260206004820152600c60248201526b11549497d11254d05093115160a21b604482015290519081900360640190fdfea2646970667358221220bafe2fbc8a50577c276042361df9106b17a0c85a7c9d3ed188a92800e53cd7cd64736f6c634300060c0033", + "immutableReferences": {}, + "sourceMap": "111:1513:4:-:0;;;528:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;528:98:4;619:5:57;:18;;-1:-1:-1;;;;;;619:18:57;627:10;619:18;;;;582:36:4;;;;;-1:-1:-1;;;582:36:4;-1:-1:-1;;;;582:36:4;;;;;;;;;111:1513;;;;;;", + "deployedSourceMap": "111:1513:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1422:217:57;;;:::i;:::-;;219:29;;;:::i;:::-;;;;-1:-1:-1;;;;;219:29:57;;;;;;;;;;;;;;779:101:4;;;;;;;;;;;;;;;;-1:-1:-1;779:101:4;;;;:::i;255:23:57:-;;;:::i;1471:150:4:-;;;;;;;;;;;;;;;;-1:-1:-1;1471:150:4;;;;;;;;;;;;:::i;154:28::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;1164:167:57;;;;;;;;;;;;;;;;-1:-1:-1;1164:167:57;-1:-1:-1;;;;;1164:167:57;;:::i;1422:217::-;1498:8;;-1:-1:-1;;;;;1498:8:57;1484:10;:22;1476:52;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;-1:-1:-1;;;1476:52:57;;;;;;;;;;;;;;;1563:8;;;1556:5;;1544:28;;-1:-1:-1;;;;;1563:8:57;;;;1556:5;;;;1544:28;;;1591:8;;;;1583:16;;-1:-1:-1;;;;;;1583:16:57;;;-1:-1:-1;;;;;1591:8:57;;1583:16;;;;1610:21;;;1422:217::o;219:29::-;;;-1:-1:-1;;;;;219:29:57;;:::o;779:101:4:-;726:12:57;:10;:12::i;:::-;846:16:4::1;:26:::0;;;::::1;;-1:-1:-1::0;;;846:26:4::1;-1:-1:-1::0;;;;846:26:4;;::::1;::::0;;;::::1;::::0;;779:101::o;255:23:57:-;;;-1:-1:-1;;;;;255:23:57;;:::o;1471:150:4:-;978:19;:17;:19::i;:::-;1579:34:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;1589:5;;1579:34:::1;::::0;;;;;;::::1;1471:150:::0;;;:::o;154:28::-;;;-1:-1:-1;;;154:28:4;;;;;:::o;1164:167:57:-;726:12;:10;:12::i;:::-;1268:5:::1;::::0;-1:-1:-1;;;;;1255:18:57;;::::1;1268:5:::0;::::1;1255:18;;1247:45;;;::::0;;-1:-1:-1;;;1247:45:57;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1247:45:57;;;;;;;;;;;;;::::1;;1303:8;:20:::0;;-1:-1:-1;;;;;;1303:20:57::1;-1:-1:-1::0;;;;;1303:20:57;;;::::1;::::0;;;::::1;::::0;;1164:167::o;813:104::-;882:5;;-1:-1:-1;;;;;882:5:57;868:10;:19;860:49;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;-1:-1:-1;;;860:49:57;;;;;;;;;;;;;;;813:104::o;1072:103:4:-;1134:16;;-1:-1:-1;;;1134:16:4;;;;1126:41;;;;;-1:-1:-1;;;1126:41:4;;;;;;;;;;;;-1:-1:-1;;;1126:41:4;;;;;;;;;;;;;", + "source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\nimport \"../utility/Owned.sol\";\r\n\r\ncontract XTransferRerouter is Owned {\r\n bool public reroutingEnabled;\r\n\r\n // triggered when a rerouteTx is called\r\n event TxReroute(\r\n uint256 indexed _txId,\r\n bytes32 _toBlockchain,\r\n bytes32 _to\r\n );\r\n\r\n /**\r\n * @dev initializes a new XTransferRerouter instance\r\n *\r\n * @param _reroutingEnabled intializes transactions routing to enabled/disabled\r\n */\r\n constructor(bool _reroutingEnabled) public {\r\n reroutingEnabled = _reroutingEnabled;\r\n }\r\n /**\r\n * @dev allows the owner to disable/enable rerouting\r\n *\r\n * @param _enable true to enable, false to disable\r\n */\r\n function enableRerouting(bool _enable) public ownerOnly {\r\n reroutingEnabled = _enable;\r\n }\r\n\r\n // allows execution only when rerouting enabled\r\n modifier reroutingAllowed {\r\n _reroutingAllowed();\r\n _;\r\n }\r\n\r\n // error message binary size optimization\r\n function _reroutingAllowed() internal view {\r\n require(reroutingEnabled, \"ERR_DISABLED\");\r\n }\r\n\r\n /**\r\n * @dev allows a user to reroute a transaction to a new blockchain/target address\r\n *\r\n * @param _txId the original transaction id\r\n * @param _blockchain the new blockchain name\r\n * @param _to the new target address/account\r\n */\r\n function rerouteTx(uint256 _txId, bytes32 _blockchain, bytes32 _to) public reroutingAllowed {\r\n emit TxReroute(_txId, _blockchain, _to);\r\n }\r\n}\r\n", + "sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", + "ast": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", + "exportedSymbols": { + "XTransferRerouter": [ + 3522 + ] + }, + "id": 3523, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3449, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:4" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 3450, + "nodeType": "ImportDirective", + "scope": 3523, + "sourceUnit": 21819, + "src": "77:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3451, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "141:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 3452, + "nodeType": "InheritanceSpecifier", + "src": "141:5:4" + } + ], + "contractDependencies": [ + 21818, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3522, + "linearizedBaseContracts": [ + 3522, + 21818, + 22847 + ], + "name": "XTransferRerouter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "edd63c35", + "id": 3454, + "mutability": "mutable", + "name": "reroutingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3522, + "src": "154:28:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3453, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "154:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 3462, + "name": "TxReroute", + "nodeType": "EventDefinition", + "parameters": { + "id": 3461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3456, + "indexed": true, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "262:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3458, + "indexed": false, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "294:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3457, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "294:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3460, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "326:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3459, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "326:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "251:93:4" + }, + "src": "236:109:4" + }, + { + "body": { + "id": 3472, + "nodeType": "Block", + "src": "571:55:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3468, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "582:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3469, + "name": "_reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "601:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "582:36:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3471, + "nodeType": "ExpressionStatement", + "src": "582:36:4" + } + ] + }, + "documentation": { + "id": 3463, + "nodeType": "StructuredDocumentation", + "src": "353:169:4", + "text": " @dev initializes a new XTransferRerouter instance\n @param _reroutingEnabled intializes transactions routing to enabled/disabled" + }, + "id": 3473, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3465, + "mutability": "mutable", + "name": "_reroutingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3473, + "src": "540:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "540:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "539:24:4" + }, + "returnParameters": { + "id": 3467, + "nodeType": "ParameterList", + "parameters": [], + "src": "571:0:4" + }, + "scope": 3522, + "src": "528:98:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3485, + "nodeType": "Block", + "src": "835:45:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3481, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "846:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3482, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3476, + "src": "865:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "846:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3484, + "nodeType": "ExpressionStatement", + "src": "846:26:4" + } + ] + }, + "documentation": { + "id": 3474, + "nodeType": "StructuredDocumentation", + "src": "632:141:4", + "text": " @dev allows the owner to disable/enable rerouting\n @param _enable true to enable, false to disable" + }, + "functionSelector": "a3ebe71c", + "id": 3486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3479, + "modifierName": { + "argumentTypes": null, + "id": 3478, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "825:9:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "825:9:4" + } + ], + "name": "enableRerouting", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3476, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3486, + "src": "804:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3475, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "804:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "803:14:4" + }, + "returnParameters": { + "id": 3480, + "nodeType": "ParameterList", + "parameters": [], + "src": "835:0:4" + }, + "scope": 3522, + "src": "779:101:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3492, + "nodeType": "Block", + "src": "967:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3488, + "name": "_reroutingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3502, + "src": "978:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "978:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3490, + "nodeType": "ExpressionStatement", + "src": "978:19:4" + }, + { + "id": 3491, + "nodeType": "PlaceholderStatement", + "src": "1008:1:4" + } + ] + }, + "documentation": null, + "id": 3493, + "name": "reroutingAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 3487, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:4" + }, + "src": "941:76:4", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3501, + "nodeType": "Block", + "src": "1115:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3497, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "1134:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1152:14:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 3496, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1126:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1126:41:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3500, + "nodeType": "ExpressionStatement", + "src": "1126:41:4" + } + ] + }, + "documentation": null, + "id": 3502, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reroutingAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1098:2:4" + }, + "returnParameters": { + "id": 3495, + "nodeType": "ParameterList", + "parameters": [], + "src": "1115:0:4" + }, + "scope": 3522, + "src": "1072:103:4", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3520, + "nodeType": "Block", + "src": "1563:58:4", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3515, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "1589:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3516, + "name": "_blockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "1596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3517, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3509, + "src": "1609:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3514, + "name": "TxReroute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "1579:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,bytes32,bytes32)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1579:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3519, + "nodeType": "EmitStatement", + "src": "1574:39:4" + } + ] + }, + "documentation": { + "id": 3503, + "nodeType": "StructuredDocumentation", + "src": "1183:282:4", + "text": " @dev allows a user to reroute a transaction to a new blockchain/target address\n @param _txId the original transaction id\n @param _blockchain the new blockchain name\n @param _to the new target address/account" + }, + "functionSelector": "e3db16f7", + "id": 3521, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3512, + "modifierName": { + "argumentTypes": null, + "id": 3511, + "name": "reroutingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3493, + "src": "1546:16:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1546:16:4" + } + ], + "name": "rerouteTx", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3505, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1490:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1490:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3507, + "mutability": "mutable", + "name": "_blockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1505:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3506, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1505:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3509, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1526:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3508, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1526:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1489:49:4" + }, + "returnParameters": { + "id": 3513, + "nodeType": "ParameterList", + "parameters": [], + "src": "1563:0:4" + }, + "scope": 3522, + "src": "1471:150:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3523, + "src": "111:1513:4" + } + ], + "src": "52:1574:4" + }, + "legacyAST": { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/XTransferRerouter.sol", + "exportedSymbols": { + "XTransferRerouter": [ + 3522 + ] + }, + "id": 3523, + "license": "SEE LICENSE IN LICENSE", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3449, + "literals": [ + "solidity", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "52:23:4" + }, + { + "absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/Owned.sol", + "file": "../utility/Owned.sol", + "id": 3450, + "nodeType": "ImportDirective", + "scope": 3523, + "sourceUnit": 21819, + "src": "77:30:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 3451, + "name": "Owned", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 21818, + "src": "141:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Owned_$21818", + "typeString": "contract Owned" + } + }, + "id": 3452, + "nodeType": "InheritanceSpecifier", + "src": "141:5:4" + } + ], + "contractDependencies": [ + 21818, + 22847 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 3522, + "linearizedBaseContracts": [ + 3522, + 21818, + 22847 + ], + "name": "XTransferRerouter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "edd63c35", + "id": 3454, + "mutability": "mutable", + "name": "reroutingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3522, + "src": "154:28:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3453, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "154:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 3462, + "name": "TxReroute", + "nodeType": "EventDefinition", + "parameters": { + "id": 3461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3456, + "indexed": true, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "262:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3458, + "indexed": false, + "mutability": "mutable", + "name": "_toBlockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "294:21:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3457, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "294:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3460, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3462, + "src": "326:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3459, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "326:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "251:93:4" + }, + "src": "236:109:4" + }, + { + "body": { + "id": 3472, + "nodeType": "Block", + "src": "571:55:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3468, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "582:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3469, + "name": "_reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3465, + "src": "601:17:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "582:36:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3471, + "nodeType": "ExpressionStatement", + "src": "582:36:4" + } + ] + }, + "documentation": { + "id": 3463, + "nodeType": "StructuredDocumentation", + "src": "353:169:4", + "text": " @dev initializes a new XTransferRerouter instance\n @param _reroutingEnabled intializes transactions routing to enabled/disabled" + }, + "id": 3473, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3465, + "mutability": "mutable", + "name": "_reroutingEnabled", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3473, + "src": "540:22:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3464, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "540:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "539:24:4" + }, + "returnParameters": { + "id": 3467, + "nodeType": "ParameterList", + "parameters": [], + "src": "571:0:4" + }, + "scope": 3522, + "src": "528:98:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3485, + "nodeType": "Block", + "src": "835:45:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3481, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "846:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3482, + "name": "_enable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3476, + "src": "865:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "846:26:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3484, + "nodeType": "ExpressionStatement", + "src": "846:26:4" + } + ] + }, + "documentation": { + "id": 3474, + "nodeType": "StructuredDocumentation", + "src": "632:141:4", + "text": " @dev allows the owner to disable/enable rerouting\n @param _enable true to enable, false to disable" + }, + "functionSelector": "a3ebe71c", + "id": 3486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3479, + "modifierName": { + "argumentTypes": null, + "id": 3478, + "name": "ownerOnly", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21754, + "src": "825:9:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "825:9:4" + } + ], + "name": "enableRerouting", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3476, + "mutability": "mutable", + "name": "_enable", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3486, + "src": "804:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3475, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "804:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "803:14:4" + }, + "returnParameters": { + "id": 3480, + "nodeType": "ParameterList", + "parameters": [], + "src": "835:0:4" + }, + "scope": 3522, + "src": "779:101:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 3492, + "nodeType": "Block", + "src": "967:50:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3488, + "name": "_reroutingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3502, + "src": "978:17:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "978:19:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3490, + "nodeType": "ExpressionStatement", + "src": "978:19:4" + }, + { + "id": 3491, + "nodeType": "PlaceholderStatement", + "src": "1008:1:4" + } + ] + }, + "documentation": null, + "id": 3493, + "name": "reroutingAllowed", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 3487, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:4" + }, + "src": "941:76:4", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3501, + "nodeType": "Block", + "src": "1115:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3497, + "name": "reroutingEnabled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "1134:16:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4552525f44495341424c4544", + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1152:14:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + }, + "value": "ERR_DISABLED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9d3ff080c987bf451b6124b46a2d27535e787d6af81fbc565831013f54fd3a71", + "typeString": "literal_string \"ERR_DISABLED\"" + } + ], + "id": 3496, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1126:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1126:41:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3500, + "nodeType": "ExpressionStatement", + "src": "1126:41:4" + } + ] + }, + "documentation": null, + "id": 3502, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_reroutingAllowed", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1098:2:4" + }, + "returnParameters": { + "id": 3495, + "nodeType": "ParameterList", + "parameters": [], + "src": "1115:0:4" + }, + "scope": 3522, + "src": "1072:103:4", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3520, + "nodeType": "Block", + "src": "1563:58:4", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3515, + "name": "_txId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3505, + "src": "1589:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3516, + "name": "_blockchain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3507, + "src": "1596:11:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 3517, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3509, + "src": "1609:3:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 3514, + "name": "TxReroute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3462, + "src": "1579:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,bytes32,bytes32)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1579:34:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3519, + "nodeType": "EmitStatement", + "src": "1574:39:4" + } + ] + }, + "documentation": { + "id": 3503, + "nodeType": "StructuredDocumentation", + "src": "1183:282:4", + "text": " @dev allows a user to reroute a transaction to a new blockchain/target address\n @param _txId the original transaction id\n @param _blockchain the new blockchain name\n @param _to the new target address/account" + }, + "functionSelector": "e3db16f7", + "id": 3521, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 3512, + "modifierName": { + "argumentTypes": null, + "id": 3511, + "name": "reroutingAllowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3493, + "src": "1546:16:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1546:16:4" + } + ], + "name": "rerouteTx", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3505, + "mutability": "mutable", + "name": "_txId", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1490:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1490:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3507, + "mutability": "mutable", + "name": "_blockchain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1505:19:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3506, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1505:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3509, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3521, + "src": "1526:11:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3508, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1526:7:4", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1489:49:4" + }, + "returnParameters": { + "id": 3513, + "nodeType": "ParameterList", + "parameters": [], + "src": "1563:0:4" + }, + "scope": 3522, + "src": "1471:150:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 3523, + "src": "111:1513:4" + } + ], + "src": "52:1574:4" + }, + "compiler": { + "name": "solc", + "version": "0.6.12+commit.27d51765.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.2.3", + "updatedAt": "2020-10-20T08:24:47.669Z", + "devdoc": { + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "used by a new owner to accept an ownership transfer" + }, + "constructor": { + "details": "initializes a new XTransferRerouter instance", + "params": { + "_reroutingEnabled": "intializes transactions routing to enabled/disabled" + } + }, + "enableRerouting(bool)": { + "details": "allows the owner to disable/enable rerouting", + "params": { + "_enable": "true to enable, false to disable" + } + }, + "rerouteTx(uint256,bytes32,bytes32)": { + "details": "allows a user to reroute a transaction to a new blockchain/target address", + "params": { + "_blockchain": "the new blockchain name", + "_to": "the new target address/account", + "_txId": "the original transaction id" + } + }, + "transferOwnership(address)": { + "details": "allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner", + "params": { + "_newOwner": "new contract owner" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/apps/cic-eth/tests/unit/api/test_callback.py b/apps/cic-eth/tests/unit/api/test_callback.py new file mode 100644 index 00000000..617673e7 --- /dev/null +++ b/apps/cic-eth/tests/unit/api/test_callback.py @@ -0,0 +1,167 @@ +# standard imports +import socket +import celery +import threading +import logging +import time +import json + +# third-party imports +import pytest +import redis as redis_interface + +# local imports +from cic_eth.callbacks import http +from cic_eth.callbacks import tcp +from cic_eth.callbacks import redis + +celery_app = celery.current_app + +logg = celery_app.log.get_default_logger() + + +class Response: + + status = 200 + +@pytest.mark.skip() +def test_callback_http( + celery_session_worker, + mocker, + ): + + mocker.patch('cic_eth.callbacks.http.urlopen', return_value=Response()) + s = celery.signature( + 'cic_eth.callbacks.http.http', + [ + 'foo', + 'http://localhost:65000', + 1, + ], + ) + t = s.apply_async() + t.get() + + +@pytest.mark.skip() +def test_callback_tcp( + celery_session_worker, + ): + + timeout=2 + + data = { + 'foo': 'bar', + 'xyzzy': 42, + } + + class Accept(threading.Thread): + + def __init__(self, socket): + super(Accept, self).__init__() + self.socket = socket + self.exception = None + + def run(self): + (c, sockaddr) = self.socket.accept() + echo = c.recv(1024) + c.close() + logg.debug('recived {} '.format(data)) + o = json.loads(echo) + try: + assert o == data + except Exception as e: + self.exception = e + + def join(self): + threading.Thread.join(self) + if self.exception != None: + raise self.exception + + + s = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM) + s.bind(('localhost', 0)) + s.settimeout(timeout) + s.listen(1) + sockaddr = s.getsockname() + + a = Accept(s) + a.start() + + s_cb = celery.signature( + 'cic_eth.callbacks.tcp.tcp', + [ + data, + '{}:{}'.format(sockaddr[0], sockaddr[1]), + '1', + ], + queue=None, + ) + s_cb.apply_async() + a.join() + s.close() + + +def test_callback_redis( + load_config, + celery_session_worker, + ): + + timeout=2 + + channel = 'barbarbar' + host = load_config.get('REDIS_HOST', 'localhost') + port = load_config.get('REDIS_PORT', '6379') + db = load_config.get('REDIS_DB', '0') + + data = { + 'foo': 'bar', + 'xyzzy': 42, + } + + class Accept(threading.Thread): + + def __init__(self, pubsub): + super(Accept, self).__init__() + self.pubsub = pubsub + self.exception = None + + def run(self): + self.pubsub.get_message() # subscribe message + echo = self.pubsub.get_message(timeout=timeout) + o = json.loads(echo['data']) + logg.debug('recived {} '.format(o)) + try: + assert o == data + except Exception as e: + self.exception = e + + def join(self): + threading.Thread.join(self) + if self.exception != None: + raise self.exception + + ps = None + try: + r = redis_interface.Redis(host=host, port=int(port), db=int(db)) + ps = r.pubsub( + ) + ps.subscribe(channel) + except redis_interface.exceptions.ConnectionError as e: + pytest.skip('cannot connect to redis, skipping test: {}'.format(e)) + + a = Accept(ps) + a.start() + + s_cb = celery.signature( + 'cic_eth.callbacks.redis.redis', + [ + data, + '{}:{}:{}:{}'.format(host, port, db, channel), + '1', + ], + queue=None, + ) + s_cb.apply_async() + a.join() + r.close() diff --git a/apps/cic-eth/tests/unit/db/test_block_sync.py b/apps/cic-eth/tests/unit/db/test_block_sync.py new file mode 100644 index 00000000..87fdee4f --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_block_sync.py @@ -0,0 +1,29 @@ +# standard imports +import logging + +# local imports +from cic_eth.db.models.otx import OtxSync + +logg = logging.getLogger() + + +def test_db_block_sync( + init_database, + ): + + s = OtxSync('eip155:8995:bloxberg') + + s.head(666, 12) + assert s.head() == (666, 12) + + s.session(42, 13) + assert s.session() == (42, 13) + + s.backlog(13, 2) + assert s.backlog() == (13, 2) + + assert not s.synced + + s.backlog(42, 13) + assert s.backlog() == (42, 13) + assert s.synced diff --git a/apps/cic-eth/tests/unit/db/test_db_convert_transfer.py b/apps/cic-eth/tests/unit/db/test_db_convert_transfer.py new file mode 100644 index 00000000..15e766db --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_db_convert_transfer.py @@ -0,0 +1,29 @@ +import os +import logging + +import pytest + +from cic_eth.db import TxConvertTransfer +from cic_eth.db.error import UnknownConvertError + +logg = logging.getLogger() + + +def test_convert_transfer( + init_database, + default_chain_spec, + ): + + tx_hash_hex = '0x' + os.urandom(32).hex() + recipient = '0x' + os.urandom(20).hex() + txct = TxConvertTransfer(tx_hash_hex, recipient, str(default_chain_spec)) + init_database.add(txct) + init_database.commit() + + txct = TxConvertTransfer.get(tx_hash_hex) + + assert txct.convert_tx_hash == tx_hash_hex + + tx_hash_bogus_hex = '0x' + os.urandom(32).hex() + with pytest.raises(UnknownConvertError): + TxConvertTransfer.get(tx_hash_bogus_hex) diff --git a/apps/cic-eth/tests/unit/db/test_default.py b/apps/cic-eth/tests/unit/db/test_default.py new file mode 100644 index 00000000..23461ee1 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_default.py @@ -0,0 +1,5 @@ +def test_db_init( + init_database, + ): + pass + diff --git a/apps/cic-eth/tests/unit/db/test_lock.py b/apps/cic-eth/tests/unit/db/test_lock.py new file mode 100644 index 00000000..475a86e3 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_lock.py @@ -0,0 +1,67 @@ +# standard imports +import os + +# local imports +from cic_eth.db.models.lock import Lock +from cic_eth.db.enum import LockEnum + + +def test_lock( + init_database, + default_chain_spec, + ): + + chain_str = str(default_chain_spec) + + # Check matching flag for global (zero-address) lock + a = 0xffffffffffffffff & LockEnum.CREATE + r = Lock.set(chain_str, a) + assert r == a + assert Lock.check(chain_str, a) > 0 + + # Check matching flag for address specific lock + address = '0x' + os.urandom(20).hex() + b = 0xffffffffffffffff & (LockEnum.QUEUE | LockEnum.SEND) + Lock.set(chain_str, b, address=address) + assert Lock.check(chain_str, b, address=address) == b + assert Lock.check(chain_str, a, address=address) == 0 + assert Lock.check(chain_str, b & LockEnum.QUEUE, address=address) == LockEnum.QUEUE + assert Lock.check(chain_str, b) == 0 + + # Reset single flag + r = Lock.reset(chain_str, LockEnum.QUEUE, address=address) + assert r == LockEnum.SEND + + # Reset to 0 + r = Lock.reset(chain_str, LockEnum.SEND, address=address) + assert r == 0 + + # Row should be deleted when flags value reaches 0 + q = init_database.query(Lock) + q = q.filter(Lock.address==address) + assert q.first() == None + + + +def test_lock_merge_check( + init_database, + default_chain_spec, + ): + + chain_str = str(default_chain_spec) + + foo_address = '0x' + os.urandom(20).hex() + bar_address = '0x' + os.urandom(20).hex() + + Lock.set(chain_str, LockEnum.CREATE) + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=foo_address) > 0 + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=bar_address) > 0 + + + Lock.set(chain_str, LockEnum.CREATE, address=foo_address) + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=foo_address) > 0 + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=bar_address) > 0 + + Lock.reset(chain_str, LockEnum.CREATE) + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=foo_address) > 0 + assert Lock.check_aggregate(chain_str, LockEnum.CREATE, address=bar_address) == 0 diff --git a/apps/cic-eth/tests/unit/db/test_nonce_db.py b/apps/cic-eth/tests/unit/db/test_nonce_db.py new file mode 100644 index 00000000..7b8cdb61 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_nonce_db.py @@ -0,0 +1,20 @@ +# third-party imports +import pytest + +# local imports +from cic_eth.db.models.nonce import Nonce + +def test_nonce_increment( + init_database, + eth_empty_accounts, + database_engine, + ): + +# if database_engine[:6] == 'sqlite': +# pytest.skip('sqlite cannot lock tables which is required for this test, skipping') + + nonce = Nonce.next(eth_empty_accounts[0], 3) + assert nonce == 3 + + nonce = Nonce.next(eth_empty_accounts[0], 3) + assert nonce == 4 diff --git a/apps/cic-eth/tests/unit/db/test_otx.py b/apps/cic-eth/tests/unit/db/test_otx.py new file mode 100644 index 00000000..018c764a --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_otx.py @@ -0,0 +1,84 @@ +# standard imports +import os +import logging + +# third-party imports +import pytest + +# local imports +from cic_eth.db.models.base import SessionBase +from cic_eth.db.models.otx import OtxStateLog +from cic_eth.db.models.otx import Otx +from cic_eth.db.enum import StatusEnum + +logg = logging.getLogger() + + +@pytest.mark.skip() +def test_get( + init_w3, + init_database, + ): + + tx_def = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 0, + 'value': 101, + 'gasPrice': 2000000000, + 'gas': 21000, + 'data': '', + 'chainId': 1, + } + + session = init_database + txs = [] + for i in range(10): + nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending') + tx_def['nonce'] = nonce + tx = init_w3.eth.sign_transaction(tx_def) + tx_hash = init_w3.eth.send_raw_transaction(tx['raw']) + logg.debug('tx {}'.format(tx)) + + address = init_w3.eth.accounts[i%3] + otx = Otx(int((i/3)+1), address, '0x'+tx_hash.hex(), tx['raw']) + txs.append(otx) + session.add(otx) + session.flush() + + logg.debug(txs) + session.commit() + + txs[0].status = 0 + session.add(txs[0]) + session.commit() + session.close() + + get_txs = Otx.get() + logg.debug(get_txs) + + +def test_state_log( + init_database, + ): + + Otx.tracing = True + + address = '0x' + os.urandom(20).hex() + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + otx = Otx.add(0, address, tx_hash, signed_tx, session=init_database) + + otx.waitforgas(session=init_database) + otx.sent(session=init_database) + otx.success(1024, session=init_database) + + q = init_database.query(OtxStateLog) + q = q.filter(OtxStateLog.otx_id==otx.id) + q = q.order_by(OtxStateLog.date.asc()) + logs = q.all() + + assert logs[0].status == StatusEnum.PENDING + assert logs[1].status == StatusEnum.WAITFORGAS + assert logs[2].status == StatusEnum.SENT + assert logs[3].status == StatusEnum.SUCCESS diff --git a/apps/cic-eth/tests/unit/db/test_queue.py b/apps/cic-eth/tests/unit/db/test_queue.py new file mode 100644 index 00000000..aff4eee7 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_queue.py @@ -0,0 +1,55 @@ +# standard imports +import logging + +# third-party imports +import pytest + +# local imports +from cic_eth.db import Otx +from cic_eth.db.error import TxStateChangeError + +logg = logging.getLogger() + + +# Check that invalid transitions throw exceptions +# sent +def test_db_queue_states( + init_database, + ): + + session = init_database + + # these values are completely arbitary + tx_hash = '0xF182DFA3AD48723E7E222FE7B4C2C44C23CD4D7FF413E8999DFA15ECE53F' + address = '0x38C5559D6EDDDA1F705D3AB1A664CA1B397EB119' + signed_tx = '0xA5866A5383249AE843546BDA46235A1CA1614F538FB486140693C2EF1956FC53213F6AEF0F99F44D7103871AF3A12B126DCF9BFB7AF11143FAB3ECE2B452EE35D1320C4C7C6F999C8DF4EB09E729715B573F6672ED852547F552C4AE99D17DCD14C810' + o = Otx( + nonce=42, + address=address[2:], + tx_hash=tx_hash[2:], + signed_tx=signed_tx[2:], + ) + session.add(o) + session.commit() + + o.sent(session=session) + session.commit() + + # send after sent is ok + o.sent(session=session) + session.commit() + + o.sendfail(session=session) + session.commit() + + with pytest.raises(TxStateChangeError): + o.sendfail(session=session) + + o.sent(session=session) + session.commit() + + o.minefail(1234, session=session) + session.commit() + + with pytest.raises(TxStateChangeError): + o.sent(session=session) diff --git a/apps/cic-eth/tests/unit/db/test_role.py b/apps/cic-eth/tests/unit/db/test_role.py new file mode 100644 index 00000000..67db1041 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_role.py @@ -0,0 +1,29 @@ +# local imports +from cic_eth.db.models.role import AccountRole + +def test_db_role( + init_database, + eth_empty_accounts, + ): + + foo = AccountRole.set('foo', eth_empty_accounts[0]) + init_database.add(foo) + init_database.commit() + assert AccountRole.get_address('foo') == eth_empty_accounts[0] + + bar = AccountRole.set('bar', eth_empty_accounts[1]) + init_database.add(bar) + init_database.commit() + assert AccountRole.get_address('bar') == eth_empty_accounts[1] + + foo = AccountRole.set('foo', eth_empty_accounts[2]) + init_database.add(foo) + init_database.commit() + assert AccountRole.get_address('foo') == eth_empty_accounts[2] + assert AccountRole.get_address('bar') == eth_empty_accounts[1] + + tag = AccountRole.role_for(eth_empty_accounts[2]) + assert tag == 'foo' + + tag = AccountRole.role_for(eth_empty_accounts[3]) + assert tag == None diff --git a/apps/cic-eth/tests/unit/db/test_tx.py b/apps/cic-eth/tests/unit/db/test_tx.py new file mode 100644 index 00000000..fc7841a6 --- /dev/null +++ b/apps/cic-eth/tests/unit/db/test_tx.py @@ -0,0 +1,124 @@ +# standard imports +import os + +# third-party imports +import pytest +from cic_registry import zero_address + +# local imports +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.otx import Otx +from cic_eth.eth.task import sign_tx + + +def test_set( + init_w3, + init_database, + ): + + tx_def = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 0, + 'value': 500000000000000000000, + 'gasPrice': 2000000000, + 'gas': 21000, + 'data': '', + 'chainId': 1, + } + (tx_hash, tx_signed) = sign_tx(tx_def, 'Foo:1') + otx = Otx( + tx_def['nonce'], + tx_def['from'], + tx_hash, + tx_signed, + ) + + init_database.add(otx) + init_database.commit() + + bogus_from_token = '0x' + os.urandom(20).hex() + to_value = int(tx_def['value'] / 2) + + tx = TxCache( + tx_hash, + tx_def['from'], + tx_def['to'], + bogus_from_token, + zero_address, + tx_def['value'], + to_value, + 666, + 13, + ) + init_database.add(tx) + init_database.commit() + + tx_stored = init_database.query(TxCache).first() + assert (tx_stored.sender == tx_def['from']) + assert (tx_stored.recipient == tx_def['to']) + assert (tx_stored.source_token_address == bogus_from_token) + assert (tx_stored.destination_token_address == zero_address) + assert (tx_stored.from_value == '1b1ae4d6e2ef500000') + assert (tx_stored.to_value == '0d8d726b7177a80000') + assert (tx_stored.values() == (tx_def['value'], to_value)) + assert (tx_stored.block_number == 666) + assert (tx_stored.tx_index == 13) + + +def test_clone( + init_database, + init_w3, + ): + + txs = [] + for i in range(2): + tx_def = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 0, + 'value': 500000000000000000000, + 'gasPrice': 2000000000 + i, + 'gas': 21000, + 'data': '', + 'chainId': 1, + } + (tx_hash, tx_signed) = sign_tx(tx_def, 'Foo:1') + otx = Otx( + tx_def['nonce'], + tx_def['from'], + tx_hash, + tx_signed, + ) + init_database.add(otx) + tx_def['hash'] = tx_hash + txs.append(tx_def) + + init_database.commit() + + txc = TxCache( + txs[0]['hash'], + txs[0]['from'], + txs[0]['to'], + zero_address, + zero_address, + txs[0]['value'], + txs[0]['value'], + ) + init_database.add(txc) + init_database.commit() + + TxCache.clone(txs[0]['hash'], txs[1]['hash']) + + q = init_database.query(TxCache) + q = q.join(Otx) + q = q.filter(Otx.tx_hash==txs[1]['hash']) + txc_clone = q.first() + + assert txc_clone != None + assert txc_clone.sender == txc.sender + assert txc_clone.recipient == txc.recipient + assert txc_clone.source_token_address == txc.source_token_address + assert txc_clone.destination_token_address == txc.destination_token_address + assert txc_clone.from_value == txc.from_value + assert txc_clone.to_value == txc.to_value diff --git a/apps/cic-eth/tests/unit/eth/test_bancor.py b/apps/cic-eth/tests/unit/eth/test_bancor.py new file mode 100644 index 00000000..3425786c --- /dev/null +++ b/apps/cic-eth/tests/unit/eth/test_bancor.py @@ -0,0 +1,129 @@ +# standard imports +import logging + +# third-party imports +import pytest +from cic_registry import CICRegistry + +# local imports +from cic_eth.eth.bancor import BancorTxFactory, unpack_convert +from cic_eth.eth.bancor import resolve_converters_by_tokens +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.queue.tx import create as queue_create +from cic_eth.eth.bancor import otx_cache_convert +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache + +logg = logging.getLogger() + + +def test_resolve_converters_by_tokens( + cic_registry, + init_w3, + bancor_tokens, + bancor_registry, + default_chain_spec, + ): + + r = resolve_converters_by_tokens( + [ + { + 'address': bancor_tokens[0], + }, + { + 'address': bancor_tokens[1], + }, + ], + str(default_chain_spec), + ) + + logg.warning('this test should be hardened by verifying the converters') + for t in r: + assert t['converters'] != None + assert len(t['converters']) == 1 + + +def test_unpack_convert( + default_chain_spec, + cic_registry, + init_w3, + init_rpc, + bancor_tokens, + bancor_registry, + ): + + txf = BancorTxFactory(init_w3.eth.accounts[0], init_rpc) + + default_reserve = CICRegistry.get_contract(default_chain_spec, 'BNTToken') + + convert_tx = txf.convert( + bancor_tokens[0], + bancor_tokens[1], + default_reserve.address(), + 42, + 13, + default_chain_spec, + ) + + s = init_w3.eth.sign_transaction(convert_tx) + s_bytes = bytes.fromhex(s['raw'][2:]) + tx_dict = unpack_signed_raw_tx(s_bytes, default_chain_spec.chain_id()) + + convert_contract = CICRegistry.get_contract(default_chain_spec, 'BancorNetwork') + assert tx_dict['from'] == init_w3.eth.accounts[0] + assert tx_dict['to'] == convert_contract.address() + assert tx_dict['value'] == 0 + + convert_data = unpack_convert(tx_dict['data']) + + assert convert_data['amount'] == 42 + assert convert_data['min_return'] == 13 + assert convert_data['source_token'] == bancor_tokens[0] + assert convert_data['destination_token'] == bancor_tokens[1] + assert convert_data['fee_recipient'] == '0000000000000000000000000000000000000000000000000000000000000000' + assert convert_data['fee'] == 0 + + +def test_queue_cache_convert( + default_chain_spec, + init_w3, + init_rpc, + init_database, + cic_registry, + bancor_registry, + bancor_tokens, + ): + + txf = BancorTxFactory(init_w3.eth.accounts[0], init_rpc) + amount = 42 + min_return = 13 + default_reserve = CICRegistry.get_contract(default_chain_spec, 'BNTToken', 'ERC20') + transfer_tx = txf.convert( + bancor_tokens[0], + bancor_tokens[1], + default_reserve.address(), + amount, + min_return, + default_chain_spec, + ) + tx_signed = init_w3.eth.sign_transaction(transfer_tx) + tx_hash = init_w3.eth.sendRawTransaction(tx_signed['raw']) + tx_hash_hex = tx_hash.hex() + nonce = int(tx_signed['nonce'][2:], 16) + tx_hash_queue = queue_create(nonce, init_w3.eth.accounts[0], tx_hash_hex, tx_signed['raw'], str(default_chain_spec)) + tx_hash_cache = otx_cache_convert(tx_hash_hex, tx_signed['raw'], str(default_chain_spec)) + + assert tx_hash_hex == tx_hash_queue + assert tx_hash_hex == tx_hash_cache + + session = Otx.create_session() + otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.tx_hash == tx_hash_hex + + txc = session.query(TxCache).filter(TxCache.otx_id==otx.id).first() + + assert txc.sender == init_w3.eth.accounts[0] + assert txc.recipient == init_w3.eth.accounts[0] + assert txc.source_token_address == bancor_tokens[0] + assert txc.destination_token_address == bancor_tokens[1] + assert txc.values() == (amount, amount) diff --git a/apps/cic-eth/tests/unit/eth/test_nonce.py b/apps/cic-eth/tests/unit/eth/test_nonce.py new file mode 100644 index 00000000..36c44c39 --- /dev/null +++ b/apps/cic-eth/tests/unit/eth/test_nonce.py @@ -0,0 +1,51 @@ +# standard imports +import logging + +# local imports +from cic_eth.eth.nonce import NonceOracle + +logg = logging.getLogger() + + +def test_nonce_sequence( + eth_empty_accounts, + init_database, + init_rpc, + ): + + account= init_rpc.w3.eth.personal.new_account('') + no = NonceOracle(account, 0) + n = no.next() + assert n == 0 + + n = no.next() + assert n == 1 + + init_rpc.w3.eth.sendTransaction({ + 'from': init_rpc.w3.eth.accounts[0], + 'to': account, + 'value': 200000000, + }) + init_rpc.w3.eth.sendTransaction({ + 'from': account, + 'to': eth_empty_accounts[0], + 'value': 100, + }) + + c = init_rpc.w3.eth.getTransactionCount(account, 'pending') + logg.debug('nonce {}'.format(c)) + + account= init_rpc.w3.eth.personal.new_account('') + no = NonceOracle(account, c) + + n = no.next() + assert n == 1 + + n = no.next() + assert n == 2 + + # try with bogus value + no = NonceOracle(account, 4) + n = no.next() + assert n == 3 + diff --git a/apps/cic-eth/tests/unit/eth/test_raw.py b/apps/cic-eth/tests/unit/eth/test_raw.py new file mode 100644 index 00000000..dc2f24bf --- /dev/null +++ b/apps/cic-eth/tests/unit/eth/test_raw.py @@ -0,0 +1,24 @@ +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.eth.task import sign_tx + +def test_unpack( + init_rpc, + w3, + ): + + tx = { + 'from': w3.eth.accounts[1], + 'to': w3.eth.accounts[0], + 'nonce': 0, + 'value': 1024, + 'gas': 21000, + 'gasPrice': 200000000, + 'data': '0x', + 'chainId': 8995, + } + + (tx_hash, tx_raw) = sign_tx(tx, 'Foo:8995') + + tx_recovered = unpack_signed_raw_tx(bytes.fromhex(tx_raw[2:]), 8995) + + assert tx_hash == tx_recovered['hash'] diff --git a/apps/cic-eth/tests/unit/eth/test_token.py b/apps/cic-eth/tests/unit/eth/test_token.py new file mode 100644 index 00000000..6f8f509d --- /dev/null +++ b/apps/cic-eth/tests/unit/eth/test_token.py @@ -0,0 +1,88 @@ +# standard imports +import logging + +# third-party imports +import pytest +from cic_registry import CICRegistry + +# local imports +from cic_eth.eth.token import TokenTxFactory, unpack_transfer, otx_cache_transfer +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.queue.tx import create as queue_create +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.tx import TxCache + +logg = logging.getLogger() + + +def test_unpack_transfer( + default_chain_spec, + init_w3, + init_rpc, + cic_registry, + bancor_tokens, + bancor_registry, + ): + + source_token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + logg.debug('bancor tokens {} {}'.format(bancor_tokens, source_token)) + txf = TokenTxFactory(init_w3.eth.accounts[0], init_rpc) + transfer_tx = txf.transfer( + source_token.address(), + init_w3.eth.accounts[1], + 42, + default_chain_spec, + ) + s = init_w3.eth.sign_transaction(transfer_tx) + s_bytes = bytes.fromhex(s['raw'][2:]) + tx_dict = unpack_signed_raw_tx(s_bytes, default_chain_spec.chain_id()) + assert tx_dict['from'] == init_w3.eth.accounts[0] + assert tx_dict['to'] == bancor_tokens[0] + assert tx_dict['value'] == 0 + + transfer_data = unpack_transfer(tx_dict['data']) + + assert transfer_data['to'] == init_w3.eth.accounts[1] + assert transfer_data['amount'] == 42 + + +def test_queue_cache_transfer( + default_chain_spec, + init_w3, + init_rpc, + init_database, + cic_registry, + bancor_tokens, + bancor_registry, + ): + + source_token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0]) + txf = TokenTxFactory(init_w3.eth.accounts[0], init_rpc) + value = 42 + transfer_tx = txf.transfer( + source_token.address(), + init_w3.eth.accounts[1], + value, + default_chain_spec, + ) + tx_signed = init_w3.eth.sign_transaction(transfer_tx) + tx_hash = init_w3.eth.sendRawTransaction(tx_signed['raw']) + tx_hash_hex = tx_hash.hex() + nonce = int(tx_signed['nonce'][2:], 16) + tx_hash_queue = queue_create(nonce, init_w3.eth.accounts[0], tx_hash_hex, tx_signed['raw'], str(default_chain_spec)) + tx_hash_cache = otx_cache_transfer(tx_hash_hex, tx_signed['raw'], str(default_chain_spec)) + + assert tx_hash_hex == tx_hash_queue + assert tx_hash_hex == tx_hash_cache + + session = Otx.create_session() + otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first() + assert otx.tx_hash == tx_hash_hex + + txc = session.query(TxCache).filter(TxCache.otx_id==otx.id).first() + + assert txc.sender == init_w3.eth.accounts[0] + assert txc.recipient == init_w3.eth.accounts[1] + assert txc.source_token_address == bancor_tokens[0] + assert txc.destination_token_address == bancor_tokens[0] + assert txc.values() == (value, value) diff --git a/apps/cic-eth/tests/unit/queue/test_otx_state_log.py b/apps/cic-eth/tests/unit/queue/test_otx_state_log.py new file mode 100644 index 00000000..9c5194da --- /dev/null +++ b/apps/cic-eth/tests/unit/queue/test_otx_state_log.py @@ -0,0 +1,22 @@ +# standard imports +import os + +# local imports +from cic_eth.db.models.otx import Otx +from cic_eth.queue.tx import get_state_log + + +def test_otx_state_log( + init_database, + ): + + Otx.tracing = True + + address = '0x' + os.urandom(20).hex() + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + otx = Otx.add(0, address, tx_hash, signed_tx, session=init_database) + init_database.commit() + + log = get_state_log(tx_hash) + assert len(log) == 1 diff --git a/apps/cic-eth/tests/unit/queue/test_queue_lock.py b/apps/cic-eth/tests/unit/queue/test_queue_lock.py new file mode 100644 index 00000000..fe18fa16 --- /dev/null +++ b/apps/cic-eth/tests/unit/queue/test_queue_lock.py @@ -0,0 +1,65 @@ +# standard imports +import os + +# third-party imports +import pytest + +# local imports +from cic_eth.queue.tx import create as queue_create +from cic_eth.db.models.lock import Lock +from cic_eth.db.enum import LockEnum +from cic_eth.error import LockedError + + +def test_queue_lock( + init_database, + default_chain_spec, + ): + + chain_str = str(default_chain_spec) + + address = '0x' + os.urandom(20).hex() + tx_hash = '0x' + os.urandom(32).hex() + tx_raw = '0x' + os.urandom(128).hex() + + Lock.set(chain_str, LockEnum.QUEUE) + with pytest.raises(LockedError): + queue_create( + 0, + address, + tx_hash, + tx_raw, + chain_str + ) + + Lock.set(chain_str, LockEnum.QUEUE, address=address) + with pytest.raises(LockedError): + queue_create( + 0, + address, + tx_hash, + tx_raw, + chain_str + ) + + Lock.reset(chain_str, LockEnum.QUEUE) + with pytest.raises(LockedError): + queue_create( + 0, + address, + tx_hash, + tx_raw, + chain_str + ) + + Lock.set(chain_str, LockEnum.QUEUE, address=address, tx_hash=tx_hash) + with pytest.raises(LockedError): + queue_create( + 0, + address, + tx_hash, + tx_raw, + chain_str + ) + + diff --git a/apps/cic-eth/tests/unit/queue/test_tx_queue.py b/apps/cic-eth/tests/unit/queue/test_tx_queue.py new file mode 100644 index 00000000..0757602b --- /dev/null +++ b/apps/cic-eth/tests/unit/queue/test_tx_queue.py @@ -0,0 +1,500 @@ +# standard imports import logging +import datetime +import os +import logging + +# third-party imports +import pytest +from sqlalchemy import DateTime +from cic_registry import CICRegistry + +# local imports +from cic_eth.eth.rpc import RpcClient +from cic_eth.eth.tx import cache_gas_refill_data +from cic_eth.db.models.otx import Otx +from cic_eth.db.models.otx import OtxSync +from cic_eth.db.models.tx import TxCache +from cic_eth.db.models.lock import Lock +from cic_eth.db.models.base import SessionBase +from cic_eth.db.enum import StatusEnum +from cic_eth.db.enum import LockEnum +from cic_eth.queue.tx import create as queue_create +from cic_eth.queue.tx import set_final_status +from cic_eth.queue.tx import set_sent_status +from cic_eth.queue.tx import set_waitforgas +from cic_eth.queue.tx import set_ready +from cic_eth.queue.tx import get_paused_txs +from cic_eth.queue.tx import get_upcoming_tx +from cic_eth.queue.tx import get_account_tx +from cic_eth.queue.tx import get_tx +from cic_eth.eth.util import unpack_signed_raw_tx +from cic_eth.db.error import TxStateChangeError + +logg = logging.getLogger() + + +def test_finalize( + default_chain_spec, + init_w3, + init_database, + ): + + tx_hashes = [] + for i in range(1, 6): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 + int(i/5), + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 666, + 'data': '', + } + logg.debug('nonce {}'.format(tx['nonce'])) + tx_signed = init_w3.eth.sign_transaction(tx) + #tx_hash = RpcClient.w3.keccak(hexstr=tx_signed['raw']) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + + if i < 4: + set_sent_status(tx_hash.hex()) + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[0]).first() + assert otx.status == StatusEnum.OBSOLETED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[1]).first() + assert otx.status == StatusEnum.OBSOLETED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[2]).first() + assert otx.status == StatusEnum.OBSOLETED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[3]).first() + assert otx.status == StatusEnum.PENDING + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[4]).first() + assert otx.status == StatusEnum.PENDING + + set_sent_status(tx_hashes[3], False) + set_sent_status(tx_hashes[4], False) + set_final_status(tx_hashes[3], 1024) + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[0]).first() + assert otx.status == StatusEnum.CANCELLED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[1]).first() + assert otx.status == StatusEnum.CANCELLED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[2]).first() + assert otx.status == StatusEnum.CANCELLED + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[3]).first() + assert otx.status == StatusEnum.SUCCESS + + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hashes[4]).first() + assert otx.status == StatusEnum.SENT + + +def test_expired( + default_chain_spec, + init_database, + init_w3, + ): + + tx_hashes = [] + for i in range(1, 6): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 + int(i/2), + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 666, + 'data': '0x', + } + tx_signed = init_w3.eth.sign_transaction(tx) + #tx_hash = RpcClient.w3.keccak(hexstr=tx_signed['raw']) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + set_sent_status(tx_hash.hex(), False) + otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash.hex()).first() + fake_created = datetime.datetime.utcnow() - datetime.timedelta(seconds=40*i) + otx.date_created = fake_created + init_database.add(otx) + init_database.commit() + init_database.refresh(otx) + + now = datetime.datetime.utcnow() + delta = datetime.timedelta(seconds=61) + then = now - delta + + otxs = OtxSync.get_expired(then) + nonce_acc = 0 + for otx in otxs: + nonce_acc += otx.nonce + + assert nonce_acc == (43 + 44) + + +def test_get_paused( + init_w3, + init_database, + cic_registry, + default_chain_spec, + ): + + tx_hashes = [] + for i in range(1, 3): + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 + int(i), + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 8995, + 'data': '0x', + } + logg.debug('nonce {}'.format(tx['nonce'])) + tx_signed = init_w3.eth.sign_transaction(tx) + #tx_hash = RpcClient.w3.keccak(hexstr=tx_signed['raw']) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1]) + txs = get_paused_txs(sender=init_w3.eth.accounts[0]) + assert len(txs.keys()) == 0 + + q = init_database.query(Otx) + q = q.filter(Otx.tx_hash==tx_hashes[0]) + r = q.first() + r.waitforgas(session=init_database) + init_database.add(r) + init_database.commit() + + chain_id = default_chain_spec.chain_id() + txs = get_paused_txs(chain_id=chain_id) + assert len(txs.keys()) == 1 + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1]) + txs = get_paused_txs(sender=init_w3.eth.accounts[0], chain_id=chain_id) + assert len(txs.keys()) == 1 + + txs = get_paused_txs(status=StatusEnum.WAITFORGAS) + assert len(txs.keys()) == 1 + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1], status=StatusEnum.WAITFORGAS) + txs = get_paused_txs(sender=init_w3.eth.accounts[0], status=StatusEnum.WAITFORGAS, chain_id=chain_id) + assert len(txs.keys()) == 1 + + + q = init_database.query(Otx) + q = q.filter(Otx.tx_hash==tx_hashes[1]) + o = q.first() + o.waitforgas(session=init_database) + init_database.add(o) + init_database.commit() + + txs = get_paused_txs() + assert len(txs.keys()) == 2 + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1]) + txs = get_paused_txs(sender=init_w3.eth.accounts[0], chain_id=chain_id) + assert len(txs.keys()) == 2 + + txs = get_paused_txs(status=StatusEnum.WAITFORGAS, chain_id=chain_id) + assert len(txs.keys()) == 2 + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1], status=StatusEnum.WAITFORGAS) + txs = get_paused_txs(sender=init_w3.eth.accounts[0], status=StatusEnum.WAITFORGAS, chain_id=chain_id) + assert len(txs.keys()) == 2 + + + q = init_database.query(Otx) + q = q.filter(Otx.tx_hash==tx_hashes[1]) + o = q.first() + o.sendfail(session=init_database) + init_database.add(o) + init_database.commit() + + txs = get_paused_txs() + assert len(txs.keys()) == 2 + + txs = get_paused_txs(sender=init_w3.eth.accounts[0], chain_id=chain_id) + assert len(txs.keys()) == 2 + + txs = get_paused_txs(status=StatusEnum.WAITFORGAS, chain_id=chain_id) + assert len(txs.keys()) == 1 + + #txs = get_paused_txs(recipient=init_w3.eth.accounts[1], status=StatusEnum.WAITFORGAS) + txs = get_paused_txs(sender=init_w3.eth.accounts[0], status=StatusEnum.WAITFORGAS, chain_id=chain_id) + assert len(txs.keys()) == 1 + + +def test_get_upcoming( + default_chain_spec, + init_w3, + init_database, + cic_registry, + ): + + tx_hashes = [] + for i in range(0, 7): + tx = { + 'from': init_w3.eth.accounts[i % 3], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 + int(i / 3), + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 8995, + 'data': '0x', + } + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + logg.debug('{} nonce {} {}'.format(i, tx['nonce'], tx_hash.hex())) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + + chain_id = int(default_chain_spec.chain_id()) + + txs = get_upcoming_tx(StatusEnum.PENDING, chain_id=chain_id) + assert len(txs.keys()) == 3 + + tx = unpack_signed_raw_tx(bytes.fromhex(txs[tx_hashes[0]][2:]), chain_id) + assert tx['nonce'] == 42 + + tx = unpack_signed_raw_tx(bytes.fromhex(txs[tx_hashes[1]][2:]), chain_id) + assert tx['nonce'] == 42 + + tx = unpack_signed_raw_tx(bytes.fromhex(txs[tx_hashes[2]][2:]), chain_id) + assert tx['nonce'] == 42 + + q = init_database.query(TxCache) + q = q.filter(TxCache.sender==init_w3.eth.accounts[0]) + for o in q.all(): + o.date_checked -= datetime.timedelta(seconds=30) + init_database.add(o) + init_database.commit() + + before = datetime.datetime.now() - datetime.timedelta(seconds=20) + logg.debug('before {}'.format(before)) + txs = get_upcoming_tx(StatusEnum.PENDING, before=before) + logg.debug('txs {} {}'.format(txs.keys(), txs.values())) + assert len(txs.keys()) == 1 + + # Now date checked has been set to current time, and the check returns no results + txs = get_upcoming_tx(StatusEnum.PENDING, before=before) + logg.debug('txs {} {}'.format(txs.keys(), txs.values())) + assert len(txs.keys()) == 0 + + set_sent_status(tx_hashes[0]) + + txs = get_upcoming_tx(StatusEnum.PENDING) + assert len(txs.keys()) == 3 + with pytest.raises(KeyError): + tx = txs[tx_hashes[0]] + + tx = unpack_signed_raw_tx(bytes.fromhex(txs[tx_hashes[3]][2:]), chain_id) + assert tx['nonce'] == 43 + + set_waitforgas(tx_hashes[1]) + txs = get_upcoming_tx(StatusEnum.PENDING) + assert len(txs.keys()) == 3 + with pytest.raises(KeyError): + tx = txs[tx_hashes[1]] + + tx = unpack_signed_raw_tx(bytes.fromhex(txs[tx_hashes[3]][2:]), chain_id) + assert tx['nonce'] == 43 + + + txs = get_upcoming_tx(StatusEnum.WAITFORGAS) + assert len(txs.keys()) == 1 + + +def test_upcoming_with_lock( + default_chain_spec, + init_database, + init_w3, + ): + + chain_id = int(default_chain_spec.chain_id()) + chain_str = str(default_chain_spec) + + tx = { + 'from': init_w3.eth.accounts[0], + 'to': init_w3.eth.accounts[1], + 'nonce': 42, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': 8995, + 'data': '0x', + } + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + logg.debug('nonce {} {}'.format(tx['nonce'], tx_hash.hex())) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + + txs = get_upcoming_tx(StatusEnum.PENDING, chain_id=chain_id) + assert len(txs.keys()) == 1 + + Lock.set(chain_str, LockEnum.SEND, address=init_w3.eth.accounts[0]) + + txs = get_upcoming_tx(StatusEnum.PENDING, chain_id=chain_id) + assert len(txs.keys()) == 0 + + tx = { + 'from': init_w3.eth.accounts[1], + 'to': init_w3.eth.accounts[0], + 'nonce': 42, + 'gas': 21000, + 'gasPrice': 1000000, + 'value': 128, + 'chainId': 8995, + 'data': '0x', + } + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + logg.debug('nonce {} {}'.format(tx['nonce'], tx_hash.hex())) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + + txs = get_upcoming_tx(StatusEnum.PENDING, chain_id=chain_id) + assert len(txs.keys()) == 1 + + +def test_obsoletion( + default_chain_spec, + init_w3, + init_database, + ): + + tx_hashes = [] + for i in range(0, 4): + tx = { + 'from': init_w3.eth.accounts[int(i/2)], + 'to': init_w3.eth.accounts[1], + 'nonce': 42 + int(i/3), + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 8995, + 'data': '0x', + } + + logg.debug('nonce {}'.format(tx['nonce'])) + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + + if i < 2: + set_sent_status(tx_hash.hex()) + + session = SessionBase.create_session() + q = session.query(Otx) + q = q.filter(Otx.status==StatusEnum.OBSOLETED) + z = 0 + for o in q.all(): + z += o.nonce + + session.close() + assert z == 42 + + set_final_status(tx_hashes[1], 362436, True) + + session = SessionBase.create_session() + q = session.query(Otx) + q = q.filter(Otx.status==StatusEnum.OBSOLETED) + zo = 0 + for o in q.all(): + zo += o.nonce + + q = session.query(Otx) + q = q.filter(Otx.status==StatusEnum.CANCELLED) + zc = 0 + for o in q.all(): + zc += o.nonce + + session.close() + assert zo == 0 + assert zc == 42 + + +def test_retry( + init_database, + ): + + address = '0x' + os.urandom(20).hex() + tx_hash = '0x' + os.urandom(32).hex() + signed_tx = '0x' + os.urandom(128).hex() + otx = Otx(0, address, tx_hash, signed_tx) + init_database.add(otx) + init_database.commit() + + set_sent_status(tx_hash, True) + set_ready(tx_hash) + + q = init_database.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + otx = q.first() + + assert otx.status == StatusEnum.RETRY + + set_sent_status(tx_hash, False) + set_ready(tx_hash) + + q = init_database.query(Otx) + q = q.filter(Otx.tx_hash==tx_hash) + otx = q.first() + + assert otx.status == StatusEnum.RETRY + + +def test_get_account_tx( + default_chain_spec, + init_database, + init_w3, + ): + + tx_hashes = [] + + for i in range(0, 4): + + tx = { + 'from': init_w3.eth.accounts[int(i/3)], + 'to': init_w3.eth.accounts[3-i], + 'nonce': 42 + i, + 'gas': 21000, + 'gasPrice': 1000000*i, + 'value': 128, + 'chainId': 666, + 'data': '', + } + logg.debug('nonce {}'.format(tx['nonce'])) + tx_signed = init_w3.eth.sign_transaction(tx) + tx_hash = init_w3.keccak(hexstr=tx_signed['raw']) + queue_create(tx['nonce'], tx['from'], tx_hash.hex(), tx_signed['raw'], str(default_chain_spec)) + cache_gas_refill_data(tx_hash.hex(), tx) + tx_hashes.append(tx_hash.hex()) + + txs = get_account_tx(init_w3.eth.accounts[0]) + logg.debug('tx {} tx {}'.format(list(txs.keys()), tx_hashes)) + assert list(txs.keys()) == tx_hashes + + txs = get_account_tx(init_w3.eth.accounts[0], as_recipient=False) + assert list(txs.keys()) == tx_hashes[:3] + + txs = get_account_tx(init_w3.eth.accounts[0], as_sender=False) + assert list(txs.keys()) == tx_hashes[3:] diff --git a/apps/cic-eth/tests/unit/sync/test_head.py b/apps/cic-eth/tests/unit/sync/test_head.py new file mode 100644 index 00000000..bf5aaf7d --- /dev/null +++ b/apps/cic-eth/tests/unit/sync/test_head.py @@ -0,0 +1,43 @@ +# standard imports +import logging + +# local imports +from cic_eth.sync.head import HeadSyncer +from cic_eth.sync.backend import SyncerBackend + +logg = logging.getLogger() + + +def test_head( + init_rpc, + init_database, + init_eth_tester, + mocker, + eth_empty_accounts, + ): + + #backend = SyncBackend(eth_empty_accounts[0], 'foo') + block_number = init_rpc.w3.eth.blockNumber + backend = SyncerBackend.live('foo:666', block_number) + syncer = HeadSyncer(backend) + + #init_eth_tester.mine_block() + nonce = init_rpc.w3.eth.getTransactionCount(init_rpc.w3.eth.accounts[0], 'pending') + logg.debug('nonce {}'.format(nonce)) + tx = { + 'from': init_rpc.w3.eth.accounts[0], + 'to': eth_empty_accounts[0], + 'value': 404, + 'gas': 21000, + 'gasPrice': init_rpc.w3.eth.gasPrice, + 'nonce': nonce, + } + tx_hash_one = init_rpc.w3.eth.sendTransaction(tx) + + block_number = init_rpc.w3.eth.blockNumber + backend.set(block_number, 0) + b = syncer.get(init_rpc.w3) + + tx = init_rpc.w3.eth.getTransactionByBlock(b[0], 0) + + assert tx.hash.hex() == tx_hash_one.hex() diff --git a/apps/cic-eth/tests/unit/sync/test_history.py b/apps/cic-eth/tests/unit/sync/test_history.py new file mode 100644 index 00000000..764a7308 --- /dev/null +++ b/apps/cic-eth/tests/unit/sync/test_history.py @@ -0,0 +1,194 @@ +# standard imports +import logging + +# third-party imports +import pytest +from web3.exceptions import BlockNotFound +from cic_registry import CICRegistry + +# local imports +from cic_eth.sync.history import HistorySyncer +from cic_eth.sync.head import HeadSyncer +#from cic_eth.sync import Syncer +from cic_eth.db.models.otx import OtxSync +from cic_eth.db.models.base import SessionBase +from cic_eth.sync.backend import SyncerBackend + +logg = logging.getLogger() + +class FinishedError(Exception): + pass + + +class DebugFilter: + + def __init__(self, address): + self.txs = [] + self.monitor_to_address = address + + def filter(self, w3, tx, rcpt, chain_spec): + logg.debug('sync filter {}'.format(tx['hash'].hex())) + if tx['to'] == self.monitor_to_address: + self.txs.append(tx) + # hack workaround, latest block hash not found in eth_tester for some reason + if len(self.txs) == 2: + raise FinishedError('intentionally finished on tx {}'.format(tx)) + + +def test_history( + init_rpc, + init_database, + init_eth_tester, + #celery_session_worker, + eth_empty_accounts, + ): + + nonce = init_rpc.w3.eth.getTransactionCount(init_rpc.w3.eth.accounts[0], 'pending') + logg.debug('nonce {}'.format(nonce)) + tx = { + 'from': init_rpc.w3.eth.accounts[0], + 'to': eth_empty_accounts[0], + 'value': 404, + 'gas': 21000, + 'gasPrice': init_rpc.w3.eth.gasPrice, + 'nonce': nonce, + } + tx_hash_one = init_rpc.w3.eth.sendTransaction(tx) + + nonce = init_rpc.w3.eth.getTransactionCount(init_rpc.w3.eth.accounts[0], 'pending') + logg.debug('nonce {}'.format(nonce)) + tx = { + 'from': init_rpc.w3.eth.accounts[1], + 'to': eth_empty_accounts[0], + 'value': 404, + 'gas': 21000, + 'gasPrice': init_rpc.w3.eth.gasPrice, + 'nonce': nonce, + } + tx_hash_two = init_rpc.w3.eth.sendTransaction(tx) + init_eth_tester.mine_block() + + block_number = init_rpc.w3.eth.blockNumber + + live_syncer = SyncerBackend.live('foo:666', 0) + HeadSyncer(live_syncer) + + history_syncers = SyncerBackend.resume('foo:666', block_number) + + for history_syncer in history_syncers: + logg.info('history syncer start {} target {}'.format(history_syncer.start(), history_syncer.target())) + + backend = history_syncers[0] + + syncer = HistorySyncer(backend) + fltr = DebugFilter(eth_empty_accounts[0]) + syncer.filter.append(fltr.filter) + + logg.debug('have txs {} {}'.format(tx_hash_one.hex(), tx_hash_two.hex())) + + try: + syncer.loop(0.1) + except FinishedError: + pass + except BlockNotFound as e: + logg.error('the last block given in loop does not seem to exist :/ {}'.format(e)) + + check_hashes = [] + for h in fltr.txs: + check_hashes.append(h['hash'].hex()) + assert tx_hash_one.hex() in check_hashes + assert tx_hash_two.hex() in check_hashes + + +def test_history_multiple( + init_rpc, + init_database, + init_eth_tester, + #celery_session_worker, + eth_empty_accounts, + ): + + block_number = init_rpc.w3.eth.blockNumber + live_syncer = SyncerBackend.live('foo:666', block_number) + HeadSyncer(live_syncer) + + nonce = init_rpc.w3.eth.getTransactionCount(init_rpc.w3.eth.accounts[0], 'pending') + logg.debug('nonce {}'.format(nonce)) + tx = { + 'from': init_rpc.w3.eth.accounts[0], + 'to': eth_empty_accounts[0], + 'value': 404, + 'gas': 21000, + 'gasPrice': init_rpc.w3.eth.gasPrice, + 'nonce': nonce, + } + tx_hash_one = init_rpc.w3.eth.sendTransaction(tx) + + + init_eth_tester.mine_block() + block_number = init_rpc.w3.eth.blockNumber + history_syncers = SyncerBackend.resume('foo:666', block_number) + for history_syncer in history_syncers: + logg.info('halfway history syncer start {} target {}'.format(history_syncer.start(), history_syncer.target())) + live_syncer = SyncerBackend.live('foo:666', block_number) + HeadSyncer(live_syncer) + + nonce = init_rpc.w3.eth.getTransactionCount(init_rpc.w3.eth.accounts[0], 'pending') + logg.debug('nonce {}'.format(nonce)) + tx = { + 'from': init_rpc.w3.eth.accounts[1], + 'to': eth_empty_accounts[0], + 'value': 404, + 'gas': 21000, + 'gasPrice': init_rpc.w3.eth.gasPrice, + 'nonce': nonce, + } + tx_hash_two = init_rpc.w3.eth.sendTransaction(tx) + + init_eth_tester.mine_block() + block_number = init_rpc.w3.eth.blockNumber + history_syncers = SyncerBackend.resume('foo:666', block_number) + live_syncer = SyncerBackend.live('foo:666', block_number) + HeadSyncer(live_syncer) + + for history_syncer in history_syncers: + logg.info('history syncer start {} target {}'.format(history_syncer.start(), history_syncer.target())) + + assert len(history_syncers) == 2 + + backend = history_syncers[0] + syncer = HistorySyncer(backend) + fltr = DebugFilter(eth_empty_accounts[0]) + syncer.filter.append(fltr.filter) + try: + syncer.loop(0.1) + except FinishedError: + pass + except BlockNotFound as e: + logg.error('the last block given in loop does not seem to exist :/ {}'.format(e)) + + check_hashes = [] + for h in fltr.txs: + check_hashes.append(h['hash'].hex()) + assert tx_hash_one.hex() in check_hashes + + + backend = history_syncers[1] + syncer = HistorySyncer(backend) + fltr = DebugFilter(eth_empty_accounts[0]) + syncer.filter.append(fltr.filter) + try: + syncer.loop(0.1) + except FinishedError: + pass + except BlockNotFound as e: + logg.error('the last block given in loop does not seem to exist :/ {}'.format(e)) + + check_hashes = [] + for h in fltr.txs: + check_hashes.append(h['hash'].hex()) + assert tx_hash_two.hex() in check_hashes + + history_syncers = SyncerBackend.resume('foo:666', block_number) + + assert len(history_syncers) == 0 diff --git a/apps/cic-eth/tests/unit/sync/test_syncer_scratch.py b/apps/cic-eth/tests/unit/sync/test_syncer_scratch.py new file mode 100644 index 00000000..2188fa83 --- /dev/null +++ b/apps/cic-eth/tests/unit/sync/test_syncer_scratch.py @@ -0,0 +1,79 @@ +# third-party imports +import pytest + +# local imports +from cic_eth.db.models.sync import BlockchainSync +from cic_eth.sync.backend import SyncerBackend + + +def test_scratch( + init_database, + ): + + with pytest.raises(ValueError): + s = SyncerBackend('Testchain:666', 13) + + syncer = SyncerBackend.live('Testchain:666', 13) + + s = SyncerBackend('Testchain:666', syncer.object_id) + + + +def test_live( + init_database, + ): + + s = SyncerBackend.live('Testchain:666', 13) + + s.connect() + assert s.db_object.target() == None + s.disconnect() + + assert s.get() == (13, 0) + + s.set(14, 1) + assert s.get() == (14, 1) + + +def test_resume( + init_database, + ): + + live = SyncerBackend.live('Testchain:666', 13) + live.set(13, 2) + + resumes = SyncerBackend.resume('Testchain:666', 26) + + assert len(resumes) == 1 + resume = resumes[0] + + assert resume.get() == (13, 2) + + resume.set(13, 4) + assert resume.get() == (13, 4) + assert resume.start() == (13, 2) + assert resume.target() == 26 + + +def test_unsynced( + init_database, + ): + + live = SyncerBackend.live('Testchain:666', 13) + live.set(13, 2) + + resumes = SyncerBackend.resume('Testchain:666', 26) + live = SyncerBackend.live('Testchain:666', 26) + resumes[0].set(18, 12) + + resumes = SyncerBackend.resume('Testchain:666', 42) + + assert len(resumes) == 2 + + assert resumes[0].start() == (13, 2) + assert resumes[0].get() == (18, 12) + assert resumes[0].target() == 26 + + assert resumes[1].start() == (26, 0) + assert resumes[1].get() == (26, 0) + assert resumes[1].target() == 42 diff --git a/apps/cic-eth/tests/unit/util/test_num.py b/apps/cic-eth/tests/unit/util/test_num.py new file mode 100644 index 00000000..ea3c24a1 --- /dev/null +++ b/apps/cic-eth/tests/unit/util/test_num.py @@ -0,0 +1,19 @@ +# third-party imports +import pytest + +# local imports +from cic_eth.db.util import num_serialize + + +@pytest.mark.parametrize( + 'n,b', + [ + (0, b'\x00'), + (1, b'\x01'), + (255, b'\xff'), + (256, b'\x01\x00'), + (18446744073709551616, b'\x01\x00\x00\x00\x00\x00\x00\x00\x00'), + ], + ) +def test_num_serialize(n, b): + assert(num_serialize(n) == b) diff --git a/apps/cic-eth/tests/unit/util/test_unpack.py b/apps/cic-eth/tests/unit/util/test_unpack.py new file mode 100644 index 00000000..9ad9adaa --- /dev/null +++ b/apps/cic-eth/tests/unit/util/test_unpack.py @@ -0,0 +1,30 @@ +from cic_eth.eth.task import sign_tx +from cic_eth.eth.util import tx_hex_string +from cic_eth.eth.util import unpack_signed_raw_tx_hex + +def test_unpack( + init_w3_conn, + ): + + tx = { + 'nonce': 42, + 'from': init_w3_conn.eth.accounts[0], + 'to': init_w3_conn.eth.accounts[1], + 'data': '0xdeadbeef', + 'value': 1024, + 'gas': 23000, + 'gasPrice': 1422521, + 'chainId': 1337, + } + + (tx_hash, tx_signed) = sign_tx(tx, 'Foo:1337') + + tx_unpacked = unpack_signed_raw_tx_hex(tx_signed, 1337) + + for k in tx.keys(): + assert tx[k] == tx_unpacked[k] + + tx_str = tx_hex_string(tx_signed, 1337) + assert tx_str == 'tx nonce 42 from 0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf to 0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF hash 0xe5aba32b1a7255d035faccb70cd8bb92c8c4a2f6bbea3f655bc5a8b802bbaa91' + +